:root {
  color-scheme: dark;
  --bg: #030406;
  --panel: rgba(9, 14, 20, 0.82);
  --panel-strong: rgba(13, 19, 27, 0.96);
  --line: rgba(126, 220, 255, 0.18);
  --line-strong: rgba(126, 220, 255, 0.42);
  --text: #f4f7fb;
  --muted: #a8b3c2;
  --subtle: #687685;
  --cyan: #00d8ff;
  --violet: #8a6cff;
  --green: #66ffae;
  --amber: #ffb14d;
  --max: 82rem;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 6%, rgba(0, 216, 255, 0.13), transparent 34rem),
    radial-gradient(circle at 12% 22%, rgba(138, 108, 255, 0.13), transparent 28rem),
    linear-gradient(180deg, #030406 0%, #05080c 42%, #030406 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(125, 220, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 220, 255, 0.05) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(180deg, transparent, black 10%, black 88%, transparent);
}

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

img,
canvas {
  display: block;
  max-width: 100%;
}

.site-glow {
  position: fixed;
  inset: auto auto 8% 64%;
  z-index: -2;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 216, 255, 0.14), transparent 68%);
  filter: blur(18px);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: min(calc(100% - 32px), var(--max));
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 0;
  background: linear-gradient(180deg, rgba(3, 4, 6, 0.88), rgba(3, 4, 6, 0.46));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.12rem, 1.5vw, 1.38rem);
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow:
    inset 0 0 12px rgba(0, 216, 255, 0.4),
    0 0 20px rgba(0, 216, 255, 0.24);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
  border-color: var(--line);
  background: rgba(126, 220, 255, 0.08);
  outline: none;
}

.section-shell {
  position: relative;
  width: min(calc(100% - 32px), var(--max));
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(76px, 9vh, 120px) 0;
}

.hero {
  --optic-top: clamp(86px, 10vh, 126px);
  --optic-right: -24px;
  --optic-width: clamp(640px, 56vw, 880px);
  --optic-height: clamp(420px, 52vh, 620px);
  --optic-blur-width: clamp(220px, 19vw, 320px);

  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  min-height: clamp(600px, 82svh, 820px);
  align-items: center;
  gap: 32px;
  padding-top: clamp(68px, 8vh, 86px);
  padding-bottom: clamp(62px, 7vh, 84px);
  isolation: isolate;
  overflow: hidden;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}
.hero::before {
  top: var(--optic-top);
  right: calc(var(--optic-right) + var(--optic-width) - var(--optic-blur-width));
  z-index: 1;
  width: var(--optic-blur-width);
  height: var(--optic-height);
  background: linear-gradient(
    90deg,
    rgba(3, 4, 6, 0.42) 0%,
    rgba(3, 4, 6, 0.28) 28%,
    rgba(3, 4, 6, 0.12) 64%,
    transparent 100%
  );
  backdrop-filter: blur(18px);
  filter: blur(8px);
  opacity: 0.62;
  mask-image: linear-gradient(90deg, transparent 0%, black 18%, black 76%, transparent 100%);
}

.hero::after {
  inset: 8% -2% 18% 42%;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 216, 255, 0.065) 18%, rgba(0, 216, 255, 0.085) 58%, transparent 100%),
    radial-gradient(circle at 62% 45%, rgba(0, 216, 255, 0.12), transparent 46%),
    radial-gradient(circle at 82% 52%, rgba(138, 108, 255, 0.1), transparent 42%);
  filter: blur(12px);
  opacity: 0.86;
}

.hero > *:not(.optic-canvas) {
  position: relative;
  z-index: 2;
}

.optic-canvas {
  position: absolute;
  top: var(--optic-top);
  right: var(--optic-right);
  z-index: 0;
  width: var(--optic-width);
  height: var(--optic-height);
  max-width: none;
  opacity: 0.82;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent 0%, black 16%, black 100%);
}

