/* ─── Nav ──────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: all 0.4s var(--ease-out);
}

.nav[data-scrolled="true"] {
  padding: 0.6rem 0;
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
}

.nav-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: oklch(from var(--text) l c h / 0.04);
}

.nav-link.active {
  color: var(--text);
  font-weight: 500;
}

.nav-link-dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s var(--ease-out);
}

.nav[data-menu-open="true"] .nav-hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav[data-menu-open="true"] .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav[data-menu-open="true"] .nav-hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem var(--page-pad) 2rem;
  gap: 4px;
}

.nav[data-menu-open="true"] .mobile-menu { display: flex; }

.mobile-menu-link {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  animation: menuSlideIn 0.4s var(--ease-out) both;
}

.mobile-menu-link.active { color: var(--accent); }

@keyframes menuSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ─── Buttons ─────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: white;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px oklch(from var(--accent) l c h / 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: oklch(from var(--text) l c h / 0.03);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  transition: gap 0.2s var(--ease-out);
}

.link-arrow:hover { gap: 10px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding: 0;
  transition: color 0.2s, gap 0.2s;
}

.back-link:hover { color: var(--text); gap: 12px; }

/* ─── Single-screen Home ───────────────────── */
.single-home {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 18% 20%, oklch(from var(--accent) l c h / 0.12), transparent 26rem),
    radial-gradient(circle at 88% 78%, oklch(from var(--sage) l c h / 0.10), transparent 24rem),
    var(--bg);
}

.single-card {
  width: min(100%, 980px);
  color: var(--text);
}

.single-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45em 0.55em;
  margin: 0 0 clamp(0.95rem, 2.5vh, 1.85rem);
  font-family: var(--body);
  font-size: clamp(1.45rem, 3.2vw, 2.45rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0;
  color: var(--text);
}

@media (min-width: 900px) {
  .single-line {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}

.intro-line {
  margin-bottom: clamp(1.9rem, 5vh, 3.7rem);
}

.connect-line {
  margin-top: clamp(1.8rem, 4.8vh, 3.4rem);
}

.avatar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.3rem, 5vw, 3.15rem);
  height: clamp(2.3rem, 5vw, 3.15rem);
  border-radius: 50%;
  background:
    linear-gradient(145deg, oklch(from var(--accent) l c h / 0.88), oklch(from var(--sage) l c h / 0.78)),
    var(--accent);
  color: oklch(0.985 0.006 75);
  font-family: var(--display);
  font-size: clamp(0.76rem, 1.5vw, 0.95rem);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 32px oklch(from var(--accent) l c h / 0.18);
  transform: rotate(-5deg);
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out), text-shadow 0.2s var(--ease-out);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent-hover);
  text-shadow: 0 0 24px oklch(from var(--accent) l c h / 0.26);
}

.icon-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: clamp(2.75rem, 7vw, 4rem);
  margin-left: 0.08em;
  vertical-align: middle;
}

.single-icon {
  --icon-size: clamp(2.35rem, 6vw, 3.25rem);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-size);
  height: var(--icon-size);
  flex: 0 0 var(--icon-size);
  border-radius: 12px;
  border: 1px solid oklch(from var(--text) l c h / 0.12);
  background: var(--bg-card);
  color: var(--text);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.08) inset,
    0 12px 28px oklch(0 0 0 / 0.22);
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.55vw, 0.92rem);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transform: translateX(var(--tucked, 0px)) rotate(var(--tilt, 0deg));
  transition:
    transform 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out),
    color 0.22s var(--ease-out);
  isolation: isolate;
  cursor: pointer;
}

.single-icon span:first-child {
  position: relative;
  z-index: 1;
}

.brand-icon {
  position: relative;
  z-index: 1;
  width: 58%;
  height: 58%;
  fill: currentColor;
}

.icon-cluster .single-icon:not(:first-child) {
  margin-left: calc(var(--icon-size) * -0.42);
}

.single-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 26% 18%, oklch(1 0 0 / 0.22), transparent 1.5rem),
    linear-gradient(145deg, var(--icon-accent, var(--accent)), oklch(from var(--icon-accent, var(--accent)) calc(l - 0.18) c h));
  opacity: 0.88;
  z-index: 0;
}

.single-icon:nth-child(1) { z-index: 10; }
.single-icon:nth-child(2) { z-index: 20; }
.single-icon:nth-child(3) { z-index: 30; }
.single-icon:nth-child(4) { z-index: 40; }
.single-icon:nth-child(5) { z-index: 50; }
.single-icon:nth-child(6) { z-index: 60; }
.single-icon:nth-child(7) { z-index: 70; }
.single-icon:nth-child(8) { z-index: 80; }

.icon-cluster:hover .single-icon,
.icon-cluster:focus-within .single-icon {
  transform: translateX(var(--spread, 0px)) rotate(0deg);
}

.single-icon:hover,
.single-icon:focus-visible {
  z-index: 100;
  color: white;
  border-color: oklch(from var(--text) l c h / 0.24);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.14) inset,
    0 18px 40px oklch(0 0 0 / 0.32);
  transform: translateX(var(--spread, 0px)) translateY(-7px) rotate(0deg) scale(1.06);
  outline: none;
}

