:root {
  --bg: #070b14;
  --bg-alt: #0b1220;
  --card: #0f1829;
  --card-hover: #122038;
  --border: #1c2a44;
  --accent: #2f7cff;
  --accent-strong: #1f66e5;
  --accent-2: #38bdf8;
  --accent-soft: rgba(47, 124, 255, 0.12);
  --glow: 0 0 40px rgba(47, 124, 255, 0.35);
  --text: #eef2fa;
  --muted: #9aa6bd;
  --ok: #86efac;
  --error: #fca5a5;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --container: 1180px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Great Vibes", cursive;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent-strong); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.accent { color: var(--accent); background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.muted { color: var(--muted); }
.icon { display: inline-flex; }
.icon svg { width: 18px; height: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accent-strong); color: #fff; box-shadow: 0 8px 24px rgba(31, 102, 229, .35); }
.btn--primary:hover { background: #1a58c7; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(47, 124, 255, .5); }
.btn--outline { border-color: var(--accent); color: var(--text); background: rgba(47, 124, 255, .06); }
.btn--outline:hover { background: var(--accent-soft); box-shadow: var(--glow); transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* Eyebrow + section headings */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent-2); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--accent); border-radius: 2px; }
.eyebrow::before { display: none; }
.eyebrow--center::before { display: block; }

.section { padding: 88px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__title { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; font-weight: 700; margin-bottom: 18px; }
.section__head { margin-bottom: 44px; }
.section__head--center { text-align: center; }
.section__head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.section__head--row .section__title { margin-bottom: 0; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .25s, transform .25s, box-shadow .25s, background .25s;
}

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(7, 11, 20, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--border); }
.nav.is-open { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(47, 124, 255, .4);
}
.brand__name { text-transform: uppercase; font-size: 15px; letter-spacing: .06em; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a:not(.btn) {
  display: block; padding: 8px 12px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); position: relative; transition: color .2s;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s;
}
.nav__links a:not(.btn):hover, .nav__links a.active { color: var(--text); }
.nav__links a.active { color: var(--accent-2); }
.nav__links a.active::after { transform: scaleX(1); }
.nav__cta-mobile { display: none; }
.nav__toggle { display: none; }

@media (max-width: 1060px) {
  .nav__cta { display: none; }
  .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  }
  .nav__toggle span { height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 24px 16px;
    background: rgba(7, 11, 20, .97); backdrop-filter: blur(14px);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links a:not(.btn) { font-size: 16px; padding: 14px 8px; border-bottom: 1px solid var(--border); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__cta-mobile { display: block; margin-top: 20px; }
  .nav__cta-mobile .btn { width: 100%; }
}

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 72px; overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% 40%, rgba(47, 124, 255, .18), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(56, 189, 248, .08), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(154, 166, 189, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(154, 166, 189, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 45%, #000 20%, transparent 75%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 48px; }
@media (min-width: 901px) and (max-width: 1180px) { .hero__inner { grid-template-columns: 1.35fr 1fr; gap: 32px; } }
.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; margin-bottom: 22px; border-radius: 999px;
  background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .3);
  font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--text);
}
.hero__name { font-size: clamp(42px, 5.2vw, 66px); line-height: 1.04; font-weight: 800; letter-spacing: -.025em; margin-bottom: 12px; }
.hero__role { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 22px; }
.hero__headline { font-size: clamp(20px, 1.9vw, 27px); line-height: 1.32; font-weight: 700; letter-spacing: -.01em; color: var(--text); max-width: 600px; margin-bottom: 14px; text-wrap: balance; }
.hero__tagline { color: var(--muted); font-size: 17px; max-width: 540px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--muted); }
.hero__proof li { display: inline-flex; align-items: center; gap: 8px; }
.hero__proof strong { color: var(--text); font-weight: 700; }
.hero__proof svg { flex: none; width: 16px; height: 16px; color: var(--accent-2); }
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border); color: var(--text); transition: border-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.socials a:hover { border-color: var(--accent); color: var(--accent-2); box-shadow: var(--glow); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

.hero__visual { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.02; max-width: 520px; width: 100%; justify-self: center; }
.hero__photo {
  position: relative; z-index: 2; width: 72%; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  border: 1px solid rgba(56, 189, 248, .35);
  box-shadow: 0 0 0 8px rgba(47, 124, 255, .08), 0 30px 80px rgba(0, 0, 0, .55), 0 0 80px rgba(47, 124, 255, .35);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(7, 11, 20, .55)); }

