@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter.1dc044f4.woff2) format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:100 800;font-display:swap;src:url(/assets/mono.340e696a.woff2) format("woff2")}
:root {
  --bg: #0b0d10; --bg2: #12151a; --bg3: #181c22; --ln: #232831; --ln2: #343b47;
  --tx: #e6e8eb; --mu: #8a93a0; --ac: #5af0b4; --ac2: #7aa2ff; --warn: #febc2e; --err: #ff6b6b;
  --on-ac: #062a1d; --shadow: 0 20px 60px rgba(0, 0, 0, .5);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --r: 10px; --max: 1120px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f7f5; --bg2: #ffffff; --bg3: #f0f0ec; --ln: #e3e3df; --ln2: #cfcfc9;
  --tx: #16181c; --mu: #5d636d; --ac: #087a54; --ac2: #3b5bdb; --warn: #925c0e; --err: #c92a2a;
  --on-ac: #ffffff; --shadow: 0 20px 60px rgba(0, 0, 0, .12);
  color-scheme: light;
}
@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; padding-bottom: 26px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.mono { font-family: var(--mono); }
.ac { color: var(--ac); } .ac2 { color: var(--ac2); } .mu { color: var(--mu); }
/* Underlined, not just coloured, so links stand out without relying on colour. */
.link { color: var(--ac2); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
::selection { background: var(--ac); color: var(--on-ac); }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ac); color: var(--on-ac); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--ac); width: 0; z-index: 60; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2 + 16px));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ln);
}
.logo { font-size: 15px; font-weight: 500; white-space: nowrap; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav nav { display: flex; gap: 18px; font-size: 13px; }
.nav nav a { color: var(--mu); transition: color .2s; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--tx); }
.nav nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--ac); padding-bottom: 2px; }
.nav-actions { display: flex; gap: 6px; align-items: center; }
.kbd-btn, .icon-btn {
  background: var(--bg2); border: 1px solid var(--ln); border-radius: 6px; height: 30px; min-width: 30px; padding: 0 8px;
  font-size: 12px; color: var(--mu); display: inline-flex; align-items: center; justify-content: center; transition: border-color .2s, color .2s;
}
.kbd-btn:hover, .icon-btn:hover { border-color: var(--ac); color: var(--tx); }
.i-moon { display: none; } [data-theme="light"] .i-sun { display: none; } [data-theme="light"] .i-moon { display: block; }
.menu-btn { display: none; }