.standalone-icon {
  margin-left: 0.1em;
  --tucked: 0px;
  --spread: 0px;
}

.standalone-icon:hover,
.standalone-icon:focus-visible {
  transform: translateY(-7px) rotate(0deg) scale(1.06);
}

.single-icon-youtube,
.tone-youtube {
  --icon-accent: oklch(0.60 0.24 29);
  color: white;
}

.tone-sage {
  --icon-accent: var(--sage);
}

.tone-warm { --icon-accent: oklch(0.66 0.16 42); }
.tone-violet { --icon-accent: oklch(0.56 0.16 292); }
.tone-amber { --icon-accent: oklch(0.70 0.16 78); }
.tone-cyan { --icon-accent: oklch(0.66 0.12 195); }
.tone-blue { --icon-accent: oklch(0.55 0.15 255); }
.tone-earth { --icon-accent: oklch(0.52 0.11 34); }
.tone-paper { --icon-accent: oklch(0.74 0.08 92); color: oklch(0.18 0.02 55); }
.tone-x { --icon-accent: oklch(0.18 0.02 260); color: white; }
.tone-github { --icon-accent: oklch(0.24 0.02 260); color: white; }
.tone-linkedin { --icon-accent: oklch(0.53 0.17 250); color: white; }
.tone-mail { --icon-accent: oklch(0.62 0.14 150); color: white; }

.icon-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.6rem);
  z-index: 200;
  width: max-content;
  max-width: 16rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: oklch(0.09 0.01 260 / 0.92);
  color: white;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

.single-icon:hover .icon-tooltip,
.single-icon:focus-visible .icon-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.single-footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: clamp(1rem, 3vh, 2rem);
  border-top: 1px solid var(--border);
}

.single-footer-line a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.single-footer-line a:hover,
.single-footer-line a:focus-visible {
  color: var(--text);
  outline: none;
}

.theme-toggle-inline {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
}

.theme-toggle-inline:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

@media (max-width: 640px) {
  .single-home {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.6rem 1.35rem;
  }

  .single-line {
    display: block;
    font-size: clamp(1.34rem, 6vw, 1.95rem);
    margin-bottom: 1.18rem;
    line-height: 1.14;
  }

  .intro-line {
    margin-bottom: 2.45rem;
  }

  .connect-line {
    margin-top: 2.25rem;
  }

  .icon-cluster {
    display: flex;
    width: 100%;
    margin: 0.55rem 0 0;
    min-height: 2.9rem;
  }

  .single-icon {
    --icon-size: 2.45rem;
  }

  .standalone-icon {
    display: inline-flex;
    margin-top: 0.5rem;
  }

  .icon-cluster .single-icon {
    transform: translateX(0) rotate(var(--tilt, 0deg));
  }

  .icon-cluster:hover .single-icon,
  .icon-cluster:focus-within .single-icon,
  .icon-cluster .single-icon:hover,
  .icon-cluster .single-icon:focus-visible {
    transform: translateY(-5px) rotate(0deg) scale(1.04);
  }

  .icon-tooltip {
    display: none;
  }
}

/* ─── Hero ─────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 3rem;
  min-height: calc(100vh - 160px);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.hero-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-name { margin-bottom: 1.5rem; }

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-canvas {
  border-radius: var(--radius-lg);
  filter: blur(0.5px);
}

.hero-scroll-indicator {
  display: flex;
  justify-content: center;
  padding-bottom: 2rem;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--text-secondary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-ctas { justify-content: center; }
  .hero-visual { display: none; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
}

/* ─── Featured Projects ───────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) { .featured-grid { grid-template-columns: 1fr; } }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  position: relative;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px oklch(from var(--text) l c h / 0.06);
}

.project-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-card-content { padding: 1.25rem; }

.project-card-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(from var(--bg) l c h / 0.8);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  color: var(--text-secondary);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all 0.3s var(--ease-out);
}

.project-card:hover .project-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* ─── Project placeholder ─────────────────── */
.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, oklch(from var(--ph-color) l c h / 0.08), oklch(from var(--ph-color) l c h / 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.placeholder-svg {
  width: 100%;
  height: 100%;
}

.placeholder-label {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ─── Status badges ───────────────────────── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 20px;
  border: 1px solid;
}

.status-badge[data-status="shipped"] {
  color: var(--sage);
  border-color: oklch(from var(--sage) l c h / 0.3);
  background: oklch(from var(--sage) l c h / 0.08);
}

.status-badge[data-status="in-development"] {
  color: var(--accent);
  border-color: oklch(from var(--accent) l c h / 0.3);
  background: oklch(from var(--accent) l c h / 0.08);
}

.status-badge[data-status="active"] {
  color: oklch(0.55 0.12 250);
  border-color: oklch(0.55 0.12 250 / 0.3);
  background: oklch(0.55 0.12 250 / 0.08);
}

/* ─── Philosophy ──────────────────────────── */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.philosophy-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s;
}

