@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0b0e;
  --surface: #141417;
  --surface-2: #1a1a1e;
  --ink: #f5f5f6;
  --muted: #9b9ba3;
  --line: #2a2a30;
  --accent: #ffffff;
  --accent-ink: #0b0b0e;
  --dark: #050507;
  --max: 1140px;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 42px rgba(0,0,0,.25);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22,.75,.25,1);
  --glow: rgba(255,255,255,.12);
  --accent-rgb: 255, 255, 255;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.03), transparent 24%),
    radial-gradient(circle at 80% 15%, rgba(255,255,255,.02), transparent 24%),
    linear-gradient(180deg, #09090b 0%, #0c0d10 100%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; height: auto; }
img { loading: lazy; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 600;
}
p { margin: 0 0 1rem; }
ul { margin: 0; padding-left: 1.15rem; }

@keyframes ripple {
  0% { width: 0; height: 0; opacity: .6; }
  100% { width: 250px; height: 250px; opacity: 0; }
}

@keyframes floatUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(8px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), filter .7s ease;
}
.words-in .word-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.magnetic {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0);
}
.magnetic::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.08), transparent 50%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.magnetic:hover::before { opacity: .18; }
.magnetic:hover {
  box-shadow: 0 12px 22px rgba(0,0,0,.12);
  border-color: rgba(255,255,255,.14);
}

.hero-content h1, .page-hero h1 {
  text-shadow: 0 0 18px rgba(255,255,255,.07);
}

.hero-lede, .section-head p, .page-hero p, .intro-copy, .intro-side p {
  max-width: 62ch;
}

@media (max-width: 768px) {
  .magnetic { transform: none !important; }
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ambient-bg, .pointer-glow { display: none; }
  .word-reveal, .words-in .word-reveal { opacity: 1; transform: none; filter: none; }
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .6rem 1rem;
  z-index: 100;
  border-radius: 8px;
  font-weight: 500;
}
.skip-link:focus { left: 12px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,11,14,.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(42,42,48,.7);
}
.site-header .wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 40px;
}
.logo-name { color: var(--ink); }
.primary-nav { margin-left: auto; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.primary-nav a {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  transition: color .3s ease-out;
  letter-spacing: 0.02em;
  position: relative;
}
.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: width .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { 
  color: var(--ink);
}
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: auto;
  position: relative;
  transition: transform .2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), background .3s, color .3s, border-color .3s, box-shadow .3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn:hover { 
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}
.btn:active {
  transform: translateY(-1px) scale(1.02);
}
.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.accent:hover {
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.25);
}
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.btn:active::after {
  animation: ripple 0.6s ease-out;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: #3a3a42;
}
.btn.ghost:hover {
  background: var(--ink);
  color: var(--accent-ink);
  border-color: var(--ink);
  box-shadow: 0 8px 20px rgba(245, 245, 246, 0.1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c4c4cc;
  font: 500 .66rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ========== Hero ========== */
.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 56px;
  align-items: end;
}
.hero h1 {
  font-size: clamp(2.9rem, 6.8vw, 5.8rem);
  max-width: 920px;
  font-weight: 600;
}
.hero h1 .accent { color: #b8b8c0; }
.hero-lede {
  max-width: 560px;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: var(--muted);
  margin: 22px 0 28px;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4/5;
  max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,11,14,.55) 0%, transparent 45%);
  pointer-events: none;
}

/* ========== Sections ========== */
.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.section-head h2,
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 600;
}
.section-head p {
  color: var(--muted);
  max-width: 480px;
  margin: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: start;
}
.intro-copy {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  max-width: 640px;
  font-weight: 500;
}
.intro-side {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}
.intro-side p { color: var(--muted); }
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 12px;
  border-radius: 999px;
  font: 500 .68rem var(--mono);
  color: var(--muted);
}

/* Focus cards */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.focus-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  min-height: 160px;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.focus-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #3a3a42;
}
.focus-no {
  font: 500 .66rem var(--mono);
  color: #a8a8b0;
}
.focus-card h3 {
  font-size: 1.25rem;
  margin: 18px 0 8px;
}
.focus-card p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
  line-height: 1.6;
}

