:root {
  color-scheme: light;
  --ink: #181a17;
  --paper: #f3f4ef;
  --paper-alt: #e8ebe4;
  --muted: #686d64;
  --line: #cfd3ca;
  --dark: #151713;
  --accent: #cfff58;
  --green: #58721f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', sans-serif;
  --mono: 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
a[target="_blank"]::after { content: '↗'; display: inline-block; margin-left: .38em; font-weight: 400; text-decoration: none; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: var(--dark); background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.topbar { position: sticky; z-index: 30; top: 0; min-height: 58px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #eff0e9; background: rgba(21,23,19,.94); border-bottom: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.home-link { width: 20px; height: 20px; display: grid; flex: 0 0 20px; place-items: center; color: #c7cbc0; text-decoration: none; }
.home-link svg { width: 19px; height: 19px; display: block; fill: currentColor; }
.home-link:hover, .home-link:focus-visible { color: var(--accent); }
.topbar nav { align-self: stretch; }
.nav-list, .subnav { margin: 0; padding: 0; list-style: none; }
.nav-list { height: 100%; display: flex; gap: 36px; }
.nav-group { position: relative; display: flex; align-items: center; }
.topbar nav a, .mobile-nav a { color: #c7cbc0; font-size: 13px; text-decoration: none; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--accent); }
.subnav { position: absolute; top: calc(100% - 1px); left: -18px; width: 280px; padding: 12px 0; display: none; background: rgba(21,23,19,.98); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 32px rgba(0,0,0,.18); }
.nav-group:last-child .subnav { left: auto; right: -18px; }
.nav-group:hover .subnav, .nav-group:focus-within .subnav { display: block; }
.subnav a { display: block; padding: 9px 18px; line-height: 1.35; }
.menu-button, .mobile-nav { display: none; }

.intro { position: relative; isolation: isolate; min-height: 390px; padding: 54px max(6vw, calc((100vw - 1080px) / 2)); display: flex; align-items: center; overflow: hidden; color: #f2f3ec; background: var(--dark); }
.intro > img, .intro-shade { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.intro > img { opacity: .72; }
.intro-shade { z-index: -1; background: linear-gradient(90deg, rgba(21,23,19,.96), rgba(21,23,19,.72) 50%, rgba(21,23,19,.23)); }
.intro-inner { width: min(100%, 980px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 30px; align-items: center; }
.intro-content { min-width: 0; }
.intro-label { margin: 0 0 8px; color: var(--accent); font: 12px var(--mono); text-transform: uppercase; }
.intro h1 { margin: 0 0 12px; font: 400 clamp(38px, 5vw, 54px)/1.05 var(--serif); letter-spacing: -.025em; }
.intro-identity { margin: 0 0 6px; color: #f1f2eb; font: 600 21px/1.3 var(--sans); }
.intro-tags { margin: 0; color: rgba(220,223,214,.78); font: 300 14px/1.55 var(--sans); letter-spacing: .015em; }
.intro-list { max-width: 650px; margin: 18px 0 0; padding: 16px 0 0 20px; border-top: 1px solid rgba(255,255,255,.22); color: #cacdc4; font-size: 15px; line-height: 1.55; }
.intro-list li + li { margin-top: 5px; }
.registered-mark { margin-left: 1px; font-size: .65em; line-height: 0; vertical-align: super; }
.intro-photo { width: 190px; height: 190px; justify-self: end; display: block; border-radius: 50%; object-fit: cover; object-position: center; }

.major-section { padding: 100px max(6vw, calc((100vw - 1080px) / 2)) 120px; }
.major-heading { margin-bottom: 65px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.major-heading h2 { margin: 0; font: 600 clamp(38px, 5vw, 56px)/1.1 var(--sans); letter-spacing: -.035em; }
.work { padding: 68px 0; border-bottom: 1px solid var(--line); }
.work:first-of-type { padding-top: 0; }
.work-heading { margin-bottom: 34px; }
.property { margin: 0 0 10px; color: var(--muted); font: 13px/1.55 var(--mono); }
.work-heading h3 { max-width: 940px; margin: 0; font: 400 clamp(31px, 4.2vw, 46px)/1.13 var(--serif); letter-spacing: -.02em; }
.tags { margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li { padding: 7px 11px; border: 1px solid #bdc3b7; border-radius: 999px; color: #545a50; font-size: 12px; }
.prose { max-width: 900px; color: #454942; font-size: 16px; line-height: 1.82; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1em; }
.work-subsection { max-width: 960px; margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--line); }
.tranquil-overview-section { border-top: 0; }
.work-subsection h4, .composition-heading h4 { margin: 0 0 25px; font: 600 clamp(22px, 2.8vw, 29px)/1.25 var(--sans); letter-spacing: -.02em; }
.subsection-intro { max-width: 850px; margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.experience-copy p + p { margin-top: 28px; }
.tranquil-overview-image { width: min(100%, 720px); height: clamp(180px, 21vw, 235px); margin: 0 0 28px; display: block; object-fit: cover; object-position: center; border: 1px solid var(--line); }
.resonance-gallery { width: min(100%, 900px); margin: -7px 0 38px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.resonance-gallery img { width: 100%; height: 210px; display: block; object-fit: cover; object-position: center; background: #dfe2da; }
.dune-gallery { width: min(100%, 900px); margin: -7px 0 38px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dune-gallery img { width: 100%; height: 200px; display: block; object-fit: cover; object-position: center top; background: #050505; }
.project-link { display: inline-block; margin-top: 22px; color: var(--green); font-size: 14px; font-weight: 600; text-underline-offset: 5px; }
.project-link:hover { color: var(--ink); }
.link-list { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
.experience-media-row { max-width: 900px; margin-bottom: 30px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px; }
.video-note { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.experience-media-row .video-launch { margin-top: 0; white-space: nowrap; }
.resonance-video-row { margin-top: 22px; margin-bottom: 0; }
.dune-video-row { margin-top: 22px; margin-bottom: 0; }
.web-demo-row { margin-top: 22px; margin-bottom: 0; }
.web-demo-row .project-link { margin-top: 0; white-space: nowrap; }
.video-launch { min-height: 62px; margin: 22px 0 0; padding: 9px 17px 9px 10px; display: inline-flex; align-items: center; gap: 12px; border: 1px solid #aeb5a7; border-radius: 999px; color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.video-launch:hover, .video-launch:focus-visible { color: var(--paper); background: var(--dark); border-color: var(--dark); }
.video-launch:focus-visible { outline: 3px solid rgba(88,114,31,.32); outline-offset: 3px; }
.video-launch strong { font-size: 14px; line-height: 1.2; }
.play-icon { position: relative; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: var(--dark); }
.play-icon::after { content: ''; position: absolute; top: 50%; left: 52%; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid var(--accent); transform: translate(-42%, -50%); }
.video-launch:hover .play-icon, .video-launch:focus-visible .play-icon { background: var(--accent); }
.video-launch:hover .play-icon::after, .video-launch:focus-visible .play-icon::after { border-left-color: var(--dark); }

.media-placeholder { padding: 24px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; border: 1px dashed #aab0a5; color: var(--muted); background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(24,26,23,.025) 12px 24px); text-align: center; }
.media-placeholder strong { color: #3f433d; font: 400 18px var(--serif); }
.media-placeholder span { font-size: 12px; }
.compact-placeholder { max-width: 900px; min-height: 180px; margin-top: 30px; }
.audio-placeholder { min-height: 105px; margin-bottom: 28px; }
.composition-audio { display: block; width: min(100%, 900px); height: 44px; margin: 0 0 28px; accent-color: var(--green); }

.dune-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: 42px; align-items: start; }
.dune-layout > img { width: 100%; min-height: 390px; display: block; object-fit: cover; }
.compositions > .work-heading { margin-bottom: 0; }
.composition { max-width: 960px; padding: 58px 0; border-top: 1px solid var(--line); }
.composition:first-of-type { margin-top: 32px; }
#music-compositions { padding-bottom: 36px; }
#music-compositions .composition:last-child { padding-bottom: 20px; }
#creative-works { padding-bottom: 52px; }
#research-technical-explorations { padding-top: 72px; }
.composition-heading .property { margin-bottom: 9px; }
.composition-intro { margin-bottom: 42px; }
.fold { max-width: 900px; margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fold + .fold { margin-top: -1px; }
.fold summary { position: relative; min-height: 64px; padding: 20px 42px 20px 0; display: flex; align-items: center; cursor: pointer; list-style: none; font: 600 16px var(--sans); }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: '+'; position: absolute; right: 2px; color: var(--green); font: 400 23px var(--sans); }
.fold[open] summary::after { content: '−'; }
.fold[open] summary { border-bottom: 1px solid var(--line); }
.fold-content { max-width: none; padding: 32px; background: var(--paper-alt); }
.compositions .fold { border-top: 0; border-bottom: 0; }
.compositions .fold + .fold { margin-top: 0; }
.compositions .fold[open] summary { border-bottom: 0; }
.research-section .fold { border-top: 0; border-bottom: 0; }
.research-section .fold + .fold { margin-top: 0; }
.research-section .fold[open] summary { border-bottom: 0; }
.listening-guide h5, .glossary h5 { margin: 28px 0 8px; color: var(--ink); font: 600 16px var(--sans); }
.listening-guide h5:first-of-type, .glossary h5:first-child { margin-top: 0; }
.glossary dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 22px; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: #4d514a; line-height: 1.65; }
.music-track { padding: 34px 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; }
.track-preview { position: relative; justify-self: center; overflow: hidden; border: 4px solid #1a2830; background: #0b1623; box-shadow: 0 8px 25px rgba(0,0,0,.22), 0 0 0 1px rgba(159,200,208,.35); }
.track-preview--portrait { width: 160px; aspect-ratio: 9 / 16; border-radius: 27px; }
.track-preview--landscape { width: 260px; aspect-ratio: 19.5 / 9; margin-top: 101px; align-self: start; border-color: #222432; border-radius: 27px; background: radial-gradient(circle at 50% 50%, #293047, #0d1625 68%); box-shadow: 0 8px 25px rgba(0,0,0,.22), 0 0 0 1px rgba(169,155,210,.35); }
.track-preview video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.track-preview-toggle { position: absolute; z-index: 2; top: 50%; left: 50%; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; opacity: 0; color: rgba(255,255,255,.88); background: rgba(12,14,16,.48); font: 600 13px/1 var(--sans); cursor: pointer; pointer-events: none; transform: translate(-50%, -50%); transition: opacity .18s ease, background-color .18s ease, border-color .18s ease; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.track-preview:hover .track-preview-toggle, .track-preview:focus-within .track-preview-toggle { opacity: .62; pointer-events: auto; }
.track-preview-toggle:hover, .track-preview-toggle:focus-visible { opacity: .82; color: #fff; background: rgba(12,14,16,.68); border-color: rgba(255,255,255,.52); }
.track-preview-toggle:focus-visible { outline: 2px solid rgba(255,255,255,.68); outline-offset: 2px; }
.track-content h5 { margin: 0 0 16px; font: 400 27px var(--serif); }
.track-content audio { width: 100%; height: 42px; margin-bottom: 16px; accent-color: var(--green); }
.track-content > p:not(.property) { margin: 0; color: #4d514a; font-size: 15px; line-height: 1.75; }
.track-content > p + p { margin-top: 10px; }
.research-section { background: #e9ebe5; }
.research-work .work-heading { display: flex; flex-direction: column; }
.research-work .work-heading h3 { order: 1; }
.research-work .work-heading > .property { order: 2; margin: 14px 0 0; }
.research-work .work-heading h3 { font-size: clamp(24px, 3vw, 34px); }
.screenshots { margin: 46px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.screenshots figure { min-width: 0; margin: 0; }
.screenshots img { width: 100%; height: 240px; display: block; object-fit: cover; object-position: left top; background: #fff; }
.screenshots figcaption { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.related-papers { max-width: 960px; margin-top: 62px; }
.paper { padding: 34px 0; border-top: 1px solid var(--line); }
.paper:first-of-type { border-top: 0; padding-top: 8px; }
.related-papers .paper:last-child { padding-bottom: 0; }
.paper-inline-link { color: var(--green); font-weight: 600; text-underline-offset: 4px; }
#rhythm-analyzer { padding-bottom: 40px; }
.paper h5 { max-width: 850px; margin: 0 0 12px; font: 400 clamp(18px, 2.1vw, 23px)/1.35 var(--serif); }
.paper > p { max-width: 850px; color: #4b4f48; font-size: 15px; line-height: 1.75; }
.paper-subtitle { margin-top: -4px; }
.publication-meta { color: var(--muted); font: 13px/1.55 var(--mono); }
.toc h6 { margin: 26px 0 8px; color: var(--ink); font-size: 15px; }
.toc h6:first-child { margin-top: 0; }
.toc ul { margin: 0; padding-left: 24px; columns: 2; column-gap: 40px; list-style-type: decimal; }
.toc li { break-inside: avoid; margin-bottom: 4px; }
.explicit-toc, .explicit-toc ol { margin: 0; padding: 0; list-style: none; }
.explicit-toc > li + li { margin-top: 18px; }
.explicit-toc ol { margin-top: 8px; padding-left: 24px; }
.explicit-toc ol li + li { margin-top: 6px; }
.explicit-toc ol ol { padding-left: 26px; color: var(--muted); }

body.video-modal-open { overflow: hidden; }
.video-modal { width: min(94vw, 1080px); max-width: none; padding: 0; border: 0; color: #f2f3ec; background: transparent; overflow: visible; }
.video-modal::backdrop { background: rgba(10,12,9,.82); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.video-modal-panel { position: relative; overflow: hidden; background: var(--dark); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 30px 90px rgba(0,0,0,.52); }
.video-modal-header { min-height: 64px; padding: 15px 70px 15px 22px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.13); }
.video-modal-header h2 { margin: 0; color: #f2f3ec; font: 500 17px/1.35 var(--sans); }
.video-modal-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; color: #f2f3ec; background: rgba(255,255,255,.06); font: 300 30px/1 var(--sans); cursor: pointer; }
.video-modal-close:hover, .video-modal-close:focus-visible { color: var(--dark); background: var(--accent); border-color: var(--accent); }
.video-modal-close:focus-visible { outline: 3px solid rgba(207,255,88,.4); outline-offset: 2px; }
.video-modal-frame { width: 100%; aspect-ratio: 16 / 9; background: #050505; }
.video-modal-frame iframe { width: 100%; height: 100%; display: block; border: 0; }
.video-modal-fallback { display: block; padding: 13px 22px 15px; color: #c7cbc0; font-size: 13px; text-underline-offset: 4px; }
.video-modal-fallback:hover { color: var(--accent); }

.footer { min-height: 82px; padding: 20px 5vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); background: var(--paper); font-size: 12px; }
.footer a { text-decoration: none; }

@media (max-width: 760px) {
  html { scroll-padding-top: 54px; }
  .topbar { min-height: 54px; }
  .topbar nav { display: none; }
  .menu-button { display: block; padding: 8px 0; border: 0; color: #c7cbc0; background: transparent; font: 13px var(--sans); }
  .mobile-nav { position: absolute; top: 54px; left: 0; right: 0; padding: 22px 5vw; background: rgba(21,23,19,.98); }
  .mobile-nav:not([hidden]) { display: grid; gap: 24px; max-height: calc(100vh - 54px); overflow-y: auto; }
  .mobile-nav-group > a { display: block; color: #f1f2eb; font-weight: 600; }
  .mobile-subnav { margin: 11px 0 0 14px; display: grid; gap: 9px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.18); }
  .mobile-subnav a { color: #aeb3a7; font-size: 12px; line-height: 1.35; }
  .intro { min-height: 0; padding: 46px 7vw 40px; }
  .intro-inner { grid-template-columns: 1fr; gap: 18px; }
  .intro h1 { margin-bottom: 10px; font-size: 38px; }
  .intro-identity { font-size: 19px; }
  .intro-tags { font-size: 13px; }
  .intro-list { max-width: 100%; font-size: 14px; line-height: 1.55; }
  .intro-photo { width: min(150px, 44vw); height: min(150px, 44vw); justify-self: start; }
  .major-section { padding: 72px 7vw 88px; }
  .major-heading { margin-bottom: 48px; }
  .major-heading h2 { font-size: 38px; }
  .work { padding: 54px 0; }
  .work-heading h3 { font-size: 32px; }
  .research-work .work-heading h3 { font-size: 27px; }
  .prose { font-size: 16px; }
  .work-subsection { margin-top: 44px; }
  .work-subsection h4, .composition-heading h4 { font-size: 23px; }
  .experience-media-row { grid-template-columns: 1fr; align-items: start; }
  .experience-media-row .video-launch { justify-self: start; }
  .tranquil-overview-image { height: 190px; margin-bottom: 24px; }
  .resonance-gallery { width: 100%; grid-template-columns: repeat(3, 64vw); margin-bottom: 32px; padding-bottom: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .resonance-gallery img { height: 210px; scroll-snap-align: start; }
  .dune-gallery { width: 100%; grid-template-columns: repeat(3, 64vw); margin-bottom: 32px; padding-bottom: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .dune-gallery img { height: 200px; scroll-snap-align: start; }
  .dune-layout { grid-template-columns: 1fr; gap: 27px; }
  .dune-layout > img { min-height: 240px; }
  .composition { padding: 46px 0; }
  #music-compositions { padding-bottom: 24px; }
  #creative-works { padding-bottom: 32px; }
  #research-technical-explorations { padding-top: 52px; }
  .fold-content { padding: 24px 18px; }
  .glossary dl { grid-template-columns: 1fr; gap: 4px; }
  .glossary dd + dt { margin-top: 12px; }
  .music-track { grid-template-columns: 1fr; gap: 22px; }
  .track-preview--portrait { width: 170px; }
  .track-preview--landscape { width: min(100%, 340px); margin-top: 0; }
  .screenshots { grid-template-columns: 88% 88% 88%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .screenshots figure { scroll-snap-align: start; }
  .screenshots img { height: 220px; }
  .toc ul { columns: 1; }
  .video-modal { width: 96vw; }
  .video-modal-header { min-height: 58px; padding: 12px 62px 12px 16px; }
  .video-modal-header h2 { font-size: 15px; }
  .video-modal-close { top: 8px; right: 8px; width: 40px; height: 40px; }
  .video-modal-fallback { padding: 12px 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
