/* ---------- 0. Fonts (self-hosted, no requests to Google) ---------- */
/* Manrope is a variable font: one file covers weights 400–800. latin-ext adds Czech letters. */
@font-face {
    font-family: "Manrope";
    font-weight: 400 800;
    font-display: swap;
    src: url("manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-weight: 400 800;
    font-display: swap;
    src: url("manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-weight: 400 600;
    font-display: swap;
    src: url("jetbrains-mono-latin.woff2") format("woff2");
}


/* ---------- 1. Design tokens ---------- */
:root {
    --dark: #16181D;          /* dark sections */
    --dark-text: #F2F2EF;
    --dark-muted: #9B9C9C;
    --dark-border: rgba(242, 242, 239, 0.2);
    --light: #FAFAFA;         /* light sections */
    --surface: #FFFFFF;       /* cards on light sections */
    --surface-muted: #F1F1EE; /* note box */
    --text: #16181D;
    --muted: #5C5D61;
    --line: #E6E6E3;
    --amber: #F5A524;         /* accent on dark */
    --amber-deep: #D98A0B;    /* accent on light */
    --amber-glow: rgba(245, 165, 36, 0.08);
    --topbar-bg: rgba(22, 24, 29, 0.82);
    --shadow: 0 12px 30px rgba(22, 24, 29, 0.08);

    --font: "Manrope", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;

    --page-width: 1080px;
    --gutter: clamp(20px, 5vw, 48px);
    --section-space: clamp(56px, 7vw, 88px);
    --radius: 14px;
}


/* ---------- 2. Language switching ---------- */
/* site.js sets <html lang="cs|en">; only the matching text is shown.
   Gotcha: ANY element with the other lang is hidden, so don't mark e.g. an English
   term inside Czech text with lang="en" – it would disappear on the Czech version. */
html[lang="cs"] body [lang="en"],
html[lang="en"] body [lang="cs"] {
    display: none;
}


/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(36px, 5vw, 54px); }
h2 { font-size: clamp(32px, 4.5vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p  { margin: 0; }

a { color: inherit; text-decoration-color: var(--amber-deep); text-underline-offset: 3px; }
a:hover { color: var(--amber-deep); }

svg { width: 24px; height: 24px; flex: none; }
.icon-sprite { display: none; }   /* icon definitions at the end of index.html */

.container {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}


/* ---------- 4. Shared pieces ---------- */
/* Short accent dash under a heading – the motif from the slides. */
.dash::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin-top: 18px;
    background: var(--amber-deep);
}
.section--dark .dash::after { background: var(--amber); }

/* Small uppercase label above a heading. */
.kicker {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber);
}

.section { padding: var(--section-space) 0; }
.section--dark  { background: var(--dark); color: var(--dark-text); }
.section--light { background: var(--light); color: var(--text); }
.section--dark a:hover { color: var(--amber); }


/* ---------- 5. Top bar ---------- */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px var(--gutter);
    background: var(--topbar-bg);
    backdrop-filter: blur(10px);
    color: var(--dark-text);
    font-size: 15px;
}

.topbar__name {
    margin-right: auto;
    font-family: var(--mono);
    text-decoration: none;
}

.topbar__nav { display: flex; gap: 24px; }
.topbar__nav a { text-decoration: none; color: var(--dark-muted); }
.topbar__nav a:hover { color: var(--dark-text); }

.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
    padding: 4px 8px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--dark-muted);
    font: 600 13px var(--mono);
    cursor: pointer;
}
.lang-switch button:hover { color: var(--dark-text); }
html[lang="cs"] [data-set-lang="cs"],
html[lang="en"] [data-set-lang="en"] {
    background: var(--amber);
    color: var(--dark);
}


/* ---------- 6. Hero (About) ---------- */
.hero {
    padding-top: calc(var(--section-space) + 40px);   /* + room for the fixed top bar */
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
    width: 100%;
}

.hero__photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    justify-self: center;
    border-radius: 50%;
    border: 4px solid var(--amber);
    box-shadow: 0 0 0 14px var(--amber-glow);
}

.arrow-list {
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
    font-size: 19px;
}
.arrow-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.arrow-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--amber);
}
.arrow-list a { color: var(--amber); text-decoration: none; }
.arrow-list a:hover { text-decoration: underline; }

.social { display: flex; gap: 12px; margin: 36px 0 0; padding: 0; list-style: none; }
.social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--dark-border);
    border-radius: 50%;
    transition: border-color 0.2s, color 0.2s;
}
.social svg { width: 20px; height: 20px; }
.social a:hover { border-color: var(--amber); }


/* ---------- 7. Talks, writing & projects ---------- */
.work {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.work-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
}
.work-item p { font-size: 16px; color: var(--muted); }

/* Small mono label: "Projekt", "Článek", … */
.work-item__label {
    font: 13px var(--mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--amber-deep);
}

/* Arrow in the corner, only on items that are links. */
.work-item__more {
    position: absolute;
    top: 24px;
    right: 28px;
    color: var(--amber-deep);
    transition: transform 0.2s;
}

/* Only clickable items react to hover. */
a.work-item { transition: border-color 0.2s, box-shadow 0.2s; }
a.work-item:hover { color: inherit; border-color: var(--amber-deep); box-shadow: var(--shadow); }
a.work-item:hover .work-item__more { transform: translateX(4px); }

/* The featured item is dark and spans two columns. */
.work-item--featured {
    grid-column: span 2;
    background: var(--dark);
    border-color: var(--dark);
    color: var(--dark-text);
}
.work-item--featured h3 { font-size: 28px; }
.work-item--featured p { color: var(--dark-muted); max-width: 520px; }
.work-item--featured .work-item__label,
.work-item--featured .work-item__more { color: var(--amber); }
a.work-item--featured:hover { color: var(--dark-text); border-color: var(--amber); }


/* ---------- 8. Workshops ---------- */
.section--muted { background: var(--surface-muted); color: var(--text); }

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 40px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
}
.features li { display: flex; gap: 16px; }
.features svg { width: 28px; height: 28px; color: var(--amber-deep); }
.features h3 { font-size: 18px; margin-bottom: 4px; }
.features p { font-size: 16px; color: var(--muted); }


/* ---------- 9. Contact ---------- */
#contact { padding-bottom: clamp(48px, 6vw, 72px); }   /* last section: less space before the footer */
.contact { margin: 40px 0 0; padding: 0; list-style: none; font-size: 19px; }
.contact li { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.contact svg { color: var(--amber); }
.contact a { text-decoration: none; }


/* ---------- 10. Footer ---------- */
.footer {
    padding: 28px var(--gutter);
    background: var(--dark);
    border-top: 1px solid var(--dark-border);
    color: var(--dark-muted);
    font-size: 14px;
    text-align: center;
}


/* ---------- 11. Scroll reveal ---------- */
/* Only hidden when JS runs (site.js adds .js), so the page works without it. */
.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}


/* ---------- 12. Responsive ---------- */
@media (max-width: 900px) {
    .work, .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    body { font-size: 17px; }
    .topbar { gap: 16px; }
    .topbar__nav { display: none; }          /* single page: the sections follow each other */
    .hero__grid { grid-template-columns: 1fr; }
    .hero__photo { order: -1; max-width: 160px; justify-self: start; }
    .work, .features { grid-template-columns: 1fr; }
    .work-item--featured { grid-column: auto; }
}
