:root {
    --bg-color: #050505;
    --bg-darker: #000000;
    --surface: rgba(20, 20, 20, 0.7);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    
    --primary: #625fff;
    --secondary: #00e1ff;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .brand {
    font-family: 'Outfit', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-darker { background-color: var(--bg-darker); }
.section { padding: 120px 0; }

/* --- TLAČÍTKA --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 30px rgba(98, 95, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(98, 95, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--surface-border);
}

.btn-outline:hover {
    background: var(--surface);
    border-color: var(--text-muted);
}

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; padding: 16px; font-size: 1.1rem; }

/* --- NAVIGACE --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 5, 0.9);
    border-bottom: 1px solid var(--surface-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand span { color: var(--primary); }

/* Vynucené odstranění bílého pozadí z loga */
.nav-logo-img {
    height: 40px; /* Sníženo pro PC verzi, aby logo nezabíralo půl webu */
    width: auto;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    display: block;
}

/* Obal navigace pro PC */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--text-main); }

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- HERO SEKCE S DYNAMICKÝM POZADÍM --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.6;
}
/* Vynucené odstranění bílého pozadí z loga */
.nav-logo-img {
    height: 70px;           /* Aby to zase nebylo obří */
    width: auto;
    background: transparent !important; /* Tohle zruší tu bílou */
    background-color: transparent !important;
    border: none !important;
    display: block;
}

/* Pokud by to nepomohlo, zkontroluj, jestli bílá barva není na odkazu */
.navbar .brand {
    background: transparent !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blob-1 {
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: var(--primary);
    /* Vlastní plynulá smyčka na 15 vteřin */
    animation: float-1 15s infinite ease-in-out;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 65vw;
    height: 65vw;
    max-width: 800px;
    max-height: 800px;
    background: var(--secondary);
    /* Vlastní plynulá smyčka na 18 vteřin (asymetrie vypadá přirozeněji) */
    animation: float-2 18s infinite ease-in-out;
}

/* Dokonale plynulé kruhové dráhy - začátek (0%) a konec (100%) jsou stejné */
@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(8vw, 5vh) scale(1.1); }
    66% { transform: translate(-5vw, 10vh) scale(0.9); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-8vw, -8vh) scale(1.15); }
    66% { transform: translate(5vw, -5vh) scale(0.85); }
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* --- NADPISY SEKCI --- */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 60px;
}
.align-left { text-align: left; }

/* --- BENTO GRID SLUŽBY --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 40px 30px;
    transition: var(--transition);
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(98, 95, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.bento-card i {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.bento-card p {
    color: var(--text-muted);
}

/* --- PROJEKTY --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover { border-color: rgba(255, 255, 255, 0.2); }

.project-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img { transform: scale(1.05); }

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-info { padding: 24px; }
.project-info h3 { margin-bottom: 8px; }
.project-info p { color: var(--text-muted); font-size: 0.95rem; }

/* --- O MNĚ --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.skill-list {
    list-style: none;
    margin-top: 30px;
}

.skill-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.skill-list i { color: var(--secondary); }

.image-wrapper {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
}

.image-wrapper img {
    width: 100%;
    display: block;
    filter: grayscale(20%);
    transition: var(--transition);
}

.image-wrapper:hover img { filter: grayscale(0%); }

/* --- FORMULÁŘ --- */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 60px;
}

.contact-header { text-align: center; margin-bottom: 40px; }
.contact-header p { color: var(--text-muted); margin-top: 10px; }

.pro-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; gap: 20px; }

.pro-form input, .pro-form textarea {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    color: var(--text-main);
    padding: 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.pro-form input:focus, .pro-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(98, 95, 255, 0.1);
}

/* --- FOOTER --- */
.footer {
    border-top: 1px solid var(--surface-border);
    padding: 40px 0;
    background: var(--bg-darker);
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-socials { display: flex; gap: 15px; }
.footer-socials a {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}
.footer-socials a:hover { background: var(--primary); transform: translateY(-3px); }

/* --- ANIMACE PRO JS SCROLL --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .fade-up { opacity: 1; transform: none; transition: none; }
}


@media (max-width: 992px) {
    .about-container { grid-template-columns: 1fr; }
    .about-visual { order: -1; }
}

@media (max-width: 768px) {
    .hamburger { 
        display: block; 
        z-index: 1001;
    }

    /* Logo vlevo a hamburger vpravo na mobilu */
    .nav-container {
        justify-content: space-between;
    }

    .brand {
        margin-right: auto;
    }

    .nav-logo-img {
        height: 35px;
    }

    /* Mobilní menu - Skryté vpravo */
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 80%;
        height: 100vh;
        background: var(--bg-darker);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-wrapper.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .nav-links a { font-size: 1.5rem; }

    .nav-actions {
        flex-direction: column;
        gap: 20px;
    }

    .cta-group { flex-direction: column; }
    .form-row { flex-direction: column; }
    .contact-container { padding: 30px 20px; }
    .footer-flex { flex-direction: column; text-align: center; gap: 20px; }
}


/* ---------------------------------------------------
   OVERRIDY PRO SVĚTLÝ REŽIM 
   (Musí být vždy až na konci souboru!)
--------------------------------------------------- */
body.light-mode {
    --bg-color: #f8fafc;
    --bg-darker: #ffffff;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    background-color: var(--bg-color);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.85); 
    border-bottom: 1px solid var(--surface-border);
}

body.light-mode .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
}

body.light-mode .hamburger {
    color: var(--text-main);
}

body.light-mode .btn-outline {
    border-color: var(--surface-border);
}

body.light-mode .btn-outline:hover {
    background: var(--text-main);
    color: var(--bg-darker);
}

body.light-mode .blob {
    opacity: 0.15;
}