:root {
  --ink: #f3e9dc;
  --ink-dim: rgba(243, 233, 220, 0.62);
  --ink-faint: rgba(243, 233, 220, 0.32);
  --accent: #ffb38a;
  --accent-2: #b9a3ff;
  --night: #120c22;
  --panel: rgba(20, 13, 36, 0.86);
  --line: rgba(243, 233, 220, 0.14);
  --serif: "DM Serif Display", Georgia, serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font: 15px/1.65 var(--mono);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* selected text: sunset peach on night ink; the orange "Kaminski" flips to lavender so it stays visible */
::selection { background: var(--accent); color: var(--night); text-shadow: none; }
.name em::selection, .panel-no::selection, .timeline .yr::selection, .big-link::selection, .send::selection { background: var(--accent-2); color: var(--night); }
:focus-visible { outline: 1px dashed var(--accent); outline-offset: 4px; }

/* ---------- scene + film fx ---------- */
#scene {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  transition: filter .8s var(--ease), transform .8s var(--ease);
}
body.mixer-open #scene, body.panel-open #scene { filter: blur(3px) brightness(.6) saturate(.8); transform: scale(1.03); }

.fx { position: fixed; inset: 0; pointer-events: none; }
.grain {
  inset: -50%;
  background-image: url("grain.png");
  opacity: .11;
  animation: grain 1s steps(6) infinite;
  mix-blend-mode: overlay;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-7%, 4%); }
  40% { transform: translate(5%, -6%); } 60% { transform: translate(-3%, 8%); }
  80% { transform: translate(8%, 2%); } 100% { transform: translate(0, 0); }
}
.scanlines {
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  opacity: .35;
}
.vignette { background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(8, 4, 18, .75) 100%); }

/* ---------- stage ---------- */
.stage {
  position: fixed; left: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(20px, 8vw, 120px);
  max-width: 900px;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
body.panel-open .stage { opacity: .25; transform: translateX(-24px); }

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; align-items: center; gap: 10px;
}
.rec { width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b; animation: rec 2.4s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .25; } }

.name {
  margin: 0;
  font: 400 clamp(52px, 10vw, 136px)/.92 var(--serif);
  letter-spacing: -.01em;
  text-shadow: 2px 0 rgba(255, 120, 150, .35), -2px 0 rgba(120, 200, 255, .3), 0 0 40px rgba(255, 179, 138, .25);
}
.name span { display: block; }
.name em { display: block; font-style: italic; color: var(--accent); }

.title {
  margin: 22px 0 0;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .08em;
  color: var(--ink-dim);
}
.caret { animation: blink 1.1s steps(1) infinite; color: var(--accent); margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.tracks { margin-top: clamp(32px, 6vh, 64px); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.track {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 14px;
  padding: 6px 0;
  font-size: 15px; letter-spacing: .14em; text-transform: lowercase;
  color: var(--ink-dim);
  transition: color .25s, transform .35s var(--ease);
}
.track .no { font-size: 11px; color: var(--ink-faint); }
.track .len { font-size: 11px; color: var(--ink-faint); margin-left: 6px; opacity: 0; transition: opacity .25s; }
.track::after {
  content: ""; position: absolute; left: 30px; right: 0; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.track:hover, .track:focus-visible { color: var(--ink); transform: translateX(8px); }
.track:hover::after, .track:focus-visible::after { transform: scaleX(1); }
.track:hover .len, .track:focus-visible .len { opacity: 1; }
.track:hover .no { color: var(--accent); }

/* ---------- cassette deck ---------- */
.deck {
  position: fixed; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 28px);
  display: flex; align-items: center; gap: 14px;
  z-index: 5;
}
.deck-btn { width: 64px; height: 40px; transition: transform .3s var(--ease); }
.deck-btn:hover { transform: translateY(-2px) rotate(-3deg); }
.cassette { width: 100%; height: 100%; overflow: visible; }
.cassette .shell { fill: rgba(20, 13, 36, .7); stroke: var(--ink-dim); stroke-width: 1.5; }
.cassette .label { fill: var(--accent); opacity: .85; }
.cassette .reel { fill: var(--night); stroke: var(--ink); stroke-width: 1.2; }
.cassette .spoke path { stroke: var(--ink); stroke-width: 1.2; }
.cassette .foot { fill: none; stroke: var(--ink-dim); stroke-width: 1.2; }
.cassette .spoke { transform-box: fill-box; transform-origin: center; }
body.playing .cassette .spoke { animation: spin 2.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.deck-meta { display: flex; flex-direction: column; line-height: 1.35; }
.deck-title { font-size: 12px; letter-spacing: .1em; color: var(--ink); }
.deck-sub { font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); }

/* ---------- mute (subtle) ---------- */
.controls {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 28px);
  display: flex; align-items: center; gap: 6px;
  z-index: 5;
}
.gear { display: grid; place-items: center; padding: 6px 4px; color: var(--ink-faint); transition: color .25s; }
.gear svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .6s var(--ease); }
.gear:hover, .gear[aria-expanded="true"] { color: var(--ink); }
.gear:hover svg { transform: rotate(60deg); }
.mute {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px;
  color: var(--ink-faint);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  transition: color .25s;
}
.mute:hover { color: var(--ink); }
.mute svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mute .x { display: none; }
.mute[aria-pressed="true"] .waves { display: none; }
.mute[aria-pressed="true"] .x { display: inline; }
.mute { position: relative; }
.mute-label { position: absolute; right: 100%; margin-right: 34px; white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; pointer-events: none; }
.mute:hover .mute-label, .mute:focus-visible .mute-label { opacity: 1; transform: none; }

