/* ─────────────────────────────────────────────
   SHARED — design tokens, reset, base, nav, wrap
   Used by: portfolio.html, story.html, posts.html
   ───────────────────────────────────────────── */

/* ── VIEW TRANSITIONS ── */
@view-transition {
  navigation: auto;
}

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

/* ── DESIGN TOKENS ── */
:root {
  --black:    #0a0a0a;
  --white:    #fefefe;
  --gray-100: #f5f5f3;
  --gray-200: #e7e6e3;
  --gray-400: #9a9894;
  --gray-500: #77756f;
  --gray-600: #4a4845;
  --accent:   #b8965a;
  --max:      960px;
  --serif:    'Playfair Display', Georgia, serif;
  --sans:     'DM Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --gutter:   1px solid var(--gray-200);
  --z-nav:    100;
  --z-modal:  200;
  --z-banner: 300;
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay — breaks digital flatness */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-banner);
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(254, 254, 254, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
  user-select: none;
}

/* ── LAYOUT ── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ── SHARED PANEL TEXT ── */
.panel-text .eyebrow {
  display: block;
  font-size: 11px;
  font-style: italic;
  color: var(--gray-400);
  margin-bottom: 16px;
}

/* ── FOCUS ── */
:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
}

/* ── RESPONSIVE: shared nav mobile ── */
@media (max-width: 720px) {
  nav {
    padding: 0 20px;
  }
}