.philosophy-card:hover { border-color: var(--border-hover); }

@media (max-width: 768px) { .philosophy-grid { grid-template-columns: 1fr; } }

/* ─── Now section ─────────────────────────── */
.now-card {
  padding: clamp(2rem, 4vw, 3.5rem);
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ─── Work page ───────────────────────────── */
.filter-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.filter-btn:not(.active):hover {
  border-color: var(--border-hover);
  color: var(--text);
}

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

.work-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.work-card-body { padding: 1.25rem; }

/* ─── Project Detail ──────────────────────── */
.detail-header {
  padding: 2rem 0 3rem;
}

.detail-hero-image {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  aspect-ratio: 2.2/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, oklch(from var(--card-accent) l c h / 0.08), oklch(from var(--card-accent) l c h / 0.18));
  position: relative;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
}

@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; gap: 2rem; } }

.sidebar-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child { border-bottom: none; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  color: var(--accent);
  font-weight: 500;
  transition: gap 0.2s;
}

.sidebar-link:hover { gap: 10px; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tech-tag {
  display: inline-block;
  padding: 4px 12px;
  background: oklch(from var(--text) l c h / 0.05);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.feature-bullet {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 8px;
}

.next-project-section {
  padding: clamp(3rem, 6vh, 5rem) 0;
  border-top: 1px solid var(--border);
}

.next-project-card {
  display: block;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: all 0.3s var(--ease-out);
}

.next-project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Writing page ────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.post-embed {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.post-embed:hover,
.post-embed:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px oklch(0 0 0 / 0.18);
  outline: none;
}

.post-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, oklch(from var(--accent) l c h / 0.35), transparent 36%),
    linear-gradient(145deg, oklch(from var(--bg-alt) l c h / 0.9), oklch(from var(--sage) l c h / 0.18));
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb[data-fallback="true"]::after,
.post-thumb:not(:has(img))::after {
  content: attr(data-source);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.2rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-body h2 {
  font-family: var(--display);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.18;
}

.post-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ─── About page ──────────────────────────── */
.about-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: 5rem;
}

@media (max-width: 768px) {
  .about-header { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, oklch(from var(--accent) l c h / 0.1), oklch(from var(--sage) l c h / 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-story { max-width: 700px; }

.about-paragraph {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-period { color: var(--text-secondary); padding-top: 2px; }

@media (max-width: 600px) {
  .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.community-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s;
}

.community-card:hover { border-color: var(--border-hover); }

@media (max-width: 600px) { .community-grid { grid-template-columns: 1fr; } }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-group {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

@media (max-width: 600px) { .skills-grid { grid-template-columns: 1fr; } }

.contact-links { display: flex; flex-direction: column; gap: 0; }

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  font-weight: 500;
}

.contact-link:hover { color: var(--accent); padding-left: 8px; }

/* ─── Speaking page ───────────────────────── */
.speaking-hero-section {
  padding-bottom: clamp(2rem, 5vh, 4rem);
}

.speaking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  padding-top: 4rem;
}

.speaker-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.speaker-photo {
  width: 92px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, oklch(from var(--accent) l c h / 0.88), oklch(from var(--sage) l c h / 0.72)),
    var(--accent);
  color: white;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 16px 40px oklch(from var(--accent) l c h / 0.18);
}

.speaking-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.speaking-action,
.bio-block {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.25rem;
}

.bio-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bio-block p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.bio-block p:last-child {
  margin-bottom: 0;
}

.copy-btn {
  flex: 0 0 auto;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.copy-btn:hover,
.copy-btn:focus-visible {
  color: var(--text);
  border-color: var(--border-hover);
  background: oklch(from var(--text) l c h / 0.04);
  outline: none;
}

.speaker-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  background: oklch(from var(--text) l c h / 0.03);
  font-size: 0.9rem;
}

.speaker-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.speaker-facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.speaker-facts dt {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.speaker-facts dd {
  color: var(--text);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .speaking-hero,
  .speaking-action-grid,
  .profile-grid,
  .speaker-details-grid {
    grid-template-columns: 1fr;
  }

  .speaking-hero {
    align-items: start;
  }
}

@media (max-width: 520px) {
  .speaker-card,
  .speaker-facts div {
    grid-template-columns: 1fr;
  }
}

/* ─── Footer ──────────────────────────────── */
.footer {
  padding: clamp(3rem, 6vh, 5rem) 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

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

.footer-col { display: flex; flex-direction: column; gap: 6px; }

.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: left;
  padding: 0;
  transition: color 0.2s;
  text-decoration: none;
  display: block;
}

.footer-link:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ─── Page transition ─────────────────────── */
.page-transition {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.page-transition[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Tweaks Panel ────────────────────────── */
.tweaks-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 16px 48px oklch(from var(--text) l c h / 0.1);
  backdrop-filter: blur(20px);
  font-family: var(--body);
}

.tweaks-title {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tweak-row {
  margin-bottom: 1rem;
}

.tweak-label {
  display: block;
  font-size: 0.75rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.tweak-options {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tweak-option {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tweak-option.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.tweak-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.tweak-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}
