/* ============================================================
   kebrick — infrastructure noir  (v2: dev + infra)
   Bricolage Grotesque (display) + JetBrains Mono (technical).
   ============================================================ */

:root {
  --bg:        #08090b;
  --bg-2:      #0c0e12;
  --surface:   #111419;
  --surface-2: #161a20;
  --line:      rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text:      #eceef1;
  --muted:     #9aa0ab;
  --muted-2:   #6b7280;

  --signal:     #79f2c8;
  --signal-dim: #2c8f72;
  --wire:       rgba(121, 242, 200, 0.16);

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --disp: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--disp);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

::selection { background: var(--signal); color: #04130d; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--signal-dim), var(--signal));
  box-shadow: 0 0 12px var(--signal); z-index: 50; pointer-events: none;
  transition: width 0.1s linear;
}

/* ---------- atmosphere ---------- */
.aurora {
  position: fixed; inset: -30%; z-index: 0; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(40% 35% at 75% 18%, rgba(121, 242, 200, 0.10), transparent 60%),
    radial-gradient(45% 40% at 12% 88%, rgba(70, 110, 200, 0.09), transparent 60%),
    radial-gradient(30% 30% at 60% 65%, rgba(121, 242, 200, 0.05), transparent 70%);
  filter: blur(20px);
  animation: drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px);
  mix-blend-mode: multiply;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  box-shadow: inset 0 0 240px 40px rgba(0, 0, 0, 0.7);
}
.nav, main, .footer { position: relative; z-index: 2; }

/* ---------- mono accents ---------- */
.eyebrow, .section__idx, .nav__links, .nav__cta, .stat__label,
.profile, .card__idx, .stackcol__h, .exp__badge, .tags,
.link-card__k, .footer, .portrait__cap, .project__tag, .project__role,
.tl__period, .store small {
  font-family: var(--mono);
}

.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 0 rgba(121, 242, 200, 0.6);
  animation: pulse 2.4s var(--ease) infinite; vertical-align: middle;
}
.status-dot--sm { width: 6px; height: 6px; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(121, 242, 200, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(121, 242, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(121, 242, 200, 0); }
}

/* ===================== NAV ===================== */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--pad);
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.nav__brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; letter-spacing: -0.02em; }
.nav__dot { width: 9px; height: 9px; border-radius: 2px; background: var(--signal); box-shadow: 0 0 12px var(--signal); animation: blink 3s steps(1) infinite; }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 94% { opacity: 0.35; } }
.nav__handle { font-size: 1.15rem; }
.nav__links { display: flex; gap: 1.6rem; font-size: 0.78rem; letter-spacing: 0.02em; }
.nav__links a { color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__idx { color: var(--signal-dim); margin-right: 0.25rem; }
.nav__cta {
  font-size: 0.78rem; padding: 0.5rem 1rem; border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); transition: all 0.2s;
}
.nav__cta:hover { border-color: var(--signal); color: var(--signal); box-shadow: 0 0 18px -6px var(--signal); }