/* Work list */
.work-list { border-top: 1px solid var(--ink); }
.work-item {
  display: grid;
  grid-template-columns: 72px 1fr 1.05fr auto;
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.work-item:hover .work-arrow { transform: translate(3px, -3px); }
.work-no {
  font: 500 .68rem var(--mono);
  color: var(--muted);
  padding-top: 4px;
}
.work-item h3 { font-size: 1.3rem; }
.work-item p {
  color: var(--muted);
  font-size: .9rem;
  margin: 4px 0 0;
}
.work-tag {
  font: 500 .64rem var(--mono);
  color: #b0b0b8;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.work-arrow {
  font-size: 1.35rem;
  transition: transform .2s;
  color: var(--muted);
}
.honesty {
  margin-top: 16px;
  color: var(--muted);
  font-size: .82rem;
}
.honesty strong { color: var(--ink); }

/* Portfolio filters */
.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 26px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(20, 20, 23, 0.8);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.work-filters button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 .98rem var(--display);
  letter-spacing: -0.02em;
  padding: 14px 18px;
  min-height: 52px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.work-filters button:hover {
  color: var(--ink);
  transform: translateY(-1px);
}
.work-filters button.is-active {
  background: rgba(255,255,255,.12);
  color: var(--ink);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 8px 18px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.08);
}
.work-filters button[aria-selected="true"] {
  background: rgba(255,255,255,.12);
}

.case.is-filtered-out {
  display: none !important;
}

/* Blog search */
.blog-search { margin-bottom: 28px; }
.blog-search input[type="search"] {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: var(--body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.blog-search input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.blog-search-status {
  min-height: 1.4em;
  margin-top: 8px;
  font-size: .85rem;
  color: var(--muted);
}

/* Blog cards */
.blog-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
}
.post-card {
  display: flex;
  flex-direction: column;
  min-height: 185px;
  padding: 16px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .3s, border-color .3s;
}
.post-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  border-color: #3a3a42;
}
.post-card.featured {
  background: var(--dark);
  border-color: #222226;
}
.post-category {
  font: 500 .62rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #a8a8b0;
  margin-bottom: 10px;
}
.featured .post-category { color: #d0d0d6; }
.post-card h3 {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  margin: 0 0 8px;
}
.post-card p {
  color: var(--muted);
  font-size: .88rem;
  margin: 0;
}
.featured p { color: #a8a8b0; }
.post-meta-line {
  font: 500 .64rem var(--mono);
  color: var(--muted);
  margin-top: 10px;
}
.featured .post-meta-line { color: #888890; }

/* Music section */
.music {
  background: var(--dark);
  color: #fff;
  border-bottom-color: #1a1a1e;
}
.music .eyebrow { color: #e0e0e4; }
.music-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.music h2 {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
}
.music p {
  color: #a8a8b0;
  font-size: 1.02rem;
  max-width: 520px;
  margin-top: 16px;
}
.music-photo {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #2a2a30;
  aspect-ratio: 4/5;
  max-height: 440px;
}
.music-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

/* CTA */
.cta { padding: 80px 0; }
.cta-box {
  background: var(--accent);
  border-radius: 24px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  color: var(--accent-ink);
}
.cta h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  max-width: 640px;
}
.cta p {
  max-width: 480px;
  color: #4a4a52;
  margin-top: 12px;
}
.cta .btn {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink);
  flex-shrink: 0;
}

/* ========== Page hero ========== */
.page-hero {
  padding: 42px 0 30px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  max-width: 900px;
}
.page-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 12px;
}

/* About specific */
.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: end;
}
.about-photo {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3/4;
  background: var(--surface);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.journey-intro {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 64px;
  align-items: start;
}
.journey-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}
.journey-copy p + p { margin-top: 16px; }

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.story-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  min-height: 170px;
}
.story-card h3 {
  font-size: 1.3rem;
  margin: 18px 0 8px;
}
.story-card p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
  margin: 0;
}

