@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Kantumruy+Pro:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #080808;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.56);
  --dim: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.25);
  --panel: rgba(255, 255, 255, 0.025);
  --glass: rgba(0, 0, 0, 0.76);
  --invert-fg: #000000;
  --display: 'Space Grotesk', 'Inter', sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shell: 72rem;
  --wide-shell: 80rem;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f4f0;
  --bg-elevated: #eceae4;
  --fg: #090909;
  --muted: rgba(9, 9, 9, 0.62);
  --dim: rgba(9, 9, 9, 0.39);
  --line: rgba(9, 9, 9, 0.14);
  --line-strong: rgba(9, 9, 9, 0.28);
  --panel: rgba(9, 9, 9, 0.025);
  --glass: rgba(245, 244, 240, 0.8);
  --invert-fg: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color .35s ease, background-color .35s ease;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
::selection { color: var(--invert-fg); background: var(--fg); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { border: 0; padding: 0; background: none; cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
strong { font-weight: 700; }

.mono { font-family: var(--mono); }
.micro { font-size: .625rem; line-height: 1.5; letter-spacing: .22em; text-transform: uppercase; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 12000;
  padding: .75rem 1rem;
  color: var(--invert-fg);
  background: var(--fg);
  font-family: var(--mono);
  font-size: .75rem;
  transform: translateY(-200%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.shell { width: min(calc(100% - 3rem), var(--shell)); margin-inline: auto; }
.wide-shell { width: min(calc(100% - 3rem), var(--wide-shell)); }
.narrow-shell { max-width: 64rem; }
.no-js .preloader { display: none; }
.no-js .reveal, .no-js .hero-reveal { opacity: 1; transform: none; }

/* Loader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.45rem;
  color: #fff;
  background: #000;
  transition: transform .75s cubic-bezier(.76, 0, .24, 1), visibility .75s;
}
.preloader.is-hidden { visibility: hidden; transform: translateY(-100%); }
.preloader-mark { width: 3.6rem; animation: loader-pulse 1.5s ease-in-out infinite; }
.preloader-mark svg rect { fill: none; stroke: currentColor; stroke-width: 2.5; }
.preloader-mark svg text { fill: currentColor; font: 700 32px var(--display); }
.preloader-track { width: min(14rem, 60vw); height: 1px; overflow: hidden; background: rgba(255,255,255,.16); }
.preloader-track span { display: block; width: 0; height: 100%; background: #fff; transition: width .12s linear; }
.preloader .micro { color: rgba(255,255,255,.45); }
@keyframes loader-pulse { 50% { opacity: .45; transform: scale(.94); } }

/* Global fixed UI */
.scroll-progress { position: fixed; inset: 0 auto auto 0; z-index: 9000; width: 0; height: 2px; background: var(--fg); }
.section-number {
  position: fixed;
  bottom: 3.5%;
  left: 2.6%;
  z-index: 0;
  color: var(--fg);
  opacity: .055;
  pointer-events: none;
  font: 700 clamp(5rem, 12vw, 11rem)/.8 var(--display);
  letter-spacing: -.08em;
  mix-blend-mode: difference;
}
.cursor-ring, .cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: difference;
}
.cursor-ring { width: 34px; height: 34px; border: 1px solid #fff; transition: width .25s var(--ease), height .25s var(--ease), background-color .25s, opacity .2s; }
.cursor-dot { width: 5px; height: 5px; background: #fff; }
.cursor-ring.is-visible, .cursor-dot.is-visible { opacity: 1; }
.cursor-ring.is-active { width: 68px; height: 68px; background: #fff; }
.project-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 230px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255,255,255,.35);
  opacity: 0;
  pointer-events: none;
  background: #111 center / cover no-repeat;
  filter: grayscale(1) contrast(1.08);
  transform: translate3d(-50%, -50%, 0) scale(.82);
  transition: opacity .25s, transform .35s var(--ease);
}
.project-preview.is-visible { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
.fixed-controls { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 800; display: flex; flex-direction: row-reverse; gap: .55rem; }
.control-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(12px);
  transition: color .2s, background .2s, border-color .2s;
}
.control-button:hover { color: var(--invert-fg); background: var(--fg); border-color: var(--fg); }
.control-button svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-moon { display: none; }
html[data-theme='light'] .theme-sun { display: none; }
html[data-theme='light'] .theme-moon { display: block; }
.sound-bars { display: flex; align-items: end; gap: 2px; height: 1rem; }
.sound-bars i { width: 2px; min-height: 3px; background: currentColor; }
.sound-bars i:nth-child(1) { height: 40%; }
.sound-bars i:nth-child(2) { height: 90%; }
.sound-bars i:nth-child(3) { height: 60%; }
.sound-bars i:nth-child(4) { height: 100%; }
#sound-toggle.is-on .sound-bars i { animation: sound-bar .9s ease-in-out infinite; }
#sound-toggle.is-on .sound-bars i:nth-child(1) { animation-delay: -.2s; }
#sound-toggle.is-on .sound-bars i:nth-child(2) { animation-delay: -.5s; }
#sound-toggle.is-on .sound-bars i:nth-child(3) { animation-delay: -.1s; }
#sound-toggle.is-on .sound-bars i:nth-child(4) { animation-delay: -.4s; }
@keyframes sound-bar { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.command-trigger {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .7rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--glass);
  backdrop-filter: blur(12px);
  font: 500 .625rem/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.command-trigger:hover { color: var(--invert-fg); background: var(--fg); }
kbd { padding: .25rem .35rem; border: 1px solid currentColor; border-radius: 3px; font: inherit; letter-spacing: .05em; }

/* Navigation */
.site-header { position: fixed; inset: 0 0 auto; z-index: 700; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.site-header.is-scrolled { border-color: var(--line); background: var(--glass); backdrop-filter: blur(14px); }
.site-nav { display: flex; height: 4.5rem; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: 0 0 auto; }
.brand-mark { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border: 1px solid var(--fg); border-radius: .35rem; transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-mark svg { width: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.brand-word { font-size: .8rem; font-weight: 700; letter-spacing: .28em; }
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.desktop-links { display: flex; align-items: center; gap: clamp(1.1rem, 2vw, 2rem); margin-left: auto; }
.desktop-links a, .nav-cta { position: relative; color: var(--muted); font: 500 .62rem/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; transition: color .25s; }
.desktop-links a::after { content: ''; position: absolute; right: 0; bottom: -.55rem; left: 0; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.desktop-links a:hover, .desktop-links a[aria-current='page'] { color: var(--fg); }
.desktop-links a:hover::after, .desktop-links a[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.language-switcher { display: flex; border: 1px solid var(--line-strong); }
.lang-button { padding: .46rem .55rem; color: var(--dim); font: 600 .56rem/1 var(--mono); letter-spacing: .08em; transition: color .2s, background .2s; }
.lang-button.is-active { color: var(--invert-fg); background: var(--fg); }
.nav-cta { padding: .65rem .9rem; border: 1px solid var(--line-strong); color: var(--fg); }
.nav-cta:hover { color: var(--invert-fg); background: var(--fg); }
.mobile-nav { display: none; }

/* Command palette */
.command-palette { position: fixed; inset: 0; z-index: 10500; display: grid; place-items: start center; padding: 18vh 1rem 1rem; }
.command-palette[hidden] { display: none; }
.command-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.command-window { position: relative; width: min(38rem, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.24); color: #fff; background: #070707; box-shadow: 0 2rem 7rem rgba(0,0,0,.65); }
.command-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.command-head svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.command-head input { width: 100%; border: 0; outline: 0; color: #fff; background: transparent; font: .78rem var(--mono); }
.command-head input::placeholder { color: rgba(255,255,255,.32); }
.command-head kbd { color: rgba(255,255,255,.4); font: .55rem var(--mono); }
.command-results { max-height: min(24rem, 52vh); overflow-y: auto; padding: .45rem; }
.command-option { display: grid; width: 100%; grid-template-columns: 1.6rem 1fr auto; align-items: center; gap: .7rem; padding: .75rem; color: rgba(255,255,255,.7); text-align: left; }
.command-option.is-active, .command-option:hover { color: #000; background: #fff; }
.command-option > span:first-child { font: .72rem var(--mono); }
.command-option strong { font: 600 .72rem var(--mono); }
.command-option small { opacity: .55; font: .56rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.command-empty { padding: 2.2rem 1rem; color: rgba(255,255,255,.4); text-align: center; font: .7rem var(--mono); }
.command-foot { display: flex; gap: 1rem; padding: .65rem 1rem; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.35); letter-spacing: .06em; }

/* Hero */
.hero { position: relative; display: flex; min-height: 100svh; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.network-canvas, .hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.network-canvas { opacity: .78; }
.hero-grid {
  opacity: .18;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
}
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 38%; pointer-events: none; background: linear-gradient(transparent, var(--bg)); }
.hero-coordinates { position: absolute; top: 6.4rem; left: 2rem; z-index: 3; display: flex; gap: 1.1rem; color: var(--muted); }
.hero-coordinates time { color: var(--fg); }
.hero-index { position: absolute; top: 6.4rem; right: 2rem; z-index: 3; color: var(--dim); line-height: 1.8; text-align: right; }
.hero-content { position: relative; z-index: 3; padding-block: 9rem 8rem; }
.hero-kicker { margin: 0 0 1.5rem; color: var(--muted); font-size: clamp(.58rem, 1vw, .75rem); letter-spacing: .24em; text-transform: uppercase; }
.hero-title { position: relative; width: fit-content; margin: 0; font: 700 clamp(4.4rem, 13.2vw, 12.4rem)/.75 var(--display); letter-spacing: -.085em; text-transform: uppercase; }
.hero-title span { display: block; }
.hero-title span:last-child { margin-left: clamp(1.5rem, 8vw, 8rem); }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; width: 100%; pointer-events: none; white-space: nowrap; opacity: .6; overflow: hidden; }
.glitch::before { color: var(--fg); clip-path: inset(0 0 58%); animation: glitch-one 2.8s linear infinite alternate; }
.glitch::after { color: var(--muted); clip-path: inset(58% 0 0); animation: glitch-two 2.2s linear infinite alternate; }
@keyframes glitch-one { 0%, 18%, 42%, 100% { transform: translate(0); } 20% { transform: translate(-3px); } 40% { transform: translate(3px); } }
@keyframes glitch-two { 0%, 23%, 52%, 100% { transform: translate(0); } 25% { transform: translate(3px); } 50% { transform: translate(-3px); } }
.hero-lower { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-top: 3rem; }
.terminal-line { min-height: 1.5em; margin: 0; color: var(--muted); font-size: .68rem; }
.terminal-line::after { content: '█'; margin-left: .2rem; color: var(--fg); animation: blink .8s step-end infinite; }
.scroll-cue { display: flex; align-items: center; gap: .8rem; color: var(--muted); }
.scroll-cue b { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid var(--line-strong); color: var(--fg); animation: scroll-bob 1.7s ease-in-out infinite; }
@keyframes scroll-bob { 50% { transform: translateY(.4rem); } }
.hero-marquee { position: absolute; right: 0; bottom: 0; left: 0; z-index: 4; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.marquee-track { display: flex; width: max-content; padding-block: .75rem; color: var(--muted); font-size: .65rem; letter-spacing: .17em; animation: marquee 24s linear infinite; }
.marquee-track span { flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero-reveal { opacity: 0; transform: translateY(28px); }
body.loaded .hero-reveal { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
body.loaded .hero-reveal.d1 { transition-delay: .1s; }
body.loaded .hero-reveal.d2 { transition-delay: .24s; }
body.loaded .hero-reveal.d3 { transition-delay: .4s; }

/* Shared sections */
.section { position: relative; padding-block: clamp(7rem, 12vw, 10rem); border-top: 1px solid var(--line); }
.section-shell { position: relative; z-index: 1; }
.section-heading { max-width: 54rem; margin-bottom: clamp(3.5rem, 7vw, 6rem); }
.section-heading.inline-heading { display: flex; align-items: baseline; gap: clamp(1.2rem, 3vw, 2.5rem); max-width: none; }
.section-tag { display: block; flex: 0 0 auto; color: var(--dim); font-size: .66rem; letter-spacing: .27em; text-transform: uppercase; }
.section-heading h2 { margin: 1.2rem 0 0; font: 700 clamp(2.45rem, 6vw, 5.5rem)/.95 var(--display); letter-spacing: -.055em; }
.section-heading.inline-heading h2 { margin: 0; }
.reveal { opacity: 0; transform: translateY(42px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr); gap: clamp(3rem, 8vw, 8rem); align-items: end; }
.about-copy { max-width: 46rem; }
.about-copy p { color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.25rem); line-height: 1.85; }
.about-copy p + p { margin-top: 1.5rem; }
.about-copy strong { color: var(--fg); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.metrics article { min-width: 0; padding: 1.6rem 1rem; border-right: 1px solid var(--line); text-align: center; }
.metrics article:last-child { border-right: 0; }
.metrics strong { display: block; margin-bottom: .75rem; font: 700 clamp(2rem, 4vw, 3.5rem)/1 var(--display); letter-spacing: -.06em; }
.metrics span { display: block; color: var(--dim); font-size: .52rem; letter-spacing: .14em; text-transform: uppercase; }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.service-card { position: relative; min-height: 28rem; padding: 2rem; overflow: hidden; color: var(--fg); background: var(--bg); transition: color .35s, background .35s, transform .45s var(--ease); }
.service-card:hover { z-index: 1; color: var(--invert-fg); background: var(--fg); transform: translateY(-.6rem); }
.service-number { color: var(--dim); font-size: .62rem; letter-spacing: .2em; }
.service-card > svg { width: 3rem; margin: 4.7rem 0 3rem; fill: none; stroke: currentColor; stroke-width: 1.35; }
.service-card h3 { margin-bottom: 1.1rem; font: 600 clamp(1.35rem, 2vw, 1.8rem)/1.1 var(--display); letter-spacing: -.035em; }
.service-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.75; }
.service-card:hover p, .service-card:hover .service-number { color: color-mix(in srgb, var(--invert-fg) 62%, transparent); }
.card-arrow { position: absolute; right: 1.7rem; bottom: 1.5rem; font-size: 1.25rem; transition: transform .35s var(--ease); }
.service-card:hover .card-arrow { transform: translate(.25rem, -.25rem); }

/* Skills */
.tool-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.tool-card { position: relative; display: flex; min-height: 9.5rem; flex-direction: column; align-items: center; justify-content: center; gap: 1.05rem; background: var(--bg); transition: color .25s, background .25s, transform .35s var(--ease); }
.tool-card.favorite { box-shadow: inset 0 0 0 1px var(--line-strong); }
.tool-card:hover { z-index: 1; color: var(--invert-fg); background: var(--fg); transform: scale(1.035); }
.tool-card img { width: 2.15rem; height: 2.15rem; object-fit: contain; }
html[data-theme='light'] .tool-card img { filter: invert(1); }
html[data-theme='light'] .tool-card:hover img { filter: none; }
.tool-card:hover img { filter: invert(1); }
.tool-card strong { font: 500 .63rem var(--mono); letter-spacing: .07em; }
.tool-monogram { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; font: 700 1.35rem var(--display); }
.favorite-star { position: absolute; top: .7rem; right: .8rem; color: var(--muted); font-size: .7rem; }
.tool-card:hover .favorite-star { color: var(--invert-fg); }
.tool-legend { margin: 1.2rem 0 0; color: var(--dim); }
.tool-legend > span:first-child { color: var(--fg); }

/* Education */
.education-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 1px; background: var(--line); }
.education-card { position: relative; padding: clamp(2rem, 4vw, 3.5rem); background: var(--bg); }
.education-image { position: relative; aspect-ratio: 16 / 9; margin-bottom: 2.5rem; overflow: hidden; border: 1px solid var(--line); }
.education-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,.75)); }
.education-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); transition: filter .6s, transform .8s var(--ease); }
.education-image:hover img { filter: grayscale(0); transform: scale(1.035); }
.education-image > span { position: absolute; bottom: 1rem; left: 1rem; z-index: 1; color: rgba(255,255,255,.72); }
.education-eyebrow { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.15rem; color: var(--dim); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; }
.status-dot, .live-pill i, .availability i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--fg); animation: blink 1.2s step-end infinite; }
.education-card h3 { max-width: 28rem; margin-bottom: 1.2rem; font: 600 clamp(1.65rem, 3.5vw, 2.7rem)/1.05 var(--display); letter-spacing: -.045em; }
.education-card > p { color: var(--muted); font-size: .94rem; line-height: 1.75; }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.tag-row span { padding: .5rem .65rem; border: 1px solid var(--line); color: var(--muted); font-size: .52rem; letter-spacing: .12em; }
.medal-visual { display: grid; min-height: 15rem; grid-template-columns: 1fr 1.15fr .8fr; align-items: center; margin-bottom: 2.5rem; border: 1px solid var(--line); font-family: var(--mono); text-align: center; }
.medal-visual > * { display: grid; height: 100%; place-items: center; border-right: 1px solid var(--line); }
.medal-visual > *:last-child { border-right: 0; }
.medal-visual span { font: 700 clamp(5rem, 10vw, 9rem)/1 var(--display); letter-spacing: -.1em; }
.medal-visual b { font-size: clamp(3rem, 7vw, 6rem); filter: grayscale(1); }
.medal-visual i { font-size: .6rem; font-style: normal; letter-spacing: .25em; writing-mode: vertical-rl; }
.medal-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; border: 1px solid var(--line); text-align: center; }
.medal-stats span { padding: 1rem .5rem; border-right: 1px solid var(--line); }
.medal-stats span:last-child { border-right: 0; }
.medal-stats b, .medal-stats small { display: block; }
.medal-stats b { font-size: 1.2rem; }
.medal-stats small { margin-top: .3rem; color: var(--dim); font-size: .48rem; letter-spacing: .15em; }

/* Work */
.projects-list { border-block: 1px solid var(--line); }
.project-row { display: grid; grid-template-columns: 3.5rem minmax(0, 1.4fr) minmax(15rem, .9fr) 2rem; gap: 1.3rem; align-items: center; min-height: 9.2rem; padding: 1.5rem; border-bottom: 1px solid var(--line); transition: color .3s, background .3s, padding .35s var(--ease); }
.project-row:last-child { border-bottom: 0; }
.project-row:hover { padding-inline: 2rem 1rem; color: var(--invert-fg); background: var(--fg); }
.project-number { align-self: start; padding-top: .45rem; color: var(--dim); font-size: .6rem; }
.project-row h3 { margin: 0 0 .6rem; font: 600 clamp(1.6rem, 4vw, 3.3rem)/1 var(--display); letter-spacing: -.055em; }
.project-row p { max-width: 34rem; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.project-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.project-tags li { padding: .4rem .55rem; border: 1px solid var(--line); color: var(--dim); font-size: .48rem; letter-spacing: .1em; }
.project-row:hover p, .project-row:hover .project-number, .project-row:hover .project-tags li { color: color-mix(in srgb, var(--invert-fg) 60%, transparent); border-color: color-mix(in srgb, var(--invert-fg) 20%, transparent); }
.project-arrow { font-size: 1.4rem; transition: transform .35s var(--ease); }
.project-row:hover .project-arrow { transform: translate(.25rem, -.25rem); }
.incoming-heading { display: flex; align-items: center; gap: .8rem; margin: 5rem 0 1.2rem; color: var(--muted); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; }
.soon-dot { display: inline-block; width: .42rem; height: .42rem; flex: none; border-radius: 50%; background: var(--fg); animation: blink 1.05s step-end infinite; }
.coming-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.coming-card { position: relative; min-height: 22rem; overflow: hidden; padding: clamp(1.8rem, 4vw, 3rem); background: var(--bg); }
.coming-card::before { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; pointer-events: none; background: linear-gradient(90deg, transparent, var(--panel), transparent); animation: scan 3.3s linear infinite; }
@keyframes scan { to { left: 160%; } }
.coming-top { display: flex; justify-content: space-between; color: var(--dim); font-size: .56rem; letter-spacing: .15em; }
.coming-top span:last-child { display: flex; align-items: center; gap: .5rem; }
.coming-card h3 { margin: 5rem 0 1rem; font: 600 clamp(2.3rem, 5vw, 4.4rem)/1 var(--display); letter-spacing: -.065em; }
.coming-card p { max-width: 28rem; color: var(--muted); line-height: 1.7; }
.deploy-row { display: flex; justify-content: space-between; margin-top: 3rem; color: var(--dim); font-size: .55rem; letter-spacing: .18em; }
.deploy-row strong { color: var(--fg); }
.deploy-track { height: 2px; margin-top: .7rem; overflow: hidden; background: var(--line); }
.deploy-track span { display: block; width: var(--progress); height: 100%; background: var(--fg); transform-origin: left; animation: deploy 2s var(--ease) both; }
@keyframes deploy { from { transform: scaleX(0); } }

/* Trading */
.trading-section { padding-bottom: 0; overflow: hidden; }
.trading-intro { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 7vw, 7rem); margin-bottom: 5rem; }
.live-pill { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; padding: .5rem .7rem; border: 1px solid var(--line-strong); color: var(--muted); font-size: .52rem; letter-spacing: .14em; }
.live-pill i { width: .38rem; height: .38rem; }
.trading-intro h3 { margin: 0; font: 600 clamp(2.2rem, 5vw, 4.2rem)/1 var(--display); letter-spacing: -.055em; }
.trading-copy p { color: var(--muted); line-height: 1.8; }
.price-feed { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 3.5vw, 2.5rem); border: 1px solid var(--line); }
.price-feed > div:first-child { display: grid; gap: .8rem; }
.price-feed strong { font: 600 clamp(3rem, 8vw, 7rem)/.8 var(--display); letter-spacing: -.07em; }
.price-change { display: grid; justify-items: end; gap: .6rem; }
.price-change > span { font-size: .9rem; }
.price-change small { color: var(--dim); font-size: .5rem; letter-spacing: .13em; }
.trading-desk { display: grid; grid-template-columns: 1.55fr .8fr; margin-top: 1px; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.chart-panel { position: relative; min-height: 31rem; overflow: hidden; background: var(--bg); }
.chart-panel canvas { width: 100%; height: 100%; }
.chart-label, .chart-price, .chart-note { position: absolute; z-index: 1; color: var(--dim); }
.chart-label { top: 1.3rem; left: 1.4rem; }
.chart-price { top: 1.3rem; right: 1.4rem; color: var(--muted); }
.chart-note { bottom: 1.3rem; left: 1.4rem; }
.analysis-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--bg); }
.analysis-state { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem; }
.analysis-state strong { grid-column: 1 / -1; margin-top: 1rem; color: var(--muted); font-size: .68rem; font-weight: 400; }
.concept-block > span { display: block; margin-bottom: .8rem; color: var(--dim); }
.concept-buttons { display: flex; flex-wrap: wrap; gap: .35rem; }
.concept-button { padding: .55rem .65rem; border: 1px solid var(--line); color: var(--muted); font: .6rem var(--mono); }
.concept-button:hover, .concept-button.is-active { color: var(--invert-fg); background: var(--fg); }
.desk-readout { margin: 0; border-top: 1px solid var(--line); }
.desk-readout div { display: flex; justify-content: space-between; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .58rem; letter-spacing: .12em; }
.desk-readout dt { color: var(--dim); }
.desk-readout dd { margin: 0; }
.execution-panel { border: 1px solid var(--line); border-top: 0; }
.execution-head { display: flex; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .55rem; letter-spacing: .14em; }
.execution-head strong { margin-left: .4rem; color: var(--fg); }
.position-table { font-size: .57rem; letter-spacing: .12em; }
.table-head { display: grid; grid-template-columns: 1fr .6fr .8fr .6fr; padding: .85rem 1.3rem; border-bottom: 1px solid var(--line); color: var(--dim); }
.table-empty { display: grid; min-height: 5rem; place-items: center; color: var(--dim); }
.trading-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.trading-metrics div { padding: 1.2rem; border-right: 1px solid var(--line); text-align: center; }
.trading-metrics div:last-child { border-right: 0; }
.trading-metrics strong, .trading-metrics span { display: block; }
.trading-metrics strong { margin-bottom: .35rem; font-size: 1rem; }
.trading-metrics span { color: var(--dim); font-size: .48rem; letter-spacing: .14em; }
.execution-log { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.3rem; border-top: 1px solid var(--line); color: var(--dim); }
.execution-log i { height: 1px; flex: 1; background: var(--line); }
.execution-log b { color: var(--muted); font-weight: 400; }
.market-ticker { margin-top: 7rem; overflow: hidden; border-block: 1px solid var(--line); background: var(--bg); }
.ticker-track { display: flex; width: max-content; padding: .8rem 0; color: var(--muted); font-size: .62rem; letter-spacing: .1em; animation: marquee 30s linear infinite; }
.ticker-track span { flex: none; }
.ticker-track b { color: var(--fg); font-weight: 500; }
.ticker-track em { color: var(--dim); font-style: normal; }

/* Beyond */
.offclock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 1px; background: var(--line); }
.culture-card { min-width: 0; padding: clamp(1.6rem, 4vw, 3rem); background: var(--bg); }
.culture-card > .micro { display: block; margin-bottom: 2rem; color: var(--dim); }
.culture-content { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.cover-button { position: relative; width: 7.5rem; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line-strong); }
.cover-button.portrait { aspect-ratio: 6 / 7; }
.cover-button img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); transition: filter .6s, transform .7s var(--ease); }
.cover-button:hover img { filter: grayscale(0); transform: scale(1.06); }
.spotify-controller { position: absolute; inset: 0; z-index: 0; opacity: 0; overflow: hidden; }
.cover-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(0,0,0,.35); transition: background .25s; }
.cover-button:hover .cover-overlay { background: rgba(0,0,0,.15); }
.cover-overlay svg { width: 2rem; fill: #fff; }
.pause-icon { display: none; }
.cover-button.is-playing .play-icon { display: none; }
.cover-button.is-playing .pause-icon { display: block; }
.culture-content h3 { margin: 0; font: 600 clamp(1.8rem, 3vw, 2.8rem)/1 var(--display); letter-spacing: -.045em; }
.culture-content .micro { margin: .5rem 0 1.15rem; color: var(--muted); letter-spacing: .1em; }
.culture-content > div > p:not(.micro):not(.song-title) { color: var(--muted); font-size: .84rem; line-height: 1.7; }
.culture-content .hint { display: block; margin-top: 1.2rem; color: var(--dim); font-size: .48rem; }
.song-title { margin: .9rem 0; color: var(--fg); font-size: .62rem; letter-spacing: .12em; }

/* Journey */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 7.7rem; width: 1px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 7.7rem 1fr; min-height: 10rem; }
.timeline li::before { content: ''; position: absolute; top: .35rem; left: calc(7.7rem - .25rem); width: .5rem; height: .5rem; border: 1px solid var(--fg); border-radius: 50%; background: var(--bg); }
.timeline li.is-current::before { background: var(--fg); box-shadow: 0 0 0 .45rem var(--line); }
.timeline time { padding-right: 2rem; color: var(--dim); font: 500 .72rem var(--mono); letter-spacing: .15em; }
.timeline li > div { padding: 0 0 3.5rem 3.5rem; }
.timeline h3 { margin: 0 0 .8rem; font: 600 clamp(1.45rem, 3vw, 2.2rem)/1.1 var(--display); letter-spacing: -.035em; }
.timeline p { max-width: 42rem; margin: 0; color: var(--muted); line-height: 1.75; }

