/* ===== ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ ===== */
:root {
    --bg-color: #f8fafc;
    --card-bg-color: #ffffff;
    --text-color: #475569;

    /* Univerzální, velmi klidná a důvěryhodná "Slate Blue" (Břidlicová modrá). Oblíbená, ale elegantní. */
    --primary-color: #3b82f6;
    /* Příjemná, měkká modrá */
    --primary-color-hover: #2563eb;

    /* Jemnější okraje a moderní průhledné stíny (soft-ui / glass feel) */
    --border-color: #e2e8f0;
    --shadow-color: rgba(59, 130, 246, 0.08);
    /* Extrémně jemný namodralý stín */
    --shadow-hover-color: rgba(59, 130, 246, 0.15);
    --border-radius: 24px;
    /* Větší a modernější zakulacení karet */
    --pill-radius: 100px;
    /* Prémiový plně zaoblený tvar (Apple styl) pro tlačítka a plovoucí navigaci */
    /* Kulatější a přátelštější rohy */
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --card-bg-color: #1e293b;
    --text-color: #94a3b8;

    /* Krásná zklidňující Slate Blue pro Dark mode */
    --primary-color: #60a5fa;
    --primary-color-hover: #93c5fd;

    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.35);
    --shadow-hover-color: rgba(96, 165, 250, 0.15);
    /* Jemné modré záření v tmavém módu */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    /* Bezpečnější čtení */
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    /* Provzdušnění řádků textu */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Plynulý přechod režimů */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(12, 74, 110, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 15s ease-in-out infinite alternate;
}

[data-theme="dark"] body::before {
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
}

@keyframes bgPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.container {
    max-width: 1100px;
    /* Zúžení pro lepší délku řádku ke čtení */
    margin: 0 auto;
    padding: 3rem 1.5rem;
    /* Více místa nahoře a dole */
    width: 100%;
}

/* ===== NAVIGACE ===== */
.main-nav {
    display: flex;
    justify-content: center;
    /* Zarovnání na střed pro odkazy */
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--pill-radius);
    /* Plně oblé pill zakončení */
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    position: sticky;
    top: 1rem;
    z-index: 100;
}

[data-theme="dark"] .main-nav {
    background: rgba(30, 41, 59, 0.7);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.burger-line {
    width: 24px;
    height: 2.5px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animace morphingu do křížku (X) */
.burger-menu.open .burger-line:nth-child(1) {
    transform: translateY(8.75px) rotate(45deg);
}

.burger-menu.open .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.open .burger-line:nth-child(3) {
    transform: translateY(-8.75px) rotate(-45deg);
}

.nav-links {
    display: none;
    list-style: none;
    gap: 2rem;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .burger-menu {
        display: flex;
        position: static;
        /* Zrušíme absolute na mobilu, flex-box se o to postará */
    }

    .main-nav {
        justify-content: space-between;
        /* Výplň prázdného místa mezi burger a CTA */
        padding: 0.8rem 1.25rem;
        /* Menší mezery na malém telefonu */
    }

    .nav-actions {
        position: static;
        /* Vrátíme do toku dokumentu */
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
        justify-content: center;
    }

    .mobile-theme-item {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }

    .theme-toggle-mobile {
        width: auto !important;
        height: auto !important;
        padding: 0.8rem 1.5rem;
        border-radius: var(--pill-radius) !important;
        background: var(--card-bg-color);
        font-family: inherit;
        font-size: 1rem !important;
        font-weight: 500;
        gap: 0.5rem;
        display: flex;
        align-items: center;
        border: 1px solid var(--border-color);
        color: var(--text-color);
    }

    .nav-cta {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 1rem);
        /* Oddělení dropdownu od zaoblené lišty */
        left: 0;
        width: 100%;
        background: var(--card-bg-color);
        padding: 2rem;
        box-shadow: 0 10px 15px var(--shadow-color);
        border-radius: var(--border-radius);
        /* Plovoucí karta pod navigací */
    }

    .nav-links.active {
        display: flex;
    }
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    position: absolute;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-actions-left {
    position: absolute;
    left: 2rem;
    display: flex;
    align-items: center;
}



.nav-cta {
    background: var(--primary-color);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: var(--pill-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.nav-cta:hover {
    background: var(--primary-color-hover);
    transform: translateY(-2px);
}

[data-theme="dark"] .nav-cta {
    color: #0f172a;
}

/* ===== HERO SEKCE A NADPIS ===== */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.main-hero-heading {
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    max-width: 800px;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .main-hero-heading {
        font-size: 2.4rem;
    }
}

/* ===== SEKCE 1: VIZITKA ===== */
.business-card-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4rem;
}

.card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 700px;
    padding: 3rem;
    /* Rozšíření vnitřního prostoru */
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-color), 0 1px 3px rgba(0, 0, 0, 0.02);
    /* Moderní, dvojitý rozptýlený stín */
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    /* Zvýraznění tenkého proužku a barvy gradientem */
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-hover));
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px var(--shadow-hover-color), 0 3px 10px rgba(0, 0, 0, 0.03);
}

