/* ============================================================
   Tanvi Nautiyal — portfolio styles
   Palette keeps the taupe-gold of the original site on cream.
   ============================================================ */

:root {
  --bg: #f5f1e8;
  --bg-2: #ede7da;
  --surface: #fbf9f4;
  --ink: #1b1915;
  --ink-2: #4a463f;
  --muted: #7a7469;
  --line: #d9d2c3;
  --accent: #8a7443;
  --accent-ink: #5d4d28;
  --accent-soft: #e6d7a8;
  --blob: #f1df9e;
  --shadow: 0 20px 60px -30px rgba(27, 25, 21, .45);
  --radius: 18px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14130f;
    --bg-2: #1c1a15;
    --surface: #1f1d17;
    --ink: #f1ece1;
    --ink-2: #cfc8b8;
    --muted: #9a9385;
    --line: #37332a;
    --accent: #d2b56a;
    --accent-ink: #e9d9a6;
    --accent-soft: #3d3421;
    --blob: #4a3d1c;
    --shadow: 0 20px 60px -30px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14130f;
  --bg-2: #1c1a15;
  --surface: #1f1d17;
  --ink: #f1ece1;
  --ink-2: #cfc8b8;
  --muted: #9a9385;
  --line: #37332a;
  --accent: #d2b56a;
  --accent-ink: #e9d9a6;
  --accent-soft: #3d3421;
  --blob: #4a3d1c;
  --shadow: 0 20px 60px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.05; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.serif { font-family: var(--font-display); }
.em { font-family: var(--font-display); font-style: italic; color: var(--accent-ink); font-size: 1.08em; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; }
.monogram {
  width: 36px; height: 36px; border: 1.5px solid var(--ink); border-radius: 8px;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; line-height: 1;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { display: flex; gap: 6px; align-items: baseline; font-size: 13.5px; color: var(--ink-2); padding: 6px 0; position: relative; }
.nav-links a .n { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--accent); }
.burger { display: none; }

@media (max-width: 900px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav-links a::after { display: none; }
  .burger { display: grid; }
}

/* ---------- buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--surface); }
.pill {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #7ed08a; box-shadow: 0 0 0 3px rgba(126,208,138,.25); }

/* ---------- section scaffolding ---------- */
section { padding: 96px 0; position: relative; }
.section-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(38px, 5vw, 60px); letter-spacing: -.01em; }
.section-head .mono { flex: 1; min-width: 140px; }
.section-head .rule { flex: 1 1 100%; height: 1px; background: var(--line); margin-top: 20px; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 80px; overflow: hidden; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(64px, 10.5vw, 148px);
  letter-spacing: -.03em; line-height: .92; margin: 0 0 28px;
}
.hero h1 .outline {
  color: transparent; -webkit-text-stroke: 1.5px var(--ink);
}
.hero .tagline { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; color: var(--ink); max-width: 30ch; margin-bottom: 20px; font-weight: 500; letter-spacing: -.01em; }
.hero .intro { color: var(--ink-2); max-width: 56ch; margin-bottom: 26px; }
.hero .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

