/* Design tokens – Hubert portfolio
   Light is default. Dark follows the OS unless the user picks a theme
   (data-theme on <html>). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../vendor/fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations");
  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: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../vendor/fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../vendor/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../vendor/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../vendor/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(../vendor/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
}

:root {
  color-scheme: light;

  /* Colour */
  --bg: #ecece9;
  --bg-rgb: 236 236 233;
  --surface: #f7f7f5;
  --surface-2: #e2e2de;
  --ink: #0d0d0d;
  --ink-rgb: 13 13 13;
  --ink-2: #55554f;
  --line: rgb(13 13 13 / 0.14);
  --line-strong: rgb(13 13 13 / 0.32);
  --accent: #ff4f12;
  --accent-ink: #b23300; /* accent used as text on light bg (AA) */
  --on-accent: #0d0d0d;
  --success: #1f7a3d;
  --danger: #b42318;
  --warning: #8a5a00;
  --focus: #0d0d0d;
  --focus-halo: #ff4f12;
  --glow-rgb: 255 118 52;
  --glow-a: 0.22;

  /* Typography */
  --font-display: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --stretch-display: 125%;

  --fs-mono: 0.75rem;      /* 12 */
  --fs-small: 0.875rem;    /* 14 */
  --fs-body: 1.0625rem;    /* 17 */
  --fs-lead: clamp(1.125rem, 0.9rem + 0.7vw, 1.375rem);
  --fs-h4: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  --fs-h3: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.2rem + 3.4vw, 4.5rem);
  --fs-h1: clamp(3.5rem, 1rem + 12vw, 13rem);
  --lh-tight: 0.92;
  --lh-snug: 1.2;
  --lh-body: 1.6;
  --measure: 65ch;

  /* Spacing (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --section-pad: clamp(4.5rem, 3rem + 7vw, 10rem);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgb(13 13 13 / 0.06), 0 2px 8px rgb(13 13 13 / 0.05);
  --shadow-2: 0 2px 4px rgb(13 13 13 / 0.06), 0 12px 32px rgb(13 13 13 / 0.12);
  --shadow-3: 0 6px 12px rgb(13 13 13 / 0.08), 0 30px 60px rgb(13 13 13 / 0.18);

  /* Motion */
  --t-1: 160ms;
  --t-2: 320ms;
  --t-3: 640ms;
  --t-4: 1000ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --z-nav: 50;
  --z-cursor: 60;
  --z-panel: 80;
}

/* Dark: explicit choice */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f10;
  --bg-rgb: 15 15 16;
  --surface: #18181a;
  --surface-2: #222225;
  --ink: #eeeeea;
  --ink-rgb: 238 238 234;
  --ink-2: #a3a39c;
  --line: rgb(238 238 234 / 0.14);
  --line-strong: rgb(238 238 234 / 0.32);
  --accent: #ff5a1f;
  --accent-ink: #ff8a5c;
  --on-accent: #0d0d0d;
  --success: #5cc584;
  --danger: #ff8a80;
  --warning: #f2c14e;
  --focus: #eeeeea;
  --focus-halo: #ff5a1f;
  --glow-rgb: 255 84 20;
  --glow-a: 0.3;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 2px 8px rgb(0 0 0 / 0.3);
  --shadow-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.45);
  --shadow-3: 0 6px 12px rgb(0 0 0 / 0.45), 0 30px 60px rgb(0 0 0 / 0.55);
}

/* Dark: OS preference, unless user forced light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f10;
    --bg-rgb: 15 15 16;
    --surface: #18181a;
    --surface-2: #222225;
    --ink: #eeeeea;
    --ink-rgb: 238 238 234;
    --ink-2: #a3a39c;
    --line: rgb(238 238 234 / 0.14);
    --line-strong: rgb(238 238 234 / 0.32);
    --accent: #ff5a1f;
    --accent-ink: #ff8a5c;
    --on-accent: #0d0d0d;
    --success: #5cc584;
    --danger: #ff8a80;
    --warning: #f2c14e;
    --focus: #eeeeea;
    --focus-halo: #ff5a1f;
  --glow-rgb: 255 84 20;
  --glow-a: 0.3;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 2px 8px rgb(0 0 0 / 0.3);
    --shadow-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.45);
    --shadow-3: 0 6px 12px rgb(0 0 0 / 0.45), 0 30px 60px rgb(0 0 0 / 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-1: 0ms;
    --t-2: 0ms;
    --t-3: 0ms;
    --t-4: 0ms;
  }
}
