/* ============================================================
   SHARED STYLES — Single source of truth for fonts & tokens
   Update fonts here and they'll apply across the entire site.
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,100..900;1,100..900&family=STIX+Two+Text:ital,wght@0,400..700;1,400..700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Typography ---- */
  --font-display: 'Libre Franklin', sans-serif;
  --font-body: 'Libre Franklin', sans-serif;
  --font-accent: 'STIX Two Text', serif;  /* Italic accent font — change here to update site-wide */
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Font weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---- Colour: Primitives ---- */
  --c-ink-900: #1F1D1A;
  --c-ink-700: #34312C;
  --c-ink-500: #6E6B66;
  --c-ink-300: #A6A29B;
  --c-paper-0: #FFFFFF;
  --c-paper-50: #F8F7F5;
  --c-paper-line: #ECEAE6;
  --c-terracotta-600: #A94F2E;
  --c-terracotta-500: #C4633E;
  --c-terracotta-100: #F6E7DF;
  --c-terracotta-300: #E8A781;
  --c-positive-500: #16A34A;

  /* ---- Colour: Semantic (use these) ---- */
  --ink: var(--c-ink-900);
  --ink-soft: var(--c-ink-700);
  --muted: var(--c-ink-500);
  --faint: var(--c-ink-300);
  --bg: var(--c-paper-50);
  --surface: var(--c-paper-0);
  --line: var(--c-paper-line);
  --acc: var(--c-terracotta-500);
  --acc-hover: var(--c-terracotta-600);
  --acc-soft: var(--c-terracotta-100);
  --acc-on-dark: var(--c-terracotta-300);

  /* ---- Dark surface (Playground / inverted blocks) ---- */
  --dark-bg: #1F1D1A;
  --dark-surface: #2A2825;
  --dark-line: #3A3833;
  --dark-text: #F4F2EE;
  --dark-muted: #B6B2AB;
  --dark-code: #B7CFA3;

  /* ---- Spacing (base 4px) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-28: 112px;

  /* ---- Layout ---- */
  --container-max: 1080px;
  --container-pad: 40px;
  --grid-gap: var(--space-6);

  /* ---- Radii ---- */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* ---- Borders ---- */
  --border-hairline: 1px solid var(--line);
  --border-dark: 1px solid var(--dark-line);
  --border-accent-wash: 1px solid var(--acc-soft);
  --border-button-secondary: 1px solid var(--ink);

  /* ---- Shadows (warm-neutral) ---- */
  --shadow-card-hover: 0 26px 50px -30px rgba(60, 55, 45, 0.40);
  --shadow-thumb-pane: 0 10px 30px -16px rgba(60, 55, 45, 0.28);
  --shadow-chip: 0 6px 16px -8px rgba(60, 55, 45, 0.30);
  --shadow-terminal: 0 14px 34px -18px rgba(40, 35, 25, 0.60);

  /* ---- Motion ---- */
  --ease-out-soft: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 180ms;
  --dur-base: 250ms;
  --dur-card: 400ms;
  --dur-reveal: 720ms;
}

/* ---- Accent word styling (italic serif highlights) ---- */
.acc-word {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--acc);
  letter-spacing: 0;
}

/* ============================================================
   BASE RESET & DEFAULTS
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- Shared type roles ---- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 13px;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}
.mono {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
}

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-reveal) var(--ease-out-soft),
              transform var(--dur-reveal) var(--ease-out-soft);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---- Wrap container ---- */
.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
@media (max-width: 760px) {
  .wrap { padding: 0 24px; }
}

/* ============================================================
   NAV — standard portfolio top nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 70px;
  background: rgba(248, 247, 245, 0.82);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: var(--border-hairline);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav .wordmark {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.nav .navlinks {
  display: flex;
  align-items: center;
  gap: var(--space-7);
}
.nav .navlinks a {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: 15px;
  color: var(--ink);
  opacity: .74;
  transition: opacity var(--dur-fast) var(--ease-out-soft);
}
.nav .navlinks a:hover { opacity: 1; }
.nav .navlinks a.cta {
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  padding: 9px 18px;
  opacity: 1;
  transition: background var(--dur-fast) var(--ease-out-soft);
}
.nav .cta:hover { background: var(--ink-soft); opacity: 1; }
@media (max-width: 760px) {
  .nav .navlinks a:not(.cta) { display: none; }
}

/* ============================================================
   FOOTER — standard portfolio footer
   ============================================================ */
footer.site {
  margin-top: var(--space-28);
  border-top: var(--border-hairline);
  background: var(--bg);
}
footer.site .wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-16) var(--container-pad);
}
@media (max-width: 760px) {
  footer.site .wrap { padding-left: 24px; padding-right: 24px; }
}
footer.site .pos {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  max-width: 18ch;
  margin: 0 0 var(--space-7);
}
footer.site .pos .acc-word { font-size: 1.05em; }
footer.site .frow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-7);
  align-items: center;
}
footer.site .frow a {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: 15px;
  color: var(--acc);
  transition: color var(--dur-fast) var(--ease-out-soft);
}
footer.site .frow a:hover { color: var(--acc-hover); }
footer.site .copy {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: var(--border-hairline);
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}