/* SHARED */
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2 .mono { font-size: 15px; font-weight: 400; }
h2.sub { font: 400 12px var(--mono); color: var(--mu); margin: 28px 0 12px; letter-spacing: 0; }
.lede { font-size: 18px; color: var(--mu); max-width: 60ch; margin: 0 0 24px; }
.card { background: var(--bg2); border: 1px solid var(--ln); border-radius: var(--r); }
.hint { font-size: 12px; color: var(--mu); margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--ln2); background: transparent; font-size: 13px; transition: transform .15s, border-color .2s, background .2s;
}
.btn:hover { border-color: var(--ac); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ac); border-color: var(--ac); color: var(--on-ac); font-weight: 500; }
.btn-ghost { border-color: transparent; color: var(--mu); }
.chip { font: 12px var(--mono); padding: 4px 10px; border-radius: 6px; border: 1px solid var(--ln); background: transparent; color: var(--mu); transition: all .2s; display: inline-block; }
a.chip:hover, button.chip:hover { color: var(--tx); border-color: var(--ln2); }
.chip.on { color: var(--ac); border-color: var(--ac); background: color-mix(in srgb, var(--ac) 8%, transparent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .chip { font-size: 11px; padding: 2px 8px; }
.notes { margin: 0 0 16px; padding: 0; list-style: none; }
.notes li { padding: 7px 0 7px 22px; position: relative; border-bottom: 1px dashed var(--ln); font-size: 15px; }
.notes li:last-child { border-bottom: 0; }
.notes li::before { content: "→"; position: absolute; left: 0; color: var(--ac); font-family: var(--mono); }
.section { padding: 80px 0 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head { padding: 64px 0 28px; }
.pathline { font-size: 13px; margin: 0 0 14px; }
.kind { font-size: 13px; margin: 0 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.filter-rows { display: grid; gap: 8px; margin-bottom: 18px; }
.filter-rows .filters { margin: 0; align-items: center; }
.filter-label { font-size: 11px; color: var(--mu); width: 64px; flex: none; }
.filters .chip sup { font-size: 9px; margin-left: 4px; color: var(--mu); }
.filters .chip.on sup { color: inherit; }
.filter-empty { color: var(--mu); font-size: 13px; padding: 24px 0; }
@media (max-width: 600px) { .filter-label { width: 100%; } }
.dim { opacity: .25; }
.filtered-out { display: none !important; }
.js .reveal:not(.in) { opacity: 0; transform: translateY(14px); }
.reveal { transition: opacity .5s ease, transform .5s ease, border-color .25s; }

/* HERO */
.hero { min-height: calc(100vh - 120px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 0; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ac); margin: 0 0 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); flex: none; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* TERMINAL */
.terminal { background: var(--bg2); border: 1px solid var(--ln); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; transition: border-color .2s; }
.terminal.focused { border-color: color-mix(in srgb, var(--ac) 55%, var(--ln)); }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--ln); font-size: 12px; color: var(--mu); }
.term-hint, .term-x { margin-left: auto; white-space: nowrap; flex: none; border: 1px solid var(--ln); border-radius: 4px; padding: 0 6px; background: none; font: 11px var(--mono); color: var(--mu); }
.term-x:hover { color: var(--tx); border-color: var(--ac); }
.lights { display: flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.term-body { height: 400px; overflow-y: auto; padding: 12px 16px; font-size: 13px; line-height: 1.65; cursor: text; }
.term-body::-webkit-scrollbar { width: 6px; } .term-body::-webkit-scrollbar-thumb { background: var(--ln2); border-radius: 3px; }
[data-term-out] > div { white-space: pre-wrap; word-break: break-word; }
.term-line { display: flex; gap: 8px; align-items: center; }
.term-line label { white-space: nowrap; }
.term-line input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--tx); font: inherit; caret-color: var(--ac); padding: 0; }
.t-mu { color: var(--mu); } .t-ac { color: var(--ac); } .t-ac2 { color: var(--ac2); } .t-err { color: var(--err); }
.t-link { color: var(--ac2); text-decoration: underline; text-underline-offset: 3px; }
.drawer { position: fixed; left: 50%; bottom: 38px; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); z-index: 90; animation: rise .2s ease; }
.drawer .term-body { height: min(380px, 50vh); }
.drawer[hidden] { display: none; }

/* HOME */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ln); border-radius: 12px; background: var(--bg2); overflow: hidden; }
.stat { padding: 20px 22px; border-right: 1px solid var(--ln); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 500 28px/1.2 var(--mono); letter-spacing: -.02em; color: var(--ac); }
.stat span { font-size: 13px; color: var(--mu); }
.now { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.now p { margin: 4px 0 0; font-size: 14px; }
.now > .mono { margin-left: auto; white-space: nowrap; font-size: 12px; }
.now:hover, .dir:hover, .commit-card:hover { border-color: var(--ln2); }
.dirs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dir { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; transition: border-color .2s, transform .2s; }
.dir:hover { transform: translateY(-2px); }
.dir b { font-size: 17px; font-weight: 600; } .dir .mono { font-size: 12px; }

/* PROJECTS */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.project { position: relative; padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; transition: border-color .25s, transform .25s, opacity .3s; }
.project::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--ac) 10%, transparent), transparent 40%); }
.project:hover { border-color: color-mix(in srgb, var(--ac) 60%, var(--ln)); transform: translateY(-2px); }
.project:hover::before { opacity: 1; }
.p-meta { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--mu); }
.project h2, .game h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.project p, .game p { margin: 0; font-size: 14px; color: var(--mu); }
.p-metrics { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 12px var(--mono); color: var(--mu); }
.p-metrics b { color: var(--ac); font-weight: 500; }
.project .tags { margin-top: auto; padding-right: 90px; }
.p-open { position: absolute; right: 18px; bottom: 20px; font-size: 12px; color: var(--ac); opacity: 0; transform: translateX(-4px); transition: all .2s; }
.project:hover .p-open, .project:focus-visible .p-open { opacity: 1; transform: none; }