/* right cluster: language switcher + CTA */
.nav__right { display: flex; align-items: center; gap: 0.7rem; }
.langsw { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-family: var(--mono); }
.langsw button { padding: 0.42rem 0.55rem; font-size: 0.72rem; line-height: 1; background: transparent; color: var(--muted); border: 0; border-right: 1px solid var(--line); cursor: pointer; transition: color 0.2s, background 0.2s; }
.langsw button:last-child { border-right: 0; }
.langsw button:hover:not(.active) { color: var(--text); }
.langsw button.active { background: var(--signal); color: #04130d; font-weight: 600; }

/* CJK-friendly stack when Chinese is active (latin still falls to Bricolage) */
html[lang="zh-CN"] { --disp: "Bricolage Grotesque", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }

/* ===================== HERO ===================== */
.hero { position: relative; padding: clamp(3rem, 9vh, 7rem) var(--pad) 3.5rem; max-width: var(--maxw); margin: 0 auto; overflow: hidden; }

/* global ambient network background — sits under all content, soft-faded edges */
.netbg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.62;
  -webkit-mask-image: radial-gradient(155% 135% at 50% 38%, #000 42%, transparent 100%);
  mask-image: radial-gradient(155% 135% at 50% 38%, #000 42%, transparent 100%);
  transition: transform 0.6s var(--ease); will-change: transform;
}
.netbg svg { width: 100%; height: 100%; display: block; }
.netbg__wires line { stroke: rgba(121, 242, 200, 0.10); stroke-width: 1; stroke-dasharray: 3 9; animation: dash 28s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -120; } }
.netbg__nodes { filter: drop-shadow(0 0 4px rgba(121, 242, 200, 0.6)); }
.netbg__nodes circle { fill: var(--signal); }
.netbg__nodes .core { fill: #fff; }
.netbg__nodes .tw { animation: twinkle 4.5s ease-in-out infinite; }
.netbg__nodes .tw:nth-of-type(2n) { animation-delay: 1.4s; }
.netbg__nodes .tw:nth-of-type(3n) { animation-delay: 2.7s; }
@keyframes twinkle { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.netbg__packets circle { filter: drop-shadow(0 0 6px var(--signal)); }

/* easter-egg: dev-mode / nat 20 flash (Konami + roll of 20) */
.netbg.storm { opacity: 1; }
.netbg.storm .netbg__packets circle { filter: drop-shadow(0 0 11px var(--signal)); }
.dev-sweep { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; background: linear-gradient(90deg, transparent, var(--signal), transparent); box-shadow: 0 0 26px 5px var(--signal); animation: devsweep 0.95s ease-in-out forwards; }
@keyframes devsweep { 0% { transform: translateY(-6px); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(100vh); opacity: 0; } }
.dev-toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 61; pointer-events: none; font-family: var(--mono); font-size: 0.85rem; font-weight: 600; color: #04130d; background: var(--signal); padding: 0.5rem 0.95rem; border-radius: 8px; box-shadow: 0 10px 34px -8px var(--signal); transition: opacity 0.5s; }
.dev-toast.out { opacity: 0; }

.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.45fr 0.85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 1.4rem;
}
.eyebrow__sep { color: var(--signal-dim); }
.eyebrow__mark { width: 7px; height: 7px; border-radius: 2px; background: var(--signal); box-shadow: 0 0 8px var(--signal); }

.hero__name {
  position: relative;
  font-size: clamp(3.6rem, 12vw, 8.5rem); font-weight: 800; line-height: 0.92;
  letter-spacing: -0.045em; margin-bottom: 0.6rem; width: max-content; max-width: 100%;
  background: linear-gradient(180deg, #fff 30%, #aeb4bd 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* glitch echo on hover */
.hero__name::after {
  content: attr(data-glitch); position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--signal), var(--signal-dim));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  clip-path: inset(0 0 0 0); opacity: 0; transform: translate(0, 0);
}
.hero__name:hover::after { animation: glitch 0.5s steps(2) 1; }
@keyframes glitch {
  0% { opacity: 0.9; transform: translate(-3px, 1px); clip-path: inset(0 0 65% 0); }
  40% { opacity: 0.7; transform: translate(3px, -1px); clip-path: inset(55% 0 0 0); }
  100% { opacity: 0; transform: translate(0, 0); }
}

.hero__realname { font-size: clamp(1.05rem, 2.4vw, 1.45rem); font-weight: 600; color: var(--text); letter-spacing: 0.01em; margin: 0.15rem 0 0.9rem; }
.hero__realname::before { content: "// "; color: var(--signal); font-family: var(--mono); font-size: 0.8em; font-weight: 500; }
.hero__role { font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 600; letter-spacing: -0.02em; }
.hero__subrole { font-family: var(--mono); font-size: clamp(0.85rem, 2vw, 1.05rem); color: var(--signal); margin-top: 0.2rem; }
.hero__lead { max-width: 52ch; color: var(--muted); margin-top: 1.5rem; font-size: clamp(1rem, 1.4vw, 1.12rem); }
.hero__lead strong { color: var(--text); font-weight: 600; }

/* typewriter + focus */
.type { color: var(--signal); }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; background: var(--signal); vertical-align: -0.15em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.84rem; font-weight: 500;
  padding: 0.7rem 1.15rem; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); background: var(--surface); transition: transform 0.18s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn .ico { width: 17px; height: 17px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); background: var(--surface-2); border-color: var(--signal-dim); }
.btn--primary { background: var(--signal); color: #04130d; border-color: var(--signal); font-weight: 600; }
.btn--primary:hover { box-shadow: 0 8px 30px -8px var(--signal); filter: brightness(1.05); border-color: var(--signal); }

/* portrait */
.hero__portrait { display: flex; justify-content: center; }
.portrait { position: relative; width: min(100%, 420px); aspect-ratio: 768 / 1364; }
.portrait img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--r);
  filter: grayscale(0.1) contrast(1.06) brightness(0.95);
  border: 1px solid var(--line);
}
.portrait::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r); pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 9, 11, 0.55));
}
.portrait__bracket { position: absolute; width: 26px; height: 26px; border: 2px solid var(--signal); z-index: 2; transition: all 0.4s var(--ease); }
.portrait:hover .portrait__bracket { width: 34px; height: 34px; }
.portrait__bracket--tl { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.portrait__bracket--tr { top: -6px; right: -6px; border-left: 0; border-bottom: 0; }
.portrait__bracket--bl { bottom: -6px; left: -6px; border-right: 0; border-top: 0; }
.portrait__bracket--br { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.portrait__cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3;
  display: flex; justify-content: space-between; font-size: 0.66rem;
  color: var(--muted); letter-spacing: 0.05em;
}
.portrait__live { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--signal); }

