/* Palette: https://coolors.co/palette/fffcf2-ccc5b9-403d39-252422-eb5e28 */
:root {
  --floral: #fffcf2;
  --silver: #ccc5b9;
  --olive: #403d39;
  --eerie: #252422;
  --flame: #eb5e28;

  /* Dark (default) */
  --bg: var(--eerie);
  --bg-raised: #2d2b29;
  --text: var(--silver);
  --text-strong: var(--floral);
  --muted: #8f897f;
  --line: rgba(204, 197, 185, 0.14);
  --accent: var(--flame);
  --accent-soft: rgba(235, 94, 40, 0.12);
  --card-hover: rgba(64, 61, 57, 0.45);

  /* Canvas colours as RGB triplets */
  --accent-rgb: 235, 94, 40;
  --ray-rgb: 204, 197, 185;
  --tip-rgb: 255, 252, 242;
  --grid-rgb: 204, 197, 185;
  --bg-rgb: 37, 36, 34;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: var(--floral);
    --bg-raised: #f5f0e4;
    --text: var(--olive);
    --text-strong: var(--eerie);
    --muted: #7a746b;
    --line: rgba(64, 61, 57, 0.14);
    --accent-soft: rgba(235, 94, 40, 0.1);
    --card-hover: rgba(204, 197, 185, 0.32);
    --ray-rgb: 64, 61, 57;
    --tip-rgb: 37, 36, 34;
    --grid-rgb: 64, 61, 57;
    --bg-rgb: 255, 252, 242;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: var(--floral);
  --bg-raised: #f5f0e4;
  --text: var(--olive);
  --text-strong: var(--eerie);
  --muted: #7a746b;
  --line: rgba(64, 61, 57, 0.14);
  --accent-soft: rgba(235, 94, 40, 0.1);
  --card-hover: rgba(204, 197, 185, 0.32);
  --ray-rgb: 64, 61, 57;
  --tip-rgb: 37, 36, 34;
  --grid-rgb: 64, 61, 57;
  --bg-rgb: 255, 252, 242;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
::selection { background: var(--accent); color: var(--floral); }
a { color: inherit; text-decoration: none; }
strong { color: var(--text-strong); font-weight: 500; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--floral); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 16px; }

/* ───────────── Hero ───────────── */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 45% 60% at 76% 50%, rgba(var(--accent-rgb), .12), transparent 70%),
    var(--bg);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }

.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px clamp(16px, 5vw, 64px);
}
.mark svg { width: 40px; height: 40px; display: block; }
.mark path { fill: none; stroke: var(--accent); stroke-width: 2; transition: fill .25s; }
.mark text { font: 700 12px var(--font-display); fill: var(--text-strong); text-anchor: middle; letter-spacing: .02em; }
.mark:hover path { fill: var(--accent-soft); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(var(--bg-rgb), .6); border: 1px solid var(--line); color: var(--text-strong);
  backdrop-filter: blur(6px);
  transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(12deg); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
/* In dark we show the sun (switch to light); in light we show the moon. */
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: block; }
}

.hero-copy {
  position: absolute;
  left: clamp(16px, 5vw, 64px);
  top: 50%; transform: translateY(-50%);
  max-width: min(560px, 52vw);
  pointer-events: none;
}
.hero-copy a { pointer-events: auto; }
.eyebrow { font: 500 14px var(--font-mono); color: var(--accent); margin: 0 0 8px; letter-spacing: .04em; }
.hero h1 {
  font: 700 clamp(48px, 8vw, 96px)/1 var(--font-display);
  color: var(--text-strong); margin: 0 0 20px; letter-spacing: -.035em;
}
.hero-line { font: 500 clamp(20px, 2.4vw, 28px)/1.35 var(--font-display); color: var(--text-strong); margin: 0 0 12px; max-width: 18em; }
.accent { color: var(--accent); }
.hero-sub { font: 400 14px var(--font-mono); color: var(--muted); margin: 0 0 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 8px;
  font: 500 15px var(--font-body);
  transition: transform .2s, background-color .2s, border-color .2s, box-shadow .2s;
}
.btn-primary { background: var(--accent); color: var(--floral); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(var(--accent-rgb), .7); }
.btn-ghost { border: 1px solid var(--line); color: var(--text-strong); background: rgba(var(--bg-rgb), .5); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }


