:root {
  --ground: #0c0824;
  --ground-2: #140d33;
  --wall: #1c1342;
  --ink: #ece6ff;
  --ink-2: #b3a9dc;
  --ink-3: #8a80b8;
  --magenta: #ff3ea5;
  --cyan: #2de2e6;
  --amber: #ffb347;
  --acid: #b6ff3b;
  --tube-off: #3a2f63;
  --display: 'Unbounded', 'Onest', sans-serif;
  --body: 'Onest', system-ui, sans-serif;
  --data: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--magenta);
}
::selection { background: var(--magenta); color: var(--ground); }
html { scrollbar-color: var(--tube-off) var(--ground); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--tube-off); border-radius: 10px; border: 2px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: var(--magenta); }

a { color: var(--cyan); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: #8ff4f6; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 50; background: var(--cyan); color: var(--ground); padding: 0.5rem 1rem; }
.skip:focus { left: 0.5rem; }

/* ---------- top bar ---------- */

.bar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem var(--pad);
  background: linear-gradient(to bottom, rgba(12, 8, 36, 0.92), rgba(12, 8, 36, 0));
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.bar.solid { background: rgba(12, 8, 36, 0.94); border-bottom-color: var(--wall); }
.mono-sign svg {
  width: 2.1rem; height: 2.1rem; display: block;
  fill: none; stroke: var(--magenta); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255, 62, 165, 0.8));
}
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; }
.nav a:hover { color: var(--ink); }
.lang { display: flex; border: 1px solid var(--tube-off); border-radius: 999px; padding: 2px; }
.lang button {
  font: 600 0.78rem var(--data); letter-spacing: 0.06em;
  background: none; border: 0; color: var(--ink-3); padding: 0.3rem 0.7rem; border-radius: 999px; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lang button[aria-pressed="true"] { background: var(--magenta); color: var(--ground); }
.lang button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* ---------- hero ---------- */

.hero { position: relative; min-height: max(100svh, 720px); display: flex; align-items: flex-end; overflow: hidden; }
.city { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner { position: relative; padding: 7rem var(--pad) clamp(3rem, 9vh, 6rem); max-width: 60rem; }
.hero-inner { z-index: 1; }

/* variant: sky. Skyline low, text floats in the empty sky. */
.hero[data-variant="sky"] { align-items: flex-start; }
.hero[data-variant="sky"] .hero-inner { padding-top: clamp(6.5rem, 17vh, 11rem); }
.hero[data-variant="sky"] .sign { font-size: clamp(3rem, 12vw, 7.5rem); }



.sign {
  font: 900 clamp(2.6rem, 10vw, 6rem)/1 var(--display);
  letter-spacing: -0.02em;
  color: var(--tube-off);
}
.sign .tube { display: inline-block; transition: color 0.5s var(--ease), text-shadow 0.5s var(--ease); }
.sign.lit .tube {
  color: #ffe3f3;
  text-shadow: 0 0 2px #fff, 0 0 10px var(--magenta), 0 0 28px var(--magenta), 0 0 60px rgba(255, 62, 165, 0.55);
  animation: ignite 1.1s steps(1, end) both;
  animation-delay: calc(var(--i) * 70ms + 200ms);
}
@keyframes ignite {
  0% { color: var(--tube-off); text-shadow: none; }
  18% { color: #ffe3f3; text-shadow: 0 0 10px var(--magenta); }
  26% { color: var(--tube-off); text-shadow: none; }
  40% { color: #ffe3f3; text-shadow: 0 0 2px #fff, 0 0 10px var(--magenta), 0 0 28px var(--magenta); }
  48% { color: var(--tube-off); text-shadow: none; }
  60%, 100% { color: #ffe3f3; text-shadow: 0 0 2px #fff, 0 0 10px var(--magenta), 0 0 28px var(--magenta), 0 0 60px rgba(255, 62, 165, 0.55); }
}

.role {
  margin-top: 1.1rem;
  font: 500 clamp(1.15rem, 2.6vw, 1.6rem)/1.2 var(--display);
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(45, 226, 230, 0.55);
}
.role .who { color: var(--ink); text-shadow: none; }
.role { display: flex; flex-wrap: wrap; align-items: baseline; }
.role span { white-space: nowrap; }
.role .sep { color: var(--ink-3); margin: 0 0.6em; text-shadow: none; }
.bio { margin-top: 1rem; max-width: 36rem; color: var(--ink); text-shadow: 0 1px 12px var(--ground); font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.route { margin-top: 1.4rem; display: flex; align-items: center; gap: 0.7rem; font: 400 0.85rem var(--data); color: var(--ink-3); }
.route i { width: 2.2rem; height: 1px; background: linear-gradient(90deg, var(--magenta), var(--cyan)); position: relative; }
.route i::after { content: ''; position: absolute; right: -1px; top: -3px; border: 3.5px solid transparent; border-left: 5px solid var(--cyan); }
.route span:last-child { color: var(--amber); }

.links { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.links a {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.6rem 1rem; border-radius: 999px;
  border: 1px solid rgba(45, 226, 230, 0.45); color: var(--ink); text-decoration: none; font-weight: 500;
  background: rgba(12, 8, 36, 0.5);
  transition: border-color 0.25s, box-shadow 0.25s var(--ease), color 0.25s;
}
.links a:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 18px rgba(45, 226, 230, 0.35), inset 0 0 12px rgba(45, 226, 230, 0.15); }
.links svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- sections ---------- */

.block { padding: clamp(4.5rem, 11vw, 8rem) var(--pad) 0; max-width: 78rem; margin: 0 auto; }
.block h2 {
  font: 700 clamp(1.9rem, 5vw, 3.2rem)/1.05 var(--display);
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.lead { color: var(--ink-2); max-width: 40rem; margin-bottom: 2.6rem; }
.lead.wide { max-width: 48rem; }

/* stack: one street per category */
.district { display: grid; gap: 0; border-top: 1px solid var(--wall); }
.street {
  display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr; gap: 1rem 2rem; align-items: baseline;
  padding: 1.05rem 0; border-bottom: 1px solid var(--wall);
}
.street h3 { font: 500 0.95rem var(--body); color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  --c: var(--cyan);
  padding: 0.28rem 0.75rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
  font-size: 0.92rem;
  transition: color 0.2s, box-shadow 0.3s var(--ease), border-color 0.2s, background 0.2s;
}
.tags li:hover {
  color: var(--ground); background: var(--c); border-color: var(--c);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 70%, transparent);
}
.c-magenta .tags li { --c: var(--magenta); }
.c-cyan .tags li { --c: var(--cyan); }
.c-amber .tags li { --c: var(--amber); }
.c-acid .tags li { --c: var(--acid); }

/* monorepo */
.mono-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.6rem; }
.mono-head h2 a { color: var(--ink); text-decoration: none; }
.mono-head h2 a:hover { color: var(--magenta); text-shadow: 0 0 18px rgba(255, 62, 165, 0.6); }
.mono-stats { font: 400 0.85rem var(--data); color: var(--acid); white-space: pre-wrap; }

.pipeline {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  counter-reset: none; margin-bottom: 0.9rem;
}
.pipeline li { position: relative; padding: 1.1rem 1.2rem 1.1rem 0; }
.pipeline li::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--magenta) 0 40%, transparent 40%) 0 0 / 22px 2px repeat-x;
  opacity: 0.85;
  animation: current 1.2s linear infinite;
}
.pipeline li::after {
  content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--ground); border: 2px solid var(--magenta); box-shadow: 0 0 10px var(--magenta);
}
.pipeline li:last-child::before { background: var(--cyan); animation: none; }
.pipeline li:last-child::after { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
@keyframes current { to { background-position: 22px 0; } }
.pipeline b { display: block; font: 600 0.95rem var(--data); color: var(--ink); margin-top: 0.4rem; }
.pipeline span { display: block; font-size: 0.9rem; color: var(--ink-2); }
.note { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 2.6rem; }

.rack { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; margin-bottom: 3rem; }
.host, .edge { display: grid; gap: 0.8rem; align-content: start; }
.host {
  border: 1px solid rgba(255, 179, 71, 0.5); border-radius: 16px; padding: 1.1rem;
  background: rgba(255, 179, 71, 0.04);
}
.host h3 { font: 600 0.85rem var(--data); color: var(--amber); letter-spacing: 0.04em; }
.vm { border-radius: 12px; padding: 0.9rem 1rem; background: var(--ground-2); border: 1px solid var(--wall); }
.vm b { display: block; font: 600 0.92rem var(--data); margin-bottom: 0.25rem; }
.vm span { display: block; color: var(--ink-2); font-size: 0.92rem; }
.vm-ha b { color: var(--cyan); }
.vm-k3s b { color: var(--magenta); }
.vm-vpn b { color: var(--acid); }
.vm-station b { color: var(--amber); }
.vm-phone b { color: var(--acid); }

.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 2.5rem; }
.parts li { border-top: 1px solid var(--wall); padding-top: 1rem; }
.parts h3 { font: 700 1.1rem var(--display); margin-bottom: 0.4rem; }
.parts p { color: var(--ink-2); font-size: 0.97rem; }
.parts small { display: block; margin-top: 0.6rem; font: 400 0.8rem var(--data); color: var(--ink-3); }

/* repositories: storefront plates */
.storefront { display: grid; gap: 0; border-top: 1px solid var(--wall); }
.shop { padding: 1.2rem 0; border-bottom: 1px solid var(--wall); display: grid; gap: 0.35rem; }
.shop-head { display: flex; align-items: center; gap: 0.7rem; }
.shop-name { font: 600 1.15rem var(--data); color: var(--ink); text-decoration: none; }
.shop-name:hover { color: var(--acid); text-shadow: 0 0 14px rgba(182, 255, 59, 0.55); }
.shop p { color: var(--ink-2); }
.shop .shop-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font: 400 0.8rem var(--data); color: var(--ink-3); }
.lang-dot::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acid); margin-right: 0.45rem; box-shadow: 0 0 8px var(--acid); }
.badge { font: 400 0.72rem var(--data); color: var(--amber); border: 1px solid rgba(255, 179, 71, 0.5); border-radius: 999px; padding: 0.05rem 0.5rem; }
.state { padding: 1.2rem 0; color: var(--ink-2); border-bottom: 1px solid var(--wall); }
.state.loading { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.45; } }
.sub { font: 700 1.2rem var(--display); margin: 2.6rem 0 1rem; }

