:root {
  --bg: #050816;
  --bg-soft: #0b1020;
  --card: #111827;
  --card-strong: #121b32;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --faint: #64748b;
  --border: #1e293b;
  --blue: #38bdf8;
  --blue-strong: #0284c7;
  --green: #22c55e;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    radial-gradient(circle at 75% 20%, rgba(34, 197, 94, 0.1), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  z-index: -2;
  animation: gridDrift 22s linear infinite;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 62%);
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px;
  backdrop-filter: blur(18px);
}

.brand,
.main-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 197, 94, 0.12));
  color: #e0f2fe;
  font-family: "JetBrains Mono", monospace;
}

.main-nav {
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px;
  background: rgba(5, 8, 22, 0.72);
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(56, 189, 248, 0.12);
}

.section-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 96px);
}

.hero-content {
  animation: heroEntry 0.85s ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: #f8fafc;
  font-family: Sora, Inter, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 850px;
  font-size: clamp(3.3rem, 8vw, 6.9rem);
}

h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

h3 {
  font-size: 1.18rem;
}

.hero-lead,
.section-heading p,
.project-card p,
.capability-card p,
.stack-card p,
.timeline-item p,
.contact-section p {
  color: var(--muted);
}

.hero-lead {
  max-width: 780px;
  margin: 28px 0 0;
  font-size: 1.08rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  color: #02111f;
  box-shadow: 0 16px 44px rgba(56, 189, 248, 0.18);
}

.btn-secondary {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.64);
  color: var(--text);
}

.architecture-panel {
  position: relative;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(17, 24, 39, 0.96), rgba(11, 16, 32, 0.94)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 22rem);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panelEntry 0.95s ease both;
}

.architecture-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(56, 189, 248, 0.28), transparent);
  opacity: 0.48;
  animation: borderSweep 5s linear infinite;
  pointer-events: none;
}

.architecture-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.architecture-header span {
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.architecture-header strong {
  color: #f8fafc;
  font-size: 0.94rem;
}

.architecture-canvas {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  overflow: hidden;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  animation: orbitRotate 12s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.85);
}

.orbit-one {
  width: 220px;
  height: 88px;
}

.orbit-two {
  width: 250px;
  height: 110px;
  transform: rotate(58deg);
  animation-duration: 16s;
}

.orbit-three {
  width: 180px;
  height: 180px;
  animation-duration: 20s;
  animation-direction: reverse;
}

.orbit-one::after { left: 22px; top: 8px; }
.orbit-two::after { right: 38px; bottom: 8px; }
.orbit-three::after { right: 26px; top: 18px; }

.core-node {
  position: relative;
  z-index: 2;
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.18), rgba(56, 189, 248, 0.15));
  box-shadow: 0 24px 70px rgba(56, 189, 248, 0.16);
  transform: rotate(45deg);
}

.core-node span,
.core-node strong {
  transform: rotate(-45deg);
  grid-area: 1 / 1;
}

.core-node span {
  margin-top: -20px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.core-node strong {
  margin-top: 22px;
  color: #f8fafc;
}

.pipeline-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 20px 18px;
}

.pipeline-node {
  cursor: pointer;
  padding: 14px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
  color: var(--muted);
  font-family: inherit;
  text-align: left;
  transition: 0.22s ease;
}

.pipeline-node span,
.pipeline-node strong,
.pipeline-node small {
  display: block;
}

.pipeline-node span {
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.pipeline-node strong {
  margin-top: 4px;
  color: #f8fafc;
}

.pipeline-node small {
  margin-top: 2px;
  color: var(--faint);
}

.pipeline-node:hover,
.pipeline-node.is-active {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.12);
  transform: translateY(-3px);
}

.architecture-detail {
  margin: 0 20px 18px;
  padding: 18px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.54);
}

.architecture-detail span,
.architecture-detail strong {
  display: block;
}

.architecture-detail span {
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.architecture-detail strong {
  margin-top: 8px;
  color: #dbeafe;
  line-height: 1.45;
}

.signal-panel {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.signal-panel div {
  display: grid;
  gap: 8px;
}

.signal-panel span {
  color: var(--muted);
  font-size: 0.84rem;
}

.signal-panel i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.signal-panel i::before {
  content: "";
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  animation: signalFill 1.4s ease both;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

.section-heading p:last-child {
  margin-top: 18px;
  font-size: 1rem;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 34px;
  max-width: none;
  align-items: end;
}

.capability-grid,
.project-grid,
.stack-grid,
.engineering-grid {
  display: grid;
  gap: 18px;
}

.capability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.engineering-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.capability-card,
.project-card,
.stack-card,
.timeline-item {
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.interactive-card {
  transform-style: preserve-3d;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.interactive-card:hover {
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.capability-card,
.stack-card {
  padding: 24px;
  border-radius: 22px;
}

.capability-card p,
.stack-card p {
  margin-bottom: 0;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  position: relative;
  min-height: 310px;
  padding: 28px;
  border-radius: var(--radius);
  overflow: hidden;
}

.engineering-card {
  min-height: 430px;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 25%;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.13), transparent 65%);
  pointer-events: none;
}

.project-card.featured {
  grid-column: span 2;
  min-height: 420px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(17, 24, 39, 0.84)),
    rgba(15, 23, 42, 0.7);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-topline a {
  color: #bae6fd;
  text-transform: none;
  letter-spacing: 0;
}

.project-card h3 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.project-card p {
  max-width: 720px;
  margin-top: 18px;
}

.work-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.work-list li {
  position: relative;
  padding-left: 24px;
  color: #cbd5e1;
  font-size: 0.94rem;
}

.work-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.tag-list span,
.school-grid span {
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
  font-size: 0.82rem;
  font-weight: 700;
}

.tag-list span {
  padding: 7px 11px;
}

.approach-section {
  padding-top: 64px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
}

.timeline-item > span {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.timeline-item p {
  margin-bottom: 0;
}

.stack-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.school-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.school-grid span {
  padding: 9px 13px;
  background: rgba(15, 23, 42, 0.66);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.16);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 48px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(34, 197, 94, 0.08)),
    rgba(15, 23, 42, 0.62);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 46px;
  color: var(--faint);
  font-size: 0.92rem;
}

.reveal-card {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
}

.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

@keyframes heroEntry {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelEntry {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes orbitRotate {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes borderSweep {
  0% { transform: translateX(-85%); }
  100% { transform: translateX(85%); }
}

@keyframes signalFill {
  from { width: 0; }
  to { width: var(--level); }
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, 64px 64px; }
}

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

  .main-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .hero,
  .split-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .capability-grid,
  .stack-grid,
  .engineering-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .section-shell {
    padding: 72px 18px;
  }

  .site-header {
    padding: 18px;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4rem);
  }

  .capability-grid,
  .project-grid,
  .stack-grid,
  .pipeline-visual,
  .engineering-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .project-card,
  .engineering-card,
  .project-card.featured {
    min-height: auto;
  }

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

  .contact-actions,
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

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