.portrait { position: relative; justify-self: center; width: min(420px, 100%); }
.portrait .blob {
  position: absolute; inset: -12% -18% auto auto; width: 120%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--blob), transparent 68%);
  z-index: 0; pointer-events: none;
}
.portrait .frame {
  position: relative; z-index: 1; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 999px 999px 24px 24px; background: var(--bg-2); box-shadow: var(--shadow);
}
.portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait .frame .placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 24px;
  background: linear-gradient(160deg, var(--bg-2), var(--accent-soft));
  color: var(--accent-ink); font-family: var(--font-display); font-size: 22px;
}
.sticker {
  position: absolute; z-index: 2; left: -8%; bottom: 14%;
  width: 118px; height: 118px; border-radius: 50%; background: var(--blob); color: var(--ink);
  display: grid; place-items: center; text-align: center; padding: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5;
  transform: rotate(-10deg); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
a.sticker:hover { filter: brightness(1.06); animation-play-state: paused; }
@keyframes float { 0%,100% { transform: rotate(-10deg) translateY(0);} 50% { transform: rotate(-8deg) translateY(-6px);} }

.facts { display: grid; grid-template-columns: repeat(var(--facts, 4), 1fr); gap: 0; margin-top: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 18px 20px 18px 0; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts > div + div { padding-left: 20px; }
.facts .v { font-size: 15px; font-weight: 500; margin-top: 6px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { order: -1; width: min(320px, 80%); }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(2) { border-right: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts > div:nth-child(3) { padding-left: 0; }
}
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts > div { border-right: 0 !important; padding-left: 0 !important; } .facts > div + div { border-top: 1px solid var(--line); } }

/* ---------- marquee ---------- */
.marquee { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track a { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 26px; color: var(--ink-2); white-space: nowrap; opacity: .85; }
.marquee-track a:hover { color: var(--accent-ink); opacity: 1; }
.marquee-track a img { height: 28px; width: auto; }
.marquee-track a::before { content: "✦"; font-size: 12px; color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .sticker { animation: none; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--stats, 4), 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.stat .v { font-family: var(--font-display); font-size: clamp(44px, 5vw, 64px); line-height: 1; color: var(--accent-ink); letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13.5px; margin-top: 10px; line-height: 1.45; }
/* a story box links down to its case study */
.stat.story { display: flex; flex-direction: column; cursor: pointer; transition: transform .25s, border-color .25s, background .25s; }
.stat.story .l { flex: 1; }
.stat.story .more { margin-top: 18px; color: var(--accent); transition: color .2s; }
.stat.story .more span { display: inline-block; transition: transform .25s; }
.stat.story:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat.story:hover .more { color: var(--accent-ink); }
.stat.story:hover .more span { transform: translateY(3px); }
.stat.story:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1100px) and (min-width: 901px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* ---------- experience ---------- */
/* one plain row per role */
.timeline { border-top: 1px solid var(--line); }
.job {
  display: grid; grid-template-columns: 170px 190px minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 22px 6px; border-bottom: 1px solid var(--line);
}
.job .company { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.job .role { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.job .team { color: var(--muted); font-size: 14px; margin-top: 2px; }
.job .now { color: var(--accent-ink); }
.job .loc { text-align: right; }
@media (max-width: 1000px) {
  .job { grid-template-columns: 130px minmax(0, 1fr); gap: 6px 16px; }
  .job .company { grid-column: 2; grid-row: 1; font-size: 26px; }
  .job .when { grid-column: 1; grid-row: 1; }
  .job .roleline { grid-column: 2; grid-row: 2; }
  .job .loc { grid-column: 1; grid-row: 2; text-align: left; align-self: start; }
}
@media (max-width: 560px) {
  .job { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 18px 2px; }
  .job .when, .job .company, .job .roleline, .job .loc { grid-column: 1; grid-row: auto; }
}
.also { margin-top: 10px; padding: 24px 0 0; }
.also > .mono { margin-bottom: 14px; display: block; }
.also-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.also-grid a { display: block; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 14px; transition: border-color .2s, background .2s; }
.also-grid a:hover { border-style: solid; border-color: var(--accent); background: var(--surface); }
.also-grid .org { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.also-grid .role { font-size: 14px; font-weight: 500; margin-top: 6px; }
.also-grid .note { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .also-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .also-grid { grid-template-columns: 1fr; } }

.edu-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; }
.card h3 { font-family: var(--font-display); font-size: 28px; margin-bottom: 18px; }
.edu-list li, .cert-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.edu-list li:first-child, .cert-list li:first-child { border-top: 0; padding-top: 0; }
.edu-list .school { font-weight: 500; }
.edu-list .note, .cert-list .note { color: var(--muted); font-size: 13.5px; }
.cert-list a { color: var(--accent-ink); border-bottom: 1px solid var(--accent-soft); }
@media (max-width: 760px) { .edu-grid { grid-template-columns: 1fr; } }

/* ---------- projects (case studies) ---------- */
.cases { display: grid; gap: 20px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 48px); }
.case-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.case-top .mono:first-child { color: var(--accent); }
.case-title { font-family: var(--font-display); font-size: clamp(36px, 5.4vw, 68px); line-height: 1; letter-spacing: -.02em; margin: 28px 0 36px; max-width: 18ch; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.case-text { display: grid; gap: 22px; }
.case .block > .mono { margin-bottom: 7px; display: block; color: var(--accent); }
.case .block p { color: var(--ink-2); font-size: 15.5px; }
.case .skills { display: flex; flex-wrap: wrap; gap: 6px; }
.case .skills .pill { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }

/* the "what I built" figure */
.case-fig { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.case-fig > .mono { display: block; margin-bottom: 16px; }
.built { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.built li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.built .bn { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--accent-ink); }
.built .bt { font-weight: 600; letter-spacing: -.01em; }
.built p { color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.built .btag { display: inline-block; margin-top: 9px; color: var(--accent-ink); }
.flow { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); line-height: 1.9; }
.flow b { color: var(--ink); font-weight: 500; }

/* results */
.case { scroll-margin-top: 84px; }
.case-back { display: inline-block; margin-top: 28px; color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.case-back:hover { color: var(--accent-ink); border-color: var(--accent-soft); }
.results { display: grid; grid-template-columns: var(--cols, 1.5fr repeat(3, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--line); }
.result { padding: 24px 20px 4px 0; }
.result + .result { padding-left: 22px; border-left: 1px solid var(--line); }
.result .v { font-family: var(--font-display); font-size: clamp(38px, 4.4vw, 54px); line-height: 1; letter-spacing: -.02em; }
.result.big .v { font-size: clamp(64px, 9vw, 116px); color: var(--accent-ink); }
.result .mono { display: block; margin-top: 10px; line-height: 1.6; }
.case-closing { margin-top: 28px; font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.4; color: var(--accent-ink); max-width: 60ch; }
.case .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.case .links a { font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ink); }
.case .links a:hover { background: var(--ink); color: var(--bg); }
@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr; gap: 28px; }
  .results { grid-template-columns: 1fr 1fr; }
  .result.big { grid-column: 1 / -1; }
  .result + .result { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .result:nth-child(n+2) { padding-right: 14px; }
}
@media (max-width: 480px) { .results { grid-template-columns: 1fr; } .case-fig { padding: 16px; } }

.case-placeholder {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: clamp(32px, 6vw, 64px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.case-placeholder .mono { color: var(--accent); }
.case-placeholder h3 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); }
.case-placeholder p { color: var(--ink-2); max-width: 56ch; margin-bottom: 8px; }
.disclaimer { margin: -24px 0 28px; color: var(--muted); font-size: 13.5px; font-style: italic; }

/* ---------- writing ---------- */
.writing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 10px; min-height: 200px; transition: transform .25s, border-color .25s;
}
.post:hover { transform: translateY(-3px); border-color: var(--accent); }
.post .top { display: flex; justify-content: space-between; gap: 10px; }
.post h3 { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.post p { color: var(--muted); font-size: 14.5px; flex: 1; }
.post .arrow { color: var(--accent); font-size: 20px; align-self: flex-end; }
/* the whole card is clickable through its title link; a featured link sits on top */
.post { position: relative; }
.post-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-link:focus-visible { outline: none; }
.post-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-also {
  position: relative; z-index: 1; align-self: flex-start; font-size: 14px; font-weight: 500; color: var(--accent-ink);
  border-bottom: 1px solid var(--accent-soft); padding-bottom: 1px; transition: border-color .2s;
}
.post-also:hover { border-color: var(--accent); }
@media (max-width: 900px) { .writing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .writing-grid { grid-template-columns: 1fr; } }

/* ---------- speaking & advisory ---------- */
.speak-intro { max-width: 64ch; color: var(--ink-2); font-size: 18px; margin-bottom: 36px; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.offer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 10px; transition: transform .25s, border-color .25s;
}
.offer:hover { transform: translateY(-3px); border-color: var(--accent); }
.offer h3 { font-family: var(--font-display); font-size: 30px; line-height: 1.05; }
.offer p { color: var(--ink-2); font-size: 15px; }
.offer .mono { margin-top: 10px; color: var(--accent); }
.offer ul { display: grid; gap: 7px; }
.offer li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.offer li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.proof .mono { margin-right: 6px; }
.speak-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 32px; }
.speak-note { color: var(--muted); font-size: 13px; font-style: italic; flex-basis: 100%; }
@media (max-width: 900px) { .offers { grid-template-columns: 1fr; } }
@media (max-width: 1060px) and (min-width: 901px) { .nav-links { gap: 14px; } .nav-links a { font-size: 12.5px; } }

/* ---------- beyond work ---------- */
.beyond .intro { max-width: 60ch; color: var(--ink-2); font-size: 18px; margin-bottom: 40px; }
.pursuits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 56px; }
.pursuit { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.pursuit .icon { font-size: 26px; }
.pursuit .name { font-weight: 600; margin-top: 10px; }
.pursuit .note { color: var(--muted); font-size: 13.5px; }
@media (max-width: 900px) { .pursuits { grid-template-columns: 1fr 1fr; } }

.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sub-head h3 { font-family: var(--font-display); font-size: 34px; }

/* photo wall: photos keep their natural proportions. main.js picks the
   column count so the whole wall fits on one screen. */
.gallery { columns: 4; column-gap: 12px; scroll-margin-top: 150px; }
.shot {
  display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; cursor: zoom-in;
  position: relative; overflow: hidden; border-radius: 10px; background: var(--surface);
  break-inside: avoid; font: inherit; color: inherit;
}
.shot img { width: 100%; height: auto; display: block; transition: transform .7s ease; }
.shot:hover img, .shot:focus-visible img { transform: scale(1.035); }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shot .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 10px 9px; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.66)); color: #fff;
  font-family: var(--font-mono); font-size: 9.5px; line-height: 1.45; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.shot:hover .cap, .shot:focus-visible .cap { opacity: 1; transform: none; }
.gallery.dense { column-gap: 8px; }
.gallery.dense .shot { margin-bottom: 8px; border-radius: 7px; }
@media (max-width: 640px) { .gallery { column-gap: 8px; } .shot { margin-bottom: 8px; border-radius: 7px; } }
@media (hover: none) { .shot .cap { display: none; } }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(12, 11, 9, .93); padding: 56px 16px 64px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(100%, 1200px); max-height: 100%; width: auto; height: auto; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox .lb-cap {
  position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: #e9e3d6;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 0 16px;
}
.lightbox button {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox .lb-close { top: 14px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 52px; transform: none; } .lightbox { padding-bottom: 110px; } }

/* reading shelf */
.shelf { margin-top: 64px; }
.shelf .sub { color: var(--muted); font-size: 14px; }
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.book { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.book.quoted { grid-column: span 3; display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: center; }
.book .t { font-weight: 600; }
.book .a { color: var(--muted); font-size: 14px; }
.book .q { font-family: var(--font-display); font-style: italic; color: var(--accent-ink); font-size: 21px; line-height: 1.35; }
.book .q.take { font-style: normal; font-family: var(--font-body); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.book .q .src { display: block; margin-top: 8px; font-family: var(--font-mono); font-style: normal; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.shelf .more { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--accent-ink); border-bottom: 1px solid var(--accent-soft); }
@media (max-width: 900px) { .books { grid-template-columns: 1fr 1fr; } .book.quoted { grid-column: span 2; grid-template-columns: 1fr; gap: 10px; } }
@media (max-width: 520px) { .books { grid-template-columns: 1fr; } .book.quoted { grid-column: span 1; } }

/* ---------- contact ---------- */
.contact { padding-bottom: 60px; }
.contact-card {
  background: var(--ink); color: var(--bg); border-radius: 28px; padding: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; position: relative; overflow: hidden;
}
.contact-card::after {
  content: ""; position: absolute; right: -10%; top: -30%; width: 50%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%); opacity: .45; pointer-events: none;
}
.contact-card h2 { font-family: var(--font-display); font-size: clamp(48px, 7vw, 96px); letter-spacing: -.02em; margin-bottom: 18px; }
.contact-card p { color: color-mix(in srgb, var(--bg) 78%, transparent); max-width: 48ch; font-size: 17px; }
.contact-card .contact-speaking { margin-top: 16px; font-size: 15.5px; }
.contact-card .contact-speaking:empty { display: none; }
.contact-card .contact-speaking a { color: var(--bg); border-bottom: 1px solid color-mix(in srgb, var(--bg) 45%, transparent); position: relative; z-index: 1; }
.contact-card .contact-speaking a:hover { border-color: var(--bg); }
.contact-links { display: grid; gap: 12px; align-content: center; position: relative; z-index: 1; }
.contact-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); border-radius: 14px;
  transition: background .2s;
}
.contact-links a:hover { background: color-mix(in srgb, var(--bg) 10%, transparent); }
.contact-links a .mono { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.contact-links a .val { font-weight: 500; }
.contact-links a#email-copy { cursor: copy; }
.contact-links a.copied { border-color: #7ed08a; background: color-mix(in srgb, #7ed08a 14%, transparent); }
.contact-links a.copied #email-hint { color: #7ed08a; }
@media (max-width: 420px) { .contact-links a { flex-direction: column; align-items: flex-start; gap: 4px; } .contact-links a .val { word-break: break-all; } }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.draft-note {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 999px; background: #b4541f; color: #fff; text-align: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; box-shadow: var(--shadow);
}

/* progress bar */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 0; z-index: 60; }