/* ---------- mixer ---------- */
.mixer-scrim { position: fixed; inset: 0; z-index: 10; background: rgba(8, 4, 18, .55); }
.mixer {
  position: fixed; left: 50%; top: 50%; z-index: 11;
  width: min(440px, calc(100% - 32px));
  padding: 26px 28px 20px;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  transform: translate(-50%, -46%) scale(.97); opacity: 0; visibility: hidden;
  transition: transform .45s var(--ease), opacity .3s, visibility 0s .45s;
  outline: none;
}
.mixer.open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; transition: transform .45s var(--ease), opacity .3s; }
.mixer-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.mixer h2 { margin: 0; font: italic 400 30px/1 var(--serif); }

.fader { display: grid; grid-template-columns: 118px 1fr 34px; align-items: center; gap: 14px; padding: 9px 0; }
.fader + .fader { border-top: 1px dashed var(--line); }
.fader label { font-size: 11px; letter-spacing: .16em; text-transform: lowercase; color: var(--ink-dim); }
.fader label small { display: block; font-size: 9px; letter-spacing: .1em; color: var(--ink-faint); }
.fader output { font-size: 11px; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.fader.master label { color: var(--ink); }

/* the slider: a groove with a filled level and a chunky fader cap */
.fader input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; margin: 0; background: transparent; cursor: grab;
  --pct: 50%;
}
.fader input[type=range]:active { cursor: grabbing; }
.fader input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) 0 var(--pct), rgba(243, 233, 220, .14) var(--pct) 100%);
}
.fader input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(243, 233, 220, .14); }
.fader input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.fader input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 24px; margin-top: -10px; border-radius: 3px;
  background: linear-gradient(to bottom, #f3e9dc 0 45%, #1a1030 45% 55%, #f3e9dc 55%);
  border: 1px solid rgba(0, 0, 0, .4); box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  transition: transform .15s;
}
.fader input[type=range]::-moz-range-thumb {
  width: 14px; height: 24px; border-radius: 3px;
  background: linear-gradient(to bottom, #f3e9dc 0 45%, #1a1030 45% 55%, #f3e9dc 55%);
  border: 1px solid rgba(0, 0, 0, .4); box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
}
.fader input[type=range]:hover::-webkit-slider-thumb, .fader input[type=range]:focus-visible::-webkit-slider-thumb { transform: scaleY(1.1); }
.fader input[type=range]:focus-visible { outline: none; }
.fader input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
.fader input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }

.mixer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.reset { font-size: 11px; letter-spacing: .16em; color: var(--ink-dim); transition: color .25s; }
.reset:hover { color: var(--accent); }
.mixer-tip { font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); }