.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(47, 124, 255, .25); pointer-events: none; }
.orbit--1 { inset: 4%; border-top-color: var(--accent); border-right-color: var(--accent-2); box-shadow: 0 0 40px rgba(47, 124, 255, .15) inset; animation: spin 26s linear infinite; }
.orbit--2 { inset: 14%; border-style: dashed; border-color: rgba(56, 189, 248, .22); animation: spin 40s linear infinite reverse; }
.orbit--1::after { content: ""; position: absolute; top: 12%; right: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 16px var(--accent-2); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__badges { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.badge {
  position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  background: rgba(15, 24, 41, .88); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; font-weight: 500;
  backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: float 6s ease-in-out infinite;
}
.badge--1 { top: 16%; left: 0; }
.badge--2 { top: 8%; right: 2%; animation-delay: -1.5s; }
.badge--3 { bottom: 26%; left: -2%; animation-delay: -3s; }
.badge--4 { bottom: 12%; right: 0; animation-delay: -4.5s; }
.badge--5 { top: 44%; right: -4%; animation-delay: -2.2s; }
.badge--result { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 16px; border-color: rgba(56, 189, 248, .4); }
.badge--result strong {
  font-size: 22px; font-weight: 800; line-height: 1.1;
  background: linear-gradient(90deg, #fff, var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.badge--result span { font-size: 12px; color: var(--muted); }
@keyframes float { 50% { transform: translateY(-10px); } }

.tool-ico {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  font-size: 12px; font-weight: 700; line-height: 1;
}
.tool-ico svg { width: 16px; height: 16px; stroke-width: 2; }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 24px); }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { max-width: 320px; }
  .hero__text { text-align: center; }
  .hero__headline, .hero__tagline { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__proof, .socials { justify-content: center; }
  .eyebrow::before { display: block; }
}
@media (max-width: 480px) {
  .hero__tagline { font-size: 16px; }
  .hero__role { font-size: 12px; letter-spacing: .12em; }
  .hero__proof { flex-direction: column; align-items: center; gap: 8px; }
  .badge { font-size: 12px; padding: 6px 10px 6px 6px; }
  .badge--result { padding: 8px 12px; }
  .badge--result strong { font-size: 18px; }
  .badge--result span { font-size: 11px; }
  .tool-ico { min-width: 26px; height: 26px; font-size: 11px; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* About */
.about { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; }
.about__text p.muted { margin-bottom: 16px; }
.about__text .btn { margin-top: 12px; }

.info-card { padding: 8px 24px; }
.info-row { display: grid; grid-template-columns: 36px 110px 1fr; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-row__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); }
.info-row__icon svg { width: 18px; height: 18px; }
.info-row__label { color: var(--muted); }
.info-row__value { word-break: break-word; }
.info-row__value a:hover { color: var(--accent-2); }
.signature { font-family: var(--font-script); font-size: 46px; color: var(--accent-2); margin-top: 22px; line-height: 1.2; text-shadow: 0 0 24px rgba(56, 189, 248, .35); }

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .info-card { padding: 4px 16px; }
  .info-row { grid-template-columns: 36px 1fr; row-gap: 2px; }
  .info-row__icon { grid-row: span 2; }
  .info-row__label { font-size: 12px; }
}

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.service::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity .25s; }
.card.service:hover { border-color: rgba(47, 124, 255, .55); transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(47, 124, 255, .15); }
.service:hover::before { opacity: 1; }
.service__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(47, 124, 255, .35); color: var(--accent-2); }
.service__icon svg { width: 28px; height: 28px; }
.service h3 { font-size: 18px; font-weight: 600; }
.service p { font-size: 14px; flex: 1; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(4px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(154, 166, 189, .08); border: 1px solid var(--border); color: var(--muted); }

@media (max-width: 960px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

/* Skills */
.expertise { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px; overflow: hidden; }
.skill::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 124, 255, .18), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card.skill:hover { border-color: rgba(47, 124, 255, .55); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.skill:hover::after { opacity: 1; }
.skill__top { display: flex; align-items: center; justify-content: space-between; }
.skill__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid rgba(47, 124, 255, .35); color: var(--accent-2);
}
.skill__icon svg { width: 24px; height: 24px; }
.skill__num { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; color: rgba(154, 166, 189, .5); letter-spacing: .1em; }
.skill h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.skill p { font-size: 14px; flex: 1; }
.skill .chips li { color: var(--text); background: rgba(47, 124, 255, .1); border-color: rgba(47, 124, 255, .3); }
@media (max-width: 960px) { .expertise { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .expertise { grid-template-columns: 1fr; } }

.toolbelt { margin-top: 56px; }
.toolbelt__label {
  text-align: center; margin-bottom: 18px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.toolbelt__viewport {
  overflow: hidden; padding: 6px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.toolbelt__track { list-style: none; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: var(--container); }
.toolbelt__track.is-moving { flex-wrap: nowrap; width: max-content; max-width: none; padding: 0; animation: marquee 55s linear infinite; }
.toolbelt__viewport:hover .toolbelt__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tool {
  flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; margin-right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; transition: border-color .2s;
}
.toolbelt__track.is-moving .tool { margin-right: 12px; }
.toolbelt__track.is-moving { gap: 0; }
.tool:hover { border-color: var(--accent); }
.tool .tool-ico { min-width: 30px; height: 30px; border-radius: 999px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project { overflow: hidden; }
.card.project:hover { border-color: rgba(47, 124, 255, .55); transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(47, 124, 255, .15); }
.project__open { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; position: relative; }
.project__open:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.project__preview {
  aspect-ratio: 400 / 220; background: radial-gradient(400px 200px at 50% 0%, rgba(47, 124, 255, .18), transparent 70%), #0a1120;
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.project__preview img, .project__preview svg { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover .project__preview svg, .project:hover .project__preview img { transform: scale(1.03); }
.project__body { padding: 22px 24px 64px; display: flex; flex-direction: column; gap: 10px; }
.project__categories { display: flex; flex-wrap: wrap; gap: 6px; }
.project__categories li {
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); border: 1px solid var(--border); color: var(--text);
}
.project__client { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.project h3 { font-size: 19px; font-weight: 600; line-height: 1.35; }
.project p.muted { font-size: 14px; }
.project__cta {
  position: absolute; left: 24px; bottom: 20px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text);
}
.project__cta svg { width: 16px; height: 16px; color: var(--accent-2); }

.svg-label { fill: #eef2fa; font: 600 12px var(--font); }
.svg-small { font: 500 10.5px var(--font); }
.flow-line { stroke-dashoffset: 0; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }

@media (max-width: 800px) { .projects { grid-template-columns: 1fr; } }

/* Modal */
.modal {
  width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid var(--border); border-radius: 18px;
  background: var(--bg-alt); color: var(--text); box-shadow: 0 30px 100px rgba(0, 0, 0, .6), 0 0 60px rgba(47, 124, 255, .15);
}
.modal::backdrop { background: rgba(3, 6, 12, .75); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__body { padding: 28px; position: relative; }
.modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.modal__close:hover { border-color: var(--accent); }
.modal__preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 36px 0 22px; background: #0a1120; }
.modal h2 { font-size: clamp(22px, 3vw, 28px); line-height: 1.25; margin: 6px 0 4px; }
.modal__role { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.modal h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); margin: 24px 0 10px; }
.ticks { display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muted); font-size: 15px; }
.ticks svg { width: 20px; height: 20px; color: var(--accent-2); margin-top: 3px; }
.ticks__lead { display: block; margin-bottom: 4px; color: var(--text); font-weight: 600; }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.results li { padding: 14px 16px; background: var(--accent-soft); border: 1px solid rgba(47, 124, 255, .35); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.modal__cta { margin-top: 28px; }
@media (max-width: 480px) { .modal__body { padding: 20px 16px; } .modal__cta { width: 100%; } }

/* Testimonials */
.testimonials { --n: 3; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px * (var(--n) - 1)) / var(--n)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.testimonials::-webkit-scrollbar { display: none; }
.testimonial { position: relative; margin: 0; padding: 30px 28px 26px; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; overflow: hidden; }
.testimonial__mark { position: absolute; top: -14px; right: 18px; font-size: 120px; line-height: 1; font-family: Georgia, serif; color: var(--accent); opacity: .18; pointer-events: none; }
.testimonial blockquote { position: relative; margin: 0; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--text); }
.testimonial blockquote::before { content: ""; display: block; width: 36px; height: 3px; margin-bottom: 18px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.testimonial figcaption img, .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; }
.testimonial figcaption > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.dots { display: flex; justify-content: center; gap: 2px; margin-top: 22px; }
.dots[hidden] { display: none; }
.dots button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; transition: width .2s; }
.dots button::before { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-radius: 5px; background: var(--border); transform: translate(-50%, -50%); transition: background .2s, width .2s; }
.dots button[aria-selected="true"] { width: 36px; }
.dots button[aria-selected="true"]::before { width: 26px; background: var(--accent); }
@media (max-width: 900px) { .testimonials { grid-auto-columns: calc((100% - 24px * (min(var(--n), 2) - 1)) / min(var(--n), 2)); } }
@media (max-width: 600px) { .testimonials { grid-auto-columns: 88%; } }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.4fr .9fr; gap: 28px; align-items: start; }
.contact__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-alt); border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s; font-size: 15px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 124, 255, .2); }
.field [aria-invalid="true"] { border-color: #ef4444; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form__status { font-size: 14px; }
.form__status[data-type="ok"] { color: var(--ok); }
.form__status[data-type="error"] { color: var(--error); }
.contact__info { padding: 8px 20px; }
.contact__info .info-row { grid-template-columns: 36px 1fr; row-gap: 0; }
.contact__info .info-row__icon { grid-row: span 2; }
.contact__info .info-row__label { font-size: 12px; }

@media (max-width: 1060px) {
  .contact { grid-template-columns: 1fr 1fr; }
  .contact__intro { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .contact__form { grid-template-columns: 1fr; padding: 18px; }
  .form__footer .btn { width: 100%; }
}

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer__blurb { font-size: 14px; margin-top: 14px; max-width: 320px; }
.footer__title { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer__links { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.footer__links a:hover { color: var(--accent-2); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.back-top { display: inline-flex; align-items: center; gap: 6px; }
.back-top:hover { color: var(--accent-2); }
.back-top svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* Clients strip */
.clients { border-top: 1px solid var(--border); background: linear-gradient(180deg, rgba(47, 124, 255, .05), transparent); padding: 26px 0; }
.clients__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.clients__label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.clients__list { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; }
.clients__list li { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: rgba(238, 242, 250, .55); transition: color .2s; }
.clients__list li:hover { color: var(--text); }
@media (max-width: 900px) { .clients__inner { justify-content: center; text-align: center; } .clients__list { justify-content: center; gap: 8px 24px; } .clients__list li { font-size: 15px; } }

/* Stats band */
.stats-section {
  position: relative; padding: 64px 0; border-top: 1px solid var(--border); overflow: hidden;
  background: radial-gradient(700px 240px at 50% 0%, rgba(47, 124, 255, .1), transparent 70%), var(--bg);
}
.stats-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(154, 166, 189, .12) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, #000, transparent 30%, transparent 70%, #000);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 30%, transparent 70%, #000);
}
.stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stat { display: flex; flex-direction: column; gap: 10px; padding-left: 22px; border-left: 1px solid var(--border); }
.stat__value {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: clamp(38px, 5vw, 64px); font-weight: 600;
  line-height: 1; letter-spacing: -.03em; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.stat__label {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.stat:hover .stat__value { color: var(--accent-2); text-shadow: 0 0 24px rgba(56, 189, 248, .35); }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } .stat:last-child { grid-column: 1 / -1; } }
@media (max-width: 400px) { .stat { padding-left: 14px; } .stat__label { letter-spacing: .12em; font-size: 11px; } }

/* Process */
.process { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 26px 22px; position: relative; }
.step:hover { border-color: rgba(47, 124, 255, .55); }
.step__num { display: inline-block; font-size: 34px; font-weight: 800; line-height: 1; margin-bottom: 14px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 44px; right: -21px; width: 22px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
@media (max-width: 960px) { .process { grid-template-columns: repeat(2, 1fr); } .step::after { display: none; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

.safeguards { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 24px; padding: 26px; border-color: rgba(47, 124, 255, .35); background: linear-gradient(135deg, rgba(47, 124, 255, .1), var(--card) 60%); }
.safeguards__head { display: flex; gap: 16px; align-items: flex-start; }
.safeguards__icon { display: grid !important; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(47, 124, 255, .35); color: var(--accent-2); }
.safeguards__icon svg { width: 26px; height: 26px; }
.safeguards h3 { font-size: 18px; margin-bottom: 4px; }
.safeguards p { font-size: 14px; }
.safeguards__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.safeguards__list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.safeguards__list svg { flex: none; width: 18px; height: 18px; color: var(--accent-2); }
@media (max-width: 960px) { .safeguards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .safeguards { padding: 20px; } .safeguards__list { grid-template-columns: 1fr 1fr; } }

/* Credentials */
.subhead { font-size: 20px; font-weight: 600; margin: 56px 0 18px; }
.credentials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.credential { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.credential:hover { border-color: rgba(47, 124, 255, .55); }
.credential__icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-2); }
.credential__icon svg { width: 22px; height: 22px; }
.credential > span:last-child { display: flex; flex-direction: column; line-height: 1.4; font-size: 14px; }
.credential strong { font-weight: 600; margin: 2px 0; }
.credential__kind { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
@media (max-width: 1060px) { .credentials { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .credentials { grid-template-columns: 1fr; } }


/* Project media */
.project__preview { position: relative; }
.project__badge {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(7, 11, 20, .8); border: 1px solid rgba(56, 189, 248, .45); color: var(--text); backdrop-filter: blur(6px);
}
.project__badge svg { width: 12px; height: 12px; color: var(--accent-2); }
.gallery { margin: 36px 0 8px; }
.gallery .modal__preview { margin: 0; }
.gallery__stage { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.gallery__stage img, .gallery__stage video { width: 100%; height: 100%; object-fit: contain; background: #05080f; }
.gallery__stage iframe { width: 100%; height: 100%; border: 0; }
.gallery__link { display: grid; justify-items: center; gap: 12px; padding: 20px; text-align: center; }
.gallery__link p { margin: 0; font-size: 14px; color: var(--muted); }
.gallery__external { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: var(--accent-strong); color: #fff; font-weight: 600; }
.gallery__external svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 480px) {
  .gallery__link { padding: 12px; gap: 8px; }
  .gallery__link p { font-size: 13px; }
  .gallery__external { padding: 12px 18px; gap: 8px; font-size: 15px; white-space: nowrap; }
}
.gallery__caption { min-height: 1.2em; margin: 10px 2px 0; font-size: 13px; color: var(--muted); }
.gallery__caption:empty { display: none; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumbs button {
  flex: none; width: 92px; aspect-ratio: 16 / 10; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: #0a1120; border: 2px solid var(--border); opacity: .7; transition: opacity .2s, border-color .2s;
}
.gallery__thumbs button[aria-selected="true"], .gallery__thumbs button:hover { opacity: 1; border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__play { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent-2); }
.gallery__play svg { width: 22px; height: 22px; }

/* Intro loader */
html.is-loading, html.is-loading body { overflow: hidden; }
.loader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background:
    radial-gradient(600px 400px at 50% 40%, rgba(47, 124, 255, .16), transparent 70%),
    var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s cubic-bezier(.77, 0, .18, 1);
  animation: loader-failsafe .6s ease 10s forwards;
}
.loader::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(154, 166, 189, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(154, 166, 189, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 65%);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

.loader__inner {
  position: relative; width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: opacity .45s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.loader.is-done .loader__inner { opacity: 0; transform: translateY(-40px) scale(.97); }

.loader__mark { position: relative; width: 72px; height: 72px; margin-bottom: 40px; }
.loader__mark span {
  position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2)); color: #fff; font-size: 24px; font-weight: 800;
  animation: mark-glow 1.8s ease-in-out infinite;
}
.loader__mark::before, .loader__mark::after { content: ""; position: absolute; border-radius: 50%; }
.loader__mark::before { inset: -18px; border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent-2); animation: spin 1.1s linear infinite; }
.loader__mark::after { inset: -30px; border: 1px dashed rgba(56, 189, 248, .3); animation: spin 6s linear infinite reverse; }
@keyframes mark-glow { 50% { box-shadow: 0 0 40px rgba(47, 124, 255, .6); } }

.loader__title {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase; color: var(--accent-2); display: inline-flex; align-items: center; gap: 6px;
}
.loader__cursor { width: 8px; height: 14px; background: var(--accent-2); animation: blink 1s steps(1) infinite; }
.loader__percent {
  font-size: clamp(64px, 16vw, 96px); font-weight: 800; line-height: 1; letter-spacing: -.03em; margin: 14px 0 22px;
  font-variant-numeric: tabular-nums;
}
.loader__percent #loader-num {
  background: linear-gradient(180deg, #fff, #9cc3ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.loader__sign { font-size: .4em; color: var(--muted); margin-left: 4px; vertical-align: .9em; }
.loader__bar { width: 100%; height: 4px; border-radius: 4px; background: rgba(154, 166, 189, .14); overflow: hidden; }
.loader__bar span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-2)); box-shadow: 0 0 14px rgba(56, 189, 248, .7);
}
.loader__log {
  width: 100%; margin-top: 26px; display: grid; gap: 8px; text-align: left;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted);
}
.loader__log li { display: flex; align-items: center; gap: 10px; opacity: .22; transition: opacity .3s, color .3s; }
.loader__log li.is-active { opacity: 1; }
.loader__log li.is-done { color: var(--text); }
.loader__status { position: relative; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(154, 166, 189, .4); }
.loader__log li.is-active:not(.is-done) .loader__status { border-color: rgba(56, 189, 248, .25); border-top-color: var(--accent-2); animation: spin .7s linear infinite; }
.loader__log li.is-done .loader__status { border-color: #22c55e; background: #22c55e; }
.loader__log li.is-done .loader__status::after {
  content: ""; position: absolute; left: 4px; top: 1.5px; width: 3px; height: 6px;
  border: solid #07140c; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}

/* Hero entrance after the loader */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.9); } }
@keyframes drop { from { opacity: 0; transform: translateY(-100%); } }
.is-ready .nav { animation: drop .7s cubic-bezier(.2, .8, .2, 1) .35s backwards; }
.is-ready .hero__text > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.is-ready .hero__text > :nth-child(1) { animation-delay: .35s; }
.is-ready .hero__text > :nth-child(2) { animation-delay: .45s; }
.is-ready .hero__text > :nth-child(3) { animation-delay: .55s; }
.is-ready .hero__text > :nth-child(4) { animation-delay: .65s; }
.is-ready .hero__text > :nth-child(5) { animation-delay: .75s; }
.is-ready .hero__text > :nth-child(6) { animation-delay: .85s; }
.is-ready .hero__text > :nth-child(7) { animation-delay: .95s; }
.is-ready .hero__visual { animation: zoom-in 1.2s cubic-bezier(.2, .8, .2, 1) .3s both; }

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

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