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

:root {
  --bg:        oklch(98% 0.007 193);
  --bg2:       oklch(95.5% 0.010 193);
  --bg3:       oklch(92.5% 0.013 193);
  --surface:   oklch(99.5% 0.004 193);
  --border:    oklch(88% 0.013 193);
  --text:      oklch(20% 0.010 200);
  --text-muted:oklch(53% 0.009 200);
  --teal:      oklch(48% 0.13 192);
  --teal-lt:   oklch(94.5% 0.022 192);
  --teal-mid:  oklch(72% 0.08 192);
  --accent:    var(--teal);
  --accent2:   var(--teal);
  --accent-glow: color-mix(in oklch, var(--teal) 10%, transparent);

  --font-sans: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-serif:'Bricolage Grotesque', system-ui, sans-serif;

  --nav-h: 64px;
  --max-w: 1100px;

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-family: var(--font-serif); font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-family: var(--font-serif); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }
p  { color: var(--text-muted); }
a  { color: inherit; text-decoration: none; }

.accent  { color: var(--teal); }
.accent2 { color: var(--teal); }

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

section { padding: 7rem 0; }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

/* ── Nav ────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#nav::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  z-index: -1;
}

#nav.scrolled {
  background: oklch(98% 0.007 193 / 0.88);
  box-shadow: 0 1px 0 var(--border);
}

#nav.scrolled::before {
  opacity: 1;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-links .nav-cta {
  background: var(--teal);
  color: oklch(99% 0.004 193);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.nav-links .nav-cta:hover { opacity: 0.85; color: oklch(99% 0.004 193); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Search ─────────────────────────────────────────────────── */
.nav-search {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  margin-right: 0.25rem;
}
.nav-search:hover { color: var(--teal); }
.nav-search[data-tooltip] { position: relative; }
.nav-search[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.nav-search[data-tooltip]:hover::after { opacity: 1; }

#searchOverlay {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 95;
  overflow-y: auto;
}
#searchOverlay.open { display: flex; flex-direction: column; }

.search-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  z-index: 1;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 0.65rem 1.25rem;
  transition: border-color 0.2s;
}
.search-input-wrap:focus-within { border-color: var(--teal); }
.search-input-wrap svg { flex-shrink: 0; color: var(--text-muted); }

#searchInput {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text);
  outline: none;
}
#searchInput::placeholder { color: var(--text-muted); }

#searchClose {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
#searchClose:hover { color: var(--text); }

.search-body {
  flex: 1;
  padding: 2.5rem 0;
}

#searchEmpty, #searchNoResults {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
}

.search-group-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-count {
  background: var(--teal-lt);
  color: var(--teal);
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
}
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 900px) {
  .search-results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .search-results-grid { grid-template-columns: 1fr; }
}

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 4rem) 2rem 4rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 75% 35%, color-mix(in oklch, var(--teal) 11%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 15% 75%, color-mix(in oklch, var(--teal) 9%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 50% 98%, color-mix(in oklch, var(--teal) 5%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-text h1 { margin-bottom: 1.5rem; }

.hero-nee {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 48ch;
  margin-bottom: 1.5rem;
}

.hero-sub em { color: var(--teal); font-style: normal; font-weight: 600; }
.hero-sub em a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  background: var(--teal-lt);
  color: var(--teal);
  border: 1px solid var(--teal-mid);
}

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--teal);
  color: oklch(99% 0.004 193);
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ── Hero photo ─────────────────────────────────────────────── */
.hero-photo {
  position: relative;
  width: 340px;
  height: 340px;
  flex-shrink: 0;
}

.photo-ring {
  position: relative;
  z-index: 2;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: 0 0 0 8px color-mix(in oklch, var(--teal) 6%, transparent), 0 20px 60px oklch(0% 0 0 / 0.10);
}

.photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: filter 0.4s;
}

.photo-blob {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--teal) 8%, transparent) 0%, color-mix(in oklch, var(--teal) 6%, transparent) 50%, transparent 70%);
  z-index: 1;
  animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.6; }
}

