:root {
  --bg: #0b1a2e;
  --bg-2: #0f2239;
  --surface: #13294a;
  --surface-2: #183259;
  --line: rgba(160, 190, 230, 0.14);
  --text: #e8eef5;
  --muted: #9fb2c8;
  --accent: #3fc1a5;
  --accent-2: #2a9fd6;
  --accent-ink: #052a22;
  --radius: 16px;
  --wrap: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font: 600 1rem/1 var(--font); cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(63, 193, 165, .6); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn--sm { padding: .6em 1.1em; font-size: .92rem; }
.btn--block { width: 100%; }
.btn svg { width: 1.05em; height: 1.05em; }
.ico-fill { fill: currentColor; stroke: none !important; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 26, 46, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(11, 26, 46, .9); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 600 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.brand b { color: var(--accent); font-weight: 700; }
.brand__mark { width: 34px; height: 34px; color: var(--text); }
.brand--sm { font-size: 1.1rem; }
.brand--sm .brand__mark { width: 28px; height: 28px; }
.nav__menu { display: flex; align-items: center; gap: 2rem; font-size: .95rem; }
.nav__menu a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__menu a:not(.btn):hover, .nav__menu a.is-active { color: var(--text); }
.nav__toggle { display: none; }

@media (max-width: 820px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
    background: transparent; cursor: pointer;
  }
  .nav__toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__menu {
    position: absolute; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s, transform .2s;
  }
  .nav__menu.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav__menu a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__menu .btn { margin-top: 16px; }
}

/* Hero */
.hero { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(64px, 10vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(63, 193, 165, .22), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -30% -15%; width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, rgba(42, 159, 214, .16), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .5;
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hl { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 36em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .4em .9em; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; color: var(--muted); background: rgba(19, 41, 74, .6); margin-bottom: 1.6rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(63, 193, 165, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(63, 193, 165, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 193, 165, 0); } }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 2rem 0 2.6rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 12px 40px; list-style: none; margin: 0; padding: 1.6rem 0 0; border-top: 1px solid var(--line); }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font: 700 1.75rem/1.1 var(--display); }
.hero__stats span { font-size: .88rem; color: var(--muted); }

.code {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(24, 50, 89, .85), rgba(15, 34, 57, .9));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transition: transform .6s;
}
.code:hover { transform: none; }
.code__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.code__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c4670; }
.code__bar i:first-child { background: #e76f6f; } .code__bar i:nth-child(2) { background: #e6c15a; } .code__bar i:nth-child(3) { background: var(--accent); }
.code__bar span { margin-left: 10px; font: 500 .8rem var(--mono); color: var(--muted); }
.code pre { margin: 0; padding: 20px 22px 24px; overflow-x: auto; font: 400 .9rem/1.75 var(--mono); color: #c9d6e6; }
.code .k { color: #7cc4fa; } .code .t { color: var(--accent); } .code .s { color: #f2c27b; } .code .c { color: #6c87a8; font-style: italic; }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: text-bottom; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 920px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .code { transform: none; }
}

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section__head p:last-child { color: var(--muted); }
.section__head--left { text-align: left; margin: 0; }
.kicker { font: 500 .82rem var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1rem; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative; padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; transition: transform .3s, border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(63, 193, 165, .14), transparent 45%);
}
.card:hover { transform: translateY(-4px); border-color: rgba(63, 193, 165, .4); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.card__icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px;
  border-radius: 12px; background: rgba(63, 193, 165, .12); color: var(--accent);
}
.card__icon svg, .contact__list svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Expertise */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.split .section__head { position: sticky; top: 110px; }
.split .section__head p:not(.kicker) { color: var(--muted); }
.link-arrow { display: inline-flex; gap: .4em; color: var(--accent); font-weight: 600; margin-top: .5rem; }
.link-arrow span { transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }
.domains { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.domains li {
  display: grid; grid-template-columns: 76px 1fr; gap: 20px; align-items: start;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .3s, background .3s;
}
.domains li:hover { border-color: rgba(63, 193, 165, .4); background: var(--surface-2); }
.domains__n {
  display: grid; place-items: center; height: 52px; border-radius: 12px;
  font: 500 .9rem var(--mono); color: var(--accent); background: rgba(63, 193, 165, .1); border: 1px solid rgba(63, 193, 165, .25);
}
.domains h3 { margin-bottom: .3em; }
.domains p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .section__head { position: static; }
}
@media (max-width: 480px) { .domains li { grid-template-columns: 1fr; gap: 14px; } .domains__n { width: 76px; } }

/* Tech */
.tech { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tech__item { padding: 30px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .3s; }
.tech__item:nth-child(3n) { border-right: 0; }
.tech__item:nth-last-child(-n+3) { border-bottom: 0; }
.tech__item:hover { background: var(--surface); }
.tech__item code { display: inline-block; font: 500 1.15rem var(--mono); color: var(--text); margin-bottom: .6rem; }
.tech__item code::before { content: "> "; color: var(--accent); }
.tech__item p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 860px) {
  .tech { grid-template-columns: 1fr 1fr; }
  .tech__item:nth-child(3n) { border-right: 1px solid var(--line); }
  .tech__item:nth-child(2n) { border-right: 0; }
  .tech__item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .tech__item:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 560px) {
  .tech { grid-template-columns: 1fr; }
  .tech__item, .tech__item:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .tech__item:last-child { border-bottom: 0; }
}

/* Steps */
.steps { list-style: none; margin: 0 0 clamp(48px, 7vw, 80px); padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding-top: 28px; border-top: 2px solid var(--line); }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); }
.steps__n { display: block; font: 700 2.2rem/1 var(--display); color: transparent; -webkit-text-stroke: 1px rgba(63, 193, 165, .7); margin-bottom: 14px; }
.steps p { color: var(--muted); font-size: .97rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why > div { background: var(--surface); padding: 26px 24px; }
.why h3 { color: var(--accent); font-size: 1.05rem; }
.why p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .why { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } }

