:root {
  --paper: #F6F2E7;
  --paper-2: #EFE9D7;
  --panel: #FBF8EF;
  --ink: #121110;
  --ink-2: #2F2C28;
  --mute: #7A746A;
  --hair: #D5CDB8;
  --accent: #1E40AF;
  --accent-dim: #162E80;
  --accent-soft: #DCE5F7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 16px;
  letter-spacing: -0.005em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: 'JetBrains Mono', monospace; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 231, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--hair);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
nav .brand {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
}
nav .brand em { color: var(--accent); font-style: italic; }
nav .links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-2);
}
nav .links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
nav .links a:hover { color: var(--accent); }
nav .links a.active {
  color: var(--accent);
}
nav .links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}
nav .contact-btn {
  font-size: 13px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
nav .contact-btn:hover { background: var(--ink); color: var(--paper); }
nav .contact-btn.active { background: var(--ink); color: var(--paper); }

/* Page header (used on inner pages) */
.page-head {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hair);
}
.page-head .eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.page-head h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 24px;
  max-width: 18ch;
}
.page-head h1 em { color: var(--accent); font-style: italic; }
.page-head .lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.55;
}

/* Hero (home only) */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--hair);
}
.hero .eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: -0.005em;
}
.availability .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f8a55;
  box-shadow: 0 0 0 3px rgba(63, 138, 85, 0.18);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.88); }
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 32px;
  max-width: 18ch;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero .lead {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 48px;
}
.hero .lead .hl { color: var(--ink); font-weight: 600; }

.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--hair);
}
.hero-meta.single { grid-template-columns: 1fr; }
.hero-meta .col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-meta .cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-meta .cta-row a {
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.hero-meta .cta-row a.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.hero-meta .cta-row a:hover { border-color: var(--ink); }
.hero-meta .cta-row a.primary:hover { background: var(--accent); border-color: var(--accent); }

.hero-meta .stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}
.stat .num {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 4vw, 52px);
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.stat .num .unit {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--accent);
  font-size: 0.55em;
  margin-left: 2px;
}
.stat .label {
  font-size: 12px;
  color: var(--mute);
  line-height: 1.4;
  max-width: 26ch;
}

/* Explore tiles on home */
.explore {
  padding: 96px 0;
  border-top: 1px solid var(--hair);
}
.explore h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hair);
}
.explore-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid var(--hair);
}
.explore-tile {
  padding: 36px 28px 36px;
  border-right: 1px solid var(--hair);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 220px;
}
.explore-tile:hover { background: var(--panel); transform: translateY(-2px); }
.explore-tile .num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}
.explore-tile h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.explore-tile p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.explore-tile .arrow {
  margin-top: auto;
  font-size: 20px;
  color: var(--accent);
}

