:root {
  --bg: #101214;
  --panel: #181b1f;
  --panel-2: #1f2328;
  --line: #2b3037;
  --text: #ecebe6;
  --muted: #a2a59f;
  --accent: #f0a23b;
  --accent-ink: #1a1206;
  --wave: #4a5059;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4ef; --panel: #ffffff; --panel-2: #f0ede6; --line: #dcd8ce;
    --text: #1b1c1e; --muted: #5d605c; --accent: #b96a00; --accent-ink: #ffffff; --wave: #c2beb3;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: var(--panel); padding: 8px 12px; border-radius: 6px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 5vw, 56px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 18px; color: var(--text); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px clamp(12px, 2.2vw, 26px); }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; padding: 2px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current=page] { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 56px); }
.hero { padding: clamp(56px, 12vh, 120px) 0 clamp(40px, 8vh, 72px); max-width: 820px; }
.eyebrow { font: 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); letter-spacing: -.01em; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 62ch; margin: 22px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); background: var(--panel); text-decoration: none; font-size: 14.5px; cursor: pointer; font-family: inherit; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.band { padding: clamp(40px, 7vh, 72px) 0; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(24px, 3vw, 32px); }
.sub { color: var(--muted); max-width: 64ch; margin: 10px 0 26px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 13.5px var(--sans); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.project { padding: clamp(32px, 6vh, 56px) 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.project:last-child { border-bottom: 0; }
.project[hidden] { display: none; }
.project .meta { font: 12px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.project h2 { font-size: clamp(22px, 2.6vw, 30px); }
.project .role { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.project .summary { margin: 16px 0 0; font-size: 17px; }
.project ul { margin: 16px 0 0; padding-left: 18px; color: var(--muted); }
.project li { margin: 6px 0; }
.project li::marker { color: var(--accent); }
.extra { color: var(--muted); font-size: 14.5px; margin-top: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag { font: 11.5px var(--mono); padding: 4px 8px; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.media { display: grid; gap: 14px; min-width: 0; }
figure { margin: 0; }
figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
figcaption, .credit { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- player ---------- */
.player { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 12px; min-width: 0; }
.player.is-playing { border-color: var(--accent); }
.p-head { display: flex; align-items: center; gap: 12px; }
.play { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; }
.play svg { width: 16px; height: 16px; fill: currentColor; }
.p-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.p-note { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.p-time { margin-left: auto; font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wave { display: block; width: 100%; height: 56px; margin-top: 12px; cursor: pointer; border-radius: 4px; }
.ab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ab button { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font: 13px var(--sans); cursor: pointer; }
.ab button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.ab .key { font: 10.5px var(--mono); opacity: .6; margin-right: 6px; }
.match { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.match input { accent-color: var(--accent); }

/* ---------- hybrid pan demo ---------- */
.demo { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.demo h4 { margin: 0 0 4px; font: 600 15px var(--sans); }
.demo p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.demo .row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.demo label { font: 12px var(--mono); color: var(--muted); width: 82px; flex: none; }
.demo input[type=range] { flex: 1; accent-color: var(--accent); min-width: 0; }
.demo output { font: 12px var(--mono); width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.readout div { background: var(--panel-2); border-radius: 6px; padding: 8px 10px; font: 12px var(--mono); color: var(--muted); }
.readout b { display: block; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 64px); }
.about h3 { font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 28px 0 10px; }
.about h3:first-child { margin-top: 0; }
.row-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-item b { display: block; }
.row-item span { color: var(--muted); font-size: 14px; }
.skill { margin: 0 0 10px; font-size: 14.5px; }
.skill b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.portrait { width: 168px; height: 168px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); margin-bottom: 18px; }

footer { max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 5vw, 56px) 56px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- multi-page pieces ---------- */
.page-head { padding: clamp(40px, 8vh, 80px) 0 clamp(20px, 4vh, 36px); max-width: 820px; }
.page-head h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.01em; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.band-head a { font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.band-head h3 { font: 600 18px var(--sans); }
.players { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 22px; }
.toc .chip { text-decoration: none; }
.listen-block { margin-top: 34px; }
.audio-head { grid-column: 1 / -1; font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 14px 0 0; }
.projects { border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 22px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card h3 { font-size: 22px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; }
.card ul { margin: 14px 0 18px; padding-left: 18px; font-size: 14.5px; }
.card li::marker { color: var(--accent); }
.card .more { margin-top: auto; color: var(--accent); font-size: 14.5px; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.mini { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.mini .meta { font: 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.mini h3 { font-size: 19px; }
.mini .role { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.mini p { font-size: 14.5px; margin: 10px 0 0; }
.mini ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.mini li { margin: 4px 0; }
.mini li::marker { color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tablewrap { margin-top: 26px; overflow-x: auto; }
.tablewrap h3 { font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.about-grid h2 { margin-bottom: 14px; }
.row-item ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.row-item li { margin: 5px 0; }
.courses { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
footer a { color: var(--muted); }
:target { scroll-margin-top: 84px; }

@media (max-width: 820px) {
  .project, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .top nav { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.player.is-loading .play { opacity: .5; cursor: progress; }
