/* The landing page. Same tokens and fonts as the Portal (modules/portal/static/index.html): cozy midnight + pastel.
   Written for anyone: plain sections first, the engineering detail folded into <details> at the end. */
:root {
  --bg: #0d111a; --panel: rgba(18, 23, 34, 0.85); --panel2: rgba(26, 32, 48, 0.75); --line: rgba(160, 196, 255, 0.12);
  --text: #f8fafc; --muted: #94a3b8; --accent: #a0c4ff; --accent2: #bde0fe; --periwinkle: #b8c0ff;
  --game: #e0aaff; --pink: #ffc8dd; --peach: #ffd6a5; --mint: #b9fbc0; --on-accent: #0d111a;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --display: 'Outfit', var(--font);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font: 16px/1.6 var(--font);
       background: radial-gradient(1200px 640px at 12% -8%, #1e2638 0%, var(--bg) 60%) no-repeat, var(--bg); }
a { color: var(--accent2); }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* top bar: the Portal's logo and pills */
header.top { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
             background: rgba(13, 17, 26, .72); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { font-family: var(--display); font-weight: 700; letter-spacing: .2em; font-size: 18px; color: var(--text);
        text-decoration: none; white-space: nowrap; }
.logo span { color: var(--accent); }
header nav { display: flex; gap: 4px; margin-left: auto; }
.live-btn { margin-left: auto; }
header nav + .live-btn { margin-left: 0; }
header nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
header nav a:hover { color: var(--text); background: var(--panel2); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 99px; font-size: 13px;
        font-weight: 600; background: var(--panel2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
a.pill { text-decoration: none; }
a.pill:hover { border-color: var(--accent); }
/* log-in menu: a <details>, so it works without any script */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { border-color: var(--accent); }
.menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 10px); width: min(330px, calc(100vw - 32px)); display: grid; gap: 4px;
             padding: 8px; background: #131926; border: 1px solid var(--line); border-radius: 14px; z-index: 10;
             box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.menu-list a { display: block; text-decoration: none; color: var(--text); padding: 10px 12px; border-radius: 10px; }
.menu-list a:hover, .menu-list a:focus-visible { background: var(--panel2); outline: none; }
.menu-list a:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.menu-list b { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; }
.menu-list span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); flex: none; }

/* live stream: open at the top while the channel is live (the server adds .open), otherwise folded into the
   Live button, which targets it; Close targets #shut. No script needed. */
#live { display: none; padding: 28px 0 8px; }
#live.open, #live:target { display: block; }
:root:has(#shut:target) #live { display: none; }
#shut { display: block; position: relative; top: -80px; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.live-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.stream { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 16px;
          overflow: hidden; background: #000; }
.stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#live .fine { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
/* the Live button: grey when offline, red with a pulsing dot when the server saw the channel live */
.live-btn i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-btn.on { background: #e91916; border-color: #e91916; color: #fff; }
.live-btn.on i { background: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-btn.on i { animation: none; } }

/* skip link: off screen until focused */
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 14px; border-radius: 10px;
        background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* hero */
.hero { padding-top: 84px; padding-bottom: 8px; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 6vw, 4.1rem); line-height: 1.06;
     letter-spacing: -.02em; margin: 0; max-width: 16ch; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--periwinkle) 55%, var(--game));
        -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: #cbd5e1; font-size: clamp(1.05rem, 1.9vw, 1.22rem); max-width: 60ch; margin: 22px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; border-radius: 12px;
       padding: 12px 20px; min-height: 46px; background: var(--accent); color: var(--on-accent); border: 1px solid transparent;
       transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.quiet { background: var(--panel2); color: var(--text); border-color: var(--line); }
.hero > .fine { color: var(--muted); font-size: 13.5px; margin: 12px 0 0; }

/* quick facts: the Portal's tile with a coloured left edge */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin: 48px 0 0; }
.fact, .card, .fold { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
                      box-shadow: 0 8px 28px rgba(0, 0, 0, .22); }
.fact { padding: 14px 18px; position: relative; overflow: hidden; }
.fact::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, var(--accent)); }
.fact dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.fact dd { margin: 4px 0 0; font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--c, var(--accent)); }
.c-accent { --c: var(--accent); } .c-mint { --c: var(--mint); } .c-game { --c: var(--game); } .c-peach { --c: var(--peach); }
.c-pink { --c: var(--pink); } .c-peri { --c: var(--periwinkle); }