/* Section heads (for inner pages) */
section { padding: 80px 0; }
.section-head {
  margin-bottom: 56px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hair);
}
.section-head .lead-col {
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.section-head .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-head h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.section-head h2 em { color: var(--accent); font-style: italic; }
.section-head .hint {
  color: var(--mute);
  font-size: 14px;
  max-width: 340px;
  text-align: right;
}

/* Featured card */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 40px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}
.featured .f-img {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.featured .f-img img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}
.featured .f-meta {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured .f-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.featured .f-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.featured h3 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.featured .f-role {
  font-size: 14px;
  color: var(--mute);
  margin-bottom: 20px;
}
.featured .f-blurb {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 32px;
  max-width: 46ch;
}
.featured .f-stack {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.04em;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
}

/* Work grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07);
}
.card .hero-img {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .hero-img img {
  max-width: 66%;
  max-height: 76%;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.card .hero-img.cover img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.card:hover .hero-img img { transform: scale(1.03); }
.card .meta {
  padding: 24px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card .chip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
}
.chip.muted { color: var(--mute); background: var(--paper-2); }
.card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.card .role { color: var(--mute); font-size: 13px; margin-bottom: 12px; }
.card .blurb { color: var(--ink-2); font-size: 14px; line-height: 1.5; }

/* Per-project image-area backgrounds */
.bg-soltrivia { background: #000; }
.bg-letscook { background: #000; }
.bg-sugashack { background: linear-gradient(135deg, #fde4ea 0%, #f4b3c1 100%); }
.bg-helloerie { background: #ffffff; }
.bg-kas { background: #ffffff; }
.bg-flower { background: #ecdef2; }

/* Capabilities */
.caps-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.caps-list .cap {
  padding: 32px 0;
  border-bottom: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: start;
}
.caps-list .cap:nth-child(odd) { padding-right: 48px; border-right: 1px solid var(--hair); }
.caps-list .cap:nth-child(even) { padding-left: 48px; }
.caps-list .cap:nth-last-child(-n+2) { border-bottom: none; }
.caps-list .cap .num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  padding-top: 4px;
}
.caps-list .cap h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.caps-list .cap p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

/* Experience */
.exp-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
}
.exp-layout .intro h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.exp-layout .intro p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
}
.timeline { display: flex; flex-direction: column; }
.tl-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--hair);
}
.tl-row:last-child { border-bottom: 1px solid var(--hair); }
.tl-when {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.02em;
  padding-top: 6px;
}
.tl-title {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.tl-title em { color: var(--accent); font-style: italic; }
.tl-org { color: var(--mute); font-size: 14px; }
.tl-org .sep { color: var(--hair); margin: 0 8px; }

/* Contact */
.contact-section {
  padding: 120px 0 100px;
  text-align: center;
}
.contact-section .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}
.contact-section h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(56px, 9vw, 120px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}
.contact-section h2 em { color: var(--accent); font-style: italic; }
.contact-section p {
  color: var(--ink-2);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.55;
}
.contact-section .links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-section .links a {
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid var(--hair);
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.contact-section .links a.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.contact-section .links a:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}
.contact-section .links a.primary:hover { background: var(--accent); border-color: var(--accent); }

footer {
  padding: 32px 0 48px;
  text-align: center;
  color: var(--mute);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  background: var(--paper-2);
  border-top: 1px solid var(--hair);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 17, 16, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 40px 20px;
  overflow-y: auto;
}
.lightbox.open { display: flex; }
.lightbox .panel {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 24px;
  max-width: 860px;
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: auto;
}
.lightbox .panel-hero {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.lightbox .panel-hero img {
  max-width: 58%;
  max-height: 78%;
  object-fit: contain;
}
.lightbox .panel-hero.cover img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(246, 242, 231, 0.95);
  color: var(--ink);
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  z-index: 2;
  transition: background 0.2s ease;
}
.lightbox .close:hover { background: var(--paper); }
.lightbox .body { padding: 40px 44px 44px; }
.lightbox .body .title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.lightbox .body h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 6px;
}
.lightbox .body .role { color: var(--mute); font-size: 14px; }
.lightbox .body .when {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--mute);
  white-space: nowrap;
}
.lightbox .body .chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.lightbox .body .section { margin-bottom: 24px; }
.lightbox .body .section:last-child { margin-bottom: 0; }
.lightbox .body .section .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.lightbox .body .section p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}
.lightbox .body .section ul { list-style: none; }
.lightbox .body .section ul li {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
  margin-bottom: 6px;
}
.lightbox .body .section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 1px;
  background: var(--accent);
}
.lightbox .body .link-row {
  display: flex;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  flex-wrap: wrap;
}
.lightbox .body .link-row a {
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--hair);
  transition: all 0.2s ease;
}
.lightbox .body .link-row a:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}
.lightbox .body .link-row a.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.lightbox .body .link-row a.primary:hover { background: var(--accent); border-color: var(--accent); }
.lightbox .note {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.lightbox .note strong { color: var(--accent); }

/* Gallery inside lightbox */
.deck-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}
.deck-section .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}
.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.deck-thumb {
  aspect-ratio: 16 / 9;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--hair);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.deck-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.deck-thumb:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(30, 64, 175, 0.18);
}
.deck-thumb .num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(18, 17, 16, 0.85);
  color: #fff;
  letter-spacing: 0.12em;
}
.deck-note {
  font-size: 13px;
  color: var(--ink-2);
  padding: 12px 16px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  margin-top: 10px;
}
.deck-note strong { color: var(--accent); }