/* PROJECT DETAIL */
.m-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.m-metrics div { background: var(--bg2); border: 1px solid var(--ln); border-radius: 10px; padding: 14px 16px; }
.m-metrics b { display: block; font: 500 24px var(--mono); color: var(--ac); }
.m-metrics span { font: 12px var(--mono); color: var(--mu); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; }
.body-text { font-size: 17px; margin: 0; }
.detail-grid .cta { margin-top: 8px; }
.flow { display: flex; flex-direction: column; align-items: flex-start; }
.flow .box { font-size: 12px; border: 1px solid var(--ln2); border-radius: 6px; padding: 8px 12px; background: var(--bg2); }
.flow .wire { width: 2px; height: 22px; margin-left: 20px; position: relative; background: var(--ln2); overflow: hidden; }
.flow .wire::after { content: ""; position: absolute; left: 0; top: -8px; width: 2px; height: 8px; background: var(--ac); animation: packet 1.3s linear infinite; }
@keyframes packet { to { top: 100%; } }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; font-size: 12px; transition: border-color .2s; }
.pager a b { font: 600 15px var(--sans); }
.pager a:hover { border-color: var(--ac); }
.pager .right { text-align: right; }

/* EXPERIENCE / EDUCATION */
.roles { display: flex; flex-direction: column; gap: 14px; }
.role { padding: 24px; scroll-margin-top: 90px; }
.role:target { border-color: var(--ac); }
.role-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.role h2 { font-size: 21px; }
.org { margin: 2px 0 0; color: var(--ac2); font-weight: 500; }
.when { font-size: 12px; text-align: right; white-space: nowrap; }
.live { color: var(--ac); }
.role > p { color: var(--mu); margin: 0 0 10px; }
.role .tags { margin: 6px 0 12px; }
.role .link { font-size: 12px; }

/* JOURNEY */
.bio { max-width: 70ch; font-size: 17px; }
.bio p { margin: 0 0 16px; }
.gitlog { list-style: none; margin: 0; padding: 0 0 0 4px; font-size: 14px; }
.commit { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 20px; }
.commit::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--ln); }
.commit:last-child::before { display: none; }
.node { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ac); background: var(--bg); margin-top: 3px; z-index: 1; }
.commit.branch .node { border-color: var(--ac2); }
.node.init { border-color: var(--ln2); }
.commit-card { display: block; padding: 16px 18px; transition: border-color .2s; }
.c-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.hash { color: var(--warn); }
.ref { font-size: 12px; color: var(--ac); } .ref.b { color: var(--ac2); }
.c-date { margin-left: auto; color: var(--mu); font-size: 12px; }
.c-role { font: 600 16px var(--sans); margin: 6px 0 2px; }
.c-co { color: var(--mu); font-size: 13px; }
.c-text { margin: 8px 0 0; font: 14px var(--sans); color: var(--mu); }
.c-init { padding-top: 2px; font-size: 13px; }

