/* =================================================================
   Portfolio: hacker-console theme
   Same design language as the huebler.tech start page. One hue (--h)
   drives the palette, so a theme is a single variable.
   No external requests: font and icons are self-hosted.
   ================================================================= */

@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-500.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-700.woff2") format("woff2"); }

:root {
  --h: 111;
  --accent: hsl(var(--h) 100% 54%);
  --accent-2: hsl(calc(var(--h) + 85) 100% 62%);
  --accent-dim: hsl(var(--h) 100% 54% / .14);
  --accent-glow: hsl(var(--h) 100% 54% / .38);

  --bg: #05070d;
  --panel: rgba(11, 17, 30, .74);
  --line: rgba(160, 200, 255, .13);
  --fg: #d8e6f5;
  --muted: #7f92aa;
  --ok: #3dff8b;
  --warn: #ffb020;
  --bad: #ff4d6d;
  --info: #00d9ff;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --nav-h: 64px;                       /* real value is measured in ui.js */
  --sat: env(safe-area-inset-top, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
[data-theme="cyan"]    { --h: 187; }
[data-theme="amber"]   { --h: 38; }
[data-theme="magenta"] { --h: 315; }
[data-theme="violet"]  { --h: 268; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; background: var(--bg); color: var(--fg);
  font: 400 15px/1.65 var(--mono); -webkit-font-smoothing: antialiased; overflow-x: clip;
  padding-left: var(--sal); padding-right: var(--sar);
}
::selection { background: var(--accent); color: #02110a; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
img { max-width: 100%; }
code, kbd { font-family: var(--mono); }
code { color: var(--accent); background: var(--accent-dim); padding: .08em .4em; border-radius: 5px; font-size: .92em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: .05em .45em; background: rgba(255,255,255,.04); color: var(--fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: hsl(var(--h) 60% 38% / .55); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

.i { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.17em; flex: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #02110a; padding: .6rem 1rem; z-index: 2000; }
.skip:focus { left: 0; }
.pre { color: var(--accent); opacity: .8; }
.dot { color: var(--accent); }
.sep { color: var(--muted); margin: 0 .35ch; }
.mono { font-family: var(--mono); }

/* ---- layers ---------------------------------------------------------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; }
.vignette { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, transparent 30%, rgba(2,4,9,.85) 100%),
              radial-gradient(ellipse at 15% 0%, hsl(var(--h) 100% 50% / .10), transparent 55%); }
.scanlines, .scanline { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .4; mix-blend-mode: overlay;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }

/* ---- header: always visible (sticky) -------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: .75rem; min-height: var(--nav-h);
  padding: calc(.5rem + var(--sat)) var(--gutter) .5rem;
  margin-inline: calc(var(--sal) * -1) calc(var(--sar) * -1);
  padding-left: max(var(--gutter), var(--sal)); padding-right: max(var(--gutter), var(--sar));
  background: linear-gradient(rgba(5,7,13,.9), rgba(5,7,13,.7));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; color: var(--fg); text-decoration: none; }
.brand:hover { color: var(--fg); }
.brand__avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--accent), 0 0 18px var(--accent-glow); transition: transform .2s; }
.brand__avatar:hover { transform: scale(1.08); }
.brand__text { display: grid; gap: .1rem; min-width: 0; line-height: 1.2; }
.brand__name { font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__user { color: var(--muted); font-weight: 400; font-size: .75rem; margin-left: .35rem; }
.brand__sub { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .72rem; white-space: nowrap; min-width: 0; }
.brand__sub span:last-child { overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s ease-in-out infinite; }

.nav__links { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav__links a { color: var(--muted); text-decoration: none; padding: .45rem .8rem; border-radius: 8px; white-space: nowrap; transition: color .2s, background .2s; }
.nav__links a:hover { color: var(--fg); background: rgba(255,255,255,.05); }
.nav__links a.is-active { color: var(--accent); background: var(--accent-dim); }
.nav__tools { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--accent); transition: transform .2s, border-color .2s; }
@media (hover: hover) { .icon-btn:hover { border-color: var(--accent); transform: rotate(-10deg); } }
.nav__toggle { display: none; margin-left: auto; }
.egg-counter { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--accent); cursor: pointer;
  padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); white-space: nowrap; transition: all .2s; }
.egg-counter:hover { border-color: var(--accent); box-shadow: 0 0 18px var(--accent-dim); }
.egg-counter.is-bump { animation: bump .6s; }

/* ---- layout ---------------------------------------------------------- */
main > * { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-top: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: calc(var(--nav-h) + 8px); }
.section__title { font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: 700; margin-bottom: 1.4rem; }
.prompt { color: var(--accent); margin-right: .6ch; }
.eyebrow { color: var(--muted); font-size: .85rem; letter-spacing: .04em; display: flex; align-items: center; gap: .6rem; }
.lead { color: var(--muted); font-size: 1.02rem; max-width: 62ch; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---- buttons --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: .7rem 1.2rem; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--fg); text-decoration: none; font-weight: 500; cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; }
@media (hover: hover) { .btn:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 26px var(--accent-dim); } }
.btn--primary { background: var(--accent); color: #02110a; border-color: transparent; font-weight: 700; box-shadow: 0 0 26px var(--accent-glow); }
.btn--primary:hover { color: #02110a; background: var(--accent-2); box-shadow: 0 8px 36px var(--accent-glow); }
.btn--ghost { border-style: dashed; background: transparent; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---- hero ------------------------------------------------------------ */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center;
  min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); padding-block: clamp(2rem, 6vw, 4rem); scroll-margin-top: var(--nav-h); }
.hero__copy { display: grid; gap: 1.4rem; justify-items: start; min-width: 0; }
.glitch { position: relative; font-size: clamp(3rem, 12vw, 6rem); font-weight: 700; letter-spacing: -.05em; text-shadow: 0 0 40px var(--accent-glow); overflow-wrap: anywhere; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.glitch::before { color: #ff2bd6; transform: translate(-3px, 0); }
.glitch::after  { color: #00e5ff; transform: translate(3px, 0); }
.glitch:hover::before, .glitch.is-glitching::before { opacity: .85; animation: glitch-a .55s steps(2) infinite; }
.glitch:hover::after,  .glitch.is-glitching::after  { opacity: .85; animation: glitch-b .55s steps(2) infinite; }
.handle { color: var(--muted); font-size: clamp(1rem, 2.6vw, 1.3rem); margin-top: -.6rem; }
.hero__type { font-size: clamp(1.02rem, 2.6vw, 1.45rem); min-height: 2.4em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; }
.social { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--fg); background: rgba(255,255,255,.03); text-decoration: none; font-size: .85rem; transition: all .2s; }
.social:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-dim); }
.social .i { color: var(--accent); }

.hero__art { display: grid; justify-items: center; gap: 1.6rem; }
.avatar { --rx: 0deg; --ry: 0deg; position: relative; width: min(330px, 68vw); aspect-ratio: 1; border-radius: 50%; cursor: pointer;
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out; }
.avatar img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 2px solid hsl(var(--h) 100% 54% / .55); user-select: none; -webkit-user-drag: none; }
.avatar__ring { position: absolute; inset: -16px; border-radius: 50%; animation: spin 9s linear infinite;
  background: conic-gradient(from 0deg, var(--accent), transparent 28%, var(--accent-2), transparent 68%, var(--accent));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  filter: drop-shadow(0 0 12px var(--accent-glow)); }
.avatar__scan { position: absolute; inset: 0; z-index: 2; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(transparent 0 46%, hsl(var(--h) 100% 60% / .32) 50%, transparent 54% 100%); background-size: 100% 250%; animation: scan 3.6s linear infinite; }
.avatar__corner { position: absolute; z-index: 3; width: 28px; height: 28px; border: 2px solid var(--accent); opacity: .85; }
.avatar__corner.tl { top: -26px; left: -26px; border-right: 0; border-bottom: 0; }
.avatar__corner.tr { top: -26px; right: -26px; border-left: 0; border-bottom: 0; }
.avatar__corner.bl { bottom: -26px; left: -26px; border-right: 0; border-top: 0; }
.avatar__corner.br { bottom: -26px; right: -26px; border-left: 0; border-top: 0; }
.avatar__caption { color: var(--muted); font-size: .85rem; text-align: center; }

/* ---- about ----------------------------------------------------------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; align-items: start; }
.about > * { min-width: 0; }
.about__block { padding: 1.5rem; }
.about__block h3 { font-size: .95rem; color: var(--accent); margin-bottom: .9rem; display: flex; align-items: center; gap: .55rem; }
.about__bio { color: var(--fg); line-height: 1.75; border-left: 2px solid var(--accent); padding-left: 1rem; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-size: .82rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid hsl(var(--h) 100% 54% / .35); color: var(--accent); background: var(--accent-dim); transition: transform .2s; }
@media (hover: hover) { .chip:hover { transform: translateY(-2px); } }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.fact { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); min-width: 0; }
.fact dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.fact dd { margin: .2rem 0 0; font-weight: 700; overflow-wrap: anywhere; display: flex; align-items: center; gap: .5rem; }
.fact dd.is-ok { color: var(--ok); }
.ascii { margin: 0; font-size: clamp(.5rem, 1.6vw, .8rem); line-height: 1.05; color: var(--accent); overflow-x: auto; }

/* ---- cards / projects ------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.card { position: relative; display: flex; flex-direction: column; gap: .7rem; min-width: 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: inherit; text-decoration: none; overflow: hidden;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .25s, border-color .25s; }
.card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--accent-dim), transparent 60%); }
@media (hover: hover) { .card:hover { color: inherit; transform: translateY(-4px); border-color: hsl(var(--h) 100% 54% / .55); }
  .card:hover::before { opacity: 1; } }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.card__title { font-size: 1.05rem; color: var(--accent); overflow-wrap: anywhere; display: flex; align-items: center; gap: .55rem; }
.card__stars { color: var(--warn); font-size: .82rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.card__desc { color: var(--muted); font-size: .9rem; flex: 1; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card__tech { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .75rem; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--info); }
.empty { color: var(--muted); padding: 1.4rem; text-align: center; }
.hint-link { margin-top: .6rem; }

/* ---- terminal ------------------------------------------------------- */
.term { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(3,6,12,.9);
  box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px var(--accent-dim), 0 0 50px hsl(var(--h) 100% 54% / .09); }
.term__bar { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem .3rem .95rem; background: rgba(255,255,255,.04); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.term__title { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* KDE Breeze style window buttons: flat, on the right */
.kwin__icon { display: grid; width: 80px; color: var(--accent); }
.kwin__buttons { display: flex; gap: 2px; width: 80px; justify-content: flex-end; }
.kwin__btn { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; color: #bdc3c7; font-style: normal; }
.kwin__btn .i { width: 15px; height: 15px; stroke-width: 1.5; }
.kwin__btn:hover { background: rgba(255,255,255,.1); }
.kwin__btn--close:hover { background: #da4453; color: #fff; }
.terminal-output { height: clamp(250px, 52vh, 470px); overflow: auto; overscroll-behavior: contain; padding: 1rem 1.1rem; font-size: .86rem; line-height: 1.55; cursor: text; position: relative; }
.terminal-input-bar { display: flex; align-items: center; gap: .7ch; padding: .7rem 1.1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.02); }
.term__prompt { color: var(--accent); white-space: nowrap; font-size: .86rem; flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
#terminal-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: .86rem; caret-color: var(--accent); }
#terminal-input::placeholder { color: var(--muted); opacity: .6; }
.terminal-output pre { margin: 0; font: inherit; line-height: 1.2; }
.terminal-output a { color: var(--accent); }
.terminal-output.is-wiping { animation: wipe .9s steps(6) infinite; }
.tab-key { display: none; flex: none; align-items: center; justify-content: center; min-width: 52px; min-height: 36px; padding: 0 .7rem; border-radius: 8px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: rgba(255,255,255,.05); color: var(--accent); font: inherit; font-size: .8rem; cursor: pointer; }
.tab-key:active { background: var(--accent-dim); }
@media (pointer: coarse) { .tab-key { display: inline-flex; } }
#matrix-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }
.neofetch-row { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.neofetch-avatar { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; border: 1px solid hsl(var(--h) 100% 54% / .5); box-shadow: 0 0 12px var(--accent-dim); flex: none; cursor: pointer; }

/* Utility names used by the terminal JS (kept from the old Tailwind markup) */
.text-term-green, .text-term-fg { color: var(--accent); } .text-term-blue, .text-term-cyan { color: var(--info); }
.text-term-yellow { color: var(--warn); } .text-term-red { color: var(--bad); } .text-term-gray { color: var(--muted); }
.font-bold { font-weight: 700; } .break-words { overflow-wrap: anywhere; } .break-all { word-break: break-all; }
.whitespace-pre { white-space: pre; } .whitespace-pre-wrap { white-space: pre-wrap; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; }
.space-y-1 > * + * { margin-top: .25rem; }
.opacity-50 { opacity: .5; } .opacity-60 { opacity: .6; } .cursor-not-allowed { cursor: not-allowed; }

/* ---- contact --------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: start; }
.contact > * { min-width: 0; }
.contact__block { padding: 1.5rem; }
.contact__block h3 { font-size: .95rem; color: var(--accent); margin-bottom: 1rem; }
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: .75rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(3,6,12,.7); color: var(--fg); font: inherit; font-size: .9rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form__row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#contact-status { font-size: .85rem; min-height: 1.2em; overflow-wrap: anywhere; }
.direct { display: grid; gap: .6rem; }

/* ---- footer / toasts ------------------------------------------------- */
.footer { max-width: var(--maxw); margin: clamp(4rem, 9vw, 7rem) auto 0; padding: 1.8rem var(--gutter) calc(3rem + var(--sab)); border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem; display: grid; gap: .7rem; }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.footer .egg-counter { margin-left: auto; }
.footer__login { margin-left: auto; color: var(--muted); font-size: .8rem; text-decoration: none; }
.footer__login:hover { color: var(--accent); }
.toasts { position: fixed; right: max(1rem, var(--sar)); bottom: max(1rem, var(--sab)); z-index: 300; display: grid; gap: .6rem; max-width: min(370px, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; padding: .85rem 1.05rem; border: 1px solid hsl(var(--h) 100% 54% / .5); border-radius: 12px; background: rgba(5,9,17,.96);
  box-shadow: 0 14px 44px rgba(0,0,0,.55), 0 0 26px var(--accent-dim); animation: toast-in .45s cubic-bezier(.2,.9,.3,1.25); }
.toast.is-out { animation: toast-out .3s forwards; }
.toast-title { color: var(--accent); font-weight: 700; font-size: .88rem; }
.toast-text { color: var(--fg); font-size: .82rem; margin-top: .2rem; }

/* ---- overlays: boot, screensaver, konami ----------------------------- */
.boot { position: fixed; inset: 0; z-index: 1000; background: #020409; color: var(--ok); padding: max(clamp(1rem, 5vw, 3rem), var(--sat)) clamp(1rem, 5vw, 3rem);
  font-size: clamp(.72rem, 1.7vw, .95rem); line-height: 1.55; overflow: hidden; transition: opacity .5s; cursor: pointer; }
.boot.is-done { opacity: 0; pointer-events: none; }
.boot__line { white-space: pre-wrap; } .boot__ok { color: var(--ok); } .boot__dim { color: #5f7a6b; }
.boot__skip { position: absolute; right: 1.2rem; bottom: max(1rem, var(--sab)); color: #5f7a6b; font-size: .8rem; }
.saver { position: fixed; inset: 0; z-index: 900; background: #000; cursor: none; }
.saver-logo { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: .7rem; padding: .55rem 1.1rem; border: 2px solid var(--c, var(--accent)); border-radius: 10px;
  color: var(--c, var(--accent)); font-weight: 700; font-size: 1.3rem; text-shadow: 0 0 14px currentColor; will-change: transform; }
.saver-logo img { width: 34px; height: 34px; border-radius: 50%; }
.saver-hint { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: #555; font-size: .8rem; white-space: nowrap; }
.is-force { animation: levitate 2.6s ease-in-out; position: relative; z-index: 5; }
html.rainbow { animation: rainbow-hue 8s linear infinite; }

/* ---- reveal ---------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---- special pages (404, /teapot, /admin ...) ------------------------ */
body.error-body { min-height: 100svh; }
.error-page { min-height: 100svh; max-width: 760px; margin: 0 auto; padding: 2rem 1.25rem; display: grid; align-content: center; gap: 1.2rem; }
.error-log { margin: 0; padding: 1.1rem 1.3rem; border: 1px solid hsl(var(--h) 100% 54% / .4); border-radius: 10px; background: rgba(0,0,0,.6);
  font-size: .85rem; line-height: 1.45; overflow-x: auto; white-space: pre; color: var(--muted); }
.error-art { color: var(--accent); width: fit-content; max-width: 100%; }
.error-red { color: var(--bad); } .error-cyan { color: var(--info); }
.error-title { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.error-text { color: var(--muted); line-height: 1.6; } .error-text code { color: var(--info); }
.error-link { color: var(--info); } .error-link:hover { color: var(--accent); text-decoration: underline; }

/* ---- keyframes ------------------------------------------------------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan { from { background-position: 0 -120%; } to { background-position: 0 120%; } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes bump { 30% { transform: scale(1.25) rotate(-4deg); } 60% { transform: scale(.95) rotate(3deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@keyframes matrix-fade { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes glitch-a { 0% { clip-path: inset(12% 0 68% 0); } 25% { clip-path: inset(62% 0 8% 0); } 50% { clip-path: inset(30% 0 42% 0); } 75% { clip-path: inset(82% 0 2% 0); } 100% { clip-path: inset(4% 0 86% 0); } }
@keyframes glitch-b { 0% { clip-path: inset(70% 0 6% 0); } 25% { clip-path: inset(8% 0 76% 0); } 50% { clip-path: inset(48% 0 24% 0); } 75% { clip-path: inset(20% 0 60% 0); } 100% { clip-path: inset(88% 0 0 0); } }
@keyframes levitate { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-34px) rotate(-3deg); } 60% { transform: translateY(-46px) rotate(3deg); } 85% { transform: translateY(-12px) rotate(0); } }
@keyframes wipe { 0% { filter: none; } 30% { filter: invert(1) hue-rotate(90deg); } 60% { filter: blur(2px) contrast(2); } 100% { filter: none; } }
@keyframes rainbow-hue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

/* ---- responsive ------------------------------------------------------ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__art { order: -1; }
  .avatar { width: min(230px, 56vw); }
  .about, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__toggle { display: inline-grid; }
  .nav__links { position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; align-items: stretch; gap: .15rem; display: none;
    padding: .6rem var(--gutter) 1rem; background: rgba(5,7,13,.98); border-bottom: 1px solid var(--line); max-height: calc(100svh - var(--nav-h)); overflow-y: auto; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .85rem .9rem; }
  .nav__tools { margin: .4rem 0 0; justify-content: space-between; }
  .nav__tools .icon-btn { width: 44px; height: 44px; }
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  .brand__user { display: none; }
  .brand__avatar { width: 38px; height: 38px; }
  .brand__sub { font-size: .68rem; }
  .facts { grid-template-columns: 1fr; }
  .term__prompt { max-width: 46%; }
  .kwin__icon, .kwin__buttons { width: 72px; }
  .terminal-output { height: clamp(230px, 46vh, 420px); padding: .8rem .85rem; font-size: .78rem; }
  .terminal-input-bar { padding: .6rem .85rem; }
  .footer .egg-counter { margin-left: 0; }
  .hero__cta .btn { flex: 1 1 auto; }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --nav-h: 54px; }
  .brand__sub { display: none; }
  .hero { min-height: 0; padding-block: 1.5rem; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; }
  .hero__art { order: 0; }
  .avatar { width: min(170px, 44vh); }
  .glitch { font-size: clamp(2.4rem, 9vh, 3.6rem); }
  .hero__copy { gap: .9rem; }
  .about, .contact { grid-template-columns: 1fr 1fr; }
  .terminal-output { height: clamp(150px, 60vh, 300px); }
}
@media (min-width: 1700px) { :root { --maxw: 1240px; } body { font-size: 16px; } }
@media (pointer: coarse) {
  #terminal-input, .field input, .field textarea { font-size: 16px; }     /* prevents iOS zoom on focus */
  .btn, .social, .icon-btn, .egg-counter { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}

.caret { display: inline-block; width: .55em; height: 1.05em; background: var(--accent); margin-left: .18em; vertical-align: -.16em; animation: blink 1.06s steps(1) infinite; }