/* About */
.about { display: grid; grid-template-columns: 320px 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.about__card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 28px; border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.about__avatar {
  display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%; margin-bottom: 20px;
  font: 700 2.2rem var(--display); color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(63, 193, 165, .12), 0 0 0 12px rgba(63, 193, 165, .05);
}
.about__name { font: 600 1.35rem var(--display); margin: 0; }
.about__role { color: var(--muted); margin: .2em 0 1.4em; font-size: .95rem; }
.about__copy p:not(.kicker) { color: var(--muted); }
.about__copy p:first-of-type:not(.kicker) { color: var(--text); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about__card { max-width: 380px; } }

/* Contact */
.contact { background: linear-gradient(180deg, var(--bg), var(--bg-2)); border-top: 1px solid var(--line); }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact__copy > p:not(.kicker) { color: var(--muted); }
.contact__list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 12px; }
.contact__list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .2s;
}
.contact__list li:hover { border-color: rgba(63, 193, 165, .4); }
.contact__list a { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.contact__list a > span { display: flex; flex-direction: column; font-weight: 500; overflow-wrap: anywhere; }
.contact__list small { color: var(--muted); font-size: .78rem; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
.contact__list svg { flex: none; color: var(--accent); }
.copy {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: 500 .8rem var(--font); cursor: pointer; transition: color .2s, border-color .2s;
}
.copy:hover, .copy.is-done { color: var(--accent); border-color: var(--accent); }

.form { padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 8px; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 193, 165, .18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #e76f6f; }
.form__note { margin: 14px 0 0; font-size: .85rem; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .contact__inner { grid-template-columns: 1fr; } }

/* Footer */
.footer { padding: 48px 0 40px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: .9rem; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer .brand { color: var(--text); margin-bottom: 14px; }
.footer__legal { margin: 0; line-height: 1.7; }
.footer__meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.footer__meta a:hover { color: var(--accent); }
.footer__meta p { margin: 8px 0 0; }
@media (max-width: 600px) { .footer__meta { align-items: flex-start; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { 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; }
  .code { transform: none; }
}

/* Grid children must be allowed to shrink below their content width (code block, long e-mails) */
.hero__inner > *, .split > *, .about > *, .contact__inner > * { min-width: 0; }
@media (max-width: 560px) { .code pre { font-size: .74rem; padding: 16px; } }
