/* =========================================================================
   Katuščák Design System — design tokens (LIGHT — paper / graphite / terracotta)

   Self-hosted fonts (no Google Fonts CDN requests) + CSS custom properties.
   Element-level defaults live in base.css. Component classes live in
   components.css. Article typography lives in prose.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Self-hosted webfonts (woff2). Each weight has TWO @font-face blocks:
   one for the latin subset and one for latin-ext (Czech diacritics). The
   browser picks the right file per-character via unicode-range.
   ------------------------------------------------------------------------- */

/* Inter 400 — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-400.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;
}
/* Inter 400 — latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter 500 — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin-500.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;
}
/* Inter 500 — latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter 600 — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-600.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;
}
/* Inter 600 — latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono 400 — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-400.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;
}
/* JetBrains Mono 400 — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono 500 — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-500.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;
}
/* JetBrains Mono 500 — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-500.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono 700 — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-700.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;
}
/* JetBrains Mono 700 — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------------------- */

:root {
  /* --- Color: base — papírová bílá ----------------------------------- */
  --bg:             #FAFAF7;   /* page background, papír */
  --surface-1:      #F4F2EB;   /* karty, code blocks, panely */
  --surface-2:      #ECE9E0;   /* hover state pro surface-1 */
  --border:         #E8E6DF;   /* hairline border / linka */
  --border-strong:  #D6D3C8;   /* hover / emphasized border */

  /* --- Color: foreground — grafit ------------------------------------ */
  --fg:             #0F0F0F;   /* primary text, grafit */
  --fg-muted:       #6B6B6B;   /* secondary text, subheadlines */
  --fg-subtle:      #999999;   /* meta, captions, disabled */

  /* --- Color: accent — tichá terakota -------------------------------- */
  --accent:         #C97B3F;
  --accent-hover:   #B86C32;
  --accent-pressed: #9F5C2A;
  --accent-fg:      #FAFAF7;   /* text color ON accent fills */

  /* Tints derived from accent — used for soft chip/icon backgrounds. */
  --accent-tint:        rgba(201,123,63,0.07);
  --accent-tint-hover:  rgba(201,123,63,0.11);
  --accent-tint-strong: rgba(201,123,63,0.16);
  --accent-tint-border: rgba(201,123,63,0.28);

  /* Portrait card background (gradient panel on About sidebar) */
  --portrait-bg:        linear-gradient(135deg, #ECE9E0 0%, #DDD8CB 100%);
  --portrait-dot:       rgba(15,15,15,0.08);

  /* Subtle "hover" overlay used on transparent buttons + active nav pill. */
  --hover-overlay:      rgba(15,15,15,0.04);

  /* Nav capsule glassmorphism — papírová s vyšší krytím */
  --nav-bg:             rgba(250,250,247,0.72);
  --nav-bg-scrolled:    rgba(250,250,247,0.92);

  /* Dot grid v hero — grafit tlumeně */
  --dot-grid:           rgba(15,15,15,0.08);

  /* --- Color: semantic ----------------------------------------------- */
  --danger:         #C44545;
  --warning:        #C8861A;
  --success:        #4A8F5C;
  --info:           #4A7FB8;

  /* --- Typography ----------------------------------------------------- */
  --font-mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale (desktop) */
  --t-h1:     64px;   --lh-h1: 1.1;   --ls-h1: -0.01em;
  --t-h2:     40px;   --lh-h2: 1.2;   --ls-h2: -0.01em;
  --t-h3:     28px;   --lh-h3: 1.3;   --ls-h3:  0em;
  --t-h4:     20px;   --lh-h4: 1.4;
  --t-body:   17px;   --lh-body: 1.6;
  --t-small:  14px;   --lh-small: 1.5;
  --t-micro:  12px;   --lh-micro: 1.4;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    700;

  /* --- Spacing (4px scale) ------------------------------------------- */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:   12px;
  --s-4:   16px;
  --s-5:   24px;
  --s-6:   32px;
  --s-7:   48px;
  --s-8:   64px;
  --s-9:   96px;
  --s-10: 128px;

  /* --- Radii ---------------------------------------------------------- */
  --r-sm:   6px;   /* pills, chips, inputs */
  --r-md:  10px;   /* buttons, cards */
  --r-lg:  16px;   /* large containers */
  --r-full: 999px; /* nav capsule, avatar */

  /* --- Shadows (used sparingly) -------------------------------------- */
  --shadow-nav: 0 1px 0 0 var(--border), 0 8px 24px -12px rgba(15,15,15,0.10);
  --shadow-pop: 0 16px 40px -12px rgba(15,15,15,0.12), 0 2px 6px -2px rgba(15,15,15,0.06);

  /* --- Motion --------------------------------------------------------- */
  --ease:       cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast:   150ms;
  --dur-med:    220ms;

  /* --- Layout --------------------------------------------------------- */
  --max-content: 1200px;
  --gutter: clamp(24px, 5vw, 96px);
  --nav-height: 96px;       /* canonical sticky-nav offset; sticky elements use this as `top`, anchor jumps use this as scroll-margin-top */
}

/* Responsive type — on narrow viewports the display sizes drop */
@media (max-width: 720px) {
  :root {
    --t-h1: 40px;
    --t-h2: 28px;
    --t-h3: 22px;
    --t-body: 16px;
    --nav-height: 64px;
  }
}