/* sections */
section { padding: 80px 0 0; scroll-margin-top: 64px; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0 0 24px; }
.intro { color: var(--muted); max-width: 66ch; margin: -14px 0 26px; }
.narrow { max-width: 760px; }
.narrow p { color: #cbd5e1; font-size: 1.08rem; margin: 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; color: var(--accent2); }

/* cards */
.grid { display: grid; gap: 14px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { padding: 20px 22px; border-top: 3px solid var(--c, var(--line)); }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.25; margin: 0 0 8px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card p + p { margin-top: 10px; }
.card p b { color: var(--text); font-weight: 600; }

/* what happens to a message: a numbered path down the page, each step labelled with where it happens */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 820px; }
.steps li { position: relative; padding: 0 0 26px 62px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
                    display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 17px;
                    color: var(--on-accent); background: var(--c, var(--accent)); box-sizing: border-box; }
.steps li::after { content: ""; position: absolute; left: 19px; top: 46px; bottom: 6px; width: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
/* the cloud fallback: a side branch of step 4, not a step of its own */
.steps li.alt { margin-left: 28px; counter-increment: none; }
.steps li.alt::before { content: "or"; font-size: 14px; background: transparent; color: var(--c); border: 2px dashed var(--c); }
.steps li.alt::after { background: none; border-left: 2px dashed var(--line); }
.where { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
         color: var(--c, var(--muted)); background: var(--panel2); border: 1px solid var(--line); padding: 2px 9px;
         border-radius: 6px; }
.steps h3 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 8px 0 4px; }
.steps p { color: var(--muted); margin: 0; max-width: 64ch; }

/* the catch */
.catch { margin: 16px 0 0; padding: 16px 20px; border-radius: 14px; border: 1px dashed rgba(255, 214, 165, .4);
         background: rgba(255, 214, 165, .06); color: #e2e8f0; }
.catch b { color: var(--peach); }

/* the technical detail: <details> folds, so it works with no script */
.fold { margin-top: 12px; }
.fold summary { cursor: pointer; list-style: none; padding: 16px 22px; min-height: 44px; font-family: var(--display);
                font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
                border-radius: 16px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.fold[open] summary::after { content: "−"; }
.fold summary:hover { background: var(--panel2); }
.fold-body { padding: 4px 22px 22px; border-top: 1px solid var(--line); }
.fold-body > p { color: var(--muted); font-size: 15px; max-width: 72ch; margin: 16px 0 0; }
.legend, .fold-body > p.legend { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.decisions { margin: 0; padding: 0; list-style: none; counter-reset: dec; display: grid; gap: 0; }
.decisions li { counter-increment: dec; padding: 16px 0 16px 44px; border-top: 1px solid var(--line); position: relative; }
.decisions li:first-child { border-top: 0; }
.decisions li::before { content: "0" counter(dec); position: absolute; left: 0; top: 18px; font-family: var(--display);
                        font-weight: 700; font-size: 14px; color: var(--accent); letter-spacing: .08em; }
.decisions h3, .parts dt { font-family: var(--display); font-weight: 600; font-size: 16.5px; margin: 0 0 4px; }
.decisions p { color: var(--muted); font-size: 14.5px; margin: 0; max-width: 78ch; }
.decisions .cost { color: var(--text); font-size: 13.5px; margin-top: 6px; }
.decisions .cost b { color: var(--peach); font-weight: 600; }

.parts { margin: 0; display: grid; gap: 0; }
.parts > div { padding: 14px 0; border-top: 1px solid var(--line); }
.parts > div:first-child { border-top: 0; }
.parts dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.parts dd { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 80ch; }
.tag { font-family: var(--font); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
       padding: 2px 8px; border-radius: 6px; background: var(--panel2); color: var(--c, var(--muted)); white-space: nowrap; }

.plain { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); font-size: 15px; max-width: 78ch; }
.plain b { color: var(--text); font-weight: 600; }

/* measured: the benchmark's numbers as bars (native <meter>, so no script and no inline style) */
.bench { margin-top: 12px; }
.b-row { display: grid; grid-template-columns: 210px 1fr 1fr 150px; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.b-row:first-child { border-top: 0; }
.b-row.head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 10px 0; }
.b-row h3 { font-family: var(--display); font-weight: 600; font-size: 16px; margin: 0; }
.b-row small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.b-bar { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.b-bar meter { grid-column: 1; grid-row: 1 / span 2; }
.b-bar b, .b-mem b { font-family: var(--display); font-weight: 600; color: var(--c, var(--accent)); }
.b-bar small { grid-column: 2; grid-row: 2; text-align: right; }
.b-bar b { grid-column: 2; grid-row: 1; text-align: right; font-size: 18px; line-height: 1.1; }
.b-mem b { font-size: 15px; display: block; }
meter { width: 100%; height: 10px; border: 0; background: var(--panel2); border-radius: 99px; -webkit-appearance: none; appearance: none; }
meter::-webkit-meter-bar { background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; height: 10px; }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value {
  background: var(--c, var(--accent)); border-radius: 99px; }
meter::-moz-meter-bar { background: var(--c, var(--accent)); border-radius: 99px; }

/* footer */
footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }

@media (max-width: 980px) {
  .facts, .grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: 1fr; }
  header nav a { padding: 6px 7px; font-size: 13.5px; }
}
@media (max-width: 820px) {
  /* the section links move to their own row under the bar and scroll sideways inside it */
  header.top .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 10px 12px; }
  .logo { margin-right: auto; }
  .live-btn { margin-left: 0; }
  header nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { flex: none; padding: 10px; }
  section { scroll-margin-top: 104px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 48px; }
  section { padding-top: 64px; }
  .b-row { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .b-row.head { display: none; }
  .b-row > div:first-child { grid-column: 1 / -1; }
  .fold summary { padding: 14px 16px; }
  .fold-body { padding: 4px 16px 18px; }
  .steps li { padding-left: 54px; }
  .steps li.alt { margin-left: 14px; }
}
@media (max-width: 520px) {
  .grid.four { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fact { padding: 12px 14px; }
  .fact dd { font-size: 16px; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* personality: the hero's hello and punchline, the About me cards, the music card */
.hi { font-family: var(--display); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--accent); margin: 0 0 14px; }
.hi span { color: var(--muted); font-weight: 500; }
.punch { font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 3.2vw, 2.1rem); line-height: 1.2;
         color: var(--game); margin: 10px 0 0; max-width: 28ch; }
.hero .lead { margin-top: 20px; }
.me { max-width: 760px; }
.me p { color: #cbd5e1; font-size: 1.08rem; margin: 0; }
.me .cta { margin-top: 18px; }
.likes { margin-top: 28px; }
.glyph { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 12px;
         font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--c); background: var(--panel2);
         border: 1px solid var(--line); }
.music { margin-top: 14px; }
.music-head { display: flex; gap: 16px; align-items: flex-start; }
.music-head .glyph { flex: none; margin: 0; }
.music-head p { max-width: 70ch; }
.artists { list-style: none; counter-reset: art; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.artists li { counter-increment: art; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
              border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.artists li::before { content: counter(art); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
                      font-size: 11.5px; font-weight: 700; color: var(--on-accent); background: var(--c); }
.music .fine { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.music .fine b { color: var(--text); }
@media (max-width: 980px) { .likes { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .music-head { flex-direction: column; gap: 10px; } }

/* meet the team: local models on one side, cloud on the other, a link between them */
.roster { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 14px; align-items: stretch; }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, .22); }
.side.local { border-top: 3px solid var(--game); }
.side.cloud { border-top: 3px solid var(--accent); }
.side-head { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.side-head b { font-family: var(--display); font-size: 20px; font-weight: 600; }
.side.local .side-head b { color: var(--game); }
.side.cloud .side-head b { color: var(--accent); }
.side-head span { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.side li { padding: 11px 0 11px 18px; border-top: 1px solid var(--line); position: relative; }
.side li:first-child { border-top: 0; }
.side li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%;
                   background: var(--c); box-shadow: 0 0 10px var(--c); }
.side li b { display: block; font-family: var(--display); font-weight: 600; font-size: 16.5px; }
.side li small { font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 6px; }
.side li span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.roster .link { align-self: center; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
                background: var(--panel2); border: 1px solid var(--line); color: var(--periwinkle); font-size: 20px; }
h3.sub { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 30px 0 14px; }
@media (max-width: 900px) {
  .roster { grid-template-columns: 1fr; gap: 10px 0; }
  .roster .link { justify-self: center; transform: rotate(90deg); }
}