.card-content {
    flex: 1;
}

.card .card-name {
    font-size: 2.8rem;
    /* Větší Jméno */
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    /* Těsnější písmena pro moderní look */
}


.profession {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.primary-cta {
    padding: 1.1rem 2.2rem;
    font-size: 1.1rem;
}

.contact-info a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: var(--primary-color-hover);
}

.contact-info a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 2rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-color-hover);
    transform: scale(1.15) translateY(-3px);
    /* Výraznější interakce */
}

/* ===== INDIKÁTOR SCROLLOVÁNÍ ===== */
.scroll-indicator {
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 4rem;
    /* Oddělení od vizitky a další sekce */
    animation: bounce 2.5s infinite;
}

.scroll-indicator a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.scroll-indicator a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.scroll-text {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ===== SPOLEČNÉ HLAVIČKY SEKCÍ ===== */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.6rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

/* Jemná dekorační linka pod nadpisy pro větší šmrnc */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-hover));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-top: 1.5rem;
    /* Odsazení od linky */
}

/* ===== SEKCE 2: PROČ JÁ (BENTO GRID) ===== */
.about-section {
    margin-bottom: 5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto;
    }

    .bento-motto {
        grid-column: 1 / -1;
    }
}

@media (min-width: 992px) {
    .bento-grid {
        grid-template-columns: 1.5fr 1fr;
        grid-template-rows: auto auto;
    }

    .bento-motto {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }

    .bento-stack {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .bento-benefits {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }
}

.bento-item {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.bento-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-hover-color);
}

.bento-item h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.bento-motto p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    position: relative;
    z-index: 2;
    margin: auto 0;
}

/* Marquee pro technologie */
.bento-stack {
    justify-content: center;
}

.tech-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 1rem 0;
}

.tech-marquee-content {
    display: flex;
    gap: 1.5rem;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    width: max-content;
}

.tech-marquee-content:hover {
    animation-play-state: paused;
}

.tech-marquee-content span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-color);
    background: rgba(12, 74, 110, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .tech-marquee-content span {
    background: rgba(255, 255, 255, 0.05);
}

.tech-marquee-content span i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 0.75rem));
    }
}

/* Seznam benefitů */
.bento-benefits ul {
    list-style: none;
    padding: 0;
    margin: auto 0;
}

.bento-benefits li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    color: var(--text-color);
}

.bento-benefits li:last-child {
    margin-bottom: 0;
}

.bento-benefits li i {
    color: var(--primary-color);
    background: rgba(12, 74, 110, 0.08);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .bento-benefits li i {
    background: rgba(56, 189, 248, 0.15);
}

.bento-benefits li:hover i {
    background: var(--primary-color);
    color: #fff;
}

[data-theme="dark"] .bento-benefits li:hover i {
    color: #0f172a;
}

/* ===== SEKCE: SPOLUPRÁCE (TIMELINE) ===== */
.process-section {
    margin-bottom: 6rem;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px; /* Místo pro osu na mobilu */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), rgba(59, 130, 246, 0.1));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -58px; /* 40px padding + 18px posun pro vycentrování na čáru */
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--card-bg-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    z-index: 2;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.15);
    background: var(--primary-color);
    color: #fff;
}

[data-theme="dark"] .timeline-item:hover .timeline-icon {
    color: #0f172a;
}

