/* ─────────────────────────────────────────────────────────────
   rotten_portfolio · Nebula theme
   Same palette as the dotfiles: night-blue background, cyan / magenta neon.
   ───────────────────────────────────────────────────────────── */

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #070914;
  --cyan: #00f0ff;
  --magenta: #e600ff;
  --yellow: #ffb800;
  --green: #00ff66;
  --pink: #ff2bd6;
  --text: #d6def5;
  --dim: #7d86a8;
  --dimmer: #5d6688;
  --card: rgba(18, 22, 46, .72);
  --card-solid: #12162e;
  --line: rgba(125, 134, 168, .18);
  --mono: "JetBrains Mono", "DejaVu Sans Mono", monospace;
  --display: "Outfit", "JetBrains Mono", sans-serif;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(0, 240, 255, .3); color: #fff; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--magenta); }
code { font-family: var(--mono); font-size: .9em; color: var(--cyan); background: rgba(0, 240, 255, .08); padding: .05em .35em; border-radius: 5px; }
kbd {
  font: 700 .72em var(--mono); color: #e9f6ff; padding: .12em .45em; border-radius: 6px;
  background: rgba(0, 240, 255, .1); border: 1px solid rgba(0, 240, 255, .55);
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ───── background: stars + drifting nebula ───── */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.nebula { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.nebula span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 38s ease-in-out infinite alternate; }
.nebula span:nth-child(1) { width: 60vw; height: 45vw; right: -15vw; top: -15vw; background: radial-gradient(closest-side, rgba(230, 0, 255, .38), transparent); }
.nebula span:nth-child(2) { width: 65vw; height: 50vw; left: -20vw; bottom: -20vw; background: radial-gradient(closest-side, rgba(0, 240, 255, .28), transparent); animation-duration: 46s; }
.nebula span:nth-child(3) { width: 50vw; height: 40vw; left: 25vw; top: 30vh; background: radial-gradient(closest-side, rgba(40, 60, 255, .3), transparent); animation-duration: 54s; }
@keyframes drift { to { transform: translate(6vw, 4vh) scale(1.15); } }

/* ───── animated border, like the Hyprland window borders ───── */
.win { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.win::before {
  content: ""; position: absolute; inset: -1px; padding: 2px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--angle), var(--cyan), var(--magenta), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .6s ease;
  animation: spin 10s linear infinite;
}
.win:hover::before, .win:focus-within::before, .win-focus::before { opacity: 1; }
.win-focus { box-shadow: 0 0 60px rgba(0, 240, 255, .08), 0 0 120px rgba(230, 0, 255, .06); }
@keyframes spin { to { --angle: 360deg; } }

.win-title {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 10px 16px; font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--line);
}
.win-title > :last-child { justify-self: end; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--pink); }
.dots i:nth-child(2) { background: var(--yellow); }
.dots i:nth-child(3) { background: var(--cyan); }