/* ---------- contact form ---------- */
.contact { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact label { display: flex; flex-direction: column; gap: 6px; }
.contact label span { font-size: 11px; letter-spacing: .2em; color: var(--accent); }
.contact input, .contact textarea {
  font: 14px/1.5 var(--mono); color: var(--ink);
  background: rgba(243, 233, 220, .04);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; resize: vertical;
  transition: border-color .25s, background .25s;
}
.contact input:focus, .contact textarea:focus { outline: none; border-color: var(--accent); background: rgba(243, 233, 220, .07); }
.contact .invalid { border-color: #ff8a8a; }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send {
  align-self: flex-start; margin-top: 4px;
  font: italic 400 24px/1 var(--serif); color: var(--accent);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color .25s, opacity .25s;
}
.send:hover { border-color: var(--accent); }
.send:disabled { opacity: .5; cursor: progress; }
.form-status { min-height: 1.6em; font-size: 13px; margin: 0; }
.form-status.ok { color: #9be3b5; }
.form-status.err { color: #ff9a9a; }

/* ---------- hint ---------- */
.hint {
  position: fixed; left: 50%; bottom: clamp(70px, 10vh, 100px); transform: translateX(-50%);
  margin: 0; font-size: 11px; letter-spacing: .24em; color: var(--ink-faint);
  animation: breathe 3s ease-in-out infinite;
  transition: opacity .8s;
  pointer-events: none;
}
.hint.gone { opacity: 0; animation: none; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- panel ---------- */
.scrim { position: fixed; inset: 0; z-index: 8; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(520px, 100%);
  z-index: 9;
  background: var(--panel);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateX(104%);
  transition: transform .7s var(--ease);
  display: flex; flex-direction: column;
  outline: none;
}
.panel.open { transform: none; }
.panel-head {
  display: flex; align-items: baseline; gap: 16px;
  padding: clamp(28px, 6vh, 56px) 36px 20px;
  border-bottom: 1px dashed var(--line);
}
.panel-no { font-size: 12px; color: var(--accent); letter-spacing: .2em; }
.panel h2 { margin: 0; flex: 1; font: italic 400 42px/1 var(--serif); }
.close { font-size: 11px; letter-spacing: .2em; color: var(--ink-faint); transition: color .25s; }
.close:hover { color: var(--accent); }
.panel-body { padding: 28px 36px 60px; overflow-y: auto; flex: 1; }
.panel-body section { display: none; }
.panel-body section.active { display: block; animation: rise .7s var(--ease) both .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.panel p { color: var(--ink-dim); margin: 0 0 1.1em; }
.panel .lede { font: 400 24px/1.35 var(--serif); color: var(--ink); }
.panel .note { font-size: 12px; color: var(--ink-faint); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 26px 22px; border-left: 1px dashed var(--line); }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline .yr { display: block; font-size: 11px; letter-spacing: .16em; color: var(--accent); }
.timeline b { display: block; font: 400 21px/1.3 var(--serif); }
.timeline i { display: block; font-style: normal; font-size: 12px; color: var(--accent-2); margin-bottom: 6px; }
.timeline p { font-size: 13px; margin: 0; }

.panel h3.sub { margin: 30px 0 10px; font-size: 11px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.cards { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cards li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(243, 233, 220, .03); transition: border-color .3s, background .3s, transform .3s var(--ease); }
.cards li:hover { border-color: rgba(255, 179, 138, .45); background: rgba(243, 233, 220, .05); transform: translateX(-3px); }
.cards .tag { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-2); }
.cards b { display: block; margin: 2px 0 6px; font: 400 20px/1.3 var(--serif); }
.cards p { font-size: 13px; margin: 0; }
.cards .tag::selection { background: var(--accent); color: var(--night); }

.skill-group { margin-bottom: 26px; }
.skill-group h3 { margin: 0 0 10px; font-size: 11px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 12px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-dim); transition: border-color .25s, color .25s; }
.chips li:hover { border-color: var(--accent); color: var(--ink); }

.big-link {
  display: inline-block; margin: 6px 0 22px;
  font: italic 400 clamp(24px, 4vw, 32px)/1.2 var(--serif);
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .25s;
  word-break: break-all;
}
.big-link:hover { border-color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .stage { padding: 0 16px; justify-content: flex-start; padding-top: 18vh; }
  .panel-head, .panel-body { padding-left: 20px; padding-right: 20px; }
  .deck-sub { display: none; }
  .hint { bottom: 76px; white-space: nowrap; }
}

@media (max-width: 640px) {
  .fader { grid-template-columns: 96px 1fr 30px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
