:root {
  --bg: #08090f;
  --bg-soft: #10131d;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7f7fb;
  --muted: #a7adbd;
  --cyan: #39d5ff;
  --green: #85ff9e;
  --rose: #ff4d8d;
  --yellow: #ffd166;
  --radius: 8px;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(57, 213, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(255, 77, 141, 0.15), transparent 25rem),
    linear-gradient(135deg, #08090f 0%, #10131d 52%, #091011 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.noise-canvas,
.cursor-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise-canvas {
  z-index: -2;
  opacity: 0.78;
}

.cursor-light {
  z-index: -1;
  background: radial-gradient(circle 220px at var(--x, 50%) var(--y, 50%), rgba(57, 213, 255, 0.2), transparent 70%);
}

.site-header {
  position: fixed;
  top: 16px;
  left: max(16px, calc((100vw - 1120px) / 2));
  right: max(16px, calc((100vw - 1120px) / 2));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 9, 15, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links a,
.button,
.card-actions a,
.contact-links a,
.site-footer a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #05070b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--panel);
}

.nav-toggle {
  display: none;
}

.section-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 100vh;
  align-items: center;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.74fr);
  gap: clamp(32px, 6vw, 88px);
  padding: 132px 0 68px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(72px, 14vw, 168px);
  line-height: 0.84;
  letter-spacing: 0;
}

.hero-text {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button-primary {
  color: #05070b;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.button-ghost {
  background: var(--panel);
}

.hero-orbit {
  position: relative;
  display: grid;
  min-height: 470px;
  place-items: center;
}

.main-card {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.06), var(--shadow);
  text-align: center;
}

.metric {
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
}

.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.orbit-ring {
  position: absolute;
  width: min(420px, 86vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  animation: spin 22s linear infinite;
}

.orbit-ring::before,
.orbit-ring::after {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  content: "";
}

.orbit-ring::before {
  top: 38px;
  left: 54px;
  background: var(--green);
  box-shadow: 0 0 26px var(--green);
}

.orbit-ring::after {
  right: 28px;
  bottom: 76px;
  background: var(--rose);
  box-shadow: 0 0 26px var(--rose);
}

.orbit-pill {
  position: absolute;
  z-index: 3;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 9, 15, 0.72);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.pill-one { top: 88px; right: 30px; }
.pill-two { bottom: 94px; left: 12px; }
.pill-three { top: 182px; left: 0; }

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 34px;
  padding: 18px 0;
  animation: marquee 28s linear infinite;
}

.marquee span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 112px;
  margin-bottom: 28px;
}

.section-heading h2,
.contact-panel h2,
.redirect-box h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 86px);
  line-height: 0.96;
}

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

.project-card,
.contact-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
}

.project-card {
  display: flex;
  min-height: 275px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.project-card.large {
  grid-column: span 2;
  min-height: 360px;
}

.project-card::before,
.contact-panel::before {
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(57, 213, 255, 0.22), transparent 36%, rgba(255, 209, 102, 0.15));
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card:hover::before,
.contact-panel:hover::before {
  opacity: 1;
}

.project-card > *,
.contact-panel > * {
  position: relative;
  z-index: 1;
}

.project-kicker {
  margin: 0 0 18px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: clamp(25px, 3.2vw, 44px);
  line-height: 1;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.card-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.card-actions a,
.contact-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease;
}

.card-actions a:hover,
.contact-links a:hover,
.button:hover {
  transform: translateY(-2px);
  background: var(--panel-strong);
}

.split-section {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 34px;
  align-items: start;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 112px;
}

.stack-item {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
  text-align: center;
}

.repo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.repo-toolbar input {
  width: min(460px, 100%);
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.repo-count {
  color: var(--muted);
  font-weight: 800;
}

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

.repo-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.repo-card:hover {
  border-color: rgba(57, 213, 255, 0.5);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-4px);
}

.repo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repo-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.08;
}

.repo-lang {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(57, 213, 255, 0.11);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.repo-card p {
  margin: 16px 0 18px;
  color: var(--muted);
  line-height: 1.48;
}

.repo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.repo-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.contact {
  padding: 112px 0 44px;
}

.contact-panel {
  padding: clamp(26px, 6vw, 60px);
}

.contact-panel h2 {
  max-width: 760px;
}

.site-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 30px 0 40px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 620ms ease, transform 620ms ease;
}

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

.redirect-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.redirect-box {
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (max-width: 900px) {
  .nav-toggle {
    position: relative;
    z-index: 31;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
  }

  .nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    transition: transform 180ms ease;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-content: center;
    gap: 16px;
    background: rgba(8, 9, 15, 0.94);
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .nav-links a {
    font-size: 28px;
    text-align: center;
  }

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

  .hero-orbit {
    min-height: 360px;
  }

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

  .project-card.large {
    grid-column: span 2;
  }

  .stack-grid {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .section-shell,
  .site-footer {
    width: min(100% - 20px, 1120px);
  }

  .site-header {
    left: 10px;
    right: 10px;
  }

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

  .hero-actions,
  .repo-toolbar,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .card-actions a,
  .contact-links a {
    width: 100%;
  }

  .featured-grid,
  .repo-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }

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

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

  .pill-three {
    left: 18px;
  }
}

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