/* stats */
.stats {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line);
}
.stat { background: var(--bg-2); padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; }
.stat__num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.stat__num--text { color: var(--signal); }
.stat__label { font-size: 0.68rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===================== SECTIONS ===================== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 9vh, 6rem) var(--pad); }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.012), transparent); max-width: none; }
.section--alt > * { max-width: calc(var(--maxw) - 2 * var(--pad)); margin-inline: auto; }

.section__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.6rem; }
.section__idx { font-size: 0.8rem; color: var(--signal-dim); padding-top: 0.4rem; }
.section__title { font-size: clamp(1.7rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.section__line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* about */
.about { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about__text p { color: var(--muted); margin-bottom: 1.1rem; }
.about__text .lead { font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--text); font-weight: 500; line-height: 1.4; }
.about__text strong { color: var(--signal); font-weight: 600; }

.profile { border: 1px solid var(--line); border-radius: var(--r); padding: 0.4rem 1.2rem; background: var(--surface); position: sticky; top: 5rem; }
.profile__row { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.8rem; }
.profile__row:last-child { border-bottom: 0; }
.profile__row span { color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
.profile__row b { color: var(--text); font-weight: 500; font-family: var(--disp); }
.profile__status { color: var(--signal); }

/* ---- cursor glow cards (expertise / contact) ---- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card { background: var(--bg-2); padding: 1.6rem 1.4rem 1.8rem; transition: background 0.25s; position: relative; isolation: isolate; }
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(220px 220px at var(--cx, 50%) var(--cy, 50%), rgba(121, 242, 200, 0.10), transparent 65%);
}
.card:hover { background: var(--surface-2); }
.card:hover::after { opacity: 1; }
.card__idx { font-size: 0.72rem; color: var(--signal-dim); }
.card h3 { font-size: 1.08rem; font-weight: 600; margin: 0.7rem 0 0.5rem; letter-spacing: -0.01em; }
.card p { font-size: 0.86rem; color: var(--muted); line-height: 1.55; }
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.card:hover::before { transform: scaleX(1); }

/* ---- stack ---- */
.stackgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.stackcol { border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.4rem; background: var(--surface); }
.stackcol__h { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--signal); margin-bottom: 1rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  font-family: var(--mono); font-size: 0.76rem; padding: 0.4rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
  background: var(--bg-2); transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.tags li:hover { color: var(--signal); border-color: var(--signal-dim); background: var(--surface-2); transform: translateY(-2px); }

/* ---- projects ---- */
.project { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: clamp(1.5rem, 3.5vw, 2.4rem); position: relative; isolation: isolate; overflow: hidden; transition: border-color 0.3s; }
.project + .project { margin-top: 1.2rem; }
.project::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(500px 500px at var(--cx, 50%) var(--cy, 0%), rgba(121, 242, 200, 0.08), transparent 60%);
}
.project:hover { border-color: var(--signal-dim); }
.project:hover::after { opacity: 1; }
.project--flagship { background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.project__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.project__tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); }
.project--flagship .project__tag { color: var(--signal); }
.project__tag--wip { color: #e2b04a; }
.project__tag--wip .status-dot { background: #e2b04a; animation: none; box-shadow: 0 0 8px rgba(226, 176, 74, 0.55); }
.project__title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; margin: 0.5rem 0 0.3rem; }
.project__role { font-size: 0.82rem; color: var(--muted); }
.project__mark { font-family: var(--mono); font-size: clamp(1.4rem, 4vw, 2.2rem); color: var(--signal-dim); opacity: 0.6; }
.project__mark--roll { cursor: pointer; background: none; border: 0; opacity: 1; padding: 0; line-height: 1; min-width: 2.4ch; text-align: right; transition: color 0.2s, transform 0.2s; }
.project__mark--roll:hover { color: var(--signal); transform: rotate(-8deg) scale(1.08); }
.project__mark--roll.is-rolling { color: var(--signal); animation: d20shake 0.4s linear infinite; }
.project__mark--roll.nat20 { color: #ffd24a; text-shadow: 0 0 18px rgba(255, 210, 74, 0.85); }
@keyframes d20shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.project__desc { color: var(--muted); max-width: 70ch; margin-bottom: 1.3rem; }
.project__desc, .project__desc + * { font-size: 0.98rem; }
.project__points { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.6rem; margin-bottom: 1.5rem; }
.project__points li { position: relative; padding-left: 1.4rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.project__points li::before { content: "▸"; position: absolute; left: 0; color: var(--signal); }
.project__points b { color: var(--text); font-weight: 600; }
.project__tags { margin-bottom: 1.6rem; }

/* store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.store {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 1.2rem; border: 1px solid var(--line); border-radius: 12px;
  background: #000; color: #fff; transition: transform 0.18s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.store:hover { transform: translateY(-2px); border-color: var(--signal); box-shadow: 0 8px 26px -10px var(--signal); }
.store__ico { width: 24px; height: 24px; fill: currentColor; }
.store span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 1.05rem; }
.store small { font-weight: 400; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---- timeline ---- */
.timeline { list-style: none; position: relative; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--signal-dim), var(--line) 80%); }
.tl { position: relative; padding: 0 0 2.2rem 2.4rem; }
.tl:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--signal-dim); transition: all 0.3s; }
.tl:hover .tl__dot { border-color: var(--signal); box-shadow: 0 0 14px -2px var(--signal); }
.tl__period { font-size: 0.72rem; color: var(--signal-dim); letter-spacing: 0.04em; }
.tl__role { font-size: clamp(1.1rem, 2.6vw, 1.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.3rem 0 0.2rem; }
.tl__org { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.9rem; }
.tl__list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.tl__list li { position: relative; padding-left: 1.3rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.tl__list li::before { content: "–"; position: absolute; left: 0; color: var(--signal-dim); }

/* ---- contact ---- */
.section--contact { padding-bottom: clamp(4rem, 10vh, 7rem); }
.contact__hi { font-family: var(--mono); font-size: 0.95rem; color: var(--muted); margin-bottom: 0.9rem; }
.contact__hi-k { color: var(--signal-dim); }
.contact__hi b { color: var(--text); font-weight: 700; font-family: var(--disp); font-size: 1.2em; letter-spacing: -0.01em; }
.contact__hi-nick { color: var(--signal); }
.contact__lead { font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; max-width: 24ch; margin-bottom: 2.5rem; line-height: 1.25; }
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.link-card {
  display: flex; flex-direction: column; gap: 0.4rem; text-align: left;
  padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); cursor: pointer; transition: transform 0.22s var(--ease), border-color 0.2s, background 0.2s;
  position: relative; overflow: hidden; isolation: isolate; color: inherit;
}
.link-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(200px 200px at var(--cx, 50%) var(--cy, 50%), rgba(121, 242, 200, 0.12), transparent 65%);
}
.link-card:hover { transform: translateY(-3px); border-color: var(--signal); background: var(--surface-2); }
.link-card:hover::after { opacity: 1; }
.link-card.is-copied { border-color: var(--signal); }
.link-card__k { font-size: 0.7rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.1em; }
.link-card__v { font-size: clamp(0.95rem, 2vw, 1.15rem); font-weight: 600; }
.link-card__arrow { position: absolute; top: 1.2rem; right: 1.4rem; font-family: var(--mono); font-size: 0.7rem; color: var(--signal); }
.link-card--gh { border-color: var(--signal-dim); }
.link-card--gh .link-card__k { color: var(--signal); }