.hero-copy > * { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-copy > :nth-child(1) { animation-delay: .5s; }
.hero-copy > :nth-child(2) { animation-delay: .62s; }
.hero-copy > :nth-child(3) { animation-delay: .74s; }
.hero-copy > :nth-child(4) { animation-delay: .86s; }
.hero-copy > :nth-child(5) { animation-delay: .98s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Portrait: flat-top hexagon to match the grid */
.hero-portrait {
  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  position: absolute; margin: 0;
  right: clamp(16px, 8vw, 140px); top: 50%;
  width: clamp(260px, 30vw, 440px); aspect-ratio: 2 / 1.732;
  transform: translateY(-50%);
  opacity: 0; animation: portraitIn 1s .4s cubic-bezier(.2,.7,.2,1) forwards;
  pointer-events: none;
}
.hero-portrait::before {
  content: ""; position: absolute; inset: 0; clip-path: var(--hex);
  background: var(--accent-soft); transform: translate(18px, 14px);
}
.hero-portrait::after {
  content: ""; position: absolute; inset: 0; clip-path: var(--hex);
  background: var(--accent);
}
.hero-portrait img {
  position: absolute; inset: 3px; z-index: 1;
  width: calc(100% - 6px); height: calc(100% - 6px);
  object-fit: cover; object-position: 50% 30%;
  clip-path: var(--hex); display: block; background: var(--bg-raised);
}
@keyframes portraitIn { from { opacity: 0; transform: translateY(-46%) scale(.96); } to { opacity: 1; transform: translateY(-50%); } }

/* ───────────── Spotlight ───────────── */
.spotlight {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(600px circle at var(--mx, -999px) var(--my, -999px), rgba(var(--accent-rgb), .07), transparent 80%);
  opacity: var(--spot, 0); transition: opacity .4s;
}

/* ───────────── Layout ───────────── */
.shell {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 96px);
  display: grid; grid-template-columns: 1fr; gap: 0;
}
@media (min-width: 1024px) {
  .shell { grid-template-columns: 1fr 1.15fr; gap: 64px; }
}

.side-inner { padding: 72px 0 24px; }
@media (min-width: 1024px) {
  .side { position: relative; }
  .side-inner {
    position: sticky; top: 0;
    height: 100vh; max-height: 100vh;
    display: flex; flex-direction: column;
    padding: 96px 0;
  }
}
.side-name { font: 700 clamp(36px, 4.4vw, 48px)/1.05 var(--font-display); color: var(--text-strong); margin: 0; letter-spacing: -.03em; }
.side-role { font: 500 18px/1.4 var(--font-display); color: var(--text-strong); margin: 12px 0 0; }
.side-blurb { color: var(--muted); max-width: 22rem; margin: 16px 0 0; }

.side-nav { display: none; margin-top: 64px; }
@media (min-width: 1024px) { .side-nav { display: block; } }
.side-nav ul { list-style: none; padding: 0; margin: 0; }
.side-nav a {
  display: inline-flex; align-items: center; gap: 16px; padding: 12px 0;
  font: 500 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.nav-line { display: block; height: 1px; width: 32px; background: var(--muted); transition: width .25s, background-color .25s; }
.side-nav a:hover .nav-line, .side-nav a.active .nav-line { width: 64px; background: var(--accent); }
.side-nav a:hover, .side-nav a.active { color: var(--text-strong); }

.socials { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 20px; }
@media (min-width: 1024px) { .socials { margin-top: auto; } }
.socials a { display: block; color: var(--muted); transition: color .2s, transform .2s; }
.socials a:hover { color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 22px; height: 22px; fill: currentColor; display: block; }

.main { padding: 24px 0 96px; }
@media (min-width: 1024px) { .main { padding: 96px 0; } }

.section { margin-bottom: 96px; scroll-margin-top: 64px; }
@media (min-width: 1024px) { .section { margin-bottom: 144px; scroll-margin-top: 96px; } }
.section-title {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -16px 24px; padding: 18px 16px;
  font: 600 13px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-strong);
  background: rgba(var(--bg-rgb), .8); backdrop-filter: blur(8px);
}
@media (min-width: 1024px) {
  .section-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; padding: 0; }
}

