@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --ink: #1a1a1a;
  --paper: #f5f0e8;
  --red: #c8392b;
  --grid-line: #c9c2b4;
  --muted: #888070;
  --hover-bg: #ede8df;
}

/* ── RESET ───────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ────────────────────────────────────────────────── */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  border-bottom: 1px solid var(--grid-line);
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 48px;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: stretch;
}

.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0 14px;
  border-left: 1px solid var(--grid-line);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--red); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--grid-line);
  display: none;
}

.nav-auth {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-auth:hover { background: #333; }
.nav-auth.nav-auth--out { background: transparent; color: var(--muted); border: 1px solid var(--grid-line); }
.nav-auth.nav-auth--out:hover { color: var(--ink); }

@media (max-width: 600px) {
  .nav-logo { font-size: 16px; }
  .nav-link { padding: 0 10px; font-size: 9px; letter-spacing: 0.1em; }
  .nav-link.nav-hide-mobile { display: none; }
  .nav-auth { font-size: 9px; padding: 6px 10px; letter-spacing: 0.12em; }
}

/* ── FOOTER TYPOGRAPHY ───────────────────────────────────── */
.footer-credit {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.7;
}

.footer-credit a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-credit a:hover { color: var(--red); }

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--grid-line);
}

.footer-disclosure {
  width: 100%;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-top: 1px solid var(--grid-line);
  padding-top: 10px;
  margin-top: 4px;
}

/* ── SHARED UTILITIES ────────────────────────────────────── */

/* Visually hidden but screen-reader accessible */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Shared underline CTA link style */
.cta-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  display: inline-block;
  transition: color 0.15s, border-color 0.15s;
}
.cta-link:hover { color: var(--red); border-color: var(--red); }

/* ── ACCESSIBILITY ───────────────────────────────────────── */

/* Keyboard focus ring — shown for keyboard users only */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Respect OS reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

