:root {
  --bg: #07090d;
  --bg-soft: #0b1017;
  --card: rgba(14, 20, 29, .62);
  --card-strong: rgba(15, 22, 32, .82);
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --text: #f4f7fb;
  --muted: #8f9aaa;
  --accent: #7df9ff;
  --accent-2: #8d7dff;
  --success: #78ffa8;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
  --radius: 24px;
  --container: min(1180px, calc(100vw - 40px));
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(125,249,255,.08), transparent 32%),
    radial-gradient(circle at 90% 15%, rgba(141,125,255,.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

::selection {
  background: rgba(125,249,255,.22);
  color: #fff;
}

#network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .52;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .025;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(125,249,255,.09), rgba(141,125,255,.03) 42%, transparent 72%);
  transform: translate(-50%, -50%);
  filter: blur(8px);
  opacity: 0;
  transition: opacity .35s ease;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  width: var(--container);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 11, 16, .62);
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(125,249,255,.33);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(125,249,255,.17), rgba(141,125,255,.08));
  color: var(--accent);
  box-shadow: inset 0 0 20px rgba(125,249,255,.08);
}

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

.nav a {
  position: relative;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  transition: color .2s ease, background .2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,.05);
  outline: none;
}

.top-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b8c5d4;
  font-size: 11px;
  letter-spacing: .14em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 14px rgba(120,255,168,.8);
  animation: statusPulse 2s infinite;
}

.status-dot.small {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(120,255,168,.0), 0 0 14px rgba(120,255,168,.7); }
  50% { box-shadow: 0 0 0 5px rgba(120,255,168,.06), 0 0 22px rgba(120,255,168,.9); }
}

main, .footer {
  position: relative;
  z-index: 2;
}

.section {
  width: var(--container);
  margin: 0 auto;
  padding: 120px 0;
}

.hero {
  min-height: 100svh;
  padding-top: 160px;
  padding-bottom: 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: 62px;
  position: relative;
}

.eyebrow,
.kicker,
.card-kicker,
.project-id,
.meta-label,
.chip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #b6c5d7;
  margin-bottom: 26px;
}

.eyebrow-dot {
  width: 20px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(125,249,255,.8);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.7rem, 7.1vw, 7.8rem);
  line-height: .89;
  letter-spacing: -.065em;
  font-weight: 900;
  max-width: 980px;
}

.accent-text {
  background: linear-gradient(90deg, #f7fbff 0%, #a6faff 44%, #aaa3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(125,249,255,.10));
}

.hero-text {
  max-width: 650px;
  margin: 30px 0 0;
  color: #a5b0bf;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.7;
}

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

.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .05em;
  transition:
    border-color .2s ease,
    background .2s ease,
    color .2s ease,
    transform .15s ease,
    box-shadow .2s ease;
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(135deg, #f7feff, #c7fbff);
  color: #071014;
  border-color: rgba(255,255,255,.6);
  box-shadow: 0 14px 34px rgba(125,249,255,.14);
}

.btn-primary:hover {
  box-shadow: 0 18px 45px rgba(125,249,255,.24);
}

.btn-ghost {
  background: rgba(255,255,255,.035);
  color: #dbe5ef;
}

.btn-ghost:hover {
  border-color: rgba(125,249,255,.3);
  background: rgba(125,249,255,.06);
}

.btn-arrow {
  font-size: 16px;
}

.hero-meta {
  margin-top: 54px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.meta-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #dce4ec;
  font-size: 12px;
}

.meta-label {
  color: #667384;
  font-size: 9px;
}

.live-text { white-space: nowrap; }

.hero-panel {
  display: flex;
  justify-content: center;
}

.orbital-card {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: .88;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.06), transparent 30%),
    linear-gradient(145deg, rgba(13,20,29,.95), rgba(8,12,18,.82));
  box-shadow: var(--shadow), inset 0 0 60px rgba(125,249,255,.025);
  overflow: hidden;
  transform-style: preserve-3d;
}

