/* ------------------------------------------------------------------
   mmagdon.dev — shared design tokens
   Lifted from contact/index.html to keep the site cohesive.
   Variants: default light, paper (warm), terminal (dark, default here).
------------------------------------------------------------------ */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --ink: #0b1220;
  --ink-2: #1f2937;
  --muted: #5b6472;
  --line: #d9dde3;
  --line-2: #e6e9ee;
  --accent: #0f5b6e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0f3;
  --danger: #9a1b1b;
  --focus: #2a6b7d;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 0 rgba(11,18,32,.04), 0 1px 2px rgba(11,18,32,.05);
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Inter", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --page-max: 760px;
}

html[data-variant="paper"] {
  --bg: #f4f1ea;
  --surface: #fbf8f1;
  --surface-2: #efeadf;
  --ink: #1a1510;
  --ink-2: #2b2620;
  --muted: #6b6458;
  --line: #d8cfbd;
  --line-2: #e6dfce;
  --accent: #6b3d1f;
  --accent-ink: #fbf8f1;
  --accent-soft: #ece1cf;
  --focus: #8a5a39;
  --font-display: "Newsreader", Georgia, serif;
}

html[data-variant="terminal"] {
  --bg: #0b0f14;
  --surface: #10151c;
  --surface-2: #141b24;
  --ink: #e6edf3;
  --ink-2: #cbd4de;
  --muted: #8a96a4;
  --line: #22303d;
  --line-2: #1a2430;
  --accent: #8cd0ff;
  --accent-ink: #0b0f14;
  --accent-soft: #152330;
  --focus: #8cd0ff;
  --shadow: 0 1px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.35);
  --font-ui: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[data-variant="terminal"] body { font-size: 16px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 6px;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Layout ---------- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 40px 22px 96px;
}
@media (min-width: 720px) {
  .page { padding: 64px 32px 120px; }
}

header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
html[data-variant="terminal"] .brand::before { content: "$ "; color: var(--accent); }

.top nav { display: flex; gap: 18px; }
.top nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { color: var(--ink); }

.meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- Typography ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--ink);
}
html[data-variant="paper"] h1 { font-weight: 500; letter-spacing: -0.01em; }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--ink);
}
h2 .num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-right: 10px;
  letter-spacing: 0.04em;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 4px;
  color: var(--ink);
}

p { margin: 0 0 12px; }

.lede {
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 18px;
}
.lede-sub {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 8px;
}

section { margin-top: 44px; }
section + section { margin-top: 44px; }

/* ---------- Utility ---------- */
.mono { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.button {
  display: inline-block;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 0;
}
.button:hover { filter: brightness(1.05); }
.button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button.ghost:hover { border-color: var(--ink); }

/* ---------- Footer ---------- */
footer.bottom {
  margin-top: 72px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
