/* Ivory and ebony: sections alternate like piano keys. */
:root {
  --ivory: #f3efe6;
  --ivory-2: #e8e2d4;
  --ink: #151413;
  --ebony: #121110;
  --ebony-2: #1e1c1a;
  --muted: #77706a;
  --accent: #e4572e;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: clip; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; }
.ivory { background: var(--ivory); color: var(--ink); }
.ebony { background: var(--ebony); color: var(--ivory); --muted: #9b948b; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 18px; color: var(--muted); }

/* Header */
.top { position: absolute; inset: 0 0 auto; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--gutter); }
.mark { font-family: var(--serif); font-size: 22px; text-decoration: none; }
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.top nav a { text-decoration: none; font-size: 14px; position: relative; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .3s; }
.top nav a:hover::after { right: 0; }

/* Hero + keyboard */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 110px var(--gutter) 36px; position: relative; }
@media (max-width: 700px) { .hero { min-height: auto; padding-top: 140px; padding-bottom: 56px; } }
.hero h1 { font-size: clamp(4.4rem, 17vw, 15rem); line-height: .82; margin-bottom: clamp(28px, 5vw, 56px); }
.hero h1 em { color: var(--accent); }
.hero h1 span, .hero h1 em { display: inline-block; animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 em { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(.25em); } }
.keys { position: relative; display: flex; height: clamp(150px, 24vw, 260px); user-select: none; -webkit-user-select: none; touch-action: none; filter: drop-shadow(0 18px 24px rgba(40, 30, 20, .12)); }
.key { --lit: 0; flex: 1; border: 1px solid #cfc7b6; border-left-width: 0; border-radius: 0 0 7px 7px; background: linear-gradient(color-mix(in oklab, var(--accent) calc(var(--lit) * 100%), #fffdf8), color-mix(in oklab, var(--accent) calc(var(--lit) * 85%), #efe9dc)); transition: background .08s; position: relative; }
.key:first-child { border-left-width: 1px; }
.key.black { position: absolute; top: 0; height: 62%; z-index: 2; border: 0; border-radius: 0 0 5px 5px; background: linear-gradient(color-mix(in oklab, var(--accent) calc(var(--lit) * 100%), #2a2826), color-mix(in oklab, var(--accent) calc(var(--lit) * 80%), #0e0d0c)); box-shadow: inset 0 -6px 0 rgba(255, 255, 255, .06), 0 3px 6px rgba(0, 0, 0, .3); }
.key.down { --lit: 1; transform: translateY(1px); }
.key b { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 500 11px var(--sans); color: #b0a795; opacity: 0; transition: opacity .3s; }
.keys:hover .key b { opacity: 1; }
.hint { margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.hint .touch { display: none; }
@media (hover: none) { .hint .desk { display: none; } .hint .touch { display: inline; } .key b { display: none; } }

/* Work */
.work { padding: clamp(72px, 10vw, 140px) var(--gutter); }
.head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; }
.head h2, .bio h2 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: .9; }
.count { font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 44px; }
.filters button { background: none; border: 1px solid #3a3734; border-radius: 99px; padding: 7px 16px; font-size: 14px; transition: background .2s, color .2s, border-color .2s; }
.filters button:hover { border-color: var(--ivory); }
.filters button.on { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 56px clamp(28px, 4vw, 56px); }
.card { min-width: 0; }
.card.big { grid-column: span 2; }
@media (max-width: 560px) { .card.big { grid-column: auto; } }
.card[hidden] { display: none; }
.js .card { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 70ms); }
.js .card.seen { opacity: 1; transform: none; }
.card h3 { font-size: 26px; line-height: 1.1; margin-top: 20px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.blurb { margin: 8px 0 0; font-size: 14px; color: color-mix(in oklab, currentColor 78%, transparent); }
.empty { font-family: var(--serif); font-size: 32px; font-style: italic; color: var(--muted); }

/* Record sleeves: the vinyl slides out on hover and spins while playing. */
.sleeve { position: relative; aspect-ratio: 1; margin-right: 14%; }
.card.big .sleeve { aspect-ratio: 16 / 10; margin-right: 8%; }
.art { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: 3px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); background: var(--ebony-2); }
.art img, .art svg { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.score { color: #151413; }
.sleeve:hover .art img, .sleeve:hover .art svg { transform: scale(1.03); }
.disc { position: absolute; z-index: 1; top: 4%; bottom: 4%; aspect-ratio: 1; right: 4%; border-radius: 50%; background: repeating-radial-gradient(circle, #1b1a19 0 1px, #0b0a0a 1px 3px); box-shadow: 0 6px 20px rgba(0, 0, 0, .4); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.disc::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: radial-gradient(circle, var(--ebony) 0 6%, transparent 7%), conic-gradient(var(--accent) 0 75%, #f2c14e 75% 100%); }
.sleeve:hover .disc { transform: translateX(16%); }
.playing .disc { transform: translateX(22%); }
.playing .disc::after { animation: spin 1.8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.play { position: absolute; z-index: 3; right: 12px; bottom: 12px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ivory); color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); transition: transform .2s, background .2s; text-decoration: none; }
.play:hover { transform: scale(1.08); background: #fff; }
.i-play { width: 14px; height: 16px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); margin-left: 3px; }
.i-pause, .playing:not(.paused) .play .i-play, .play-btn.playing:not(.paused) .i-play { width: 14px; height: 16px; margin: 0; background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%); clip-path: none; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(72px, 10vw, 140px) var(--gutter); }
.about:not(:has(.portrait)) { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.portrait { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; transform: rotate(-1.5deg); box-shadow: 0 20px 40px rgba(40, 30, 20, .18); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.bio h2 { margin-bottom: 28px; }
.bio p { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.35; margin: 0 0 .8em; }
@media (max-width: 760px) { .about { grid-template-columns: minmax(0, 1fr); } .portrait { max-width: 420px; } }

/* Contact */
.contact { padding: clamp(80px, 12vw, 160px) var(--gutter) 120px; }
.hello { display: inline-flex; align-items: baseline; gap: .2em; font-family: var(--serif); font-size: clamp(3.2rem, 11vw, 9rem); line-height: 1; text-decoration: none; margin: 0; }
a.hello span { color: var(--accent); transition: transform .3s; display: inline-block; }
a.hello:hover span { transform: translateX(.15em); }
.socials { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 40px; }
.socials a { text-decoration: none; border-bottom: 1px solid #3a3734; padding-bottom: 2px; }
.socials a:hover { border-color: var(--ivory); }
.fine { margin-top: 64px; font-size: 13px; color: var(--muted); }

/* Project page */
.piece { padding: 110px var(--gutter) clamp(72px, 10vw, 120px); }
.back { display: inline-block; font-size: 14px; text-decoration: none; color: var(--muted); margin-bottom: 36px; }
.back:hover { color: var(--ink); }
.piece-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.hero-sleeve { margin-right: 18%; }
.hero-sleeve .disc { animation: slide 1.1s .2s cubic-bezier(.2, .7, .2, 1) both; transform: translateX(22%); }
@keyframes slide { from { transform: none; } }
.piece-text h1 { font-size: clamp(3rem, 7vw, 6rem); line-height: .95; margin-bottom: 20px; }
.lede { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.35; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 99px; border: 1px solid var(--ink); background: var(--ink); color: var(--ivory); text-decoration: none; font-size: 15px; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: none; color: var(--ink); }
.notes { max-width: 60ch; }
.notes p { margin: 0 0 1em; }
.video { margin-top: clamp(48px, 7vw, 96px); }
.video iframe, .video video, .yt { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: #000; }
.yt { position: relative; padding: 0; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .3s; }
.yt:hover img { opacity: 1; }
.yt .i-play { position: absolute; left: 50%; top: 50%; width: 30px; height: 34px; translate: -40% -50%; color: #fff; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .5)); }
.next { display: block; margin-top: clamp(64px, 9vw, 120px); padding-top: 28px; border-top: 1px solid var(--ivory-2); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.6rem); text-decoration: none; line-height: 1.1; }
.next span { display: block; font: 500 12px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.next:hover { color: var(--accent); }
@media (max-width: 760px) { .piece-grid { grid-template-columns: minmax(0, 1fr); } .hero-sleeve { max-width: 420px; } }

/* Player */
.player { position: fixed; z-index: 50; left: 50%; bottom: 16px; translate: -50% 0; width: min(760px, calc(100% - 32px)); display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto auto; grid-template-areas: "art text eq toggle close" "bar bar bar bar bar"; align-items: center; gap: 8px 14px; padding: 12px 14px; background: color-mix(in oklab, var(--ivory) 92%, transparent); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); animation: pop .4s cubic-bezier(.2, .7, .2, 1); }
.player[hidden] { display: none; }
@keyframes pop { from { opacity: 0; translate: -50% 20px; } }
.pl-art { grid-area: art; width: 48px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--ivory-2); }
.pl-art img, .pl-art svg { width: 100%; height: 100%; object-fit: cover; }
.pl-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pl-text strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-toggle { grid-area: toggle; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ivory); display: grid; place-items: center; }
.pl-close { grid-area: close; border: 0; background: none; font-size: 24px; line-height: 1; padding: 4px 6px; color: var(--muted); }
.pl-bar { grid-area: bar; display: flex; align-items: center; gap: 10px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }
.pl-bar input { flex: 1; accent-color: var(--accent); height: 4px; }
.pl-eq { grid-area: eq; display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.pl-eq i { width: 3px; height: 100%; background: var(--accent); border-radius: 2px; transform-origin: bottom; transform: scaleY(.12); }

/* 404 */
.lost main { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: var(--gutter); }
.lost h1 { font-size: clamp(5rem, 20vw, 12rem); font-style: italic; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .card { opacity: 1; transform: none; }
}