.role,
.section-index {
  margin: 0 0 16px;
  color: var(--cyan);
  font-family: "SF Mono", "Cascadia Code", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 5vw, 5.7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.hero-lede,
.section-heading p {
  max-width: 700px;
  color: #cbd4df;
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  line-height: 1.6;
}

.hero-support {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

.contact-reveal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.contact-toggle,
.contact-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(126, 220, 255, 0.22);
  border-radius: 999px;
  color: #dce6ef;
  background: rgba(8, 14, 20, 0.72);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.contact-toggle {
  padding: 0 16px;
}

.contact-link {
  max-width: min(100%, 360px);
  padding: 0 14px;
  color: var(--cyan);
}

.contact-link svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.contact-link-text {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #dce6ef;
  font-size: 0.78rem;
  line-height: 1.15;
}

.contact-toggle:hover,
.contact-toggle:focus-visible,
.contact-link:hover,
.contact-link:focus-visible {
  border-color: var(--line-strong);
  background: rgba(0, 216, 255, 0.11);
  outline: none;
  transform: translateY(-1px);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-self: end;
}

.hero-metrics article,
.metric-card,
.work-item,
.system-step,
.skill-cloud section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-metrics article {
  min-height: 120px;
  padding: 18px;
}

.hero-metrics strong,
.metric-value {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1;
}

.hero-metrics span,
.metric-card p,
.work-item p,
.work-item dd,
.system-step p,
.skill-cloud p {
  color: var(--muted);
  line-height: 1.55;
}

.section-heading {
  margin-bottom: 34px;
}

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

.metric-card {
  min-height: 230px;
  padding: 22px;
}

.metric-card:nth-child(3n + 1) .metric-value {
  color: var(--cyan);
}

.metric-card:nth-child(3n + 2) .metric-value {
  color: var(--violet);
}

.metric-card:nth-child(3n) .metric-value {
  color: var(--amber);
}

.work-grid {
  display: grid;
  gap: 18px;
}

.work-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 0.22fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 42px);
  overflow: hidden;
  padding: clamp(22px, 3vw, 38px);
}

.work-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  content: "";
  background: linear-gradient(var(--cyan), var(--violet));
}

.work-date {
  color: var(--text);
  font-family: "SF Mono", "Cascadia Code", ui-monospace, monospace;
  font-size: clamp(0.78rem, 0.9vw, 0.92rem);
  line-height: 1.5;
}

.work-copy span {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-family: "SF Mono", "Cascadia Code", ui-monospace, monospace;
  font-size: 0.74rem;
}

.work-copy {
  max-width: 1180px;
}

.work-copy h3 {
  max-width: 860px;
  font-size: clamp(1.25rem, 1.7vw, 2rem);
}

.work-copy p {
  max-width: 860px;
  margin-bottom: 18px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}

.product-list li {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid rgba(126, 220, 255, 0.16);
  border-radius: 8px;
  color: #dce6ef;
  background: rgba(126, 220, 255, 0.055);
  font-size: 0.88rem;
  line-height: 1.25;
}

.work-copy dl {
  display: grid;
  grid-template-columns: minmax(110px, 0.34fr) 1fr;
  gap: 10px 16px;
  max-width: 860px;
  margin: 0;
}

.work-copy dt {
  color: var(--subtle);
  font-family: "SF Mono", "Cascadia Code", ui-monospace, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.work-copy dd {
  margin: 0;
}

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

.system-step {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
}

.system-step span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cyan);
  font-family: "SF Mono", "Cascadia Code", ui-monospace, monospace;
}

.system-step::after {
  position: absolute;
  inset: auto -20% 12px 45%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(0, 216, 255, 0.5), transparent);
  transform: rotate(-12deg);
}

.skill-cloud {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

.skill-cloud section {
  min-height: 220px;
  padding: 20px;
}

.site-footer {
  width: min(calc(100% - 32px), var(--max));
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 0 28px;
  border-top: 1px solid rgba(126, 220, 255, 0.08);
  color: rgba(168, 179, 194, 0.58);
  font-size: 0.68rem;
  line-height: 1.6;
}

.site-footer p {
  max-width: 1180px;
  margin: 0 0 6px;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .work-item,
  .metric-card,
  .system-step {
    transition:
      border-color 180ms ease,
      transform 180ms ease,
      background 180ms ease;
  }

  .work-item:hover,
  .metric-card:hover,
  .system-step:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    background:
      linear-gradient(180deg, rgba(0, 216, 255, 0.055), transparent),
      var(--panel-strong);
  }
}

@media (max-width: 980px) {
  .site-header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    --optic-width: min(112vw, 680px);
    --optic-height: 430px;
    --optic-blur-width: min(58vw, 360px);

    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
  }

  .optic-canvas {
    opacity: 0.44;
  }

  .hero::before {
    opacity: 0.52;
  }

  .hero-metrics,
  .metric-grid,
  .systems-grid,
  .skill-cloud {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  nav {
    gap: 3px;
  }

  nav a {
    padding: 6px 4px;
    font-size: 0.7rem;
  }

  .hero {
    --optic-top: 260px;
    --optic-right: -168px;
    --optic-width: 560px;
    --optic-height: 420px;
    --optic-blur-width: 210px;
  }

  .optic-canvas {
    opacity: 0.22;
  }

  .hero::before {
    opacity: 0.4;
    backdrop-filter: blur(12px);
    filter: blur(6px);
  }

  .contact-reveal {
    margin-top: 20px;
  }

  .section-shell {
    width: min(calc(100% - 32px), var(--max));
    padding: 76px 0;
  }

  h1 {
    font-size: 3.1rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-metrics,
  .metric-grid,
  .systems-grid,
  .skill-cloud {
    grid-template-columns: 1fr;
  }

  .work-item {
    grid-template-columns: 1fr;
  }

  .work-copy dl {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .optic-canvas {
    opacity: 0.38;
  }
}
