/* Anton Kazmirenko: personal site.
   Calm single scroll. Dark-first with electric-blue and orange neon accents (glows, thin lines),
   generous type, short line lengths, big numbers kept for the figures that matter.
   Fonts are self-hosted (latin subset), so nothing is loaded from third parties. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0d1a;
  --surface: #131730;
  --surface-2: #1a1f3d;
  --ink: #f1f3fb;
  --muted: #b6bcd8;
  --hair: #2d3366;
  --neon: #5d6dff;
  --on-neon: #0b0d1a;
  --neon-text: #8e9bff;
  --hot: #ff7a45;
  --on-hot: #0b0d1a;
  --hot-text: #ff9166;
  --glow-a: rgba(93, 109, 255, .28);
  --glow-b: rgba(255, 122, 69, .16);
  --glow: rgba(93, 109, 255, .45);
  --f-head: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5fa; --surface: #ffffff; --surface-2: #e9ecfb; --ink: #12142b; --muted: #4a5072; --hair: #cdd2ea;
    --neon: #2a3df5; --on-neon: #ffffff; --neon-text: #2a3df5; --hot: #ff5a1f; --on-hot: #12142b; --hot-text: #b93a08;
    --glow-a: rgba(42, 61, 245, .14); --glow-b: rgba(255, 90, 31, .10); --glow: rgba(42, 61, 245, .22);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5fa; --surface: #ffffff; --surface-2: #e9ecfb; --ink: #12142b; --muted: #4a5072; --hair: #cdd2ea;
  --neon: #2a3df5; --on-neon: #ffffff; --neon-text: #2a3df5; --hot: #ff5a1f; --on-hot: #12142b; --hot-text: #b93a08;
  --glow-a: rgba(42, 61, 245, .14); --glow-b: rgba(255, 90, 31, .10); --glow: rgba(42, 61, 245, .22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 18px; line-height: 1.65;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--hair); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { font-family: var(--f-head); font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.brand b { color: var(--neon-text); }
.links { display: none; gap: 24px; margin-left: auto; font-size: 15px; font-weight: 500; }
.links a { text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.links a:hover { color: var(--ink); border-bottom-color: var(--neon); }
.tools { display: flex; gap: 8px; margin-left: auto; }
.pill { display: inline-block; font: 500 14px/1.2 var(--f-body); padding: 8px 14px; background: transparent; color: var(--ink); border: 1px solid var(--hair); border-radius: 6px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: var(--neon); }
@media (max-width: 480px) {
  .nav .wrap { gap: 12px; }
  .brand { font-size: 16px; }
  .pill { padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 360px) {
  .brand { font-size: 15px; }
  .pill { padding: 8px 8px; font-size: 12.5px; }
}
@media (min-width: 860px) { .links { display: flex; } .tools { margin-left: 0; } }

/* hero */
.hero {
  background: radial-gradient(60% 90% at 90% 0%, var(--glow-a), transparent 65%),
              radial-gradient(45% 70% at 0% 100%, var(--glow-b), transparent 65%), var(--bg);
  border-bottom: 1px solid var(--hair);
}
.hero-in { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 88px); }
.eyebrow { font-family: var(--f-head); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--neon-text); }
h1 { margin-top: 14px; font-family: var(--f-head); font-weight: 700; font-size: clamp(40px, 7vw, 76px); line-height: 1.05; letter-spacing: -.015em; }
.lede { margin-top: 20px; max-width: 36ch; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.45; color: var(--muted); }
.lede b { color: var(--ink); font-weight: 600; }
.badge { margin-top: 28px; display: inline-block; max-width: 100%; padding: 14px 20px; background: var(--surface); border: 1px solid var(--hair); border-left: 4px solid var(--hot); border-radius: 6px; }
.badge strong { display: block; font-family: var(--f-head); font-size: 19px; }
.badge span { display: block; margin-top: 2px; font-size: 16px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; font: 600 16px var(--f-body); text-decoration: none; padding: 13px 22px; border-radius: 6px; background: var(--neon); color: var(--on-neon); border: 2px solid var(--neon); }
.btn:hover { background: var(--hot); border-color: var(--hot); color: var(--on-hot); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn.ghost:hover { background: transparent; border-color: var(--neon); color: var(--ink); }

.facts { display: grid; gap: 14px; margin-top: 44px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.fact { padding: 18px 20px; background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; box-shadow: inset 0 3px 0 var(--neon); }
.fact b { display: block; font-family: var(--f-head); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--neon-text); text-shadow: 0 0 22px var(--glow); }
.fact span { display: block; margin-top: 6px; font-size: 16px; line-height: 1.4; color: var(--muted); }

/* sections */
.sec { padding-block: clamp(52px, 8vw, 96px); border-bottom: 1px solid var(--hair); }
.sec.alt { background: var(--surface); }
.h2 { margin-top: 10px; font-family: var(--f-head); font-weight: 700; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -.01em; }
.h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 16px; background: var(--neon); box-shadow: 0 0 16px var(--glow); }
.meta { margin-top: 14px; font-size: 16px; color: var(--muted); }
.intro { margin-top: 16px; max-width: 62ch; color: var(--muted); }