/* ───── top bar ───── */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 10px var(--gutter);
  background: linear-gradient(rgba(7, 9, 20, .85), rgba(7, 9, 20, .55));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 0, 255, .25);
}
.workspaces { display: flex; align-items: center; gap: 6px; }
.brand { display: block; width: 30px; height: 30px; margin-right: 6px; border-radius: 50%; transition: transform .25s, filter .25s; }
.brand img { width: 100%; height: 100%; }
.brand:hover { transform: rotate(-8deg) scale(1.08); filter: drop-shadow(0 0 10px rgba(230, 0, 255, .6)); }
.ws {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 8px;
  color: var(--cyan); background: rgba(0, 240, 255, .07); font-size: 13px; transition: background .25s, color .25s;
}
.ws span { color: var(--dim); font-size: 12px; transition: color .25s; }
.ws:hover { background: rgba(0, 240, 255, .16); color: var(--cyan); }
.ws.active { background: var(--magenta); color: #fff; box-shadow: 0 0 18px rgba(230, 0, 255, .55); }
.ws.active span { color: #fff; }
.clock { text-align: center; line-height: 1.15; }
.clock span { color: var(--cyan); font-size: 14px; letter-spacing: .04em; }
.clock small { display: block; color: var(--magenta); font-size: 10px; }
.status { display: flex; justify-content: flex-end; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12px; border: 0; cursor: pointer; white-space: nowrap;
}
.pill svg { width: 15px; height: 15px; }
.pill-dim { color: var(--cyan); background: rgba(0, 240, 255, .07); cursor: default; }
.pill-cyan { background: var(--cyan); color: #04121a; font-weight: 600; }
.pill-cyan:hover { color: #04121a; box-shadow: 0 0 18px rgba(0, 240, 255, .6); }
.pill-magenta { background: rgba(230, 0, 255, .16); color: var(--magenta); border: 1px solid rgba(230, 0, 255, .5); }
.pill-magenta kbd { border-color: rgba(230, 0, 255, .7); background: rgba(230, 0, 255, .14); }
.pill-magenta:hover { box-shadow: 0 0 18px rgba(230, 0, 255, .45); }

/* ───── layout ───── */
main { padding: 0 var(--gutter); }
section { max-width: 1240px; margin: 0 auto; padding: 110px 0 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 24px; margin-bottom: 36px; }
.section-head .path { flex-basis: 100%; }
.path { margin: 0; color: var(--dim); font-size: 13px; }
.path::before { content: "❯ "; color: var(--green); }
h2 { margin: 0; font: 800 clamp(30px, 5vw, 52px)/1.05 var(--mono); letter-spacing: .1em; }
.grad { background: linear-gradient(90deg, var(--cyan), var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hint { margin: 0 0 6px; color: var(--dim); font-size: 13px; }
.dim { color: var(--dimmer); }
.c-cyan { color: var(--cyan); } .c-magenta { color: var(--magenta); } .c-yellow { color: var(--yellow); } .c-green { color: var(--green); }

/* ───── hero ───── */
.hero { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 56px; padding-top: 90px; }
.kicker { margin: 0 0 18px; font: 600 13px var(--display); letter-spacing: .22em; color: var(--text); }
.kicker span { color: var(--magenta); }
.neon { margin: 0; font: 900 clamp(64px, 10vw, 136px)/.88 var(--display); letter-spacing: -.01em; }
.neon span { display: block; }
.neon-cyan { color: var(--cyan); text-shadow: 0 0 18px rgba(0, 240, 255, .75), 0 0 48px rgba(0, 240, 255, .45); }
.neon-magenta { color: var(--magenta); text-shadow: 0 0 18px rgba(230, 0, 255, .8), 0 0 48px rgba(230, 0, 255, .45); margin-left: .35em; animation: flicker 7s infinite; }
@keyframes flicker { 0%, 92%, 94%, 97%, 100% { opacity: 1; } 93%, 96% { opacity: .55; } }
.date-pill {
  display: inline-block; margin: 26px 0 0; padding: 8px 22px; border-radius: 999px;
  font: 800 15px var(--display); letter-spacing: .12em; text-transform: uppercase;
  color: var(--magenta); background: rgba(230, 0, 255, .14); border: 2px solid rgba(230, 0, 255, .55);
  box-shadow: 0 0 22px rgba(230, 0, 255, .25);
}
.lead { max-width: 560px; margin: 26px 0 30px; color: var(--text); font-size: 15px; }
.lead b { color: var(--cyan); font-weight: 600; }
.lead i { color: var(--magenta); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 26px;
  border-radius: 999px; font: 800 13px var(--display); letter-spacing: .16em; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s, box-shadow .25s, background .25s, color .25s;
}
.btn span { transition: transform .2s; }
.btn:hover span { transform: translateX(4px); }
.btn-cyan { background: var(--cyan); color: #04121a; }
.btn-cyan:hover { color: #04121a; box-shadow: 0 0 30px rgba(0, 240, 255, .6); transform: translateY(-2px); }
.btn-magenta { background: var(--magenta); color: #fff; }
.btn-magenta:hover { color: #fff; box-shadow: 0 0 30px rgba(230, 0, 255, .6); transform: translateY(-2px); }
.btn-ghost { color: var(--cyan); border-color: rgba(0, 240, 255, .45); background: rgba(13, 11, 31, .6); }
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 22px rgba(0, 240, 255, .3); }

/* terminal */
.term { padding: 26px 26px 22px; font-size: 14px; }
.fetch { display: flex; gap: 28px; align-items: center; }
.logo { margin: 0; color: var(--magenta); font: 600 14px/1.35 var(--mono); text-shadow: 0 0 12px rgba(230, 0, 255, .5); }
.fetch dl { margin: 0; display: grid; gap: 1px; min-width: 0; }
.fetch dl > div { display: flex; gap: 14px; }
.fetch dl .gap { height: 12px; }
.fetch dt { width: 3.4em; flex: none; font-weight: 800; }
.fetch dd { margin: 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette { display: flex; gap: 10px; margin: 18px 0 22px calc(88px + 28px); }
.palette i { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px currentColor; }
.palette i:nth-child(2) { background: #ff007f; } .palette i:nth-child(3) { background: var(--yellow); } .palette i:nth-child(4) { background: #00a8ff; }
.palette i:nth-child(5) { background: var(--green); } .palette i:nth-child(6) { background: #ffd000; } .palette i:nth-child(7) { background: var(--cyan); } .palette i:nth-child(8) { background: #ff0055; }
.prompt { display: flex; align-items: center; font-size: 13px; }
.seg { padding: 2px 14px; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); white-space: nowrap; }
.seg-os { background: #303030; color: #fff; }
.seg-dir { background: #2f6fe8; color: #fff; }
.seg-git { background: #4fbf26; color: #04121a; }
.seg-git::before { content: "⎇ "; }
.seg-time { background: #e9f3eb; color: #070914; }
.seg-line { width: 14px; height: 1px; background: var(--dim); }
.seg-line.grow { flex: 1; }
.cmdline { margin-top: 8px; min-height: 1.6em; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ───── projects ───── */
.project { margin-bottom: 36px; transition: opacity .4s, transform .4s; }
.tag { white-space: nowrap; font-size: 11px; padding: 2px 10px; border-radius: 999px; letter-spacing: .06em; }
.tag-cyan { color: var(--cyan); border: 1px solid rgba(0, 240, 255, .5); }
.tag-magenta { color: var(--magenta); border: 1px solid rgba(230, 0, 255, .5); }
.tag-yellow { color: var(--yellow); border: 1px solid rgba(255, 184, 0, .5); }
.project-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; padding: 28px; align-items: start; }
.project-body.reverse > .gallery { order: 2; }
.project-text h3 { margin: 0; font: 800 clamp(24px, 3vw, 32px)/1.2 var(--display); color: #fff; }
.project-text .sub { margin: 4px 0 16px; color: var(--magenta); font-weight: 600; }
.project-text p { margin: 0 0 14px; }
.feat { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; font-size: 13.5px; }
.feat li { position: relative; padding-left: 22px; }
.feat li::before { content: "▸"; position: absolute; left: 0; color: var(--cyan); }
.feat b { color: var(--cyan); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.tags span { font-size: 12px; padding: 3px 10px; border-radius: 7px; color: #e9f6ff; background: rgba(0, 240, 255, .08); border: 1px solid rgba(0, 240, 255, .3); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.stats div { text-align: center; padding: 10px 4px; border-radius: 12px; background: rgba(7, 9, 20, .55); border: 1px solid var(--line); }
.stats b { display: block; font: 900 26px/1.1 var(--display); color: var(--cyan); text-shadow: 0 0 14px rgba(0, 240, 255, .5); }
.stats div:nth-child(even) b { color: var(--magenta); text-shadow: 0 0 14px rgba(230, 0, 255, .5); }
.stats span { font-size: 11px; color: var(--dim); }

.gallery { display: grid; gap: 12px; min-width: 0; }
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery-tabs button {
  padding: 4px 12px; font-size: 12px; border-radius: 7px; cursor: pointer; color: var(--dim);
  background: rgba(7, 9, 20, .6); border: 1px solid var(--line); transition: all .2s;
}
.gallery-tabs button:hover { color: var(--cyan); border-color: rgba(0, 240, 255, .5); }
.gallery-tabs button.active { color: #fff; background: rgba(230, 0, 255, .2); border-color: rgba(230, 0, 255, .7); }
.shot {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: #070914; box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.shot img { width: 100%; height: auto; transition: opacity .25s, transform .5s; }
.shot:hover img { transform: scale(1.02); }
.shot img.swap { opacity: 0; }
.oled { margin: 6px 0 0; display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: 12px; background: rgba(7, 9, 20, .6); border: 1px solid var(--line); }
.oled img { width: 150px; flex: none; border-radius: 8px; image-rendering: pixelated; }
.oled figcaption { color: var(--dim); font-size: 12px; }

.guides { margin-top: 8px; }
.guides .path { margin-bottom: 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.guide { display: flex; flex-direction: column; gap: 6px; padding: 18px; color: var(--text); transition: transform .25s; }
.guide:hover { color: var(--text); transform: translateY(-4px); }
.guide b { color: #fff; font: 800 16px var(--display); }
.guide > span:last-child { color: var(--dim); font-size: 12.5px; line-height: 1.55; }
.g-ico { font-size: 22px; }

/* ───── training: Root-Me / LeetCode ───── */
.training { margin-bottom: 36px; }
.training .path { margin-bottom: 14px; }
.train-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.train { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; color: var(--text); transition: transform .25s; }
.train:hover { color: var(--text); transform: translateY(-4px); }
.train-head { display: flex; align-items: center; gap: 12px; }
.train-head b { font: 800 22px var(--display); color: #fff; }
.train-head .tag { margin-left: auto; }
.train-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font: 800 20px var(--mono); background: rgba(7, 9, 20, .7); border: 1px solid var(--line); }
.train-text { flex: 1; color: var(--dim); font-size: 13.5px; }
.train-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.train-stats > span { display: grid; place-items: center; padding: 10px 4px; border-radius: 12px; background: rgba(7, 9, 20, .6); border: 1px solid var(--line); }
.train-stats b { font: 900 26px/1.1 var(--display); color: var(--cyan); text-shadow: 0 0 14px rgba(0, 240, 255, .5); }
.train-stats > span:nth-child(2) b { color: var(--magenta); text-shadow: 0 0 14px rgba(230, 0, 255, .5); }
.train-stats small { font-size: 11px; color: var(--dim); }
.rig, .tlog { margin-top: 18px; }
.rig-body { padding: 20px 24px 18px; }
.rig-line { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 10px; background: rgba(7, 9, 20, .8); border: 1px solid var(--line); font-size: 15px; color: #fff; white-space: pre; overflow: hidden; }
.rig-line .caret { margin-left: -6px; }
.rig-line #rig-typed.selected { background: rgba(0, 240, 255, .35); color: #fff; border-radius: 3px; }
.rig-gag { margin-left: auto; color: var(--magenta); font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.rig-gag.show { opacity: 1; }
.rig-keys { display: block; width: 100%; max-width: 760px; margin: 18px auto 6px; }
.rig-keys .k rect { fill: var(--card-solid); stroke: var(--cyan); stroke-opacity: .7; stroke-width: 1.4; transition: fill .08s, filter .08s; }
.rig-keys .k.thumb rect { stroke: var(--magenta); }
.rig-keys .k text { fill: var(--text); font: 600 13px var(--mono); pointer-events: none; }
.rig-keys .k text.small { font-size: 9.5px; }
.rig-keys .k.down rect { fill: var(--cyan); filter: drop-shadow(0 0 8px var(--cyan)); }
.rig-keys .k.thumb.down rect { fill: var(--magenta); filter: drop-shadow(0 0 8px var(--magenta)); }
.rig-keys .k.down text { fill: #04121a; }
.rig-note { margin: 4px 0 0; text-align: center; color: var(--dim); font-size: 12.5px; }
.rig-note b { color: var(--cyan); }
.chip-mini { margin-left: 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(230, 0, 255, .5); background: rgba(230, 0, 255, .1); color: var(--magenta); font-size: 12px; cursor: pointer; }
.chip-mini:hover { box-shadow: 0 0 14px rgba(230, 0, 255, .4); }
.tlog { position: relative; }
.tlog-body { padding: 18px 22px 16px; }
.tlog-scroll { overflow-x: auto; padding-bottom: 6px; scrollbar-color: rgba(0, 240, 255, .3) transparent; }
.tlog-wrap { width: max-content; margin: 0 auto; }
.tlog-months { display: grid; grid-auto-flow: column; grid-auto-columns: 14px; gap: 4px; height: 16px; margin-bottom: 4px; font-size: 10px; color: var(--dim); }
.tlog-months span { white-space: nowrap; overflow: visible; }
.tlog-grid { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 4px; }
.tlog-grid button.today { outline: 2px solid var(--cyan); outline-offset: 1px; box-shadow: 0 0 10px rgba(0, 240, 255, .6); }
.tlog-grid button, .tlog-legend i { width: 14px; height: 14px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; }
.l0 { background: #161b3a; } .l1 { background: rgba(0, 240, 255, .28); } .l2 { background: rgba(0, 240, 255, .6); }
.l3 { background: #7a6cff; } .l4 { background: var(--magenta); box-shadow: 0 0 8px rgba(230, 0, 255, .6); }
.tlog-grid button:hover, .tlog-grid button.sel { outline: 2px solid #fff; outline-offset: 1px; }
.tlog-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.tlog-foot p { margin: 0; color: var(--text); }
.tlog-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.tlog-legend i { display: inline-block; cursor: default; }
.tlog-tip { position: absolute; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 8px; background: rgba(13, 11, 31, .95); border: 1px solid var(--magenta); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 5; box-shadow: 0 0 18px rgba(230, 0, 255, .3); }
.training.offline .rig, .training.offline .tlog { display: none; }
.train-bar { position: relative; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(7, 9, 20, .7); border: 1px solid var(--line); }
.train-bar i { position: absolute; inset: 0; width: 8%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--magenta)); box-shadow: 0 0 12px rgba(0, 240, 255, .6); }
.train-bar i::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255, 255, 255, .25) 6px 12px); animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 17px 0; } }
.train-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--dim); }
.train-foot > span:last-child { color: var(--cyan); }
.log li.next::before { border-style: dashed; border-color: var(--green); box-shadow: 0 0 10px rgba(0, 255, 102, .5); }
.log li.next .hash { color: var(--green); }
.log li.next b { color: var(--green); }

/* ───── skills: keycaps like the cheatsheet ───── */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { padding: 20px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid rgba(0, 240, 255, .28); box-shadow: 0 0 22px rgba(0, 240, 255, .06) inset; }
.card h3 { margin: 0 0 14px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--magenta); }
.keys { display: flex; flex-wrap: wrap; gap: 8px; }
.key {
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 9px; white-space: nowrap; color: #e9f6ff;
  background: rgba(0, 240, 255, .1); border: 1px solid rgba(0, 240, 255, .55);
  box-shadow: 0 3px 0 rgba(0, 240, 255, .25); transition: transform .12s, box-shadow .12s;
  user-select: none;
}
.key.super { background: rgba(230, 0, 255, .14); border-color: rgba(230, 0, 255, .7); box-shadow: 0 3px 0 rgba(230, 0, 255, .3); }
.key:hover, .key.pressed { transform: translateY(3px); box-shadow: 0 0 0 transparent, 0 0 16px rgba(0, 240, 255, .4); }
.key.super:hover, .key.super.pressed { box-shadow: 0 0 16px rgba(230, 0, 255, .45); }

/* ───── history: git log ───── */
.log { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; max-width: 900px; }
.log::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--cyan), var(--magenta)); opacity: .6; }
.log li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.log li::before {
  content: ""; position: absolute; left: -27px; top: 19px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 10px rgba(0, 240, 255, .6);
}
.log li.merge::before { border-color: var(--magenta); box-shadow: 0 0 10px rgba(230, 0, 255, .7); background: var(--magenta); }
.log li.root::before { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255, 184, 0, .6); }
.hash { color: var(--yellow); font-size: 13px; }
.log time { color: var(--dim); font-size: 13px; }
.log b { color: var(--cyan); font-weight: 600; }
.log li.merge b { color: var(--magenta); }

/* ───── contact: lock-screen card ───── */
#contact { display: grid; place-items: center; min-height: 80vh; }
.lock { width: min(560px, 100%); padding: 26px 28px 24px; border-radius: 28px; background: rgba(13, 11, 40, .78); }
.lock-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.lock-head svg { width: 16px; height: 16px; color: var(--text); }
.lock-head b { color: var(--text); letter-spacing: .14em; font-family: var(--display); }
.lock h2 { margin: 18px 0 8px; font: 800 clamp(28px, 4vw, 38px)/1.15 var(--display); letter-spacing: 0; color: #fff; }
.lock p { margin: 0 0 20px; color: var(--dim); }
.lock-field {
  display: grid; place-items: center; height: 58px; border-radius: 999px; border: 2px solid var(--magenta);
  font: 800 14px var(--display); letter-spacing: .2em; color: var(--text); box-shadow: 0 0 20px rgba(230, 0, 255, .25) inset;
}
.lock-actions { display: grid; grid-template-columns: auto 1fr; gap: 14px; margin-top: 16px; }
.user-pill img { width: 34px; height: 34px; border-radius: 50%; }
.user-pill { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px 0 10px; border-radius: 999px; background: rgba(0, 240, 255, .07); color: var(--cyan); font: 800 13px var(--display); letter-spacing: .14em; }
.unlock { min-height: 54px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 20px; font-size: 13px; }

footer { text-align: center; padding: 40px var(--gutter) 50px; font-size: 13px; color: var(--dim); border-top: 1px solid var(--line); }
footer p { margin: 4px 0; }

/* ───── fuzzel-like menu ───── */
.menu { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 14vh 16px 0; background: rgba(4, 5, 12, .6); backdrop-filter: blur(4px); }
.menu[hidden] { display: none; }
.menu-box { width: min(560px, 100%); padding: 14px; background: rgba(13, 11, 31, .95); }
#menu-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(0, 240, 255, .4); background: rgba(7, 9, 20, .9);
  color: #fff; font: 15px var(--mono); outline: none;
}
#menu-input:focus { border-color: var(--cyan); box-shadow: 0 0 16px rgba(0, 240, 255, .25); }
#menu-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 46vh; overflow-y: auto; }
#menu-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
#menu-list li small { color: var(--dim); }
#menu-list li.sel { background: rgba(0, 240, 255, .14); color: var(--cyan); }
#menu-list li.sel small { color: var(--magenta); }
.menu-foot { margin: 10px 4px 0; color: var(--dimmer); font-size: 11px; }

/* ───── lightbox ───── */
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(4, 5, 12, .9); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; width: auto; border-radius: 12px; box-shadow: 0 0 80px rgba(0, 240, 255, .15); }
.lightbox button { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--magenta); background: rgba(230, 0, 255, .15); color: var(--magenta); cursor: pointer; }

/* ───── reveal on scroll ───── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ───── responsive ───── */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 110px; min-height: auto; }
  .project-body, .project-body.reverse { grid-template-columns: 1fr; }
  .project-body.reverse > .gallery { order: 0; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .ws span { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .bar { grid-template-columns: 1fr auto; }
  .clock, .pill-dim, .pill-cyan span { display: none; }
  .ws { padding: 0 9px; }
  .skill-grid, .guide-grid, .train-grid { grid-template-columns: 1fr; }
  .rig-line { flex-wrap: wrap; padding: 8px 12px; font-size: 14px; }
  .rig-gag { flex-basis: 100%; margin-left: 0; font-size: 11.5px; }
  .rig-body, .tlog-body { padding: 14px; }
  .train-foot { flex-direction: column; gap: 4px; }
  .project-body { padding: 18px; gap: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .term { padding: 18px 16px; font-size: 12.5px; }
  .logo { display: none; }
  .palette { margin-left: 0; }
  .seg-time, .seg-line.grow { display: none; }
  .neon-magenta { margin-left: .2em; }
  .lock-actions { grid-template-columns: 1fr; }
  .user-pill { height: 46px; }
  section { padding-top: 90px; }
}
@media (max-width: 720px) {
  .win-title > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 380px) {
  .bar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .workspaces { gap: 4px; }
  .ws { padding: 0 7px; }
  .brand { margin-right: 2px; }
  #open-menu { display: none; }
}
/* calm mode (device asks for less motion): no flicker, no drifting, no fly-in; typing and a slow border stay */
html[data-motion="calm"] { scroll-behavior: auto; }
html[data-motion="calm"] .nebula span,
html[data-motion="calm"] .neon-magenta { animation: none; }
html[data-motion="calm"] .win::before { animation-duration: 40s; }
html[data-motion="calm"] .reveal { opacity: 1; transform: none; transition: none; }