.timeline-content {
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.timeline-item:hover .timeline-content {
    transform: translateX(5px);
    box-shadow: 0 12px 30px var(--shadow-hover-color);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.4rem 1rem;
    border-radius: var(--pill-radius);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

@media (min-width: 768px) {
    .timeline {
        padding-left: 60px;
    }
    .timeline-icon {
        left: -80px; /* Zarovnání pro větší padding */
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .timeline-content {
        padding: 2.5rem;
    }
    .timeline-content h3 {
        font-size: 1.5rem;
    }
}

.process-cta {
    text-align: center;
    margin-top: 4rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: var(--pill-radius);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(9, 64, 103, 0.2);
}

.cta-button:hover {
    background: var(--primary-color-hover);
    transform: translateY(-3px) scale(1.02);
    /* Větší "kliknutelnost" */
    box-shadow: 0 10px 25px rgba(9, 64, 103, 0.3);
}

[data-theme="dark"] .cta-button {
    color: #0f172a;
    /* Tmavý text na světlém podkladu tlačítka pro kontrast */
    background: var(--primary-color);
}

[data-theme="dark"] .cta-button:hover {
    background: var(--primary-color-hover);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
}

/* Animace pulzování pro úplně hlavní CTA na konci webu */
.pulse-effect {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(12, 74, 110, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(12, 74, 110, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(12, 74, 110, 0);
    }
}

[data-theme="dark"] .pulse-effect {
    animation: pulse-dark 2s infinite;
}

@keyframes pulse-dark {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(56, 189, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

/* ===== ZÁVĚREČNÉ HLAVNÍ CTA (nad footerem) ===== */
.final-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--card-bg-color), rgba(12, 74, 110, 0.03));
    padding: 4rem 2rem;
    border-radius: var(--border-radius);
    margin: 5rem 0 2rem 0;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .final-cta {
    background: linear-gradient(135deg, var(--card-bg-color), rgba(56, 189, 248, 0.05));
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-color-hover));
}

.final-cta h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.final-cta p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    color: var(--text-color);
}

/* ===== SEKCE 3: PROJEKTY ===== */
.projects-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.projects-section {
    margin-bottom: 5rem;
}

.projects-section h3 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 500;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.project-card {
    background-color: transparent;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    box-shadow: 0 8px 25px var(--shadow-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.card-inner:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px var(--shadow-hover-color);
}

.project-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.project-card.flipped:hover .card-inner {
    transform: translateY(-6px) rotateY(180deg);
}

.card-front {
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg-color);
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: rotateY(180deg);
    background-color: var(--bg-color);
    color: var(--text-color);
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-front h3 {
    margin: 1rem 1rem 0.5rem;
    color: var(--primary-color);
}

.card-front p {
    margin: 0 1rem 0.75rem;
    font-size: 0.9rem;
}

.flip-btn {
    display: inline-block;
    margin: auto 1.5rem 1.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    /* Jemnější ohraničení */
    border-radius: var(--pill-radius);
    /* Modernější zaoblení */
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.flip-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.flip-back-btn {
    margin-top: 2rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--pill-radius);
    background: var(--card-bg-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.flip-back-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.card-back h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.card-back ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.card-back li {
    background: rgba(12, 74, 110, 0.05);
    /* Skleněnější vzhled pro technologii tagy */
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: var(--pill-radius);
    margin-bottom: 0;
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
}

[data-theme="dark"] .card-back li {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 3rem 0 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.site-footer .copyright {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--primary-color-hover);
}

.footer-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ===== RESPONZIVNÍ DESIGN ===== */
/* Tablet */
@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ZMĚNA: Úprava vizitky na menších mobilech */
@media (max-width: 600px) {
    .section-header h2 {
        font-size: 2rem;
    }

    .final-cta h2 {
        font-size: 1.8rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-content {
        padding-right: 0;
        margin-bottom: 0;
    }

    .card h1 {
        font-size: 1.8rem;
    }

    .profession {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .process-section h2,
    .projects-section h2 {
        font-size: 2rem;
    }

    .projects-grid {
        gap: 1.5rem;
    }
}


/* ===== STYLY PRO ANIMACE ===== */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.show {
    opacity: 1;
    transform: translateY(0);
}

.project-link:nth-child(1) {
    transition-delay: 100ms;
}

.project-link:nth-child(2) {
    transition-delay: 200ms;
}

.project-link:nth-child(3) {
    transition-delay: 300ms;
}

.project-link:nth-child(4) {
    transition-delay: 400ms;
}

.project-link:nth-child(5) {
    transition-delay: 500ms;
}

/* Tlačítko pro tmavý režim a Scroll To Top */
.theme-toggle,
.scroll-top-btn {
    background: var(--card-bg-color);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover,
.scroll-top-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px var(--shadow-hover-color);
    color: var(--primary-color-hover);
}

.hidden-btn {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

/* ===== CUSTOM CURSOR ===== */
@media (pointer: fine) {

    /* Apply only on devices with a mouse */
    body {
        cursor: none;
    }

    a,
    button,
    .project-card,
    .flip-btn,
    .flip-back-btn,
    .theme-toggle,
    .scroll-top-btn,
    .bento-item,
    .timeline-content {
        cursor: none;
    }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 10px;
        height: 10px;
        background-color: var(--primary-color);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9999;
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }

    .custom-cursor-follower {
        position: fixed;
        top: 0;
        left: 0;
        width: 30px;
        height: 30px;
        border: 2px solid var(--primary-color);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9998;
        transition: transform 0.1s cubic-bezier(0.165, 0.84, 0.44, 1),
            width 0.2s, height 0.2s, border-color 0.2s, background-color 0.2s;
    }

    /* Hover state for links and buttons */
    .custom-cursor.hover {
        width: 40px;
        height: 40px;
        background-color: var(--primary-color);
        opacity: 0.15;
    }

    .custom-cursor-follower.hover {
        width: 40px;
        height: 40px;
        border-color: transparent;
    }
}