/* Slide viewer */
.slide-viewer {
  position: fixed;
  inset: 0;
  background: rgba(18, 17, 16, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 60px 80px;
}
.slide-viewer.open { display: flex; }
.slide-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.slide-viewer .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(246, 242, 231, 0.12);
  color: #fff;
  border: 1px solid rgba(246, 242, 231, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 28px;
  transition: background 0.2s ease;
  user-select: none;
}
.slide-viewer .nav-btn:hover { background: rgba(246, 242, 231, 0.22); }
.slide-viewer .nav-btn.prev { left: 20px; }
.slide-viewer .nav-btn.next { right: 20px; }
.slide-viewer .sv-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(246, 242, 231, 0.12);
  color: #fff;
  border: 1px solid rgba(246, 242, 231, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
}
.slide-viewer .sv-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(246, 242, 231, 0.75);
  letter-spacing: 0.1em;
  padding: 8px 16px;
  background: rgba(246, 242, 231, 0.08);
  border: 1px solid rgba(246, 242, 231, 0.15);
  border-radius: 999px;
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  border-radius: 999px;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: var(--panel); }
.nav-toggle span {
  display: block;
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(246, 242, 231, 0.98);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: none;
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 96px 24px 48px;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100%;
}
.mobile-menu-inner a {
  font-family: 'Instrument Serif', serif;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink);
  transition: color 0.2s ease;
  opacity: 0;
  transform: translateY(8px);
}
.mobile-menu-inner a em { color: var(--accent); font-style: italic; }
.mobile-menu-inner a:hover,
.mobile-menu-inner a.active { color: var(--accent); }
.mobile-menu-inner a.primary {
  margin-top: auto;
  margin-bottom: 4px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  padding: 18px 24px;
  border-radius: 999px;
  font-size: 17px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-bottom: none;
  letter-spacing: -0.005em;
}
.mobile-menu-inner a.primary:hover { background: var(--accent); color: var(--paper); }
.mobile-menu.open .mobile-menu-inner a {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease, background 0.2s ease;
}
.mobile-menu.open .mobile-menu-inner a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(2) { transition-delay: 0.13s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(4) { transition-delay: 0.23s; }
.mobile-menu.open .mobile-menu-inner a:nth-child(5) { transition-delay: 0.28s; }
body.menu-open { overflow: hidden; }

@media (max-width: 1000px) {
  .featured { grid-template-columns: 1fr; }
  .featured .f-img { aspect-ratio: 16 / 10; }
  .featured .f-meta { padding: 36px 32px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .caps-list { grid-template-columns: 1fr; }
  .caps-list .cap { padding: 24px 0 !important; border-right: none !important; }
  .caps-list .cap:last-child { border-bottom: none; }
  .exp-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-meta { grid-template-columns: 1fr; gap: 32px; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  nav .links { display: none; }
  nav .contact-btn { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu { display: block; }
  .hero { padding: 72px 0 56px; }
  .explore { padding: 72px 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  nav .wrap { padding-top: 14px; padding-bottom: 14px; }
  nav .brand { font-size: 20px; }
  section { padding: 52px 0; }
  .hero { padding: 44px 0 40px; }
  .hero .lead { margin-bottom: 32px; }
  .hero-meta { margin-top: 36px; padding-top: 36px; }
  .hero-meta .cta-row { gap: 8px; }
  .hero-meta .cta-row a { font-size: 13px; padding: 11px 18px; }
  .hero-meta .cta-row a.primary { width: 100%; text-align: center; padding: 14px 22px; font-size: 14px; }
  .page-head { padding: 44px 0 32px; }
  .page-head h1 { margin-bottom: 16px; }
  .explore { padding: 56px 0; }
  .explore h2 { margin-bottom: 24px; padding-bottom: 16px; }
  .explore-grid { grid-template-columns: 1fr; border-left: none; }
  .explore-tile { padding: 24px 0; border: none; border-top: 1px solid var(--hair); min-height: 0; gap: 14px; }
  .explore-tile:last-child { border-bottom: 1px solid var(--hair); }
  .explore-tile h3 { font-size: 26px; }
  .featured { border-radius: 18px; margin-bottom: 32px; }
  .featured .f-img { aspect-ratio: 4 / 3; }
  .featured .f-meta { padding: 28px 22px 30px; }
  .featured h3 { font-size: 32px; }
  .featured .f-blurb { font-size: 15.5px; margin-bottom: 24px; }
  .featured .f-stack { gap: 12px; padding-top: 18px; font-size: 10.5px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .card { border-radius: 18px; }
  .card .hero-img { aspect-ratio: 4 / 3; }
  .card .meta { padding: 22px 20px 26px; }
  .card h3 { font-size: 26px; }
  .card .blurb { font-size: 14px; }
  .section-head { gap: 16px; padding-bottom: 20px; margin-bottom: 36px; }
  .section-head .hint { text-align: left; max-width: 100%; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; padding: 20px 0; }
  .tl-when { font-size: 11px; margin-bottom: 2px; padding-top: 0; }
  .tl-title { font-size: 20px; }
  .tl-org { font-size: 13px; }
  .exp-layout .intro h3 { font-size: 24px; }
  .caps-list .cap { grid-template-columns: 48px 1fr; gap: 16px; }
  .caps-list .cap .num { font-size: 24px; }
  .caps-list .cap h4 { font-size: 22px; }
  .lightbox { padding: 16px 10px; }
  .lightbox .panel { border-radius: 18px; }
  .lightbox .panel-hero { aspect-ratio: 4 / 3; }
  .lightbox .panel-hero img { max-width: 66%; }
  .lightbox .body { padding: 24px 20px 28px; }
  .lightbox .body h2 { font-size: 30px; }
  .lightbox .body .title-row { margin-bottom: 16px; gap: 12px; }
  .lightbox .body .section { margin-bottom: 20px; }
  .lightbox .body .section p,
  .lightbox .body .section ul li { font-size: 14px; line-height: 1.6; }
  .lightbox .close { width: 40px; height: 40px; top: 14px; right: 14px; font-size: 20px; }
  .lightbox .body .link-row { gap: 8px; margin-top: 24px; padding-top: 20px; }
  .lightbox .body .link-row a { font-size: 12.5px; padding: 10px 16px; }
  .deck-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .slide-viewer { padding: 20px 6px; }
  .slide-viewer .nav-btn { width: 44px; height: 44px; font-size: 22px; background: rgba(246, 242, 231, 0.18); }
  .slide-viewer .nav-btn.prev { left: 6px; }
  .slide-viewer .nav-btn.next { right: 6px; }
  .slide-viewer .sv-close { width: 40px; height: 40px; top: 14px; right: 14px; }
  .hero-meta .stats { grid-template-columns: 1fr 1fr; }
  .mobile-menu-inner { padding: 80px 20px 40px; }
  .mobile-menu-inner a { font-size: 34px; padding: 14px 0; }
  .mobile-menu-inner a.primary { font-size: 16px; padding: 16px 22px; }
  .contact-section { padding: 72px 0 64px; }
  .contact-section p { font-size: 16px; margin-bottom: 32px; }
  .contact-section .links { gap: 8px; }
  .contact-section .links a { padding: 12px 18px; font-size: 13px; }
  footer { padding: 24px 0 36px; font-size: 11px; }
}