/* SKILLS */
.skills-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.skill-groups { display: flex; flex-direction: column; gap: 12px; }
.skill-group { padding: 4px 18px 18px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.skill { font-size: 13px; padding: 6px 12px; color: var(--tx); scroll-margin-top: 120px; }
.chip.skill sup { color: var(--ac); font-size: 10px; margin-left: 4px; }
.skill-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.skill-graph { position: relative; height: 380px; overflow: hidden; }
.skill-graph canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.graph-legend { position: absolute; left: 14px; bottom: 10px; display: flex; gap: 14px; font-size: 11px; color: var(--mu); pointer-events: none; }
.graph-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.lg-p { border: 2px solid var(--tx); } .lg-r { border: 2px solid var(--warn); } .lg-s { background: var(--ac2); }
.skill-detail { padding: 14px 16px; font-size: 13px; min-height: 120px; }
.sd-head { margin-bottom: 8px; }
.sd-row { display: block; padding: 5px 0; border-bottom: 1px dashed var(--ln); }
.sd-row:last-child { border-bottom: 0; }
.sd-row:hover { color: var(--ac); }
.skill-detail p { margin: 0; font-family: var(--sans); }

/* GAMES */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.game { padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 90px; transition: opacity .3s, background-color .4s, border-color .2s, transform .2s; }
.game:hover { border-color: var(--ln2); transform: translateY(-2px); }
.game h2 { font-size: 15px; line-height: 1.3; }
.g-poster { overflow: hidden; background: var(--bg3); }
.g-poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game:hover .g-poster img { transform: scale(1.04); }
.g-cover { aspect-ratio: 2 / 3; border-radius: 8px; display: grid; place-items: center; font-size: 28px; font-weight: 500; letter-spacing: .05em;
  color: hsl(var(--h) 70% 75%); background: linear-gradient(135deg, hsl(var(--h) 45% 18%), hsl(calc(var(--h) + 40) 45% 12%)); margin-bottom: 4px; }
[data-theme="light"] .g-cover { color: hsl(var(--h) 55% 30%); background: linear-gradient(135deg, hsl(var(--h) 60% 90%), hsl(calc(var(--h) + 40) 60% 84%)); }
.game .chip { align-self: flex-start; font-size: 11px; padding: 2px 8px; }
@media (max-width: 600px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Hovering a game fades the page background to its cover art (darkened). */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop i { position: absolute; inset: 0; background: center 20% / cover no-repeat; filter: brightness(.7); opacity: 0; transition: opacity .5s ease; }
/* No wide art: tile the poster at its own size so it stays sharp instead of stretched. */
.backdrop i.tile { background: center / auto 450px repeat; filter: brightness(.6); }
.backdrop i.on { opacity: 1; }
:root[data-theme="light"] .backdrop i.on { opacity: .6; }
/* darken the edges a little so the nav, headings and cards stay readable */
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 55%, transparent), transparent 30%, transparent 70%, color-mix(in srgb, var(--bg) 60%, transparent)); }
.backdrop-on .game { background-color: color-mix(in srgb, var(--bg2) 70%, transparent); }
.backdrop-on .filters .chip:not(.on) { background: color-mix(in srgb, var(--bg2) 80%, transparent); color: var(--tx); }
.status-playing { color: var(--ac); border-color: var(--ac); }
.status-favourite, .status-favorite { color: var(--warn); border-color: var(--warn); }

.empty { padding: 22px; font-size: 14px; }
.empty p { margin: 0 0 4px; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.contact-side { display: flex; flex-direction: column; gap: 12px; }
.big-email { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.big-email .mono { font-size: 12px; }
.email { font-size: clamp(18px, 2.6vw, 26px); font-weight: 600; letter-spacing: -.01em; word-break: break-all; }
.email:hover { color: var(--ac); }
.links { padding: 16px 20px; display: flex; gap: 20px; font-size: 13px; }
.links a:hover { color: var(--ac); }
.contact-form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font: 12px var(--mono); color: var(--mu); }
.contact-form input, .contact-form textarea { font: 15px var(--sans); color: var(--tx); background: var(--bg); border: 1px solid var(--ln); border-radius: 8px; padding: 10px 12px; resize: vertical; transition: border-color .2s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ac); }
.contact-form .invalid { border-color: var(--err); }
.form-error { color: var(--err); font-size: 12px; margin: 0; min-height: 1em; }
.contact-form .btn { align-self: flex-start; }
.code { border: 1px solid var(--ln); border-radius: 8px; overflow: hidden; font-size: 12px; }
.code-bar { display: flex; justify-content: space-between; padding: 6px 12px; border-bottom: 1px solid var(--ln); color: var(--mu); background: var(--bg3); }
.code pre { margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word; color: var(--mu); }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; padding: 60px 0; }
.notfound .card { padding: 28px; max-width: 640px; font-size: 14px; }
.notfound p { margin: 0 0 10px; }
.err { color: var(--err); }

/* FOOTER + STATUS BAR */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 80px; padding-bottom: 32px; font-size: 12px; color: var(--mu); }
.foot-links { display: flex; gap: 16px; }
.foot a:hover { color: var(--ac); }
.statusbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: 26px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 12px; font-size: 11px; background: var(--ac); color: var(--on-ac); }
.statusbar b { font-weight: 600; padding: 1px 6px; background: color-mix(in srgb, var(--on-ac) 15%, transparent); border-radius: 3px; margin-right: 6px; }

