@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Syne:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─────────────────────────────────────────────
   TOKENS
───────────────────────────────────────────── */
:root {
  --bg:          #F7F6F2;
  --bg-card:     #FFFFFF;
  --surface:     rgba(255, 255, 255, 0.72);
  --surface-hov: rgba(255, 255, 255, 0.94);
  --border:      rgba(0, 0, 0, 0.075);
  --border-mid:  rgba(0, 0, 0, 0.13);
  --text:        #0F0F0E;
  --text-dim:    #3A3A42;
  --text-body:   #525258;
  --muted:       #9898A4;
  --accent:      #1B3A6B;
  --accent-soft: rgba(27, 58, 107, 0.06);
  --accent-line: rgba(27, 58, 107, 0.22);
  --green:       #1A6B3A;
  --nav-bg:      rgba(247, 246, 242, 0.84);
  --rule:        rgba(0, 0, 0, 0.08);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Syne', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --radius:  2px;
  --max-w:   1080px;
  --pad:     2rem;
  --ease:    cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

img, svg { display: block; max-width: 100%; }

/* ─────────────────────────────────────────────
   BODY — dot grid atmosphere
───────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle dot grid — gives technical depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.048) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* Ambient soft glow at top-right */
body::after {
  content: '';
  position: fixed;
  top: -10%;
  right: -5%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(ellipse at center, rgba(27, 58, 107, 0.045) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

nav, main, footer { position: relative; z-index: 1; }

/* ─────────────────────────────────────────────
   NAV
───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom-color: var(--border);
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text);
  transition: color 0.2s;
}
.nav-wordmark:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links li a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links li a:hover { color: var(--text); }

.nav-contact {
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  color: var(--accent) !important;
}
.nav-contact:hover { opacity: 0.75; }

/* ─────────────────────────────────────────────
   CONTAINER
───────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

main { padding-top: 54px; }

/* ─────────────────────────────────────────────
   SECTION HEADER
───────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rule) 0%, transparent 90%);
  border: none;
}

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  padding: 7.5rem 0 5.5rem;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 2.75rem;
  opacity: 0;
  animation: fade-up 0.75s var(--ease) 0.15s forwards;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 7.25rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 860px;
  opacity: 0;
  animation: fade-up 0.9s var(--ease) 0.28s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

/* Hairline underline accent on a word */
.hero h1 .ul {
  position: relative;
  display: inline-block;
}
.hero h1 .ul::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.06em;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.hero-meta {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 0.45s forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────
   BENTO GRID
───────────────────────────────────────────── */
.section-block { padding: 4.5rem 0; }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5rem;
}

.bento-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  padding: 2rem 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.bento-card:hover {
  background: var(--surface-hov);
}

.bento-card.span-2 { grid-column: span 2; }
.bento-card.span-3 { grid-column: span 3; }

.bento-num {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
  display: block;
}

.bento-desc {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 380px;
}

.bento-desc strong {
  color: var(--text-dim);
  font-weight: 600;
}

/* ─────────────────────────────────────────────
   WORK / WRITING LISTS
───────────────────────────────────────────── */
.item-list {
  border-top: 1px solid var(--rule);
}

.list-item {
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.list-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 1.25rem 0;
  color: inherit;
  text-decoration: none;
  gap: 1.5rem;
  transition: padding-left 0.22s var(--ease);
}

/* Left accent bar on hover */
.list-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: height 0.22s var(--ease);
}
.list-item:hover::before { height: 60%; }

.list-item a:hover { padding-left: 1rem; }

.item-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.item-title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.list-item a:hover .item-title { color: var(--accent); }

.item-desc {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.item-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   SITE FOOTER
───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 3.5rem var(--pad) 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-bio {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 0.65; }

/* ─────────────────────────────────────────────
   INNER PAGE HERO
───────────────────────────────────────────── */
.page-hero {
  padding: 7rem 0 3rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3.5rem;
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 4vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 760px;
  margin-bottom: 1.375rem;
}

.page-lead {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 1.75rem;
}

.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  color: var(--muted);
  letter-spacing: 0.07em;
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   ARTICLE BODY
───────────────────────────────────────────── */
.article-body {
  max-width: 680px;
  padding-bottom: 4rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 400;
  color: var(--text);
  margin: 3.5rem 0 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.article-body h3 {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.25rem 0 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-body p {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 1.125rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.article-body li {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 0.5rem;
}

.article-body li::marker { color: var(--accent); }

.article-body strong {
  color: var(--text-dim);
  font-weight: 600;
}

.article-body blockquote {
  border-left: 2px solid var(--accent-line);
  padding: 0.75rem 0 0.75rem 1.375rem;
  margin: 2rem 0;
  background: var(--accent-soft);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.65;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ─────────────────────────────────────────────
   RESULTS TABLE
───────────────────────────────────────────── */
.results-table,
.arch-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin: 2rem 0;
  font-size: 0.875rem;
  overflow: hidden;
}

.results-table th,
.arch-table th {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: rgba(0, 0, 0, 0.015);
}

.results-table td,
.arch-table td {
  padding: 0.8125rem 1.125rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-family: var(--font-sans);
}

.results-table tr:last-child td,
.arch-table tr:last-child td { border-bottom: none; }

.metric-name {
  color: var(--text-dim) !important;
  font-weight: 500;
  font-size: 0.875rem;
}

.metric-after {
  color: var(--accent) !important;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   DECK DOWNLOADS
───────────────────────────────────────────── */
.deck-downloads {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.deck-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0.55rem 0.9375rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.deck-link:hover {
  background: var(--accent-soft);
  box-shadow: 0 2px 12px rgba(27, 58, 107, 0.1);
}

/* ─────────────────────────────────────────────
   PAGE NAV
───────────────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  gap: 1rem;
}

.page-nav a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.page-nav a:hover { color: var(--accent); }

.page-nav .all-work {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-nav .next::after { content: ' →'; }
.page-nav .prev::before { content: '← '; }

/* ─────────────────────────────────────────────
   INNER FOOTER
───────────────────────────────────────────── */
.inner-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.inner-footer a {
  color: var(--accent);
  transition: opacity 0.2s;
}
.inner-footer a:hover { opacity: 0.65; }

/* ─────────────────────────────────────────────
   REVEAL
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-d1 { transition-delay: 0.06s; }
.reveal-d2 { transition-delay: 0.12s; }
.reveal-d3 { transition-delay: 0.18s; }
.reveal-d4 { transition-delay: 0.24s; }
.reveal-d5 { transition-delay: 0.30s; }
.reveal-d6 { transition-delay: 0.36s; }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.span-3 { grid-column: span 2; }
}

@media (max-width: 640px) {
  :root { --pad: 1.25rem; }

  .bento { grid-template-columns: 1fr; }
  .bento-card.span-2,
  .bento-card.span-3 { grid-column: span 1; }

  .hero h1 { font-size: clamp(2.25rem, 9vw, 3.5rem); }
  .nav-links { gap: 1.25rem; }
  .nav-contact { display: none; }

  .list-item a { flex-wrap: wrap; }
  .item-year { display: none; }

  .page-hero { padding-top: 5.5rem; }
  .page-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .results-table th,
  .results-table td { padding: 0.55rem 0.75rem; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero h1, .hero-eyebrow, .hero-meta { opacity: 1 !important; animation: none !important; }
}