/* ── Hero scroll hint ───────────────────────────────────────── */
.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--teal), transparent);
  animation: scrollDrop 2.2s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── About ──────────────────────────────────────────────────── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { margin-bottom: 1rem; }
.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.stat:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 4px 20px color-mix(in oklch, var(--teal) 8%, transparent); }

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Timeline ───────────────────────────────────────────────── */
.timeline {
  position: relative;
  margin-top: 3rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--teal), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.timeline-item.visible { opacity: 1; transform: none; }

.timeline-marker {
  position: absolute;
  left: calc(-2rem - 4px);
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--teal) 15%, transparent);
}

.timeline-content {
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.timeline-content:hover { border-color: var(--teal); box-shadow: 0 4px 20px color-mix(in oklch, var(--teal) 7%, transparent); }

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.timeline-company {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.timeline-period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-content h3 { margin-bottom: 0.4rem; font-size: 1rem; }
.timeline-content p { font-size: 0.875rem; }

/* ── Book ───────────────────────────────────────────────────── */
#book { background: var(--bg2); }

.book-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  padding: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 40px oklch(0% 0 0 / 0.06);
}

.book-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 85% 50%, color-mix(in oklch, var(--teal) 5%, transparent) 0%, transparent 60%);
  pointer-events: none;
}

.book-text h2 { margin-bottom: 0.25rem; }

.book-subtitle {
  color: var(--teal);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.book-text p { margin-bottom: 1.5rem; max-width: 55ch; }

.book-cover-img {
  flex-shrink: 0;
}

.book-cover-img img {
  width: 200px;
  border-radius: 6px;
  box-shadow: -6px 6px 24px oklch(0% 0 0 / 0.18), 0 2px 8px oklch(0% 0 0 / 0.10);
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover-img img:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: -8px 12px 32px oklch(0% 0 0 / 0.22), 0 4px 12px oklch(0% 0 0 / 0.12);
}

/* ── Writing ────────────────────────────────────────────────── */
#writing h2 { margin-bottom: 2.5rem; }

.writing-group { margin-bottom: 3.5rem; }

.writing-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--teal-lt);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.writing-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.writing-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px color-mix(in oklch, var(--teal) 9%, transparent);
}

.writing-card--featured {
  grid-column: span 2;
  background: var(--teal-lt);
  border-color: var(--teal-mid);
}
.writing-card--featured:hover {
  border-color: var(--teal);
  box-shadow: 0 6px 24px color-mix(in oklch, var(--teal) 12%, transparent);
}

.writing-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.writing-card--featured .writing-tag { color: var(--teal); }
.writing-card--featured .writing-cta { color: var(--teal); }

.writing-card h3 { flex: 1; font-size: 0.9rem; line-height: 1.45; color: var(--text); }
.writing-card h4 { flex: 1; font-size: 0.875rem; line-height: 1.4; color: var(--text); font-weight: 500; }

.writing-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: auto;
  transition: letter-spacing 0.2s;
}
.writing-card:hover .writing-cta { letter-spacing: 0.03em; }

/* ── Talks ──────────────────────────────────────────────────── */
#talks { background: var(--bg2); }
.section-intro { color: var(--text-muted); margin-bottom: 2.5rem; max-width: 65ch; }

/* Year filter */
.year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.year-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.year-btn:hover, .year-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: oklch(99% 0.004 193);
}

.talks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.talk-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.talk-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px color-mix(in oklch, var(--teal) 8%, transparent);
}