.alt { background: #101013; }

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pill {
  display: inline-flex;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font: 500 .68rem var(--mono);
  color: var(--muted);
}

.quote-panel {
  margin-top: 28px;
  padding: 24px;
  border-left: 3px solid var(--accent);
  background: #111114;
  border-radius: 0 12px 12px 0;
}
.quote-panel p {
  font-family: var(--display);
  font-size: 1.25rem !important;
  line-height: 1.4 !important;
  color: #e4e4e8 !important;
  margin: 0 !important;
}

/* Portfolio / Cases */
.case-list { display: grid; gap: 12px; }
.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 22px;
}
.case h2 { font-size: 1.55rem; margin: 8px 0 6px; }
.case p { color: var(--muted); margin: 0; }
.tag {
  font: 500 .64rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b0b0b8;
}
.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.case-metrics div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.case-metrics b {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
}
.case-metrics span {
  font-size: .72rem;
  color: var(--muted);
}

/* Resume timeline */
.resume-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 56px;
}
.timeline {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
  left: -27px;
  top: 6px;
}
.timeline-date {
  font: 500 .64rem var(--mono);
  color: #b0b0b8;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.timeline-item h3 {
  font-size: 1.2rem;
  margin: 6px 0 4px;
}
.timeline-item .org {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 8px;
}
.timeline-item p,
.timeline-item ul {
  color: var(--muted);
  font-size: .92rem;
}
.timeline-item ul { margin-top: 6px; }
.timeline-item li + li { margin-top: 4px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  padding: 64px 0;
}
.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form { display: grid; gap: 16px; }
.field label {
  display: block;
  font: 500 .68rem var(--mono);
  margin-bottom: 6px;
  color: #c4c4cc;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  transition: border-color .2s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 0.15);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.direct-card {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}
.direct-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.direct-card p { color: var(--muted); }
.direct-card a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-status {
  min-height: 1.2em;
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}
.form-status.is-error {
  color: #ffb4b4;
}
.form-status.is-success {
  color: #b7f0c8;
}
.form-note {
  font-size: .76rem;
  color: var(--muted);
  margin: 0;
}

/* Social links */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 .68rem var(--mono);
  color: var(--muted);
  transition: color .3s ease-out, border-color .3s, background .3s, transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.social-link:hover {
  color: var(--ink);
  border-color: #4a4a52;
  background: var(--surface);
  transform: translateY(-2px);
}

/* Music page extras */
.music-hero {
  background: var(--dark);
  border-bottom-color: #1a1a1e;
}
.music-gallery {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}
.music-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.music-gallery .tall {
  grid-row: span 2;
  min-height: 420px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
  align-items: start;
  max-width: 900px;
  margin-inline: auto;
}
.reel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0d10;
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.reel-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0,0,0,.22);
  border-color: #4a4a52;
}
.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reel-card-label {
  font-family: var(--mono, monospace);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--muted, rgba(255,255,255,.6));
  padding: 0 2px;
}
.video-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}
.video-meta strong {
  font-size: 1rem;
  font-family: var(--display);
}
.video-meta span {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.embed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.embed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color .3s, box-shadow .3s;
}
.embed-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #3a3a42;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.embed-card a {
  display: block;
  padding: 22px;
}
.embed-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.embed-card p {
  color: var(--muted);
  font-size: .88rem;
  margin: 0;
}
.embed-meta {
  font: 500 .64rem var(--mono);
  color: #888890;
  margin-top: 14px;
  display: block;
}