/* OVERLAYS */
.overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px); animation: fade .15s ease; }
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }
.palette { width: min(560px, 100%); background: var(--bg2); border: 1px solid var(--ln2); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
#pal-input { width: 100%; border: 0; border-bottom: 1px solid var(--ln); background: none; padding: 16px 18px; font-size: 14px; color: var(--tx); outline: none; }
#pal-list { list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow-y: auto; }
#pal-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; }
#pal-list li .grp { margin-left: auto; font: 11px var(--mono); color: var(--mu); }
#pal-list li .ico { font: 12px var(--mono); color: var(--ac); width: 16px; text-align: center; }
#pal-list li[aria-selected="true"] { background: var(--bg3); }
#pal-list li mark { background: none; color: var(--ac); }
#pal-list .empty { color: var(--mu); cursor: default; }
.pal-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--ln); font-size: 11px; color: var(--mu); }
.toast { position: fixed; left: 50%; bottom: 44px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--tx); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 12px; transition: all .25s; z-index: 120; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* RESPONSIVE */
@media (max-width: 1020px) {
  .menu-btn { display: inline-flex; }
  .nav nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg2); border-bottom: 1px solid var(--ln); padding: 8px 16px; }
  .nav nav a { padding: 10px 0; border-bottom: 1px solid var(--ln); }
  .nav nav a:last-child { border-bottom: 0; }
  .nav nav a[aria-current] { box-shadow: none; color: var(--ac); }
  .menu-open .nav nav { display: flex; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding-top: 36px; }
  .term-body { height: 340px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--ln); }
  .dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .skills-layout, .contact-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-side { position: static; }
}
@media (max-width: 600px) {
  .dirs, .projects { grid-template-columns: 1fr; }
  .term-body { font-size: 12px; height: 300px; }
  .sb-mid { display: none; }
  .role-top { flex-direction: column; gap: 4px; } .when { text-align: left; }
  .now { flex-wrap: wrap; } .now > .mono { margin-left: 24px; }
  .page-head { padding-top: 40px; }
  .pager { grid-template-columns: 1fr; }
  .c-date { margin-left: 0; width: 100%; }
  .kbd-btn#open-palette { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .np-dot { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal:not(.in) { opacity: 1; transform: none; }
}

/* ── terminal suggestions (touch screens / narrow windows) ── */
.term-suggest { display: none; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--ln); overflow-x: auto; scrollbar-width: none; }
.term-suggest::-webkit-scrollbar { display: none; }
.term-suggest button { flex: none; font: 12px var(--mono); color: var(--tx); background: var(--bg3); border: 1px solid var(--ln2); border-radius: 999px; padding: 6px 12px; white-space: nowrap; cursor: pointer; }
.term-suggest button:active { border-color: var(--ac); color: var(--ac); }
@media (pointer: coarse), (max-width: 600px) { .term-suggest:not(:empty) { display: flex; } }

/* ── project screenshots ── */
.shots { margin-top: 48px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.shot { margin: 0; }
.shot a { display: block; border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; background: var(--bg2); transition: border-color .2s; }
.shot a:hover { border-color: var(--ac); }
/* contain, not cover: phone screenshots are portrait and must not be cropped */
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: var(--bg3); }
.shot figcaption { margin-top: 8px; font-size: 12px; color: var(--mu); }

