:root {
    --bg: #0b0c0f; /* tmavé pozadí */
    --bg-soft: #0f1117; /* karty/sekce */
    --text: #e5e7eb; /* primární text */
    --muted: #9ca3af; /* sekundární text */
    --brand: #0ea5e9; /* akcent */
    --border: #1f2937; /* bordery */
    --card: #11131a; /* card bg */
    --shadow: 0 10px 30px rgba(2, 6, 23, .35);
    --radius: 16px;
    --container: 1080px;
}

[data-theme="light"]:root {
    --bg: #f8fafc;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(2, 6, 23, .08);
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding: 0 20px;
}

header {
    position: sticky;
    top: 0;
    backdrop-filter: saturate(180%) blur(12px);
    background-color: color-mix(in oklab, var(--bg), transparent 40%);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}

.brand .logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #22d3ee);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.navlinks {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.navlinks a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}

.navlinks a:hover {
    color: var(--text);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--brand)
}

.btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    border-color: color-mix(in oklab, var(--brand), var(--border));
    box-shadow: var(--shadow);
}

.btn.primary {
    background: linear-gradient(135deg, var(--brand), #22d3ee);
    color: #001018;
    border: none;
}

.hero {
    padding: 72px 0 32px;
    display: grid;
    gap: 18px;
}

.hero h1 {
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
    margin: 0;
}

.hero p {
    color: var(--muted);
    max-width: 70ch;
}

.profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}

.profile-picture {
    max-height: 200px;
    max-width: 200px;
    border-radius: 25%;
    margin-right: 40px;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 14px;
}

section {
    padding: 42px 0;
}

.section-title {
    font-size: 22px;
    margin: 0 0 16px;
}

.grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 720px) {
    .grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .navlinks {
        opacity: 0;
        pointer-events: none;
        transform: translateY(6px) scale(0.98);

        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: min(90vw, 320px);

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;

        background: var(--bg-soft);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
        box-shadow: var(--shadow);
        z-index: 100;

        transition: opacity .18s ease, transform .18s ease;
    }

    .navlinks.show {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .navlinks a {
        display: block;
        padding: 10px 12px;
        border-radius: 10px;
        color: var(--text);
        background: transparent;
    }

    .navlinks a:hover,
    .navlinks a:focus-visible {
        background: color-mix(in oklab, var(--brand), transparent 92%);
        outline: none;
    }

    .navlinks .btn.primary {
        width: 100%;
        justify-content: center;
    }

    .profile {
        flex-direction: column;
        align-content: center;
    }

    .profile-picture {
        margin-bottom: 20px;
        margin-right: 0;
    }

    .hero {
        padding: 36px 0 16px;
    }
}


.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.muted {
    color: var(--muted);
}

li {
    padding: 5px;
}

.about {
    display: grid;
    gap: 16px;
    scroll-margin-top: 30vh;
}

.timeline {
    position: relative;
    padding-left: 18px;
}

.timeline:before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 14px;
    margin: 14px 0;
}

.timeline-item:before {
    content: "";
    position: absolute;
    left: -2px;
    top: .45rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand), transparent 70%);
}

.projects .thumb {
    aspect-ratio: 16/9;
    border-radius: 12px;
    background: linear-gradient(135deg, color-mix(in oklab, var(--brand), #000 30%), #111);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.projects .thumb img {
    max-width: 100%;
    border-radius: 12px;
    display: block;
    height: auto;
    transition: transform .3s ease;
    transform-origin: center;
}

.projects .thumb img:hover {
    transform: scale(1.8);
}

.skills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.contact {
    display: grid;
    gap: 10px;
}

.contact a {
    color: var(--text);
    text-decoration: none;
}

.contact .row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

footer {
    padding: 36px 0 56px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 10px;
    top: 10px;
    background: var(--brand);
    color: #000;
    padding: 10px;
    border-radius: 8px;
    z-index: 999;
}