/* ---- footer ---- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem;
  padding: 1.6rem var(--pad); border-top: 1px solid var(--line-soft);
  font-size: 0.72rem; color: var(--muted-2); letter-spacing: 0.04em;
  max-width: var(--maxw); margin: 0 auto;
}
.footer__mid { color: var(--signal-dim); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal 0.7s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 120ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }
.io-hidden { opacity: 0; transform: translateY(26px); }
.io-show { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { order: -1; }
  .portrait { width: min(78vw, 320px); }
  .about { grid-template-columns: 1fr; }
  .profile { position: static; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stackgrid { grid-template-columns: repeat(2, 1fr); }
  .project__points { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
  .stackgrid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .stores { flex-direction: column; }
  .store { justify-content: center; }
  .footer { flex-direction: column; }
}

@media (max-width: 420px) {
  .nav__cta { display: none; } /* keep the language switcher; contact is reachable via hero + section */
}

/* ===================== terminal · palette · boot · CRT · cursor ===================== */

/* custom HUD cursor (additive; OS cursor stays) */
.cursor { position: fixed; top: 0; left: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 1px solid var(--signal); border-radius: 50%; z-index: 120; pointer-events: none; opacity: 0; transition: width .18s var(--ease), height .18s var(--ease), margin .18s var(--ease), background .2s, opacity .3s; }
.cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: var(--signal); }
.cursor--active { width: 42px; height: 42px; margin: -21px 0 0 -21px; background: rgba(121, 242, 200, 0.10); }
.cursor--tap { width: 18px; height: 18px; margin: -9px 0 0 -9px; }

