/* ============================================================
   KEVIN JOHNSON — Personal Site
   SHELL DESIGN SYSTEM  ·  "warm founder console"
   ============================================================ */

:root {
  /* warm dark base */
  --bg:        #0E0D0B;
  --bg-1:      #15130F;
  --bg-2:      #1C1915;
  --bg-3:      #24201A;
  --line:      rgba(250, 246, 241, 0.10);
  --line-2:    rgba(250, 246, 241, 0.06);

  /* cream foreground */
  --ink:       #FAF6F1;
  --ink-2:     rgba(250, 246, 241, 0.70);
  --ink-3:     rgba(250, 246, 241, 0.46);
  --ink-4:     rgba(250, 246, 241, 0.28);

  /* single warm accent + a cool counter-accent */
  --gold:      #E5B567;
  --gold-soft: rgba(229, 181, 103, 0.14);
  --sage:      #9FB89A;

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Instrument Sans", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* rhythm */
  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 18px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle warm vignette + film grain feel on the body */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 78% -8%, rgba(229,181,103,0.10), transparent 60%),
    radial-gradient(900px 500px at 6% 12%, rgba(159,184,154,0.05), transparent 55%);
}

::selection { background: var(--gold); color: #1A1409; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- type scale ---------- */
.display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono { font-family: var(--mono); }

h2.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.02;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 1; }
section { position: relative; z-index: 1; }

.section-pad { padding: clamp(72px, 11vw, 150px) 0; }

.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(36px, 6vw, 64px); }
.section-head .idx { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--gold); }
.section-head .lede { color: var(--ink-2); max-width: 56ch; font-size: clamp(16px, 1.6vw, 19px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--gold); color: #1A1409; border-color: var(--gold); }
.btn-primary:hover { transform: translateY(-2px); background: #efc47e; }
.btn-ghost { background: rgba(250,246,241,0.03); color: var(--ink); }
.btn-ghost:hover { background: rgba(250,246,241,0.08); border-color: var(--line); transform: translateY(-2px); }

/* ---------- chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
  background: rgba(250,246,241,0.02);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.dot.live { background: var(--sage); box-shadow: 0 0 0 0 rgba(159,184,154,0.55); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(159,184,154,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(159,184,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(159,184,154,0); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(14,13,11,0.72);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border-bottom-color: var(--line-2);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 17px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--gold); color: #1A1409;
  font-family: var(--display); font-weight: 700; font-size: 15px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--ink-3); padding: 8px 13px; border-radius: 999px;
  transition: color .2s, background .2s; font-weight: 500;
}
.nav-links a:hover { color: var(--ink); background: rgba(250,246,241,0.05); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line); align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 16px; height: 1.6px; background: var(--ink); position: relative; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.6px; background: var(--ink); }
.nav-burger span::before { top: -5px; } .nav-burger span::after { top: 5px; }

/* scroll progress bar */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--gold); z-index: 101; width: 0%; transition: width .1s linear; }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: rgba(10,9,7,0.97);
  backdrop-filter: blur(8px); display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 0 var(--gut); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; padding: 10px 0; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.mobile-menu a:active { color: var(--gold); }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- generic surfaces ---------- */
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-2); padding: 64px 0 48px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer-big { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 6vw, 76px); letter-spacing: -0.03em; line-height: 0.95; }
.footer-meta { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; line-height: 1.5; }
.footer-meta span { white-space: nowrap; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; color: var(--ink-4); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta .btn:not(.nav-burger) { display: none; }
  body { font-size: 16px; }
}
