/* ============================================================
   Inter variable font (self-hosted)
   ============================================================ */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

/* ============================================================
   Custom properties
   ============================================================ */
/* ============================================================
   Theme tokens — light is default; dark applies via
   [data-theme="dark"] on <html>, or via prefers-color-scheme
   when no explicit choice is stored.
   ============================================================ */
:root {
  /* Maya portfolio tokens (light mode default).
     White page, light-grey card surfaces, near-black text.
     Monochrome system — no chromatic accent; hover states use
     brightness/underline only. Swap --accent if you want color later.
  */
  --bg: #FFFFFF;
  --surface: #F6F6F7;
  --text: #111111;
  --text-muted: rgba(17, 17, 17, 0.6);
  --rule: rgba(0, 0, 0, 0.08);
  --accent: #111111;
  --hover-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.85);

  --font-display: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container-max: 1280px;
  --text-column-max: 720px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
}

/* System preference, only when JS hasn't set an explicit theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E10;
    --surface: #18181B;
    --text: #F8FAFC;
    --text-muted: rgba(248, 250, 252, 0.6);
    --rule: rgba(255, 255, 255, 0.08);
    --accent: #F8FAFC;
    --hover-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
    --nav-bg: rgba(14, 14, 16, 0.85);
  }
}

/* Explicit override via the toggle. */
:root[data-theme="dark"] {
  --bg: #0E0E10;
  --surface: #18181B;
  --text: #F8FAFC;
  --text-muted: rgba(248, 250, 252, 0.6);
  --rule: rgba(255, 255, 255, 0.08);
  --accent: #F8FAFC;
  --hover-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --nav-bg: rgba(14, 14, 16, 0.85);
}

:root[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F6F6F7;
  --text: #111111;
  --text-muted: rgba(17, 17, 17, 0.6);
  --rule: rgba(0, 0, 0, 0.08);
  --accent: #111111;
  --hover-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.85);
}

/* Smooth theme transitions on the color-bearing properties only. */
body {
  transition: background-color 250ms ease, color 250ms ease;
}

/* Container Lines — fixed vertical guides that frame the content
   area. Subtler than CreatorFlow's spec so they sit quietly on white. */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.04);
  pointer-events: none;
  z-index: 1;
}
:root[data-theme="dark"] body::before,
:root[data-theme="dark"] body::after {
  background: rgba(255, 255, 255, 0.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before,
  :root:not([data-theme="light"]) body::after {
    background: rgba(255, 255, 255, 0.05);
  }
}
body::before {
  left: max(calc((100vw - var(--container-max)) / 2), 24px);
}
body::after {
  right: max(calc((100vw - var(--container-max)) / 2), 24px);
}
@media (max-width: 640px) {
  /* Lines pull in tight on mobile — keep them visible but unobtrusive. */
  body::before { left: 16px; }
  body::after { right: 16px; }
}

/* ============================================================
   Reset (compact modern reset)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

/* ============================================================
   Typography utilities — CreatorFlow pairing:
   Manrope for display/headings (architectural, tight tracking),
   Inter for body, JetBrains Mono for tiny uppercase labels.
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.subhead {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.body-text {
  font-size: 16px;
  line-height: 1.6;
}

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.text-column {
  max-width: var(--text-column-max);
}

.section {
  padding-block: var(--space-8);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin-block: var(--space-8);
}

@media (min-width: 1025px) {
  .container { padding-inline: 48px; }
  .section { padding-block: var(--space-10); }
}