/* method steps */
.steps { display: grid; gap: 14px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { padding: 20px 22px; border: 1px solid var(--hair); border-radius: 8px; background: var(--surface); }
.alt .step { background: var(--bg); }
.step h3 { font-family: var(--f-head); font-weight: 700; font-size: 24px; color: var(--neon-text); }
.step p { margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--muted); }

/* cards */
.grid { display: grid; gap: 18px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.alt .card { background: var(--bg); }
.card:hover { border-color: var(--neon); box-shadow: 0 0 26px var(--glow-a); }
.tag { display: inline-block; margin-bottom: 14px; padding: 3px 10px; font-family: var(--f-head); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; background: var(--neon); color: var(--on-neon); border-radius: 4px; }
.tag.o { background: var(--hot); color: var(--on-hot); }
.card h3 { font-family: var(--f-head); font-weight: 700; font-size: 24px; line-height: 1.2; }
.card .org { margin-top: 6px; font-size: 16px; color: var(--muted); }
.card p.txt { margin-top: 12px; font-size: 17px; line-height: 1.6; }

/* stats */
.stats { display: grid; gap: 18px; margin-top: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .stats, .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 26px 26px 28px; background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; box-shadow: inset 0 3px 0 var(--neon); }
.alt .stat { background: var(--bg); }
.stat.o { box-shadow: inset 0 3px 0 var(--hot); }
.big { font-family: var(--f-head); font-weight: 700; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; color: var(--neon-text); text-shadow: 0 0 26px var(--glow); overflow-wrap: anywhere; }
.stat.o .big { color: var(--hot-text); text-shadow: none; }
.cap { margin-top: 10px; font-size: 18px; line-height: 1.5; }

/* timeline */
.legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; font-size: 15px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: block; width: 16px; height: 16px; border-radius: 3px; }
.tl { margin-top: 28px; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 0; border-top: 1px solid var(--hair); }
.tlab h3 { font-family: var(--f-head); font-weight: 600; font-size: 19px; line-height: 1.25; }
.tlab p { margin-top: 2px; font-size: 15px; color: var(--muted); }
.track { position: relative; height: 28px; }
.gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hair); }
.bar { position: absolute; top: 4px; height: 20px; min-width: 14px; border-radius: 3px; }
.b-blue { background: var(--neon); box-shadow: 0 0 14px var(--glow); }
.b-orange { background: var(--hot); }
.b-grey { background: var(--muted); }
.axis { border-top: 0; padding: 0 0 4px; }
.axis-track { position: relative; height: 20px; }
.axis-track span { position: absolute; top: 0; font-size: 13px; color: var(--muted); }
.axis > div:first-child { display: none; }
@media (min-width: 820px) {
  .trow { grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 24px; }
  .axis > div:first-child { display: block; }
}
.sub { margin-top: 56px; font-family: var(--f-head); font-weight: 700; font-size: 26px; }

/* languages */
.langs { margin-top: 28px; max-width: 760px; }
.also { margin-top: 20px; font-size: 17px; color: var(--muted); }
.lang { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--hair); }
.lang:last-child { border-bottom: 1px solid var(--hair); }
.lang h3 { font-family: var(--f-head); font-weight: 600; font-size: 22px; }
.lvl { font-weight: 600; font-size: 16px; text-align: right; color: var(--muted); }
.meter { grid-column: 1 / -1; display: flex; gap: 5px; }
.meter i { display: block; flex: 1; height: 10px; border-radius: 2px; background: var(--hair); }
.meter i.on { background: var(--neon); }
.meter i.on.o { background: var(--hot); }
@media (min-width: 640px) {
  .lang { grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 24px; }
  .meter { grid-column: auto; }
}

/* tools */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { padding: 7px 14px; border: 1px solid var(--hair); border-radius: 6px; font-size: 16px; background: var(--bg); }

/* contact */
.contact { padding-block: clamp(56px, 9vw, 110px); background: radial-gradient(60% 100% at 100% 100%, var(--glow-a), transparent 65%), var(--bg); }
.ask { margin-top: 12px; max-width: 18ch; font-family: var(--f-head); font-weight: 700; font-size: clamp(32px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -.01em; }
.ask em { font-style: normal; color: var(--hot-text); }
.ask-sub { margin-top: 20px; max-width: 52ch; color: var(--muted); }
.reach { display: grid; gap: 12px; margin-top: 32px; max-width: 620px; }
.reach-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 18px; background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; min-width: 0; }
.reach-row span { font-size: 17px; overflow-wrap: anywhere; min-width: 0; user-select: all; }
.reach-row button, .reach-row a { flex: none; font: 600 15px var(--f-body); padding: 9px 16px; border: 0; border-radius: 6px; background: var(--neon); color: var(--on-neon); text-decoration: none; cursor: pointer; }
.reach-row button:hover, .reach-row a:hover { background: var(--hot); color: var(--on-hot); }
@media (max-width: 480px) {
  .reach-row { gap: 10px; padding: 10px 10px 10px 14px; }
  .reach-row span { font-size: 15px; }
  .reach-row button, .reach-row a { padding: 9px 13px; }
}
@media (max-width: 360px) {
  .reach-row span { font-size: 14px; }
}
.foot { padding-block: 28px; font-size: 15px; color: var(--muted); }

/* 404 */
.nf { min-height: 100vh; display: flex; align-items: center; }
.nf .wrap { padding-block: 64px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