.orbital-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.orbital-head,
.orbital-grid {
  position: relative;
  z-index: 2;
}

.orbital-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 0;
}

.chip { color: #8f9aaa; }

.signal-bars {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  height: 14px;
}

.signal-bars i {
  display: block;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(125,249,255,.6);
}
.signal-bars i:nth-child(1) { height: 4px; opacity: .45; }
.signal-bars i:nth-child(2) { height: 7px; opacity: .6; }
.signal-bars i:nth-child(3) { height: 10px; opacity: .8; }
.signal-bars i:nth-child(4) { height: 14px; }

.orbital-center {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 250px;
  height: 250px;
  transform: translate(-50%, -57%);
}

.core {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 28px;
  border: 1px solid rgba(125,249,255,.35);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.13), transparent 28%),
    linear-gradient(145deg, rgba(125,249,255,.18), rgba(141,125,255,.12)),
    #0c1219;
  box-shadow:
    0 0 70px rgba(125,249,255,.16),
    inset 0 0 24px rgba(125,249,255,.10);
}

.core span {
  font-size: 42px;
  font-weight: 900;
  color: #dffcff;
  text-shadow: 0 0 22px rgba(125,249,255,.45);
}

.orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px solid rgba(125,249,255,.15);
  border-radius: 50%;
}

.orbit::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  top: 50%;
  left: -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(125,249,255,.9);
}

.orbit-a {
  width: 190px;
  height: 190px;
  margin: -95px;
  animation: orbitSpin 13s linear infinite;
}

.orbit-b {
  width: 246px;
  height: 246px;
  margin: -123px;
  border-color: rgba(141,125,255,.12);
  animation: orbitSpinReverse 19s linear infinite;
}

.orbit-b::before {
  background: var(--accent-2);
  box-shadow: 0 0 16px rgba(141,125,255,.85);
}

@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitSpinReverse { to { transform: rotate(-360deg); } }

.orbital-grid {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  gap: 12px;
}

.orbital-grid div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.orbital-grid small {
  color: #657283;
  font-size: 8px;
  letter-spacing: .15em;
}

.orbital-grid strong {
  font-size: 10px;
  letter-spacing: .07em;
}

.scroll-hint {
  position: absolute;
  left: 0;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #586575;
  font-size: 9px;
  letter-spacing: .2em;
}

.scroll-hint i {
  display: block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, #586575, transparent);
}

.section-head {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: start;
  margin-bottom: 56px;
}

.section-index {
  color: #5d6a79;
  font-size: 11px;
  letter-spacing: .18em;
  padding-top: 8px;
}

.kicker,
.card-kicker {
  color: var(--accent);
  margin: 0 0 12px;
}

.section-head h2,
.contact-panel h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  line-height: .96;
  letter-spacing: -.05em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.45fr .8fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}

.glass-card,
.project-card,
.contact-panel,
.terminal {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), transparent 35%),
    var(--card);
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card {
  border-radius: var(--radius);
  padding: 28px;
}

.glass-card.large {
  grid-row: 1 / span 2;
  padding: 36px;
}

.glass-card h3 {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 3vw, 3.25rem);
  letter-spacing: -.04em;
  line-height: 1;
}

.glass-card p:not(.card-kicker) {
  color: #98a5b5;
  line-height: 1.7;
  max-width: 650px;
}

.card-line {
  height: 1px;
  background: var(--line);
  margin: 34px 0 24px;
}

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

.tags span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #aeb9c7;
  font-size: 10px;
  letter-spacing: .08em;
}

.mini-terminal {
  margin-top: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.20);
  font-family: "SFMono-Regular", Consolas, monospace;
  color: #9faaba;
  font-size: 11px;
}

.prompt { color: var(--accent); }
.mini-terminal strong { color: var(--success); }

