/* edylle.com: "Pit Wall" layout with a pedalboard for the hobbies.
   Colours are tokens; the light theme only redefines them. */

:root {
  --bg: #0B0D10;
  --panel: #13171C;
  --line: #252B33;
  --line-2: #3A424D;
  --text: #E9EDF2;
  --soft: #C9D1DB;
  --muted: #9BA6B4;
  --accent: #FF7A33;
  --on-accent: #0B0D10;
  --teal: #45D6C4;
  --purple: #B79CFF;
  --nav-bg: rgba(11, 13, 16, 0.86);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg: #F1F3F5;
  --panel: #FFFFFF;
  --line: #D5DAE0;
  --line-2: #A9B0B8;
  --text: #111418;
  --soft: #2B3138;
  --muted: #4E5661;
  --accent: #C2410C;
  --on-accent: #FFFFFF;
  --teal: #0F766E;
  --purple: #6D28D9;
  --nav-bg: rgba(241, 243, 245, 0.9);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
kbd { font: 500 11px var(--mono); padding: 2px 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }

.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.acc { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--soft); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 30; padding: 10px 14px; background: var(--accent); color: var(--on-accent); border-radius: 8px; }

.label { font: 500 12px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.label a { color: inherit; }

/* Placeholders still to fill in: easy to spot, search the HTML for "TODO". */
.todo { padding: 0 6px; border: 1px dashed currentColor; border-radius: 4px; font-style: italic; opacity: 0.85; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 68px; }
.brand { font: 700 16px var(--mono); letter-spacing: 0.04em; text-decoration: none; margin-right: auto; padding: 12px 0; }
.nav-links { display: flex; flex-wrap: wrap; }
.nav-links a { font: 500 13px var(--mono); color: var(--muted); text-decoration: none; padding: 13px 12px; }
.nav-links a:hover { color: var(--text); }
.nav-tools { display: flex; gap: 8px; }

/* Buttons */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.btn { min-height: 48px; padding: 0 22px; }
.btn:hover, .btn-ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.btn-pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-pri:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn-ghost { font: 500 13px var(--mono); padding: 0 14px; background: var(--panel); border-color: var(--line); border-radius: 8px; }

/* Layout */
.row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.row.top { align-items: flex-start; }
.row > * { flex: 1 1 300px; min-width: 0; }
.row > .grow2 { flex: 2 1 480px; }
.row > .grow1 { flex: 1 1 300px; }
.card { padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; transition: border-color 0.2s ease; }
.card:hover { border-color: var(--line-2); }

.sec { margin-top: 72px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.sec-head.between { flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; }
.sec-head.flat { margin: 0; }
.sec-no { font: 500 13px var(--mono); color: var(--accent); }
h2 { font: 600 32px/1.25 var(--display); letter-spacing: -0.02em; }
h3 { font: 600 20px/1.3 var(--display); }

/* Hero */
#top { margin-top: 24px; }
.row > .hero { flex: 3 1 520px; padding: 40px; }
.badge { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
h1 { margin: 24px 0 12px; font: 700 clamp(44px, 9vw, 80px)/1.05 var(--display); letter-spacing: -0.03em; }
.kicker { font: 500 14px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lede { margin: 20px 0 28px; max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--soft); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.row > .portrait { flex: 1 1 260px; min-height: 300px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.portrait img, .ph { flex: 1; border-radius: 10px; }
.portrait img { flex: 1 1 0; width: 100%; height: 0; min-height: 280px; object-fit: cover; object-position: 50% 25%; }
.music-photo { margin: 0; }
.music-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 20%; border-radius: 12px; }
.music-photo figcaption { margin-top: 6px; font: 500 11px var(--mono); color: var(--muted); }
.ph { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-2); font: 500 12px var(--mono); color: var(--muted); }

.glance > .card { flex: 1 1 200px; padding: 20px; border-radius: 12px; }
.val { margin-top: 8px; font: 600 17px var(--display); }
.val-sm { margin-top: 4px; font-weight: 500; }

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills li { font: 500 12px var(--mono); padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--soft); background: var(--bg); }

/* Projects */
.proj { display: flex; flex-direction: column; gap: 16px; }
.proj-head { display: flex; align-items: center; gap: 14px; }
.proj-head img, .proj-ph { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.proj-ph { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-2); font: 700 18px var(--mono); color: var(--muted); }
.proj > p { color: var(--soft); }
.proj-head img.logo-plain { height: auto; border-radius: 0; }
.foot-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; }
.notes { padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--soft); display: grid; gap: 10px; }
.notes[hidden] { display: none; }
.k { display: block; font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.k1 { color: var(--teal); } .k2 { color: var(--accent); } .k3 { color: var(--purple); }
.proj-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: auto; font-size: 13px; }