/* Blog post */
.post-shell { padding: 72px 0; }
.post { max-width: 720px; margin: auto; }
.post-header { margin-bottom: 36px; }
.post h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.post-meta {
  font: 500 .68rem var(--mono);
  color: var(--muted);
  margin-top: 16px;
}
.post > p,
.post li {
  font-size: 1.05rem;
  color: #c4c4cc;
}
.post h2 {
  font-size: 1.7rem;
  margin: 40px 0 12px;
}
.post ul { margin-bottom: 20px; }
.post blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: #111114;
  font-family: var(--display);
  font-size: 1.2rem;
  border-radius: 0 10px 10px 0;
}
.post a {
  color: #fff;
  text-decoration: none;
  text-underline-offset: 3px;
  position: relative;
  transition: color .3s ease-out;
}
.post a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.post a:hover {
  color: #f0f0f0;
}
.post a:hover::after {
  width: 100%;
}
.related {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: .78rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a:hover { color: var(--ink); }
.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-social a {
  color: var(--muted);
  font: 500 .68rem var(--mono);
}
.footer-social a:hover { color: var(--ink); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid,
  .intro-grid,
  .music-grid,
  .about-hero-grid,
  .journey-intro,
  .resume-grid,
  .contact-grid,
  .case { grid-template-columns: 1fr; gap: 36px; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid .featured { grid-column: 1 / -1; }
  .work-item { grid-template-columns: 48px 1fr auto; }
  .work-item p { grid-column: 2 / -1; }
  .music-gallery { grid-template-columns: 1fr; }
  .music-gallery .tall { grid-row: auto; min-height: 320px; }
  .embed-grid { grid-template-columns: 1fr; }
  .cta-box { flex-direction: column; align-items: start; }
  .story-grid { grid-template-columns: 1fr; }
  .case-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .site-header .wrap { min-height: 68px; }
  .primary-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 10px 14px 16px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav a {
    display: block;
    padding: 12px 10px;
  }
  .nav-toggle { display: block; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .section { padding: 56px 0; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .focus-grid,
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid .featured { grid-column: auto; }
  .work-item { grid-template-columns: 36px 1fr auto; }
  .work-item p { display: none; }
  .cta { padding: 48px 0; }
  .cta-box { padding: 28px 22px; }
  .page-hero { padding: 52px 0 40px; }
  .post-shell { padding: 48px 0; }
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
  .logo img { width: 36px; height: 36px; flex-basis: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .focus-card, .post-card, .embed-card, .case, .story-card, .social-link, .primary-nav a::after, .word-reveal, .is-breathing {
    transition: none;
    animation: none;
  }
  .word-reveal {
    animation: none;
    opacity: 1;
  }
}

@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .page-hero { padding-top: 0; }
  .reveal, .word-reveal, .words-in .word-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}
/* ========== MUSIC ANIMATIONS ========== */

/* Frequency bars */
.music-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 120px;
  margin: 30px 0;
}

.music-visualizer span {
  width: 5px;
  background: #fff;
  border-radius: 4px;
  animation: equalize 1.4s ease-in-out infinite alternate;
  opacity: 0.85;
}

.music-visualizer span:nth-child(1) { height: 28px; animation-delay: 0.0s; }
.music-visualizer span:nth-child(2) { height: 55px; animation-delay: 0.1s; }
.music-visualizer span:nth-child(3) { height: 90px; animation-delay: 0.2s; }
.music-visualizer span:nth-child(4) { height: 45px; animation-delay: 0.3s; }
.music-visualizer span:nth-child(5) { height: 110px; animation-delay: 0.15s; }
.music-visualizer span:nth-child(6) { height: 65px; animation-delay: 0.25s; }
.music-visualizer span:nth-child(7) { height: 38px; animation-delay: 0.05s; }
.music-visualizer span:nth-child(8) { height: 85px; animation-delay: 0.35s; }
.music-visualizer span:nth-child(9) { height: 50px; animation-delay: 0.18s; }
.music-visualizer span:nth-child(10){ height: 72px; animation-delay: 0.28s; }
.music-visualizer span:nth-child(11){ height: 42px; animation-delay: 0.08s; }
.music-visualizer span:nth-child(12){ height: 95px; animation-delay: 0.22s; }

@keyframes equalize {
  0%   { transform: scaleY(0.45); }
  100% { transform: scaleY(1); }
}

/* Vinyl record */
.vinyl {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1a1a1e 28%, #0b0b0e 29%, #0b0b0e 38%, #222 39%, #111 70%, #000 100%);
  position: relative;
  animation: spin 8s linear infinite;
  box-shadow: 0 0 0 6px #2a2a30, 0 20px 40px rgba(0,0,0,0.5);
  margin: 0 auto;
}

.vinyl::before {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: #f5f5f6;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Soft pulse */
.music-pulse {
  animation: pulse 2.8s ease-in-out infinite;
}

/* ========== SMOOTH ANIMATIONS ========== */

/* Ripple click effect */
@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Link underline slide */
@keyframes slideUnderline {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Smooth fade in up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth scale fade */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Glow pulse for accent buttons */
@keyframes accentGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.1);
  }
}

/* Smooth hero title word reveal */
.word-reveal {
  display: inline-block;
  animation: fadeInUp .6s cubic-bezier(0.22, 0.75, 0.25, 1) both;
}

.words-in .word-reveal {
  animation: fadeInUp .6s cubic-bezier(0.22, 0.75, 0.25, 1) both;
}

/* Smooth breathing effect for photos */
.is-breathing {
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* Staggered list item reveals */
.reveal-list li {
  animation: fadeInUp .6s cubic-bezier(0.22, 0.75, 0.25, 1) both;
}

.reveal-list li:nth-child(1) { animation-delay: 0.1s; }
.reveal-list li:nth-child(2) { animation-delay: 0.2s; }
.reveal-list li:nth-child(3) { animation-delay: 0.3s; }
.reveal-list li:nth-child(4) { animation-delay: 0.4s; }
.reveal-list li:nth-child(5) { animation-delay: 0.5s; }

/* Smooth nav slide on mobile */
@keyframes slideInNav {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.primary-nav.is-open {
  animation: slideInNav .3s ease-out;
}

/* Case card lift */
.case {
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .3s, border-color .3s;
}

.case:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  border-color: #3a3a42;
}

/* Story card hover */
.story-card {
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color .3s, box-shadow .3s;
}

.story-card:hover {
  transform: translateY(-3px);
  border-color: #3a3a42;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* Focus card lift */
.focus-card {
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .3s, border-color .3s;
}

.focus-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  border-color: #3a3a42;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.03); opacity: 0.92; }
}

/* Guitar string hover effect on photos */
.music-photo {
  position: relative;
  overflow: hidden;
}

.music-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 18px,
    rgba(255,255,255,0.07) 18px,
    rgba(255,255,255,0.07) 19px
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.music-photo:hover::after {
  opacity: 1;
  animation: stringVibrate 0.4s ease-in-out 2;
}

@keyframes stringVibrate {
  0%, 100% { transform: translateY(0); }
  25%      { transform: translateY(-1.5px); }
  75%      { transform: translateY(1.5px); }
}

/* Floating notes (Music page only) */
.floating-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-notes span {
  position: absolute;
  color: rgba(255,255,255,0.12);
  font-size: 18px;
  animation: floatUp 12s linear infinite;
}

.floating-notes span:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-notes span:nth-child(2) { left: 25%; animation-delay: 2s; font-size: 14px; }
.floating-notes span:nth-child(3) { left: 45%; animation-delay: 4s; }
.floating-notes span:nth-child(4) { left: 65%; animation-delay: 1s; font-size: 16px; }
.floating-notes span:nth-child(5) { left: 80%; animation-delay: 3s; }

@keyframes floatUp {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-20vh) rotate(20deg); opacity: 0; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .music-visualizer span,
  .vinyl,
  .music-pulse,
  .floating-notes span {
    animation: none !important;
  }
}
/* ========== EXTRA MUSIC ANIMATIONS ========== */

/* 1. Cursor music notes */
.cursor-note {
  position: fixed;
  pointer-events: none;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  z-index: 9999;
  animation: noteFade 1.1s forwards;
  user-select: none;
}

@keyframes noteFade {
  0%   { transform: translateY(0) scale(1); opacity: 0.7; }
  100% { transform: translateY(-40px) scale(0.4); opacity: 0; }
}

/* 2. Photo reveal with soundwave line */
.music-photo.reveal-wave {
  position: relative;
  overflow: hidden;
}

.music-photo.reveal-wave::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  z-index: 2;
  transition: none;
}

.music-photo.reveal-wave.is-visible::before {
  animation: waveScan 1.2s ease-out forwards;
}

@keyframes waveScan {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* 3. Button mini equalizer on hover */
.btn-music {
  position: relative;
  padding-right: 42px; /* makes space for the bars */
}

.btn-music .mini-eq {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
  height: 12px;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn-music:hover .mini-eq {
  opacity: 1;
}

.btn-music .mini-eq i {
  display: block;
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  animation: miniEq 0.45s ease-in-out infinite alternate;
}

.btn-music .mini-eq i:nth-child(1) { height: 5px;  animation-delay: 0s; }
.btn-music .mini-eq i:nth-child(2) { height: 10px; animation-delay: 0.1s; }
.btn-music .mini-eq i:nth-child(3) { height: 7px;  animation-delay: 0.2s; }
.btn-music .mini-eq i:nth-child(4) { height: 12px; animation-delay: 0.15s; }

@keyframes miniEq {
  to { transform: scaleY(0.35); }
}

/* 4. Section entrance beat */
.music-beat {
  animation: beatIn 0.9s cubic-bezier(0.22, 0.75, 0.25, 1) both;
}

@keyframes beatIn {
  0%   { opacity: 0; transform: scale(0.96) translateY(18px); }
  60%  { opacity: 1; transform: scale(1.02) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 5. Vinyl scratch on hover */
.vinyl {
  transition: animation-duration 0.3s;
}

.vinyl:hover {
  animation-duration: 1.2s; /* spins much faster on hover */
}

/* 6. Text frequency distortion (subtle) */
.music-glitch {
  position: relative;
}

.music-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  width: 100%;
  height: 100%;
  color: rgba(255,255,255,0.35);
  clip-path: inset(0 0 0 0);
  animation: glitch 6s infinite linear;
  pointer-events: none;
  opacity: 0;
}

.music-glitch:hover::after {
  opacity: 1;
}

@keyframes glitch {
  0%, 90%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); opacity: 0; }
  92% { clip-path: inset(20% 0 40% 0); transform: translate(-2px, 1px); opacity: 0.6; }
  94% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); opacity: 0.5; }
  96% { clip-path: inset(10% 0 50% 0); transform: translate(-1px, 0); opacity: 0.4; }
}

