/* adritlath.com design tokens
   Light is the default. Dark follows the system setting.
   Add data-theme="light" or data-theme="dark" on <html> to force a theme. */

@font-face {
  font-family: "Radley";
  src: url("fonts/radley-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color: light */
  --bg: #faf7f2;
  --bg-raised: #ffffff;
  --text: #1c1a17;
  --text-muted: #6b655c;
  --border: #e4ded3;
  --accent: #b4532a;
  --accent-hover: #8f4120;
  --on-accent: #ffffff;
  --logo-filter: grayscale(1) brightness(0.55);

  /* Type */
  --font-serif: "Radley", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale: editorial. Small mono labels, a 18px reading size, large serif display. */
  --text-xs: 0.75rem;    /* mono labels, dates, kickers */
  --text-sm: 0.875rem;   /* captions, patents, navbar */
  --text-base: 1.125rem; /* body, 18px */
  --text-lg: 1.5rem;     /* role titles, project titles */
  --text-xl: 2rem;       /* standfirst, subsection headings */
  --text-2xl: 3rem;      /* section titles */
  --text-3xl: clamp(3rem, 6vw + 1rem, 5.25rem); /* page title; Radley runs small, so this is large */

  --leading-body: 1.7;
  --leading-heading: 1.15;
  --leading-display: 1.02;
  --tracking-label: 0.1em;

  /* Spacing: 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 9rem;

  /* Layout */
  --page-max: 1120px;
  --label-col: 240px;
  --measure: 62ch;
  --gutter: 1.25rem;
  --nav-height: 56px;

  /* Shape */
  --radius: 4px;
  --radius-pill: 999px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17150f;
  --bg-raised: #201d16;
  --text: #ede8df;
  --text-muted: #a39c90;
  --border: #2e2a22;
  --accent: #e08a62;
  --accent-hover: #ee9f7b;
  --on-accent: #17150f;
  --logo-filter: grayscale(1) brightness(0.55) invert(1);
}