/* FAQ */
.faq-list { border-block: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { display: flex; min-height: 5.4rem; align-items: center; justify-content: space-between; gap: 2rem; cursor: pointer; list-style: none; font: 600 clamp(1.1rem, 2.2vw, 1.45rem) var(--display); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font: 400 1.7rem var(--mono); transition: transform .3s var(--ease); }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { max-width: 48rem; margin: -.3rem 0 0; padding: 0 3rem 2rem 0; color: var(--muted); line-height: 1.75; }

/* Contact + footer */
.contact-section { position: relative; padding-block: clamp(8rem, 15vw, 13rem); border-top: 1px solid var(--line); overflow: hidden; }
.contact-section::before { content: 'D3'; position: absolute; top: 50%; left: 50%; color: var(--fg); opacity: .025; font: 700 50vw/.7 var(--display); letter-spacing: -.1em; transform: translate(-50%, -50%); }
.contact-inner { position: relative; z-index: 1; text-align: center; }
.contact-inner .section-tag { margin-bottom: 2rem; }
.contact-inner h2 { margin-bottom: 2.5rem; font: 700 clamp(3.4rem, 10vw, 9rem)/.85 var(--display); letter-spacing: -.075em; }
.contact-link { display: inline-flex; align-items: center; gap: .8rem; padding-bottom: .25rem; border-bottom: 1px solid var(--fg); font: 500 clamp(1.2rem, 3vw, 2rem) var(--mono); }
.contact-link b { transition: transform .35s var(--ease); }
.contact-link:hover b { transform: translate(.35rem, -.35rem); }
.availability { display: flex; justify-content: center; align-items: center; gap: .65rem; margin-top: 2.5rem; color: var(--dim); font-size: .55rem; letter-spacing: .14em; }
.availability i { display: inline-block; }
.site-footer { padding-block: 2.3rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.footer-inner p { margin: 0; color: var(--dim); }
.underline-link { color: var(--muted); background: linear-gradient(var(--fg), var(--fg)) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease), color .25s; }
.underline-link:hover { color: var(--fg); background-size: 100% 1px; }
.noscript-message { position: fixed; right: 1rem; bottom: 1rem; z-index: 12000; max-width: 24rem; padding: 1rem; color: #000; background: #fff; font: .7rem/1.5 var(--mono); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 22%, transparent) var(--bg); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { border: 2px solid var(--bg); background: color-mix(in srgb, var(--fg) 24%, transparent); }
::-webkit-scrollbar-thumb:hover { background: var(--fg); }

/* Khmer type */
html[lang='km'] body { font-family: 'Kantumruy Pro', var(--sans); }
html[lang='km'] h1, html[lang='km'] h2, html[lang='km'] h3 { font-family: 'Kantumruy Pro', var(--display); }

@media (max-width: 1120px) {
  .desktop-links { gap: 1rem; }
  .desktop-links a { font-size: .55rem; }
  .nav-cta { display: none; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { min-height: 23rem; }
  .service-card > svg { margin-block: 3rem 2rem; }
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
  .project-row { grid-template-columns: 3rem minmax(0, 1fr) 2rem; }
  .project-tags { display: none; }
  .section-number { display: none; }
}

@media (max-width: 820px) {
  .shell, .wide-shell { width: min(calc(100% - 2rem), var(--shell)); }
  .site-nav { height: 4.1rem; }
  .desktop-links, .language-switcher { display: none; }
  .nav-actions { margin-left: auto; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 850; display: block; padding: 0 .75rem calc(.75rem + env(safe-area-inset-bottom)); pointer-events: none; }
  .mobile-nav-shell { display: grid; grid-template-columns: repeat(5, 1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 1rem; color: #fff; background: rgba(0,0,0,.86); box-shadow: 0 .5rem 2rem rgba(0,0,0,.55); backdrop-filter: blur(16px); pointer-events: auto; }
  .mobile-nav a { display: flex; min-height: 3.8rem; flex-direction: column; align-items: center; justify-content: center; gap: .18rem; color: rgba(255,255,255,.42); font: 500 .47rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .mobile-nav svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav i { width: .22rem; height: 2px; border-radius: 1rem; background: transparent; transition: width .25s, background .25s; }
  .mobile-nav a[aria-current='page'] { color: #fff; }
  .mobile-nav a[aria-current='page'] i { width: 1rem; background: #fff; }
  .fixed-controls { right: 1rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .command-trigger { display: none; }
  .hero-coordinates { top: 5.5rem; left: 1rem; }
  .hero-index { display: none; }
  .hero-content { padding-block: 8rem 9rem; }
  .hero-title { font-size: clamp(4rem, 18vw, 8rem); line-height: .8; }
  .hero-title span:last-child { margin-left: 0; font-size: .74em; }
  .hero-lower { align-items: center; }
  .about-grid, .trading-intro, .education-grid, .offclock-grid { grid-template-columns: 1fr; }
  .metrics { max-width: none; }
  .section-heading.inline-heading { display: block; }
  .section-heading.inline-heading h2 { margin-top: 1rem; }
  .project-row { min-height: 8.2rem; padding-inline: .8rem; }
  .project-row:hover { padding-inline: 1.1rem .5rem; }
  .coming-grid, .trading-desk { grid-template-columns: 1fr; }
  .chart-panel { min-height: 25rem; }
  .culture-content { grid-template-columns: 6.6rem 1fr; }
  .cover-button { width: 6.6rem; }
  .site-footer { padding-bottom: calc(6.6rem + env(safe-area-inset-bottom)); }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .section { padding-block: 6.5rem; scroll-margin-top: 4rem; }
  .hero-title { font-size: 19vw; }
  .hero-kicker { max-width: 70%; line-height: 1.8; }
  .hero-coordinates { flex-direction: column; gap: .2rem; }
  .hero-lower { display: grid; gap: 2rem; }
  .scroll-cue { justify-self: end; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 20rem; }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-card { min-height: 7.4rem; }
  .tool-card img { width: 1.7rem; height: 1.7rem; }
  .tool-card strong { max-width: 90%; font-size: .52rem; text-align: center; }
  .metrics article { padding-inline: .4rem; }
  .metrics strong { font-size: 1.8rem; }
  .metrics span { font-size: .42rem; }
  .education-card { padding: 1.4rem; }
  .medal-visual { min-height: 10rem; }
  .project-row { grid-template-columns: 2.2rem minmax(0, 1fr) 1.2rem; gap: .5rem; }
  .project-row h3 { font-size: 1.55rem; }
  .project-row p { font-size: .68rem; }
  .coming-card { min-height: 20rem; }
  .price-feed { display: grid; }
  .price-change { justify-items: start; }
  .chart-panel { min-height: 21rem; }
  .chart-note { max-width: 60%; line-height: 1.6; }
  .execution-head { gap: 1rem; }
  .execution-log b { display: none; }
  .culture-content { grid-template-columns: 1fr; }
  .cover-button { width: 7.5rem; }
  .timeline::before { left: 4rem; }
  .timeline li { grid-template-columns: 4rem 1fr; }
  .timeline li::before { left: calc(4rem - .25rem); }
  .timeline time { font-size: .57rem; }
  .timeline li > div { padding-left: 1.6rem; }
  .faq-item summary { font-size: 1rem; }
  .contact-inner h2 { font-size: 15vw; }
  .command-foot { display: none; }
}

@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot, .project-preview { display: none; }
}

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

/* Journal */
.blog-section { overflow: clip; }
.blog-intro {
  max-width: 48rem;
  margin: -2.2rem 0 4rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.8;
}
.blog-intro strong { color: var(--fg); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}
.blog-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
  transition: transform .45s var(--ease), color .3s, background .3s;
}
.blog-card:hover { z-index: 2; transform: translateY(-.55rem); }
.blog-card-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, .85fr);
  min-height: 34rem;
}
.blog-media {
  position: relative;
  min-height: 25rem;
  margin: 0;
  overflow: hidden;
  background: #0a0a0a;
}
.blog-media-featured { min-height: 34rem; }
.blog-image-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(255,255,255,.13), transparent 28%),
    linear-gradient(145deg, #1d1d1d, #050505 55%, #171717);
}
.blog-image-fallback::before,
.blog-image-fallback::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.blog-image-fallback::before {
  inset: 0;
  opacity: .25;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  mask-image: linear-gradient(to bottom right, #000, transparent 70%);
}
.blog-image-fallback::after {
  right: 8%;
  bottom: -15%;
  width: 46%;
  aspect-ratio: 1 / 1.35;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50% 50% 12% 12%;
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.02));
  transform: rotate(-8deg);
}
.blog-image-fallback span { position: relative; z-index: 1; font-size: .55rem; letter-spacing: .2em; }
.blog-image-fallback strong {
  position: relative;
  z-index: 1;
  max-width: 85%;
  font: 700 clamp(2.4rem, 6vw, 5.5rem)/.82 var(--display);
  letter-spacing: -.075em;
}
.blog-card:not(.blog-card-featured) .blog-image-fallback strong { font-size: clamp(2.2rem, 3.8vw, 3.6rem); }
.blog-media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.08);
  transition: filter .7s, transform .9s var(--ease), opacity .25s;
}
.blog-media-featured img { object-position: center 35%; }
.blog-media.is-placeholder img { display: none; }
.blog-card:hover .blog-media img { filter: grayscale(0) contrast(1.02); transform: scale(1.035); }
.blog-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(transparent 55%, rgba(0,0,0,.78));
}
.blog-media figcaption {
  position: absolute;
  right: 1.2rem;
  bottom: 1rem;
  left: 1.2rem;
  z-index: 3;
  color: rgba(255,255,255,.7);
  font-size: .5rem;
  letter-spacing: .14em;
}
.blog-card-body {
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.blog-card-featured .blog-card-body { justify-content: center; }
.blog-meta,
.blog-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--dim);
  font-size: .52rem;
  letter-spacing: .13em;
}
.blog-card h3 {
  margin: 2rem 0 1.1rem;
  font: 600 clamp(1.7rem, 3.2vw, 3.2rem)/1.02 var(--display);
  letter-spacing: -.05em;
}
.blog-card-featured h3 { font-size: clamp(2.7rem, 5.4vw, 5.2rem); }
.blog-card-body > p {
  margin-bottom: 1.7rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.75;
}
.blog-byline { margin-top: .3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.blog-read {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 600 .6rem var(--mono);
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
  transition: color .25s;
}
.blog-card-featured .blog-read { margin-top: 2rem; }
.blog-read b { color: var(--fg); font-size: 1.1rem; transition: transform .35s var(--ease); }
.blog-read:hover { color: var(--fg); }
.blog-read:hover b { transform: translate(.25rem, -.25rem); }

/* Journal reader */
.blog-reader,
.sequence-video {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(20px);
}
.blog-reader[open], .sequence-video[open] { animation: dialog-enter .45s var(--ease) both; }
.blog-reader::backdrop,
.sequence-video::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(7px); }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(2rem); } }
.blog-reader-shell {
  width: min(calc(100% - 2rem), 64rem);
  min-height: 100%;
  margin-inline: auto;
  padding: clamp(1.2rem, 4vw, 3rem) 0 4rem;
}
.blog-reader-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
}
.blog-reader-head .micro { display: block; margin-bottom: .7rem; color: var(--dim); }
.blog-reader-head h2 { max-width: 52rem; margin: 0; font: 700 clamp(2rem, 5vw, 4.5rem)/.94 var(--display); letter-spacing: -.055em; }
.blog-reader-close,
.sequence-video header > button {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  font: 300 1.7rem/1 var(--sans);
  transition: color .2s, background .2s;
}
.blog-reader-close:hover,
.sequence-video header > button:hover { color: var(--invert-fg); background: var(--fg); }
.blog-reader-content { padding: clamp(3rem, 8vw, 7rem) 0; }
.article-prose { max-width: 46rem; margin-inline: auto; }
.article-prose p,
.article-prose li { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.9; }
.article-prose .article-lead { color: var(--fg); font: 500 clamp(1.4rem, 3vw, 2.15rem)/1.5 var(--display); letter-spacing: -.025em; }
.article-prose h3 { margin: 3.5rem 0 1rem; font: 600 clamp(1.7rem, 3vw, 2.5rem)/1.1 var(--display); letter-spacing: -.04em; }
.article-prose blockquote { margin: 3.5rem 0; padding: 1.6rem 0 1.6rem 2rem; border-left: 2px solid var(--fg); font: 600 clamp(1.6rem, 4vw, 3.2rem)/1.18 var(--display); letter-spacing: -.04em; }
.article-prose ul { display: grid; gap: .65rem; margin: 1.5rem 0 2.5rem; padding-left: 1.25rem; }
.article-prose strong { color: var(--fg); }
.blog-reader-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: .56rem;
  letter-spacing: .13em;
}
.blog-reader-foot button { color: var(--fg); font: inherit; letter-spacing: inherit; text-transform: uppercase; }