/* 7. Background ambient pulse */
.music-hero,
.section.music {
  animation: ambientPulse 7s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.06); }
}

/* 8. Scroll-linked waveform (side) */
.side-wave {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.5;
}

.side-wave span {
  width: 3px;
  background: #fff;
  border-radius: 2px;
  transform-origin: bottom;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cursor-note,
  .music-photo.reveal-wave::before,
  .btn-music .mini-eq i,
  .music-beat,
  .vinyl,
  .music-glitch::after,
  .music-hero,
  .section.music,
  .side-wave {
    animation: none !important;
    filter: none !important;
  }
}

@media (max-width: 900px) {
  .side-wave { display: none; }
}
/* ========== MAX POTENTIAL UPGRADES ========== */

/* Light theme */
html[data-theme="light"] {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #efeff2;
  --ink: #121216;
  --muted: #5c5c66;
  --line: #e2e2e8;
  --accent: #121216;
  --accent-ink: #ffffff;
  --dark: #e8e8ee;
  --shadow: 0 20px 50px rgba(0,0,0,.08);
}

html[data-theme="light"] .site-header {
  background: rgba(246,246,248,.85);
}
html[data-theme="light"] .logo img {
  filter: invert(1);
}
html[data-theme="light"] .music-visualizer span,
html[data-theme="light"] .side-wave span {
  background: #121216;
}
html[data-theme="light"] .btn.accent {
  background: #121216;
  color: #fff;
  border-color: #121216;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: scale(1.05); }
.theme-toggle svg { width: 18px; height: 18px; }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
@media (min-width: 901px) {
  .header-actions { order: 3; }
  .primary-nav { margin-left: 0; }
}

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--ink);
  z-index: 100;
  transition: width .1s linear;
  pointer-events: none;
}