/* on-page terminal */
.term { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 106%); width: min(720px, 94vw); height: min(430px, 72vh); z-index: 80; display: flex; flex-direction: column; background: rgba(10, 12, 15, 0.97); backdrop-filter: blur(14px); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -24px 70px -22px rgba(0, 0, 0, 0.85); font-family: var(--mono); font-size: 13px; color: var(--text); transition: transform .35s var(--ease); }
.term--open { transform: translate(-50%, 0); }
.term__head { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.term__dot { width: 11px; height: 11px; border-radius: 50%; background: #3a3f47; }
.term__dot--r { background: #ff5f56; } .term__dot--y { background: #ffbd2e; } .term__dot--g { background: #27c93f; }
.term__title { margin-left: 8px; color: var(--muted-2); font-size: 11px; letter-spacing: .04em; }
.term__close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.term__close:hover { color: var(--signal); }
.term__body { flex: 1; overflow-y: auto; padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.term__line { line-height: 1.5; }
.term__ps { color: var(--signal); }
.term__dim { color: var(--muted-2); }
.term__err { color: #ff6b6b; }
.term__prompt { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line-soft); }
.term__input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; caret-color: var(--signal); }
.term__dot { position: relative; cursor: pointer; }
.term__dot::after { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; line-height: 1; color: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity .15s; }
.term__head:hover .term__dot--r::after { content: "\00d7"; opacity: 1; }
.term__head:hover .term__dot--y::after { content: "\2013"; opacity: 1; }
.term__head:hover .term__dot--g::after { content: "+"; opacity: 1; }
.term--min { height: auto; }
.term--min .term__body, .term--min .term__prompt { display: none; }
.term--min .term__head { cursor: pointer; }
.term--max { width: min(1000px, 96vw); height: 92vh; }

/* command palette */
.pal { position: fixed; inset: 0; z-index: 85; display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; background: rgba(4, 5, 7, 0.55); backdrop-filter: blur(4px); }
.pal--open { display: flex; }
.pal__box { width: min(560px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); }
.pal__input { width: 100%; padding: 16px 18px; background: none; border: 0; border-bottom: 1px solid var(--line-soft); outline: none; color: var(--text); font-family: var(--disp); font-size: 1.05rem; }
.pal__list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.pal__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.pal__item--active { background: rgba(121, 242, 200, 0.10); }
.pal__label { font-size: .95rem; }
.pal__hint { font-family: var(--mono); font-size: .7rem; color: var(--muted-2); }
.pal__item--active .pal__hint { color: var(--signal); }

/* boot sequence */
.boot { position: fixed; inset: 0; z-index: 90; background: #06070a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot__log { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--signal); max-width: 90vw; }
.boot__skip { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.boot--out { opacity: 0; transition: opacity .5s ease; pointer-events: none; }

/* matrix rain */
.matrix-rain { position: fixed; inset: 0; z-index: 78; pointer-events: none; }

/* CRT / retro terminal mode (toggle) */
.crt { text-shadow: 0 0 1px rgba(121, 242, 200, 0.22); }
.crt::after { content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.crt::before { content: ""; position: fixed; inset: 0; z-index: 201; pointer-events: none; background: radial-gradient(120% 120% at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.5)); animation: crtflicker 6s steps(40) infinite; }
@keyframes crtflicker { 0%, 100% { opacity: .92; } 47% { opacity: .84; } 50% { opacity: 1; } }

/* mobile entry FAB (hidden on desktop; keyboard users use ` and ⌘K) */
.term-fab { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--signal-dim); background: rgba(10, 12, 15, 0.9); backdrop-filter: blur(8px); color: var(--signal); font-family: var(--mono); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 26px -10px rgba(0, 0, 0, 0.7); align-items: center; justify-content: center; }
.term-fab:active { transform: scale(.94); }
@media (pointer: coarse), (max-width: 640px) { .term-fab { display: flex; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal, .io-hidden { opacity: 1; transform: none; }
  .aurora, .netbg__packets { display: none; }
}
