/* ==========================================================================
   Vítězslav Mergl — vitezslavmergl.cz
   ========================================================================== */

:root {
    /* Barvy z loga */
    --teal: #00bc9c;
    --teal-bright: #00e0ba;
    --teal-dim: rgba(0, 188, 156, .14);

    --bg: #0f1518;
    --bg-alt: #131b1f;
    --surface: #182126;
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .18);

    --text: #e9eff1;
    --muted: #9bacb2;

    --font-head: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    --wrap: 1060px;
    --radius: 12px;
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, p, ul, li, figure {
    margin: 0;
    padding: 0;
}

ul { list-style: none; }

img, svg { display: block; max-width: 100%; }

html {
    scroll-behavior: smooth;
    /* aby kotva nezmizela pod fixni hlavickou */
    scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-bright); }

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--teal);
    color: #04120f;
    border-radius: 6px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
}

/* --- Hlavicka ------------------------------------------------------------- */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 21, 24, .82);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 68px;
}

.header__logo img {
    width: 148px;
    height: auto;
}

.nav {
    display: flex;
    gap: 1.75rem;
    font-size: .95rem;
}

.nav a {
    color: var(--muted);
    padding: .25rem 0;
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.nav a:hover {
    color: var(--text);
    border-bottom-color: var(--teal);
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 5.5rem 0 5rem;
}

/* jemna tyrkysova zare v pozadi */
.hero::before {
    content: "";
    position: absolute;
    top: -30%;
    left: 50%;
    width: 900px;
    height: 900px;
    transform: translateX(-55%);
    background: radial-gradient(circle, rgba(0, 188, 156, .13) 0%, rgba(0, 188, 156, 0) 62%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3.5rem;
}

.hero__photo {
    position: relative;
    flex: none;
    width: 216px;
    height: 216px;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* preruseny kruh — stejny motiv jako v logu */
.hero__photo .ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* kruznice ma polomer presne na hrane fotky, takze stopa lezi napul uvnitr
       a napul venku — vnejsi polovina musi smet pretect pres viewBox */
    overflow: visible;
    color: var(--teal);
}

.hero__eyebrow {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .82rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: .6rem;
}

.hero h1 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -.02em;
}

.hero__lead {
    margin-top: 1.15rem;
    max-width: 46ch;
    font-size: 1.15rem;
    color: var(--muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 2rem;
}

/* --- Tlacitka ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .98rem;
    line-height: 1.2;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
    background: var(--teal);
    color: #04120f;
}
.btn--primary:hover {
    background: var(--teal-bright);
    color: #04120f;
}

.btn--ghost {
    border-color: var(--line-strong);
    color: var(--text);
}
.btn--ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* --- Sekce ---------------------------------------------------------------- */

.section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--line);
}

.section--alt { background: var(--bg-alt); }

.section__grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.section__title {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .82rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--teal);
    padding-top: .45rem;
}

.section__body > p + p { margin-top: 1rem; }

.section__body p {
    color: var(--muted);
    max-width: 62ch;
}

/* --- Dovednosti ----------------------------------------------------------- */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2rem;
}

.chips li {
    padding: .3rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: .85rem;
    color: var(--muted);
}

/* --- Projekty ------------------------------------------------------------- */

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.project {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s ease, transform .2s ease;
}

.project:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
}

.project__role {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal);
}

.project__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.25;
    margin: .35rem 0 .6rem;
}

.project__text {
    font-size: .97rem;
    flex: 1;
}

.project__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.1rem;
    font-size: .93rem;
    align-self: flex-start;
}

.project__arrow {
    transition: transform .2s ease;
}

.project__link:hover .project__arrow {
    transform: translateX(3px);
}

.projects__note {
    margin-top: 1.5rem;
    font-size: .93rem;
}

/* --- Kontakt -------------------------------------------------------------- */

.contact__lead { margin-bottom: 2rem; }

.contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.contact__label {
    display: block;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .2rem;
}

.contact a {
    font-size: 1.05rem;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}

.contact a:hover { border-bottom-color: currentColor; }

/* --- Paticka -------------------------------------------------------------- */

.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    font-size: .9rem;
    color: var(--muted);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer__links {
    display: flex;
    gap: 1rem;
}

.footer__links a {
    color: var(--muted);
    transition: color .2s ease;
}

.footer__links a:hover { color: var(--teal); }

.footer__links .icon {
    width: 1.3rem;
    height: 1.3rem;
}

/* --- Responzivita --------------------------------------------------------- */

@media (max-width: 860px) {
    .section__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .section__title { padding-top: 0; }
}

@media (max-width: 700px) {
    .hero {
        padding: 3.5rem 0;
    }
    .hero__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 2.25rem;
    }
    .hero__photo {
        width: 168px;
        height: 168px;
    }
    .hero__actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
    .nav {
        gap: 1.1rem;
        font-size: .9rem;
    }
    .header__logo img { width: 128px; }
    .section { padding: 3.25rem 0; }
    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
