:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-soft: #080c12;
  --ink: #f4f7fb;
  --muted: #9aa7b7;
  --muted-strong: #c7d1df;
  --surface: #0c1118;
  --surface-strong: #101821;
  --card: #0e141d;
  --card-hover: #111b26;
  --line: rgba(180, 205, 235, 0.13);
  --line-strong: rgba(120, 190, 255, 0.26);
  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 70px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-padding-top: calc(var(--header-h) + 18px);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 50% -8rem, rgba(56, 189, 248, 0.13), transparent 48rem),
    linear-gradient(180deg, #05070b 0%, #06080d 48%, #05070b 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
  line-height: 1.55;
  margin: 0;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(18px) saturate(145%);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: var(--header-h);
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(18px, 4vw, 44px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.site-header.is-scrolled {
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.24);
}

.brand,
.site-nav,
.header-actions {
  align-items: center;
  display: flex;
}

.brand {
  color: var(--ink);
  font-weight: 760;
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(180deg, #f7fbff, #b9e9ff);
  border-radius: 10px;
  color: #06111c;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.site-nav {
  gap: 4px;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 680;
  padding: 8px 12px;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.028);
  border-color: rgba(180, 205, 235, 0.08);
  color: var(--muted-strong);
}

.header-actions {
  gap: 10px;
}

.menu-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.menu-button span {
  background: currentColor;
  height: 2px;
  width: 16px;
}

.hero,
.metrics,
.section {
  margin: 0 auto;
  max-width: var(--container);
  padding-left: clamp(20px, 4vw, 38px);
  padding-right: clamp(20px, 4vw, 38px);
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.hero {
  position: relative;
  min-height: 72vh;
  padding-bottom: clamp(54px, 8vw, 94px);
  padding-top: calc(var(--header-h) + clamp(72px, 9vw, 118px));
}

.hero-content {
  max-width: 900px;
}

.kicker,
.section-label {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  color: var(--ink);
  font-weight: 820;
  letter-spacing: 0;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.85rem, 5.9vw, 5.6rem);
  line-height: 0.98;
  max-width: 900px;
}

.hero-copy {
  color: var(--muted-strong);
  font-size: clamp(1.12rem, 1.8vw, 1.38rem);
  margin: 34px 0 0;
  max-width: 720px;
}

.availability-badge {
  align-items: center;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0 0 24px;
  padding: 7px 12px;
  text-transform: uppercase;
}

.hero-proof {
  border-left: 2px solid rgba(56, 189, 248, 0.42);
  color: var(--muted-strong);
  font-size: 1rem;
  font-weight: 720;
  margin: 24px 0 0;
  max-width: 680px;
  padding-left: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.scroll-indicator {
  align-items: center;
  bottom: 34px;
  color: color-mix(in srgb, var(--muted) 82%, transparent);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 720;
  gap: 9px;
  position: absolute;
  right: clamp(20px, 4vw, 38px);
}

.scroll-indicator span {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  height: 28px;
  position: relative;
  width: 18px;
}

.scroll-indicator span::after {
  background: var(--accent-strong);
  border-radius: 50%;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  width: 4px;
}

.scroll-indicator em {
  font-style: normal;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: clamp(48px, 7vw, 78px);
}

.metrics article,
.service-grid article,
.project-card,
.stack-grid article,
.about-proof,
.contact-cta {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.055) inset;
  min-width: 0;
  overflow-wrap: break-word;
}

.metrics article {
  min-height: 126px;
  padding: 22px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.metrics article:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.metrics span {
  color: var(--ink);
  display: block;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 840;
  letter-spacing: 0;
  line-height: 1;
}

.metrics p {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  margin: 14px 0 0;
}

.section {
  border-top: 1px solid var(--line);
  padding-bottom: clamp(58px, 8vw, 96px);
  padding-top: clamp(58px, 8vw, 96px);
}

.section-heading {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-heading.compact {
  max-width: 860px;
}

.section h2 {
  font-size: clamp(2rem, 4.4vw, 4.45rem);
  line-height: 1.02;
  max-width: 900px;
}

.service-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-grid article {
  min-height: 220px;
  padding: 24px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.service-grid article:hover,
.stack-grid article:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.service-grid span {
  color: var(--accent);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 26px;
}

.service-grid h3,
.project-content h3,
.project-content h4 {
  color: var(--ink);
  margin: 0;
}

.service-grid h3 {
  font-size: 1.22rem;
  line-height: 1.18;
}

.service-grid p,
.stack-grid p,
.about-copy,
.about-proof p,
.project-content p,
.project-content li {
  color: var(--muted);
  margin: 0;
}

.service-grid p {
  margin-top: 14px;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-card {
  background: linear-gradient(180deg, rgba(12, 19, 29, 0.98), rgba(8, 12, 18, 0.98));
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.project-card.is-open {
  border-color: var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.project-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 22px;
  grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 0.58fr) 34px;
  padding: clamp(22px, 3vw, 30px);
  position: relative;
  text-align: left;
  width: 100%;
}

.project-trigger::before {
  background: linear-gradient(180deg, var(--accent), transparent);
  bottom: 24px;
  content: "";
  left: 0;
  position: absolute;
  top: 24px;
  width: 2px;
}

.project-index {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 820;
}

.project-title-block {
  display: grid;
  gap: 8px;
}

.project-trigger strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.project-trigger em,
.project-impact {
  color: var(--muted);
  font-style: normal;
  font-weight: 620;
}

.project-impact {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.project-trigger::after {
  align-items: center;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-strong);
  content: "+";
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.project-card.is-open .project-trigger::after {
  content: "-";
}

.project-panel {
  display: none;
}

.project-card.is-open .project-panel {
  display: block;
}

.project-content {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(24px, 3vw, 32px);
}

.project-card.is-open .project-content {
  animation: revealProject 220ms ease both;
}

.project-overview,
.diagram-frame {
  grid-column: 1 / -1;
}

.project-content section,
.diagram-frame {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.project-overview h3 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.12;
}

.project-overview p {
  margin-top: 10px;
  max-width: 760px;
}

.project-content h4 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.project-content ul {
  margin: 0;
  padding-left: 18px;
}

.project-content li + li {
  margin-top: 8px;
}

.diagram-frame {
  align-items: center;
  background: #f7fafc;
  display: flex;
  justify-content: center;
  margin: 0;
  min-height: 260px;
  overflow: auto;
}

.diagram-frame img {
  border-radius: 8px;
  display: block;
  max-height: 620px;
  max-width: none;
  object-fit: contain;
  width: min(100%, 1180px);
}

.diagram-placeholder {
  color: var(--muted);
  font-weight: 720;
  text-align: center;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-badges span {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 720;
  padding: 7px 10px;
}

.stack-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-grid article {
  min-height: 150px;
  padding: 22px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.stack-grid span,
.about-proof span {
  color: var(--accent);
  display: block;
  font-weight: 800;
  margin-bottom: 12px;
}

.about-copy {
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  max-width: 820px;
}

.about-proof {
  margin-top: 24px;
  max-width: 820px;
  padding: 22px;
}

.contact-cta {
  align-items: center;
  display: grid;
  gap: clamp(22px, 5vw, 58px);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(24px, 4vw, 36px);
}

.contact-cta span {
  color: var(--accent);
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.contact-cta p {
  color: var(--muted-strong);
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  margin: 0;
  max-width: 700px;
}

.contact-links {
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 760;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:focus-visible,
.menu-button:focus-visible,
.project-trigger:focus-visible,
.site-nav a:focus-visible {
  outline: 4px solid rgba(56, 189, 248, 0.24);
  outline-offset: 3px;
}

.button.primary {
  background: var(--accent);
  color: #03111a;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
  color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--line-strong);
}

.contact-links .button {
  min-height: 52px;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 24px clamp(22px, 5vw, 48px);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 720;
}

@keyframes revealProject {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-nav {
    background: rgba(5, 7, 11, 0.97);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    display: grid;
    gap: 0;
    left: 0;
    padding: 10px 22px 20px;
    position: fixed;
    right: 0;
    top: var(--header-h);
    transform: translateY(calc(-100% - var(--header-h)));
    transition: transform 180ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
  }

  .site-nav a {
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    padding: 14px 0;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    background: transparent;
    border-color: transparent;
    border-bottom-color: var(--line);
    color: var(--accent-strong);
  }

  .menu-button {
    display: inline-flex;
  }

  .metrics,
  .service-grid,
  .stack-grid,
  .project-content,
  .contact-cta {
    grid-template-columns: 1fr;
  }

  .contact-links {
    justify-content: flex-start;
  }

  .project-trigger {
    grid-template-columns: 42px minmax(0, 1fr) 34px;
  }

  .project-impact {
    border-left: 0;
    grid-column: 2 / -1;
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  :root {
    --header-h: 64px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10.5vw, 3.65rem);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .scroll-indicator {
    margin-top: 28px;
    position: static;
  }

  .metrics article {
    min-height: 112px;
  }

  .project-trigger {
    gap: 14px;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 20px;
  }

  .project-trigger::after {
    grid-column: 2;
    justify-self: start;
  }

  .project-impact {
    grid-column: 2;
  }

  .diagram-frame {
    justify-content: flex-start;
    min-height: 190px;
  }

  .diagram-frame img {
    max-height: 360px;
    min-width: 720px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