.section p { margin: 0 0 16px; }
a.inline { color: var(--text-strong); font-weight: 500; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color .2s, background-size .2s; }
a.inline:hover { color: var(--accent); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 36px; }
.pillar {
  position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .25s, background-color .25s, transform .25s;
}
.pillar:hover { border-color: rgba(var(--accent-rgb), .5); background: var(--accent-soft); transform: translateY(-3px); }
.pillar h3 { font: 600 16px var(--font-display); color: var(--text-strong); margin: 12px 0 6px; }
.pillar p { font-size: 14px; line-height: 1.55; margin: 0; color: var(--muted); }
.pillar-hex {
  display: block; width: 22px; height: 25px; background: var(--accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: transform .5s;
}
.pillar:hover .pillar-hex { transform: rotate(60deg); }

/* Cards (Career / Talks) */
.list { list-style: none; padding: 0; margin: 0; }
.card {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr; gap: 4px;
  padding: 20px 0; margin-bottom: 12px; border-radius: 10px;
  transition: opacity .25s;
}
@media (min-width: 640px) {
  .card { grid-template-columns: 7.5rem 1fr; gap: 24px; padding: 20px; margin-left: -20px; margin-right: -20px; }
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px; z-index: -1;
  border: 1px solid transparent; transition: background-color .25s, border-color .25s, box-shadow .25s;
}
@media (min-width: 1024px) {
  .list:hover .card:not(:hover) { opacity: .5; }
  .card:hover::before { background: var(--card-hover); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(var(--tip-rgb), .05); }
}
.card-meta { font: 500 12px/2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 !important; }
.card-body h3 { font: 500 17px/1.35 var(--font-body); color: var(--text-strong); margin: 0; }
.card-body h3 a { transition: color .2s; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; } /* whole-card link */
.card:hover h3, .card:hover h3 a { color: var(--accent); }
.arrow { display: inline-block; transition: transform .2s; font-size: .9em; }
.card:hover .arrow, .more:hover .arrow { transform: translate(3px, -3px); }
.card-sub { font-size: 14px; color: var(--muted); margin: 2px 0 10px !important; }
.card-body p { font-size: 15px; line-height: 1.65; margin-bottom: 0; }
.card-body q { font-style: italic; color: var(--text-strong); }
.tags { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font: 500 12px/1 var(--font-mono); color: var(--accent);
  background: var(--accent-soft); padding: 7px 11px; border-radius: 999px;
}
.card-cta::before { border: 1px dashed var(--line) !important; }

.more { display: inline-flex; gap: 8px; margin-top: 24px; font-weight: 500; color: var(--text-strong); }
.more:hover { color: var(--accent); }

/* Book */
.book { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
@media (min-width: 640px) { .book { grid-template-columns: 200px 1fr; } }
.book-cover { perspective: 1200px; justify-self: center; }
.book-3d {
  position: relative; width: 200px; aspect-ratio: 2 / 3;
  transform: rotateY(-22deg) rotateX(4deg); transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.book:hover .book-3d { transform: rotateY(-6deg) rotateX(0); }
.book-3d::before { /* pages */
  content: ""; position: absolute; top: 4px; bottom: 4px; right: -14px; width: 16px;
  background: repeating-linear-gradient(90deg, #efe9dc 0 1px, #d9d2c4 1px 2px);
  transform: rotateY(90deg) translateZ(-2px); transform-origin: left;
}
.book-front {
  position: absolute; inset: 0; border-radius: 2px 6px 6px 2px; overflow: hidden;
  display: flex; flex-direction: column; padding: 22px 18px 18px 26px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='24.25' viewBox='0 0 42 24.25'%3E%3Cpath d='M7 0h14l7 12.12-7 12.13H7L0 12.12z' fill='none' stroke='%23eb5e28' stroke-opacity='.22'/%3E%3C/svg%3E") 0 0 / 42px 24.25px,
    linear-gradient(160deg, #403d39, #252422 70%);
  box-shadow: inset 6px 0 0 var(--accent), inset 8px 0 0 rgba(0,0,0,.35), 0 24px 40px -18px rgba(0,0,0,.7);
  color: var(--floral);
}
.book-tag { font: 500 9px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.book-title { font: 700 34px/0.98 var(--font-display); letter-spacing: -.03em; margin-top: 14px; }
.book-sub { font: 400 11px/1.4 var(--font-body); color: var(--silver); margin-top: 10px; max-width: 12em; }
.book-author { margin-top: auto; font: 600 12px var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.book-body h3 { font: 600 22px/1.3 var(--font-display); color: var(--text-strong); margin: 4px 0 12px; letter-spacing: -.01em; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.book-points { list-style: none; padding: 0; margin: 0 0 24px; }
.book-points li { position: relative; padding-left: 22px; margin-bottom: 6px; font-size: 15px; }
.book-points li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 11px; background: var(--accent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.book-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-disabled { border: 1px dashed var(--line); color: var(--muted); cursor: not-allowed; }
.book-note { font: 400 12px var(--font-mono); color: var(--muted); margin-top: 14px !important; }

/* Podcasts */
.pods { display: grid; gap: 16px; }
.pod {
  display: grid; grid-template-columns: 168px 1fr; gap: 20px; padding: 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  transition: border-color .25s, transform .25s, background-color .25s;
}
.pod:hover { border-color: rgba(var(--accent-rgb), .5); transform: translateY(-3px); background: var(--card-hover); }
.pod-art {
  display: block; align-self: start; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line);
}
.pod-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.pod:hover .pod-art img { transform: scale(1.05); }
.pod-body h3 { font: 500 17px/1.35 var(--font-body); color: var(--text-strong); margin: 0 0 8px; }
.pod-body p { font-size: 15px; line-height: 1.6; }
.pod-links { display: flex; gap: 16px; margin-top: 12px; }
.pod-links a { font: 500 13px var(--font-mono); color: var(--accent); }
.pod-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 560px) { .pod { grid-template-columns: 1fr; } .pod-art { aspect-ratio: 16 / 9; } }

.newsletter {
  margin-top: 40px; padding: 28px; border-radius: 14px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--accent-rgb), .22), transparent 60%),
    var(--bg-raised);
  border: 1px solid var(--line);
}
.newsletter h3 { font: 700 26px var(--font-display); color: var(--text-strong); margin: 0 0 4px; letter-spacing: -.02em; }
.newsletter p { margin: 0 !important; }

.footer { max-width: 30rem; font-size: 14px; color: var(--muted); padding-bottom: 32px; }
.footer a { color: var(--text-strong); font-weight: 500; }
.footer a:hover { color: var(--accent); }
.footer-small { font: 400 12px var(--font-mono); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-copy { top: 96px; transform: none; right: 16px; max-width: 560px; }
  .hero-portrait { top: auto; bottom: 40px; right: 16px; width: 180px; transform: none; animation-name: fadeIn; }
}
@media (max-height: 700px) and (max-width: 900px) { .hero-portrait { display: none; } }
@keyframes fadeIn { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