/* ── résumé ── */
.resume-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 40px auto 16px; max-width: 820px; font-size: 13px; }
.resume-bar .cta { display: flex; gap: 8px; margin: 0; }
.resume { max-width: 820px; margin: 0 auto 64px; background: #fff; color: #16181c; border-radius: var(--r); padding: 48px 56px; font-size: 14px; line-height: 1.55; box-shadow: var(--shadow); }
:root[data-theme="light"] .resume { border: 1px solid var(--ln); }
.resume a { color: #087a54; text-decoration: underline; text-decoration-color: rgba(8, 122, 84, .35); text-underline-offset: 2px; }
.resume h1 { font-size: 30px; line-height: 1.15; margin: 0; letter-spacing: -.02em; color: #16181c; }
.resume h2 { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: lowercase; color: #087a54; border-bottom: 1px solid #e3e3df; padding-bottom: 4px; margin: 26px 0 10px; }
.resume h3 { font-size: 14.5px; font-weight: 600; margin: 0; color: #16181c; }
.rs-role { margin: 4px 0 2px; color: #5d636d; }
.rs-links { margin: 0; font-size: 13px; }
.rs-summary { margin: 18px 0 0; }
.rs-item { margin-bottom: 14px; break-inside: avoid; }
.resume h2 { break-after: avoid; }
.rs-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.rs-row span { flex: none; font-size: 12.5px; color: #5d636d; }
.resume ul { margin: 6px 0 0; padding-left: 18px; }
.resume li { margin: 2px 0; }
.resume p { margin: 4px 0 0; }
.rs-mu { color: #5d636d; }
.rs-skills { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.rs-skills dt { font-weight: 600; }
.rs-skills dd { margin: 0; }
@media (max-width: 600px) {
  .resume { padding: 28px 20px; border-radius: 8px; }
  .rs-row { flex-direction: column; gap: 0; }
  .rs-skills { grid-template-columns: 1fr; }
  .rs-skills dd { margin-bottom: 6px; }
}
@page { size: A4; margin: 14mm 14mm 16mm; }
@media print {
  :root { color-scheme: light !important; }
  html, body { background: #fff !important; padding: 0; }
  body > :not(main), main > :not(.resume), .skip { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .resume { box-shadow: none; border: 0 !important; padding: 0; margin: 0; max-width: none; font-size: 10.5pt; border-radius: 0; }
  .resume h1 { font-size: 22pt; }
  .resume a { text-decoration: none; }
}

/* ── link-preview card (rendered to og.png by npm run render) ── */
body.bare { margin: 0; padding: 0; background: #0b0d10; }
.og-card { box-sizing: border-box; width: 1200px; height: 630px; padding: 56px 72px; display: flex; flex-direction: column; justify-content: space-between; background: #0b0d10; color: #e6e8eb; font-family: var(--mono); position: relative; overflow: hidden; }
.og-card::after { content: ""; position: absolute; right: -140px; top: -140px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(90, 240, 180, .14), transparent 70%); }
.og-bar { display: flex; align-items: center; gap: 12px; font-size: 22px; color: #8a93a0; }
.og-bar i { width: 18px; height: 18px; border-radius: 50%; background: #ff5f57; } .og-bar i:nth-child(2) { background: #febc2e; } .og-bar i:nth-child(3) { background: #28c840; margin-right: 12px; }
.og-cmd { margin: 0; font-size: 26px; color: #8a93a0; } .og-cmd span { color: #5af0b4; }
.og-card h1 { font: 600 92px/1.05 var(--sans); letter-spacing: -.03em; margin: 12px 0 14px; }
.og-role { margin: 0; font-size: 30px; color: #8a93a0; } .og-role span { color: #5af0b4; }
.og-chips { display: flex; gap: 14px; flex-wrap: wrap; }
.og-chips span { font-size: 22px; padding: 10px 22px; border: 2px solid #343b47; border-radius: 999px; background: #12151a; }

/* HOBBIES intro above the games grid */
/* Hobbies: intro beside a "now playing" column; stacked on small screens. */
.hobby-top { display: grid; grid-template-columns: minmax(0, 68ch) 280px; gap: 40px; align-items: start; margin: 0 0 32px; }
.hobby-top.solo { grid-template-columns: minmax(0, 68ch); }
.hobby-intro { color: var(--tx); line-height: 1.7; }
.hobby-toggle { display: none; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--ac); font-size: 12px; cursor: pointer; }
.now-playing { border-left: 1px solid var(--ln); padding-left: 24px; }
.np-head, .np-foot { margin: 0; font-size: 12px; color: var(--mu); }
.np-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.np-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); animation: np-pulse 2s ease-in-out infinite; }
@keyframes np-pulse { 50% { opacity: .35; } }
.np-covers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.np-cover { display: grid; place-items: center; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--bg3); border: 1px solid var(--ln); transition: border-color .2s, transform .2s; }
.np-cover span { padding: 6px; font-size: 11px; text-align: center; color: var(--mu); }
.np-cover:hover, .np-cover:focus-visible { border-color: var(--ac); transform: translateY(-2px); }
.np-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.np-foot { margin-top: 8px; }
@media (max-width: 900px) {
  .hobby-top { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 24px; }
  .now-playing { border-left: 0; padding-left: 0; max-width: 360px; }
}
@media (max-width: 600px) {
  .js .hobby-intro:not(.open) .more { display: none; }
  .js .hobby-toggle { display: inline-block; }
}
.hobby-intro p { margin: 0; }
.hobby-intro p + p { margin-top: 12px; }
.page-head:not(:has(.lede)) { padding-bottom: 8px; }
.section-title { font-size: 14px; font-weight: 500; margin: 8px 0 14px; color: var(--tx); }