.pulse-line {
  position: relative;
  height: 1px;
  background: rgba(255,255,255,.08);
  margin-top: 30px;
  overflow: hidden;
}

.pulse-line::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -30%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan { to { left: 120%; } }

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

.project-card {
  position: relative;
  min-height: 320px;
  padding: 26px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -50px;
  bottom: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125,249,255,.10), transparent 68%);
  opacity: .65;
  transition: transform .35s ease, opacity .35s ease;
}

.project-card:hover::after {
  transform: scale(1.5);
  opacity: 1;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-id { color: #718093; }
.project-icon {
  color: var(--accent);
  font-size: 22px;
}

.project-card h3 {
  margin: auto 0 12px;
  font-size: 2rem;
  letter-spacing: -.035em;
}

.project-card p {
  margin: 0;
  color: #929ead;
  line-height: 1.65;
}

.project-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #647182;
  font-size: 9px;
  letter-spacing: .13em;
}

.stack-marquee {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 24px;
  animation: marquee 26s linear infinite;
  color: #8c98a8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}

.marquee-track i {
  color: rgba(125,249,255,.5);
  font-style: normal;
  font-size: 7px;
}

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

.terminal-wrap {
  margin-top: 46px;
}

.terminal {
  max-width: 920px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
}

.terminal-bar {
  height: 44px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: #667383;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.terminal-bar > :last-child { justify-self: end; }

.terminal-dots {
  display: inline-flex;
  gap: 6px;
}

.terminal-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #3d4651;
}
.terminal-dots i:nth-child(2) { opacity: .7; }
.terminal-dots i:nth-child(3) { opacity: .45; }

.terminal-body {
  min-height: 220px;
  padding: 22px;
  background: rgba(4,7,10,.46);
  color: #9ca8b7;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.8;
}

.terminal-body .prompt {
  color: var(--accent);
  margin-right: 8px;
}

.terminal-line.output { color: #6f7c8b; }
.terminal-line.success { color: #86f7a9; }

.caret {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.contact {
  padding-bottom: 140px;
}

.contact-panel {
  position: relative;
  padding: clamp(34px, 6vw, 72px);
  border-radius: 32px;
  overflow: hidden;
}

.contact-panel::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  right: -180px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125,249,255,.14), rgba(141,125,255,.08) 35%, transparent 70%);
  pointer-events: none;
}

.contact-copy {
  max-width: 600px;
  color: #8f9aaa;
  line-height: 1.7;
  margin: 24px 0 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.footer {
  width: var(--container);
  margin: 0 auto;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  color: #667383;
  font-size: 11px;
}

.footer-brand { color: #bac5d2; }
.footer p { margin: 12px 0 0; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer a {
  color: #9eabb9;
  letter-spacing: .09em;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .75s cubic-bezier(.22,.8,.25,1),
    transform .75s cubic-bezier(.22,.8,.25,1);
}

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

.tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }
  .nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 70px;
    padding-top: 145px;
  }

  .hero-panel { justify-content: flex-start; }
  .orbital-card { width: min(100%, 520px); }

  .about-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .glass-card.large { grid-row: auto; }

  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 260px; }
}

@media (max-width: 640px) {
  :root { --container: min(100% - 28px, 1180px); }

  .topbar {
    top: 10px;
    border-radius: 14px;
    padding: 10px 12px;
  }

  .top-status { font-size: 9px; }

  .section { padding: 86px 0; }

  .hero {
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 70px;
  }

  .hero h1 { font-size: clamp(3rem, 15vw, 5rem); }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .meta-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
  }

  .orbital-card { aspect-ratio: .82; }
  .orbital-center { transform: translate(-50%, -62%) scale(.88); }

  .section-head {
    grid-template-columns: 42px 1fr;
    margin-bottom: 36px;
  }

  .glass-card, .glass-card.large { padding: 24px; }
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right {
    width: 100%;
    justify-content: space-between;
  }

  .cursor-glow { display: none; }
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  #network { display: none; }

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