/* Experience */
.stints details { border-bottom: 1px solid var(--line); }
.stints details:last-child { border-bottom: 0; }
.stints summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 16px 0; cursor: pointer; list-style: none; }
.stints summary::-webkit-details-marker { display: none; }
.stints summary:hover .role { color: var(--accent); }
.role { font: 600 18px/1.35 var(--display); }
.role::before { content: "+ "; font-family: var(--mono); color: var(--muted); }
details[open] .role::before { content: "- "; }
.at { color: var(--muted); font-weight: 500; }
.when { font: 500 13px var(--mono); color: var(--muted); }
.when.cur { color: var(--teal); }
.stints ul { padding: 0 0 18px 34px; list-style: disc; color: var(--soft); display: grid; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack .label { margin-bottom: 10px; }
.stack .small + .small { margin-top: 4px; }

/* Pedalboard */
.board { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.pedal { flex: 1 1 230px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 12px; color: #111418; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); transition: transform 0.15s ease; }
.pedal:hover { transform: translateY(-3px); }
.p-yellow { background: #F2B632; }
/* Overdrive: overdrive-pedal green, with dark lettering. */
.p-green { background: #4DB56A; color: #0B1F12; }
/* Focus: red with white and black stripes. The stripes show behind the knobs and the footswitch only;
   the first layer is a solid red block that keeps the text between them readable. */
.p-evh {
  color: #FFFFFF;
  background:
    linear-gradient(118deg, transparent 22%, #FFFFFF 22% 28%, #111418 28% 30.5%, transparent 30.5%),
    linear-gradient(64deg, transparent 52%, #111418 52% 54.5%, #FFFFFF 54.5% 61%, transparent 61%),
    linear-gradient(-32deg, transparent 38%, #FFFFFF 38% 42.5%, transparent 42.5%),
    linear-gradient(172deg, transparent 8%, #111418 8% 10%, #FFFFFF 10% 14%, transparent 14%),
    linear-gradient(-12deg, transparent 9%, #FFFFFF 9% 13.5%, #111418 13.5% 15.5%, transparent 15.5%),
    linear-gradient(98deg, transparent 70%, #FFFFFF 70% 74%, transparent 74%),
    #C4161C;
}
/* The stripes run behind the text, so each text block sits on a dark, almost solid label. */
.p-evh > div:not(.knobs), .p-evh > p { align-self: flex-start; padding: 8px 10px; border-radius: 6px; background: rgba(11, 13, 16, 0.95); }
.p-blue { background: #1F3A8A; color: #FFFFFF; }
.knobs { display: flex; justify-content: space-between; }
.knobs span { width: 44px; height: 44px; border-radius: 50%; background: #111418; border: 3px solid #F7F8F9; position: relative; }
.knobs span::after { content: ""; position: absolute; left: 50%; top: 4px; width: 3px; height: 12px; margin-left: -1.5px; background: #F7F8F9; border-radius: 2px; }
/* Easter egg: the knobs turn when dragged (script.js sets --rot). They do nothing else. */
.knobs span { transform: rotate(var(--rot, 0deg)); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.knobs span.turning { cursor: grabbing; }
.knobs span:last-child { --rot: 40deg; }
.knobs span:first-child { --rot: -30deg; }
.pedal h3 { font: 700 30px/1 var(--display); text-transform: uppercase; letter-spacing: -0.02em; }
.pedal-sub { margin-top: 4px; font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.pedal-specs, .pedal-note { font-size: 14px; }
.lcd, .metro { padding: 10px 12px; border-radius: 8px; background: #0B0D10; }
.lcd svg { width: 100%; }
.lcd-txt { color: #B7F36B; font: 700 16px var(--mono); text-align: center; }
.lcd-cap { color: #C9D1DB; font: 500 11px var(--mono); text-align: center; text-transform: uppercase; letter-spacing: 0.08em; }
.lcd-list p { color: #B7F36B; font: 500 13px/1.8 var(--mono); }
.metro { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px; }
.metro .lcd-txt { font-size: 20px; }
.metro button { width: 44px; height: 44px; background: #13171C; border: 1px solid #3A424D; border-radius: 6px; color: #E9EDF2; font: 500 18px var(--mono); }
.beats { display: flex; justify-content: center; gap: 12px; }
.beats span { width: 12px; height: 12px; border-radius: 50%; background: rgba(17, 20, 24, 0.25); }
.beats span.on { background: #111418; }
.beats span.on:first-child { background: #C92A21; }
.foot { margin-top: auto; align-self: center; width: 76px; height: 76px; border-radius: 50%; background: #D5DAE0; border: 4px solid #111418; color: #111418; font: 700 11px var(--mono); text-transform: uppercase; }
button.foot:active { transform: scale(0.96); }
button.foot[aria-pressed="true"] { background: #B7F36B; }

/* Music */
.music { display: flex; flex-direction: column; gap: 16px; }
.music > p { color: var(--soft); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.card-head h3 { font-size: 22px; }
.embed { flex: 1; min-height: 152px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; }
.embed.loaded { padding: 0; border: 0; }
.embed iframe { width: 100%; height: 352px; border: 0; border-radius: 12px; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.videos { display: grid; gap: 10px; }
.videos a { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; text-decoration: none; }
.videos img { width: 96px; flex: none; border-radius: 6px; border: 1px solid var(--line); }
.rig .label { margin-bottom: 8px; }
.rig-note { margin-top: 8px; color: var(--muted); }

/* /now */
.now { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 16px; border-color: var(--accent); }
.now:hover { border-color: var(--accent); }
.now > div { flex: 1 1 200px; min-width: 0; }
.now > .now-head { flex: 0 0 180px; }
.now h3 { font: 700 22px var(--mono); }

/* Footer */
.foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 72px; padding-top: 32px; padding-bottom: 40px; border-top: 1px solid var(--line); }
.talk { font: 600 22px var(--display); margin-bottom: 6px; }
.foot-bar .label { text-transform: none; letter-spacing: 0; }

/* Command palette */
dialog#palette { width: min(560px, calc(100vw - 32px)); margin-top: 14vh; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
dialog#palette::backdrop { background: rgba(5, 7, 9, 0.6); backdrop-filter: blur(3px); }
#palInput { width: 100%; height: 56px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: 400 15px var(--mono); outline: none; }
#palInput::placeholder { color: var(--muted); }
#palList { max-height: 46vh; overflow-y: auto; padding: 6px; }
#palList li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; cursor: pointer; }
#palList li[aria-selected="true"] { background: var(--bg); box-shadow: inset 0 0 0 1px var(--accent); }
#palList .grp { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
#palList .none { color: var(--muted); cursor: default; }
.pal-hint { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--line); font: 500 11px var(--mono); color: var(--muted); }
.pal-hint kbd + kbd { margin-left: -2px; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 40; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .row > .hero { padding: 24px; }
  .card { padding: 20px; }
  .board { padding: 14px; }
  .nav-links a { padding: 13px 8px; }
  .sec { margin-top: 56px; }
  h2 { font-size: 26px; }
  #paletteOpen kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .nav, #palette, #toast, .metro, .beats, .foot, .embed { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Easter egg: 16-bit mode (Konami code, see script.js) ----------
   Kept at the end so these tokens win over both themes. */
.curtain { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.hud { display: none; }

:root.retro {
  --bg: #140C2E;
  --panel: #24194D;
  --line: #5B4BD6;
  --line-2: #8F7BFF;
  --text: #F4ECD8;
  --soft: #DDD4F2;
  --muted: #B3A8E0;
  --accent: #FFD23F;
  --on-accent: #140C2E;
  --teal: #3DF0C0;
  --purple: #FF8FDD;
  --nav-bg: #140C2E;
  --sans: "VT323", ui-monospace, Menlo, monospace;
  --mono: "VT323", ui-monospace, Menlo, monospace;
  --display: "Press Start 2P", ui-monospace, Menlo, monospace;
}
.retro body {
  font-size: 20px; line-height: 1.3; padding-bottom: 44px;
  -webkit-font-smoothing: none;
  /* a starfield made of single pixels */
  background-image:
    radial-gradient(#F4ECD8 1px, transparent 1px),
    radial-gradient(#8F7BFF 1px, transparent 1px);
  background-size: 96px 96px, 64px 64px;
  background-position: 12px 20px, 40px 52px;
}
/* scanlines over everything */
.retro body::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.16) 2px 4px); }
.retro * { border-radius: 0 !important; transition: none !important; }
.retro .knobs span, .retro .foot { border-radius: 50% !important; }
.retro img { image-rendering: pixelated; }
.retro .nav { backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 3px solid var(--line-2); }
.retro .card, .retro .board { border-width: 3px; box-shadow: 6px 6px 0 #000; }
.retro .pedal { box-shadow: 6px 6px 0 #000; border: 3px solid #000; }
.retro .btn, .retro .btn-ghost { border-width: 3px; box-shadow: 4px 4px 0 #000; text-transform: uppercase; font-size: 18px; }
.retro .btn:hover, .retro .btn-ghost:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.retro .pills li { border-width: 2px; font-size: 16px; padding: 2px 8px; }
.retro .label, .retro .kicker, .retro .when, .retro .nav-links a, .retro .brand, .retro .badge, .retro .sec-no, .retro .k, .retro .pedal-sub, .retro .lcd-cap { font-size: 17px; letter-spacing: 0.04em; }
.retro .small, .retro .pedal-specs, .retro .pedal-note, .retro .videos a, .retro .notes, .retro .proj-foot { font-size: 18px; }
.retro .lede { font-size: 22px; line-height: 1.3; }
.retro h1 { font-size: clamp(24px, 5vw, 50px); line-height: 1.3; letter-spacing: 0; text-shadow: 4px 4px 0 #000; color: var(--accent); }
.retro h2 { font-size: 20px; line-height: 1.5; letter-spacing: 0; text-shadow: 3px 3px 0 #000; }
.retro h3, .retro .card-head h3 { font-size: 13px; line-height: 1.6; }
.retro .pedal h3 { font-size: 17px; line-height: 1.4; letter-spacing: 0; }
.retro .now h3 { font-size: 28px; }
.retro .role { font-size: 11px; line-height: 1.7; }
.retro .val, .retro .talk { font-size: 12px; line-height: 1.6; }
.retro .val-sm { font-size: 20px; }
.retro .lcd-txt, .retro .metro .lcd-txt { font-size: 24px; }
.retro .lcd-list p { font-size: 18px; line-height: 1.4; }
.retro #toast { border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
.retro dialog#palette { border-width: 3px; box-shadow: 8px 8px 0 #000; }
.retro #palInput { font-size: 20px; }
.retro .hud { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 12px; background: #000; color: #FFD23F; border-top: 3px solid #8F7BFF; font: 10px/1.6 "Press Start 2P", ui-monospace, monospace; white-space: pre-wrap; text-align: center; }
.retro #toast { bottom: 64px; }
.retro .music-photo figcaption, .retro kbd, .retro .pal-hint, .retro #palList .grp { font-size: 16px; }