/* Audio sequence player */
.sequence-player {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 900;
  display: grid;
  width: min(calc(100% - 18rem), 34rem);
  grid-template-columns: auto minmax(7rem, auto) minmax(4rem, 1fr) 2.4rem 2.4rem;
  align-items: center;
  gap: .8rem;
  padding: .75rem;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  box-shadow: 0 .7rem 2.5rem rgba(0,0,0,.35);
}
.sequence-player > div:nth-child(2) { display: grid; gap: .25rem; }
.sequence-player strong { font-size: .55rem; letter-spacing: .1em; }
.sequence-player #sequence-time { color: var(--dim); font-size: .48rem; }
.sequence-equalizer { display: flex; width: 1.3rem; height: 1.25rem; align-items: end; gap: 2px; }
.sequence-equalizer i { width: 2px; height: 25%; background: var(--fg); animation: sound-bar .85s ease-in-out infinite; }
.sequence-equalizer i:nth-child(2) { animation-delay: -.45s; }
.sequence-equalizer i:nth-child(3) { animation-delay: -.2s; }
.sequence-equalizer i:nth-child(4) { animation-delay: -.6s; }
.sequence-player.is-paused .sequence-equalizer i { animation-play-state: paused; }
.sequence-track { height: 2px; overflow: hidden; background: var(--line); }
.sequence-track span { display: block; width: 0; height: 100%; background: var(--fg); }
.sequence-player > button { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 1px solid var(--line); font: 600 .7rem var(--mono); }
.sequence-player > button:hover { color: var(--invert-fg); background: var(--fg); }
.sequence-video { place-items: center; padding: 1rem; }
.sequence-video[open] { display: grid; }
.sequence-video-shell { width: min(100%, 72rem); }
.sequence-video header { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; }
.sequence-video header .micro { color: var(--dim); }
.sequence-video h2 { margin: .6rem 0 0; font: 600 clamp(2rem, 5vw, 4.5rem)/1 var(--display); letter-spacing: -.055em; }
.sequence-video-frame { overflow: hidden; border: 1px solid var(--line-strong); background: #000; box-shadow: 0 2rem 7rem rgba(0,0,0,.6); }
.sequence-video-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

@media (max-width: 1120px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-card-featured { grid-template-columns: 1.15fr .85fr; }
  .blog-grid > .blog-card:last-child { grid-column: 1 / -1; }
  .mobile-nav-shell { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 820px) {
  .blog-intro { margin-top: -1.5rem; }
  .blog-card-featured { grid-template-columns: 1fr; }
  .blog-media-featured { min-height: min(72vw, 30rem); }
  .blog-card-featured h3 { font-size: clamp(2.5rem, 9vw, 4.5rem); }
  .sequence-player { bottom: calc(5.5rem + env(safe-area-inset-bottom)); width: calc(100% - 2rem); grid-template-columns: auto minmax(6rem, auto) 1fr 2.4rem 2.4rem; }
}

@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid > .blog-card:last-child { grid-column: auto; }
  .blog-media { min-height: 25rem; }
  .blog-card-featured { min-height: 0; }
  .blog-card-body { min-height: 18rem; }
  .blog-reader-head { align-items: start; }
  .blog-reader-head h2 { font-size: 2rem; }
  .blog-reader-foot { align-items: start; flex-direction: column; }
  .article-prose blockquote { padding-left: 1.2rem; }
  .sequence-player { grid-template-columns: auto 1fr 2.35rem 2.35rem; }
  .sequence-player > div:nth-child(2) { min-width: 0; }
  .sequence-track { display: none; }
  .sequence-video { padding: .65rem; }
  .sequence-video header { align-items: start; }
  .mobile-nav a { font-size: .42rem; }
}