/* Form success state */
.form-success {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.form-success.is-visible { display: block; }
.form-success h3 {
  font-family: var(--display);
  margin: 0 0 8px;
}
.contact-form.is-hidden { display: none; }

/* Now page */
.now-grid {
  display: grid;
  gap: 18px;
}
.now-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
}
.now-card h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.15rem;
}
.now-card p { margin: 0; color: var(--muted); }
.now-meta {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 18px;
}

/* 404 */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}
.error-page h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  margin: 0;
  font-family: var(--display);
}
.error-page p { color: var(--muted); max-width: 420px; margin: 12px auto 24px; }

/* Blog article polish */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.article-wrap h1 { font-family: var(--display); }
.article-meta {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
  margin: 8px 0 28px;
}
.toc {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 0 0 28px;
}
.toc strong {
  display: block;
  font-size: .8rem;
  margin-bottom: 8px;
  font-family: var(--mono);
  color: var(--muted);
}
.toc ol {
  margin: 0;
  padding-left: 18px;
}
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* YouTube embed */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin: 18px 0;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Newsletter strip */
.newsletter {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 14px;
}
.newsletter h3 {
  margin: 0;
  font-family: var(--display);
}
.newsletter p { margin: 0; color: var(--muted); }
.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
}
.newsletter-form button {
  border-radius: 999px;
}

