/* =====================================================================
   DJ Belnap · personal site
   Hi-fi paper aesthetic · cobalt accent
   Fonts: Instrument Serif (display) + Geist (body) + JetBrains Mono
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
  /* paper palette */
  --paper:   #f4f1ea;
  --paper-2: #ebe7dd;
  --paper-3: #e1dccd;
  --paper-card: #faf7f0;

  --ink:     #1a1817;
  --ink-2:   #2c2926;
  --ink-3:   #3d3934;
  --graphite:#6b6760;
  --graphite-2:#8a857c;

  --rule:      #c6c0b3;
  --rule-soft: #ddd7c9;
  --rule-very-soft: #ebe7dd;

  --placeholder:   #d8d3c5;
  --placeholder-2: #c9c3b3;
  --placeholder-3: #b8b1a0;

  /* accent (cobalt) */
  --accent:        #2d4a8a;
  --accent-2:      #3960b0;
  --accent-soft:   #d6dcec;
  --accent-bg:     #e8edf6;

  /* secondary tag colors */
  --tag-ai:     var(--accent);
  --tag-cs:     #2c2926;
  --tag-hiring: #6f7a3a;
  --tag-ops:    #8a5e3a;
  --tag-product:#7a3a5e;

  /* type */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* layout */
  --page-max: 1100px;
  --gutter: 28px;
  --radius: 6px;
  --radius-sm: 3px;
}

/* ---------- base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--paper); }

/* paper texture: subtle dual-noise via radial gradients */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(0,0,0,0.018) 0, transparent 50%),
    radial-gradient(circle at 82% 76%, rgba(0,0,0,0.018) 0, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- type helpers ---------- */
.serif    { font-family: var(--serif); letter-spacing: -0.012em; font-weight: 400; }
.serif-i  { font-family: var(--serif); font-style: italic; font-weight: 400; }
.mono     { font-family: var(--mono); letter-spacing: 0; }
.muted    { color: var(--graphite); }
.accent   { color: var(--accent); }
.ink2     { color: var(--ink-2); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
}
.micro {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.08; }
h3 { font-size: 24px; line-height: 1.15; }
h4 { font-size: 19px; line-height: 1.2; }
p  { margin: 0 0 14px; text-wrap: pretty; }

/* ---------- page chrome ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* site nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-very-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 16px var(--gutter);
}
.nav-brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.015em;
  display: inline-flex; align-items: baseline; gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  transform: translateY(-2px);
}
.nav-links {
  display: flex; gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.nav-links a {
  position: relative;
  padding-bottom: 4px;
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent);
}
.nav-links .nav-sep {
  width: 1px;
  height: 12px;
  background: var(--rule);
  align-self: center;
}
.nav-links a.nav-studio {
  color: var(--graphite);
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links a.nav-studio::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--graphite-2);
  display: inline-block;
  transition: background .15s;
}
.nav-links a.nav-studio:hover { color: var(--ink-2); }
.nav-links a.nav-studio:hover::before { background: var(--accent); }
.nav-links a.nav-studio[aria-current="page"] {
  color: var(--ink);
}
.nav-links a.nav-studio[aria-current="page"]::before {
  background: var(--accent);
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  padding: 56px var(--gutter) 36px;
  border-top: 1px solid var(--rule-very-soft);
  background: var(--paper-2);
}
.footer-inner {
  max-width: var(--page-max); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 60px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
}
.footer h3 {
  font-size: 32px;
  margin-bottom: 6px;
}
.footer .sub {
  color: var(--graphite);
  font-size: 15px;
  margin-bottom: 18px;
  max-width: 36ch;
}
.subscribe-form {
  display: flex; gap: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
  max-width: 380px;
  transition: border-color .15s, box-shadow .15s;
}
.subscribe-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.subscribe-form input {
  flex: 1;
  border: 0; background: transparent;
  padding: 11px 18px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.subscribe-form input::placeholder { color: var(--graphite-2); }
.subscribe-form button {
  border: 0; background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .15s;
}
.subscribe-form button:hover { background: var(--accent); }
.subscribe-success {
  display: none;
  font-family: var(--mono); font-size: 12px;
  color: var(--accent);
  margin-top: 10px;
}
.subscribe-form.sent + .subscribe-success { display: block; }

.footer-meta {
  display: flex; flex-direction: column; gap: 16px;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
  margin-bottom: 8px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 4px; font-size: 14px; }
.footer-col a {
  color: var(--ink-2);
  transition: color .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.footer-col a:hover { color: var(--accent); }
.footer-col a::after { content: "↗"; font-family: var(--mono); font-size: 10px; color: var(--graphite-2); }
.footer-col a[href^="mailto"]::after,
.footer-col a[href^="/"]::after,
.footer-col a.nox::after { content: ""; }

.footer-base {
  max-width: var(--page-max); margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; color: var(--graphite);
}

/* ---------- shared primitives ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--paper);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"], .chip.solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chip.accent {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--paper);
}
.chip.accent[aria-pressed="true"], .chip.accent.solid {
  background: var(--accent);
  color: var(--paper);
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: var(--paper);
  color: var(--ink);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn .arrow {
  display: inline-block;
  transition: transform .2s;
}
.btn:hover .arrow { transform: translateX(2px); }

.rule { height: 1px; background: var(--rule-soft); margin: 32px 0; }

/* ---------- page-load animations ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rise { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.fade { animation: fade .6s ease both; }
[data-stagger] > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
[data-stagger] > *:nth-child(1) { animation-delay: 0.00s; }
[data-stagger] > *:nth-child(2) { animation-delay: 0.04s; }
[data-stagger] > *:nth-child(3) { animation-delay: 0.08s; }
[data-stagger] > *:nth-child(4) { animation-delay: 0.12s; }
[data-stagger] > *:nth-child(5) { animation-delay: 0.16s; }
[data-stagger] > *:nth-child(6) { animation-delay: 0.20s; }
[data-stagger] > *:nth-child(7) { animation-delay: 0.24s; }
[data-stagger] > *:nth-child(8) { animation-delay: 0.28s; }
[data-stagger] > *:nth-child(9) { animation-delay: 0.32s; }
[data-stagger] > *:nth-child(10) { animation-delay: 0.36s; }
[data-stagger] > *:nth-child(n+11) { animation-delay: 0.40s; }
[data-stagger-slow] > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
[data-stagger-slow] > *:nth-child(1) { animation-delay: 0.05s; }
[data-stagger-slow] > *:nth-child(2) { animation-delay: 0.18s; }
[data-stagger-slow] > *:nth-child(3) { animation-delay: 0.30s; }
[data-stagger-slow] > *:nth-child(4) { animation-delay: 0.40s; }
[data-stagger-slow] > *:nth-child(5) { animation-delay: 0.50s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .rise, .fade,
  [data-stagger] > *,
  [data-stagger-slow] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  .rise, .fade,
  [data-stagger] > *,
  [data-stagger-slow] > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ---------- responsive baseline ---------- */
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  .nav-links { gap: 14px; font-size: 11px; }
  .nav-brand { font-size: 18px; }
}