/* hobbies: amber street lamps */
.hobbies { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.4rem 3rem; }
.hobbies li { position: relative; padding-left: 1.6rem; }
.hobbies li::before {
  content: ''; position: absolute; left: 0; top: 0.45rem; width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 6px var(--amber), 0 0 18px rgba(255, 179, 71, 0.6);
}
.hobbies h3 { font: 700 1.1rem var(--display); color: var(--amber); margin-bottom: 0.35rem; }
.hobbies p { color: var(--ink-2); }

/* contact */
.contact { padding-bottom: clamp(4rem, 10vw, 7rem); }
.contact .sign-small {
  font-size: clamp(2.2rem, 7vw, 4.6rem); color: var(--tube-off); transition: color 0.6s var(--ease), text-shadow 0.6s var(--ease);
}
.contact .sign-small.on {
  color: #dcfdff;
  text-shadow: 0 0 2px #fff, 0 0 10px var(--cyan), 0 0 30px var(--cyan), 0 0 60px rgba(45, 226, 230, 0.45);
}
.links.big a { font-size: 1.05rem; padding: 0.8rem 1.25rem; }

.foot { border-top: 1px solid var(--wall); padding: 1.4rem var(--pad); color: var(--ink-3); font: 400 0.8rem var(--data); }
.open { color: var(--acid); text-shadow: 0 0 10px rgba(182, 255, 59, 0.6); }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .street { grid-template-columns: 1fr; gap: 0.6rem; }
  .pipeline { grid-template-columns: 1fr; padding-left: 1.2rem; }
  .pipeline li { padding: 0 0 1.3rem 1.2rem; }
  .pipeline li::before { left: 0; top: 0; bottom: 0; right: auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--magenta) 0 40%, transparent 40%) 0 0 / 2px 22px repeat-y; animation-name: current-v; }
  .pipeline li::after { left: -4px; top: 0.35rem; }
  .pipeline b { margin-top: 0; }
  .rack { grid-template-columns: 1fr; }
}
@keyframes current-v { to { background-position: 0 22px; } }

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