/* Sticky mobile CTA polish */
@media (max-width: 700px) {
  .header-actions { gap: 6px; }
  .theme-toggle { width: 36px; height: 36px; }
}

/* Modern, low-noise styling for the final production build. */

:root {
  color-scheme: dark;
  --bg: #08080a;
  --surface: #111114;
  --surface-2: #17171b;
  --ink: #ededef;
  --muted: #8b8b94;
  --line: #232329;
  --accent: #f2f2f4;
  --accent-ink: #0a0a0c;
  --shadow: 0 18px 48px rgba(0,0,0,.18);
  --radius: 18px;
  --radius-sm: 12px;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body > header,
body > main,
body > footer {
  position: relative;
  z-index: 1;
}

.site-header {
  background: rgba(8, 8, 10, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.theme-toggle:hover {
  border-color: #3a3a42;
  background: var(--surface);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.primary-nav a {
  position: relative;
  color: var(--muted);
  transition: color 0.25s ease;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--ink);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero h1 .word-reveal,
.page-hero h1 .word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero h1.words-in .word-reveal,
.page-hero h1.words-in .word-reveal {
  opacity: 1;
  transform: none;
}

.hero-photo.is-breathing,
.music-gallery img.is-breathing,
.about-photo img.is-breathing {
  animation: photoBreathe 7s ease-in-out infinite;
}
@keyframes photoBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--ink);
  opacity: 0.35;
  z-index: 100;
  pointer-events: none;
}

.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 18000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  place-items: start center;
  padding-top: 18vh;
}
.cmdk-overlay.open { display: grid; }
.cmdk {
  width: min(440px, calc(100% - 28px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.cmdk input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 14px 16px;
  font: inherit;
  outline: none;
  border-bottom: 1px solid var(--line);
}
.cmdk-list {
  padding: 6px;
  max-height: 280px;
  overflow: auto;
}
.cmdk-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.cmdk-item:hover,
.cmdk-item.active { background: var(--surface-2); }

html[data-theme="light"] {
  --bg: #f4f4f6;
  --surface: #ffffff;
  --surface-2: #ececf0;
  --ink: #121214;
  --muted: #5c5c66;
  --line: #dcdce2;
  --accent: #121214;
  --accent-ink: #ffffff;
}
html[data-theme="light"] .site-header {
  background: rgba(244, 244, 246, 0.88);
}
html[data-theme="light"] .logo img {
  filter: invert(1);
}

:focus-visible {
  outline: 1px solid rgba(255,255,255,.45);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .hero h1 .word-reveal,
  .page-hero h1 .word-reveal,
  .hero-photo.is-breathing,
  .music-gallery img.is-breathing,
  .about-photo img.is-breathing {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 720px) {
  .site-header .wrap { min-height: 68px; }
  .primary-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 10px 14px 16px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav a {
    display: block;
    padding: 12px 10px;
  }
  .nav-toggle { display: block; }
}