.talk-meta {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.talk-card h4 { font-size: 0.875rem; line-height: 1.45; color: var(--text); font-weight: 500; }

.talk-card .talk-type {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: var(--teal-lt);
  color: var(--teal);
  align-self: flex-start;
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Contact ────────────────────────────────────────────────── */
#contact {
  position: relative;
  overflow: hidden;
  padding-bottom: 6rem;
}

#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 30% 50%, color-mix(in oklch, var(--teal) 5%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 70% 50%, color-mix(in oklch, var(--teal) 5%, transparent) 0%, transparent 60%);
  pointer-events: none;
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner h2 { margin-bottom: 2.5rem; }
.contact-inner > p { margin-bottom: 2.5rem; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: stretch;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.75rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 0.875rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.contact-link:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px color-mix(in oklch, var(--teal) 9%, transparent);
}
.contact-link svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--bg2);
}
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.page-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}
.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-info {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 3rem;
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-photo { width: 220px; height: 220px; margin: 0 auto; }
  .photo-ring { width: 200px; height: 200px; }
  .hero-text { order: 1; }
  .hero-photo { order: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-card { grid-template-columns: 1fr; gap: 2rem; }
  .book-cover-img { display: none; }
  .writing-card--featured { grid-column: span 1; }
}

@media (max-width: 640px) {
  section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }

  .hero-photo { display: none; }

  /* Nav */
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: oklch(98% 0.007 193 / 0.97);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 1.25rem;
    z-index: 99;
  }
  .nav-burger { display: flex; }

  /* Hero */
  .hero-text h1 { font-size: 3rem; }
  .hero-sub { font-size: 1rem; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }
  .hero-scroll-hint { display: none; }

  /* About */
  .about-stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat { padding: 1.25rem; }
  .stat-number { font-size: 2rem; }

  /* Timeline */
  .timeline { padding-left: 1.5rem; }
  .timeline-marker { left: calc(-1.5rem - 4px); }
  .timeline-content { padding: 1.25rem; }

  /* Book */
  .book-card { padding: 1.75rem; }

  /* Writing */
  .writing-grid { grid-template-columns: 1fr; }

  /* Talks */
  .talks-grid { grid-template-columns: 1fr; }
  .year-filter { gap: 0.4rem; }
  .year-btn { padding: 0.4rem 0.9rem; font-size: 0.75rem; }

  /* Contact */
  .contact-link { font-size: 0.85rem; padding: 1rem 1.25rem; }
}

/* ── LinkedIn Connect FAB ── */
.linkedin-fab {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  z-index: 900;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 0.75rem 1rem;
  background: var(--teal);
  color: oklch(99% 0.004 193);
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 20px color-mix(in oklch, var(--teal) 40%, transparent), 0 2px 8px oklch(0% 0 0 / 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.linkedin-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 28px color-mix(in oklch, var(--teal) 50%, transparent), 0 4px 12px oklch(0% 0 0 / 0.14); }
.linkedin-fab:active { transform: translateY(0); }

@media (max-width: 767px) {
  .linkedin-fab { display: flex; }
}

/* ── LinkedIn Bottom Sheet ── */
.linkedin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: oklch(0% 0 0 / 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.linkedin-overlay.is-open {
  display: flex;
  opacity: 1;
}
.linkedin-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1rem 1.75rem 2.5rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 40px oklch(0% 0 0 / 0.12);
}
.linkedin-overlay.is-open .linkedin-sheet { transform: translateY(0); }

.linkedin-sheet-handle {
  width: 2.5rem;
  height: 4px;
  background: var(--border);
  border-radius: 9999px;
  margin: 0 auto 1.25rem;
}
.linkedin-sheet-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg2);
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.linkedin-sheet-close:hover { background: var(--bg3); color: var(--text); }

.linkedin-sheet-header { text-align: center; margin-bottom: 1.5rem; }
.linkedin-sheet-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.3rem;
}
.linkedin-sheet-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.2rem;
}
.linkedin-sheet-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.linkedin-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.linkedin-qr-inner {
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  border: 2px solid var(--teal-lt);
  box-shadow: 0 4px 20px color-mix(in oklch, var(--teal) 10%, transparent);
  line-height: 0;
}
#linkedinQR img, #linkedinQR canvas { border-radius: 4px; display: block; }

.linkedin-sheet-actions {
  display: flex;
  gap: 0.75rem;
}
.linkedin-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.linkedin-btn:hover { transform: translateY(-1px); }
.linkedin-btn:active { transform: translateY(0); opacity: 0.85; }
.linkedin-btn-primary {
  background: var(--teal);
  color: oklch(99% 0.004 193);
  box-shadow: 0 3px 14px color-mix(in oklch, var(--teal) 35%, transparent);
}
.linkedin-btn-secondary {
  background: var(--teal-lt);
  color: var(--teal);
}
