:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #14181c;
  --muted: #5d676f;
  --line: rgba(20, 24, 28, 0.1);
  --teal: #0f8f86;
  --amber: #d98a00;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 650; max-width: 20ch; }
h3 { font-size: 1.15rem; font-weight: 600; }

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--teal), var(--amber)); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; padding: 14px clamp(16px, 4vw, 48px); transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(246, 245, 241, 0.8); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand img { border-radius: 6px; }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); font-size: .92rem; }
.nav nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav .pill { color: #fff; background: var(--ink); padding: 7px 16px; border-radius: 999px; }
.nav .pill:hover { color: #fff; background: var(--teal); }

.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 760px) auto; justify-content: center; gap: clamp(40px, 6vw, 96px); align-items: center; overflow: hidden; padding: 110px clamp(20px, 6vw, 96px) 80px; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 760px; pointer-events: none; }
.hero-inner a { pointer-events: auto; }
.hero-logo { position: relative; z-index: 1; justify-self: center; width: clamp(180px, 21vw, 330px); pointer-events: none; }
.logo-float { animation: float 4.5s ease-in-out infinite; }
.logo-float img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgba(20, 24, 28, .18)); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-28px) rotate(2.5deg); } }
.eyebrow, .kicker { font: 500 .78rem/1 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .14em; color: var(--teal); margin: 0 0 22px; }
.grad { background: linear-gradient(100deg, var(--teal), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 56ch; margin: 26px 0 34px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; text-decoration: none; padding: 12px 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: .95rem; transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(20, 24, 28, .35); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: var(--teal); border-color: var(--teal); }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; width: 24px; height: 40px; margin-left: -12px; border: 1.5px solid var(--muted); border-radius: 14px; z-index: 2; }
.scroll-hint span { position: absolute; top: 7px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--muted); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.section { padding: clamp(56px, 8vw, 110px) clamp(20px, 6vw, 96px); max-width: 1320px; margin: 0 auto; }
/* About: timeline left, bio + image right */
/* About: path (title + timeline) left, compact bio block right - same height on desktop */
.about-grid { display: grid; position: relative; grid-template-columns: minmax(240px, .8fr) 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: stretch; }
.path-col h2 { margin-bottom: 30px; font-size: clamp(1.5rem, 2.5vw, 2.2rem); max-width: none; }
.about-col { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.about-head { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.about-head .kicker { margin-bottom: 14px; }
.about-head h2 { margin: 0; max-width: none; font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
.about-col > p { margin: 0; font-size: 1.1rem; line-height: 1.75; }
.about-col .cta { margin-top: 0; }
/* portrait */
.portrait { flex: none; margin: 0; width: clamp(110px, 11vw, 150px); border-radius: 18px; overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 20px 40px -24px rgba(20, 24, 28, .45); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; transition: transform 1.2s var(--ease); }
.portrait:hover img { transform: scale(1.04); }
.about p { color: var(--muted); }
.about h2 { margin-bottom: 22px; }
.about a { color: var(--teal); }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 40px; padding: 0; margin: 34px 0 0; }
.stats b { display: block; font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stats span { font-size: .85rem; color: var(--muted); }

.writing h2 { margin-bottom: 44px; }
.focus { margin: clamp(64px, 9vw, 110px) auto 0; text-align: center; }
.focus .card { text-align: left; }
.focus h2 { margin-left: auto; margin-right: auto; }
.focus h2 { margin-bottom: 32px; font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: none; }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--teal), var(--amber)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(20, 24, 28, .3); }
.card:hover::before { transform: scaleX(1); }
.card .idx { font: 500 .8rem 'JetBrains Mono', monospace; color: var(--amber); }
.card h3 { margin: 38px 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.surface-band { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.surface-band h2 { margin-bottom: 20px; }
.surface-band p:not(.kicker) { color: var(--muted); }
.surface-canvas, .city-canvas, .book-canvas, .signal-canvas { width: 100%; height: clamp(300px, 42vw, 480px); }
.surface-band.reverse { grid-template-columns: 1.4fr minmax(260px, 1fr); }
.surface-band.reverse .surface-canvas, .surface-band.reverse .book-canvas { order: -1; }
.research .surface-band + .surface-band { padding-top: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 32px; }
.chip { font: 500 .8rem 'Inter', sans-serif; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.post { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, opacity .4s; }
.post:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(20, 24, 28, .35); }
.post.hide { display: none; }
.thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, #e4efed, #f4e8d2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post:hover .thumb img { transform: scale(1.06); }
.post-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body time { font: 400 .75rem 'JetBrains Mono', monospace; color: var(--muted); }
.post-body h3 { font-size: 1.02rem; line-height: 1.35; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tags span { font-size: .72rem; color: var(--teal); background: rgba(15, 143, 134, .09); padding: 3px 10px; border-radius: 999px; }

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 30px; max-width: 440px; font-size: .94rem; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; }
.timeline::before { background: var(--line); }
.timeline::after { background: linear-gradient(var(--teal), var(--amber)); transform-origin: 50% 0; transform: scaleY(var(--tl, 0)); }
.timeline li { position: relative; padding-bottom: 30px; }
.timeline li::before { content: ''; position: absolute; left: -30px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); transition: background .4s, transform .4s var(--ease); }
.timeline li.in::before { background: var(--teal); transform: scale(1.15); }
.timeline time { font: 400 .8rem 'JetBrains Mono', monospace; color: var(--amber); }
.timeline h3 { margin: 5px 0 2px; font-size: 1.02rem; }
.timeline p { margin: 0; color: var(--muted); }

.contact { text-align: center; }
.contact h2 { margin: 0 auto 32px; max-width: none; font-size: clamp(2.2rem, 6vw, 4.4rem); }
.contact .cta { justify-content: center; }
.footer { display: flex; justify-content: space-between; padding: 28px clamp(20px, 6vw, 96px); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.js-off .reveal { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .about-grid, .surface-band, .surface-band.reverse { grid-template-columns: 1fr; }
  .surface-band.reverse .surface-canvas, .surface-band.reverse .book-canvas { order: 0; }
  .hero { grid-template-columns: 1fr; align-content: center; }
  .hero-logo { width: 110px; justify-self: start; order: -1; }
  .portrait { max-width: 320px; }
  .nav nav a:not(.pill) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span, .logo-float { animation: none; }
}
.more{margin-top:36px;text-align:center}
.about .kicker { color: var(--teal); }

.research-feature .cta { margin-top: 26px; }
.surface-band .band-text p:not(.kicker) { max-width: 52ch; }

[hidden] { display: none !important; }
.post.collapsed { display: none; }

/* Highlight: journal badge */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 18px; background: rgba(217, 138, 0, .12); border: 1px solid rgba(217, 138, 0, .38); color: #8a5a00; font: 600 .84rem/1.3 'Inter', sans-serif; max-width: 100%; }
.badge svg { flex: none; }
.about-head h2 .nb { display: inline-block; }
