/* Layout: a bento board. The homepage is a 12-column grid of glassy tiles of different sizes;
   projects and ideas follow as their own boards. Dark-first: midnight navy with amber light. */
:root {
  --bg: #0C1226;
  --tile: #141C36;
  --tile-2: rgba(255, 255, 255, .06);
  --glass: rgba(20, 28, 56, .55);
  --glass-line: rgba(255, 255, 255, .09);
  --glass-hi: rgba(255, 255, 255, .07);
  --shadow-c: rgba(0, 0, 0, .45);
  --aura-o: .38;
  --ink: #EEF1FA;
  --muted: #9AA4C6;
  --line: #253057;
  --amber: #FFB547;
  --amber-text: #FFC56E;
  --amber-ink: #1C1303;
  --coral: #FF8F70;
  --mint: #6EE7B7;
  --lilac: #B8A6FF;
  --code-bg: #080C1A;
  --code-fg: #E4E8F5;
  --code-dim: #6A7499;


  --f-display: "Chakra Petch", "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 18px;
  --r-sm: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #EDF0F8; --tile: #FFFFFF; --tile-2: rgba(18, 26, 51, .05);
    --glass: rgba(255, 255, 255, .58); --glass-line: rgba(18, 26, 51, .08); --glass-hi: rgba(255, 255, 255, .9);
    --shadow-c: rgba(30, 40, 90, .16); --aura-o: .32;
    --ink: #121A33; --muted: #58628A; --line: #D3DAEC;
    --amber: #FFB547; --amber-text: #A86300; --amber-ink: #1C1303; --coral: #D9573A; --mint: #0E8A62; --lilac: #6B55D9;
    --code-bg: #121A33; --code-fg: #E4E8F5; --code-dim: #7882A8;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.03rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--amber-text); }
code { font-family: var(--f-mono); font-size: .88em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); } }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav .wrap { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.logo { font: 700 1.25rem var(--f-display); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo i { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px var(--amber); }
.logo b { color: var(--amber-text); font-weight: 700; }
.nav-links { margin-left: auto; display: flex; gap: 4px; padding: 5px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--glass-line); border-radius: 999px; }
.nav-links a { font: 700 .9rem var(--f-body); color: var(--muted); text-decoration: none; padding: 7px 14px; border-radius: 999px; }
.nav-links a:hover { color: var(--ink); background: var(--tile-2); }
@media (max-width: 520px) { .nav-links a { padding: 7px 10px; font-size: .82rem; } .logo span { display: none; } .nav-links a[href="/#top"] { display: none; } }

/* ---------- Glowing background ---------- */
main, footer { position: relative; z-index: 1; }
.aura { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aura i { position: absolute; width: 44vmax; height: 44vmax; border-radius: 50%; filter: blur(90px); opacity: var(--aura-o); animation: drift 28s ease-in-out infinite alternate; }
.aura i:nth-child(1) { background: var(--amber); top: -16vmax; left: -12vmax; }
.aura i:nth-child(2) { background: var(--coral); top: 6vmax; right: -16vmax; animation-delay: -7s; animation-duration: 32s; }
.aura i:nth-child(3) { background: var(--lilac); bottom: -18vmax; left: 10vmax; animation-delay: -14s; }
.aura i:nth-child(4) { background: var(--mint); bottom: -10vmax; right: 4vmax; width: 30vmax; height: 30vmax; animation-delay: -20s; animation-duration: 36s; }
@keyframes drift { to { transform: translate(7vmax, 5vmax) scale(1.15); } }

/* ---------- Tiles ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; padding-block: 18px 12px; }
.tile {
  --tint: var(--amber);
  background:
    radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), color-mix(in srgb, var(--tint) 24%, transparent), transparent 65%),
    linear-gradient(155deg, color-mix(in srgb, var(--tint) 22%, transparent), transparent 58%),
    var(--glass);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--glass-line); border-radius: var(--r);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 22px 44px -26px var(--shadow-c);
  padding: 26px; min-width: 0; position: relative; overflow: hidden;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease, border-color .4s ease;
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms);
}
.tile:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--tint) 50%, var(--glass-line)); box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 54px -26px color-mix(in srgb, var(--tint) 55%, transparent); }
@keyframes rise { from { opacity: .3; transform: translateY(16px) scale(.985); } }
.t-play { --tint: var(--mint); } .t-feat { --tint: var(--coral); } .t-stats { --tint: var(--lilac); }
.t-now { --tint: var(--coral); } .t-stack { --tint: var(--mint); } .t-links { --tint: var(--lilac); }
.proj, .col { --tint: var(--c); }
.label { font: 600 .78rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--amber)); }

.t-intro { grid-column: span 7; grid-row: span 2; display: flex; flex-direction: column; gap: 20px; }
.t-play { grid-column: span 5; grid-row: span 2; padding: 0; display: flex; flex-direction: column; }
.t-feat { grid-column: span 5; grid-row: span 2; padding: 0; display: flex; flex-direction: column; }
.t-stats { grid-column: span 3; }
.t-now { grid-column: span 4; grid-row: span 2; }
.t-spark { grid-column: span 3; background: linear-gradient(140deg, var(--amber) 30%, color-mix(in srgb, var(--amber) 55%, var(--coral))); color: var(--amber-ink); border-color: transparent; }
.t-note { grid-column: span 12; --tint: var(--mint); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; color: inherit; text-decoration: none; }
.t-note[hidden] { display: none; }
.t-stack { grid-column: span 6; }
.t-links { grid-column: span 6; }
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .t-intro, .t-play, .t-feat, .t-now { grid-column: span 6; grid-row: auto; }
  .t-stats, .t-spark { grid-column: span 3; }
  .t-stack, .t-links { grid-column: span 6; }
  .t-note { grid-column: span 6; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* let the two half-width tiles (stats + weekend idea) share a row instead of leaving gaps */
  .bento { grid-auto-flow: row dense; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > .tile { grid-column: auto; }
  .tile { padding: 22px; }
  /* Say hi: label on its own line so the email gets the full width */
  .link-row { flex-wrap: wrap; row-gap: 2px; }
  .link-row .k { width: 100%; }
}

/* Intro */
.avatar { width: 64px; height: 64px; border-radius: 22px; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; font: 700 1.5rem var(--f-display); transform: rotate(-6deg); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--amber) 70%, transparent); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.t-intro:hover .avatar { transform: rotate(6deg) scale(1.06); }
.t-intro h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4.1rem); font-weight: 700; line-height: 1.02; }
.t-intro h1 span { color: var(--amber-text); background: linear-gradient(90deg, var(--amber-text), var(--coral) 60%, var(--lilac)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.t-intro .intro { font-size: 1.15rem; color: var(--muted); max-width: 42ch; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pill { font: 700 .82rem var(--f-body); padding: 7px 14px; border-radius: 999px; background: var(--tile-2); color: var(--ink); }
.pill.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-right: 8px; vertical-align: 1px; }

/* Playground */
.pg-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.pg-head button { font: 700 .8rem var(--f-body); color: var(--ink); background: var(--tile-2); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.pg-stage { flex: 1; display: grid; place-items: center; min-height: 160px; padding: 20px; }
.pg-code { background: var(--code-bg); margin: 0 10px 10px; border-radius: 18px; position: relative; }
.pg-input { display: block; width: 100%; min-height: 170px; resize: vertical; border: 0; outline: none; background: transparent; color: var(--code-fg); font: .8rem/1.7 var(--f-mono); padding: 16px 18px; tab-size: 2; caret-color: var(--amber); border-radius: 18px; }
.pg-input:focus-visible { box-shadow: inset 0 0 0 2px var(--amber); }
.pg-err { position: absolute; right: 14px; bottom: 10px; font: 600 .75rem var(--f-body); color: var(--coral); }
/* Matches the playground's starting CSS, so the button is styled before JavaScript loads. */
.hello { font: 600 1.15rem var(--f-display); padding: 16px 28px; color: #1C1303; background: #FFB547; border: none; border-radius: 999px; box-shadow: 0 6px 0 #C47F14; transform: rotate(-4deg); cursor: pointer; }

/* Featured */
.feat-art { flex: 1; min-height: 190px; display: grid; place-items: end center; padding: 22px 16px 0; overflow: hidden; background: radial-gradient(circle at 20% 30%, var(--amber) 1.5px, transparent 2px) 0 0 / 46px 46px, radial-gradient(circle at 70% 60%, var(--lilac) 1px, transparent 1.5px) 0 0 / 34px 34px, var(--tile-2); }
.phone { width: min(240px, 100%); background: var(--bg); border: 6px solid color-mix(in srgb, var(--ink) 85%, transparent); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 16px 14px 18px; display: grid; gap: 10px; box-shadow: 0 -10px 40px -10px color-mix(in srgb, var(--amber) 55%, transparent); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.t-feat:hover .phone { transform: translateY(-6px); }
.ph-head { display: flex; justify-content: space-between; align-items: center; font: 700 .95rem var(--f-display); }
.ph-stars { font: 800 .78rem var(--f-body); color: var(--amber-ink); background: var(--amber); padding: 3px 9px; border-radius: 999px; }
.ph-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ph-list li { display: flex; align-items: center; gap: 8px; font: 600 .8rem var(--f-body); padding: 8px 10px; border-radius: 10px; background: var(--tile-2); }
.ph-list li::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--muted); flex: none; }
.ph-list li.done::before { background: var(--mint); border-color: var(--mint); }
.ph-list li.done span { text-decoration: line-through; color: var(--muted); }
.ph-list b { margin-left: auto; color: var(--amber-text); font-weight: 800; }
.ph-reward { font: 600 .72rem var(--f-body); color: var(--muted); }
.ph-bar { height: 8px; border-radius: 99px; background: var(--tile-2); overflow: hidden; margin-top: 5px; }
.ph-bar i { display: block; height: 100%; width: 70%; background: linear-gradient(90deg, var(--amber), var(--coral)); border-radius: inherit; }
.feat-body { padding: 20px 24px 24px; display: grid; gap: 8px; }
.feat-body h3 { font-size: 1.6rem; }
.feat-body p { color: var(--muted); font-size: .97rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font: 600 .75rem var(--f-body); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

/* Stats */
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.stat b { display: block; font: 700 2.4rem/1 var(--f-display); color: var(--amber-text); font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Now */
.now-list { display: grid; gap: 18px; margin-top: 16px; }
.now-list h3 { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.now-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.now-list li { font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.now-list li::before { content: "●"; font-size: .55rem; color: var(--c); transform: translateY(-2px); }
.updated { margin-top: 18px; font-size: .8rem; color: var(--muted); }

/* Latest note */
.note-tile-body { display: grid; gap: 4px; min-width: 0; }
.note-tile-body b { font: 600 1.35rem/1.2 var(--f-display); }
.note-tile-body span { color: var(--muted); font-size: .95rem; }
.note-tile-go { font: 700 .88rem var(--f-body); color: var(--amber-text); white-space: nowrap; display: inline-flex; gap: 10px; }
.note-tile-go span { color: var(--muted); font-weight: 600; }

/* Weekend idea */
.t-spark .label { color: var(--amber-ink); opacity: .75; }
.t-spark .label::before { background: var(--amber-ink); }
.t-spark output { display: block; font: 600 1.2rem/1.3 var(--f-display); margin: 14px 0 16px; min-height: 4.6em; }
.t-spark button { font: 800 .88rem var(--f-body); padding: 10px 16px; border-radius: 999px; border: 0; background: var(--amber-ink); color: var(--amber); cursor: pointer; transition: transform .15s ease; }
.t-spark button:hover { transform: rotate(-2deg) scale(1.03); }
.t-spark button:focus-visible { outline-color: var(--amber-ink); }

/* Toolbox */
.stack-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stack-cloud span { font: 700 .88rem var(--f-body); padding: 8px 14px; border-radius: 999px; background: var(--tile-2); }
.stack-cloud span.fav { background: color-mix(in srgb, var(--amber) 22%, var(--tile-2)); color: var(--amber-text); }
.stack-note { margin-top: 12px; font-size: .8rem; color: var(--muted); }

/* Links */
.link-list { display: grid; gap: 8px; margin-top: 14px; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--tile-2); min-width: 0; }
.link-row .k { font: 600 .75rem var(--f-display); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; width: 4.2rem; flex: none; }
.link-row .val { font: 600 .88rem var(--f-body); overflow-wrap: anywhere; min-width: 0; flex: 1; color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
.link-row .val:hover { color: var(--amber-text); }
.link-row button { font: 700 .72rem var(--f-body); border: 0; border-radius: 999px; padding: 5px 10px; background: var(--tile); color: var(--ink); cursor: pointer; flex: none; }

/* ---------- Sections ---------- */
section.block { padding-block: 64px 12px; scroll-margin-top: 72px; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); font-weight: 700; }
.sec-head h2 span { color: var(--amber-text); }
.sec-head p { color: var(--muted); max-width: 46ch; }

/* Projects */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.proj { display: flex; flex-direction: column; gap: 12px; }
.proj.wide { grid-column: span 2; }
.proj.full { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 960px) { .pgrid { grid-template-columns: minmax(0, 1fr); } .pgrid .proj { grid-column: 1 / -1; } }
@media (max-width: 760px) { .proj.full { grid-template-columns: minmax(0, 1fr); } }
.proj-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.proj-main > p { color: var(--muted); max-width: 56ch; }
.proj-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.proj-icon { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 1.35rem; background: color-mix(in srgb, var(--c) 20%, var(--tile-2)); }
.status { font: 700 .75rem var(--f-body); padding: 5px 11px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
.proj h3 { font-size: 1.4rem; }
.proj h3 small { font: 600 .82rem var(--f-body); color: var(--muted); margin-left: 6px; }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.highlights li { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: .92rem; padding: 12px 14px; border-radius: var(--r-sm); background: var(--tile-2); }
.highlights li::before { content: "★"; color: var(--amber-text); }
.proj.wide .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .proj.wide .highlights { grid-template-columns: minmax(0, 1fr); } }
.learned { font-size: .93rem; padding: 12px 14px; border-radius: var(--r-sm); background: var(--tile-2); }
.learned b { display: block; font: 600 .74rem var(--f-display); text-transform: uppercase; letter-spacing: .06em; color: var(--amber-text); margin-bottom: 2px; }
.proj-link { font: 700 .85rem var(--f-body); color: var(--amber-text); text-decoration: none; overflow-wrap: anywhere; }
.proj-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-links a { font: 700 .85rem var(--f-body); color: var(--ink); text-decoration: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--tile-2); transition: border-color .15s ease, color .15s ease; }
.proj-links a:first-child { border-color: color-mix(in srgb, var(--c, var(--amber-text)) 55%, var(--line)); color: var(--c, var(--amber-text)); }
.proj-links a:hover { border-color: var(--c, var(--amber-text)); color: var(--c, var(--amber-text)); }
.proj-links a:focus-visible { outline: 2px solid var(--c, var(--amber-text)); outline-offset: 2px; }
.proj details { margin-top: auto; }
.proj summary { cursor: pointer; font: 700 .85rem var(--f-body); color: var(--ink); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.proj summary::-webkit-details-marker { display: none; }
.proj summary::before { content: "</>"; font: 500 .75rem var(--f-mono); color: var(--amber-text); }
.proj details[open] summary { background: var(--tile-2); }
.snippet { margin-top: 10px; background: var(--code-bg); border-radius: var(--r-sm); overflow-x: auto; }
.snippet pre { margin: 0; padding: 14px 16px; font: .78rem/1.7 var(--f-mono); color: var(--code-fg); white-space: pre; }
.snippet .c { color: var(--code-dim); font-style: italic; }

/* Ideas */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .board { grid-template-columns: minmax(0, 1fr); } }
.col { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 4px; }
.col-head .count { font: 700 .8rem var(--f-body); color: var(--muted); background: var(--tile-2); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.idea { background: var(--tile-2); border-radius: 18px; padding: 14px 16px; }
.idea h3 { font-size: 1.02rem; font-weight: 600; }
.idea p { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.idea .why { display: inline-block; margin-top: 8px; font: 700 .72rem var(--f-body); color: var(--c); }
.idea a.why { text-decoration: none; }
.idea a.why:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Contact */
.tile.contact { --tint: var(--coral); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 40px; }
@media (max-width: 820px) { .tile.contact { grid-template-columns: minmax(0, 1fr); padding: 26px; gap: 24px; } }
.contact h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); font-weight: 700; margin-top: 12px; }
.contact h2 span { color: var(--amber-text); }
.contact-copy p { color: var(--muted); margin-top: 14px; max-width: 46ch; }
.contact-actions { display: grid; gap: 14px; min-width: 0; }
.contact-email { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--tile-2); }
.contact-email .val { font: 700 clamp(1rem, .9rem + .5vw, 1.25rem) var(--f-display); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; min-width: 0; flex: 1; }
.contact-email .val:hover { color: var(--amber-text); }
.btn-copy { font: 800 .88rem var(--f-body); padding: 10px 16px; border-radius: 999px; border: 0; background: var(--amber); color: var(--amber-ink); cursor: pointer; transition: transform .15s ease; }
.btn-copy:hover { transform: translateY(-1px); }
.contact-gh { font: 700 .9rem var(--f-body); color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.contact-gh:hover { color: var(--amber-text); }

footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 56px 36px; color: var(--muted); font-size: .88rem; font-weight: 600; }

/* Footer status link with live dot (status.js / StatusLink.tsx) */
footer a.status-link { color: inherit; text-decoration: none; white-space: nowrap; }
footer a.status-link:hover .status-text { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); opacity: .6; transition: background-color .3s ease; }
.status-link[data-state="up"] .status-dot { background: var(--mint); opacity: 1; box-shadow: 0 0 8px var(--mint); animation: status-pulse 2.4s ease-in-out infinite; }
.status-link[data-state="degraded"] .status-dot { background: var(--amber); opacity: 1; box-shadow: 0 0 8px var(--amber); }
.status-link[data-state="down"] .status-dot { background: var(--coral); opacity: 1; box-shadow: 0 0 8px var(--coral); animation: status-pulse 1.2s ease-in-out infinite; }
@keyframes status-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none !important; } }

/* ---------- 404: Lost in space ---------- */
/* Space is always dark, so the page keeps the dark palette even in light mode. */
:root:has(main.space) {
  --bg: #0A0D24; --tile-2: rgba(255, 255, 255, .06); --glass: rgba(20, 28, 56, .55); --glass-line: rgba(255, 255, 255, .09);
  --ink: #EEF1FA; --muted: #A9B2D0; --amber-text: #FFC56E; --coral: #FF8F70; --lilac: #B8A6FF;
  color-scheme: dark;
}
:root:has(main.space) body { overflow: hidden; }
:root:has(main.space) .aura { display: none; }
.space-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse at 20% 15%, #232A5C 0%, transparent 55%), radial-gradient(ellipse at 85% 90%, #3A1F4D 0%, transparent 50%), var(--bg); }
.space-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gas { position: absolute; right: -170px; bottom: -190px; width: 440px; height: 440px; }
.globe { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; box-shadow: 0 0 50px 6px rgba(255, 190, 140, .18);
  background: linear-gradient(180deg, #B98F68 0%, #D9B98F 8%, #A77A58 16%, #E2C9A6 24%, #9C6E52 33%, #D4AA80 42%, #B4845E 52%, #E6CFAE 61%, #A2735A 71%, #D1A77C 82%, #8F6249 100%); }
.globe::before { content: ""; position: absolute; left: 30%; top: 52%; width: 84px; height: 44px; border-radius: 50%;
  background: radial-gradient(ellipse, #E08A5C 0%, #B4543A 70%, transparent 100%); filter: blur(2px); }
.globe::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 26% 28%, rgba(255, 255, 255, .2) 0%, transparent 34%, rgba(2, 3, 18, .6) 74%, rgba(2, 3, 18, .92) 100%); }
.ring { position: absolute; left: -28%; top: 30%; width: 156%; height: 40%; border-radius: 50%; transform: rotate(-16deg);
  background: radial-gradient(ellipse at center, transparent 57%, rgba(228, 204, 168, .55) 59%, rgba(170, 140, 110, .3) 64%, rgba(236, 216, 186, .5) 68%, rgba(140, 115, 92, .22) 74%, transparent 77%); }
.ring.front { clip-path: inset(50% 0 0 0); }
.moon { position: absolute; left: 6%; bottom: 9%; width: 120px; height: 120px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 40%, rgba(55, 55, 62, .6) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 26%, rgba(65, 65, 72, .55) 0 6%, transparent 7%),
    radial-gradient(circle at 58% 68%, rgba(50, 50, 58, .55) 0 12%, transparent 13%),
    radial-gradient(circle at 22% 72%, rgba(60, 60, 68, .5) 0 5%, transparent 6%),
    radial-gradient(circle at 72% 50%, rgba(70, 70, 78, .45) 0 4%, transparent 5%),
    radial-gradient(circle at 30% 30%, #DCDCE0, #A0A0A8 55%, #5C5C66 100%);
  box-shadow: inset -24px -18px 38px rgba(0, 0, 14, .85), 0 0 22px rgba(200, 210, 255, .1); }
#astro { position: fixed; left: 0; top: 0; width: 100px; height: 120px; z-index: 1; cursor: pointer; will-change: transform; touch-action: manipulation; }
#astro svg { width: 100%; height: 100%; display: block; overflow: visible; }
#astro:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.bubble { position: fixed; left: 0; top: 0; z-index: 2; max-width: 200px; padding: 9px 13px; border-radius: 14px 14px 14px 4px;
  background: var(--ink); color: #121A33; font: 600 .88rem/1.35 var(--f-body);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; pointer-events: none; }
.bubble.show { opacity: 1; }
main.space { position: relative; z-index: 3; min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 24px 16px; pointer-events: none; }
.space-copy { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center; }
.space-num { margin: 0; font: 700 clamp(6rem, 24vw, 11.5rem)/1 var(--f-display); letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--amber-text), var(--coral) 60%, var(--lilac)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 181, 71, .25)); }
main.space h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-weight: 700; margin: 4px 0 12px; }
.space-lead { color: var(--muted); max-width: 34ch; margin-bottom: 26px; font-size: 1.1rem; line-height: 1.5; text-shadow: 0 1px 8px var(--bg); }
.space-home { pointer-events: auto; font: 800 .95rem var(--f-body); padding: 12px 22px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); text-decoration: none; box-shadow: 0 6px 0 #C47F14; transition: transform .15s ease; }
.space-home:hover { transform: translateY(-2px); }
.space-fine { margin-top: 26px; font-size: .85rem; color: var(--muted); text-shadow: 0 1px 8px var(--bg); }
:root:has(main.space) footer { pointer-events: none; }

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