:root {
  --bg: #04060b;
  --bg-2: #0a0f1a;
  --panel: rgba(14, 22, 38, 0.62);
  --line: rgba(120, 255, 230, 0.14);
  --line-strong: rgba(120, 255, 230, 0.35);
  --text: #e8f1ff;
  --muted: #8a97b0;
  --cyan: #3cf2d6;
  --violet: #9b7bff;
  --lime: #d4ff4f;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 60%, #ff6ad5);
  --radius: 18px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }

#field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; pointer-events: none;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(155, 123, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(60, 242, 214, 0.12), transparent 60%);
}
.scanline {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .03;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px);
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 18px;
  background: rgba(6, 10, 18, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; font-family: var(--mono); font-size: 13px;
  background: var(--grad); color: #04060b; font-weight: 700;
}
.brand-name { font-family: var(--mono); font-size: 14px; }
.brand-name b { color: var(--cyan); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  font-size: 14px; color: var(--muted); padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: rgba(255,255,255,0.05); }
.nav .nav-cta { color: #04060b; background: var(--cyan); font-weight: 600; }
.nav .nav-cta:hover { color: #04060b; background: var(--lime); }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary {
  background: var(--cyan); color: #04060b;
  box-shadow: 0 0 0 0 rgba(60, 242, 214, 0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px rgba(60, 242, 214, 0.6); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--violet); background: rgba(155, 123, 255, 0.08); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  width: min(1180px, calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 56px; align-items: center;
  padding: 130px 0 60px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; color: var(--cyan);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  margin-bottom: 28px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.hero h1 { font-size: clamp(42px, 7vw, 88px); font-weight: 800; }
.morph {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block; min-width: 4ch;
}
.morph.out { animation: glitch .35s steps(2) both; }
@keyframes glitch {
  0% { transform: translate(0); filter: none; }
  25% { transform: translate(-3px, 1px) skewX(-8deg); filter: hue-rotate(60deg); }
  50% { transform: translate(3px, -1px); opacity: .5; }
  100% { transform: translate(0); }
}
.outline { color: transparent; -webkit-text-stroke: 1.5px rgba(232, 241, 255, 0.55); }
.lead { margin: 28px 0 36px; font-size: 18px; color: var(--muted); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* HUD */
.hud {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px; padding: 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: 13px;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}
.hud::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(60,242,214,.08), transparent 40%);
}
.hud-head { display: flex; justify-content: space-between; color: var(--cyan); letter-spacing: .1em; }
.hud-clock { color: var(--muted); }
.orbit { position: relative; height: 260px; display: grid; place-items: center; margin: 10px 0; }
.ring {
  position: absolute; border-radius: 50%; border: 1px dashed var(--line-strong);
  animation: spin linear infinite;
}
.ring i {
  position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px var(--cyan);
}
.r1 { width: 110px; height: 110px; animation-duration: 6s; }
.r2 { width: 180px; height: 180px; animation-duration: 11s; animation-direction: reverse; border-style: solid; border-color: rgba(155,123,255,.3); }
.r2 i { background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.r3 { width: 240px; height: 240px; animation-duration: 18s; }
.r3 i { background: var(--lime); box-shadow: 0 0 14px var(--lime); }
@keyframes spin { to { transform: rotate(360deg); } }
.core {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, var(--cyan) 30%, var(--violet) 80%);
  color: #04060b; font-weight: 700;
  box-shadow: 0 0 40px rgba(60, 242, 214, .55), 0 0 90px rgba(155, 123, 255, .35);
}
.hud-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hud-stats li {
  display: flex; flex-direction: column; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.25);
}
.hud-stats span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hud-stats b { font-weight: 500; }
.hud-stats .ok { color: var(--lime); }
.hud-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.06); margin: 14px 0 8px; overflow: hidden; }
.hud-bar span { display: block; height: 100%; width: 40%; background: var(--grad); transition: width .8s ease; }
.hud-foot { color: var(--muted); font-size: 11px; }

/* ---------- ticker ---------- */
.ticker {
  border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track { display: flex; gap: 48px; width: max-content; animation: ticker 40s linear infinite; }
.ticker span { font-family: var(--mono); color: var(--muted); font-size: 15px; white-space: nowrap; }
.ticker span::before { content: "◆ "; color: var(--violet); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 120px 0 40px; }
.section-label {
  font-family: var(--mono); color: var(--muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .2em; margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.section-label span { color: var(--cyan); }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.section-title { font-size: clamp(32px, 4.6vw, 56px); margin-bottom: 48px; max-width: 18ch; }

.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; }
.about h2 { font-size: clamp(28px, 3.6vw, 44px); }
.about-text { display: grid; gap: 18px; color: var(--muted); font-size: 17px; }
.link-arrow { color: var(--cyan); font-family: var(--mono); font-size: 14px; }
.link-arrow:hover { color: var(--lime); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.metric { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.metric b {
  display: block; font-size: clamp(36px, 4vw, 52px); font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric span { color: var(--muted); font-size: 14px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; padding: 28px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .3s, transform .2s;
  transform-style: preserve-3d;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(60,242,214,.14), transparent 60%);
}
.card:hover { border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card-ico {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--line-strong); margin-bottom: 22px;
}
.card-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.tags { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 11px; padding: 4px 9px; border-radius: 6px; background: rgba(155,123,255,.12); color: #c9b8ff; }

/* projects */
.feature {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  padding: 40px; border-radius: 26px; margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    var(--grad) border-box;
  border-color: transparent;
}
.kicker { font-family: var(--mono); font-size: 12px; color: var(--lime); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 14px; }
.feature h3 { font-size: clamp(24px, 2.8vw, 34px); margin-bottom: 18px; }
.feature-copy p { color: var(--muted); }
.feature .meta { margin-top: 18px; font-family: var(--mono); font-size: 13px; }
.feature-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-stats div { padding: 20px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.feature-stats b { display: block; font-size: 28px; color: var(--cyan); }
.feature-stats span { font-size: 13px; color: var(--muted); }

.projects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.project {
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
  transition: transform .25s, border-color .25s;
}
.project:hover { transform: translateY(-4px); border-color: var(--violet); }
.project-id { font-family: var(--mono); font-size: 12px; color: var(--violet); }
.project h3 { font-size: 18px; }
.project p { color: var(--muted); font-size: 14px; flex: 1; }
.project-num { font-family: var(--mono); color: var(--lime); font-size: 14px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 1px solid var(--line-strong); display: grid; gap: 36px; }
.timeline li { position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -34px; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan);
}
.tl-year { font-family: var(--mono); font-size: 13px; color: var(--cyan); padding-top: 3px; }
.timeline h3 { font-size: 20px; margin-bottom: 6px; }
.timeline p { color: var(--muted); }

/* contact */
.contact-box {
  text-align: center; padding: 72px 32px; border-radius: 28px;
  border: 1px solid var(--line); background:
    radial-gradient(600px 300px at 50% 0%, rgba(60,242,214,.12), transparent 70%), var(--panel);
}
.contact-box h2 { font-size: clamp(34px, 5vw, 64px); margin-bottom: 18px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-box p { color: var(--muted); max-width: 52ch; margin: 0 auto 32px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.footer {
  width: min(1180px, calc(100% - 32px)); margin: 80px auto 0; padding: 28px 0 40px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px;
}
.mono { font-family: var(--mono); font-size: 13px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 120px; }
  .about, .feature { grid-template-columns: 1fr; }
  .cards, .projects, .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .menu-btn {
    display: grid; gap: 6px; place-content: center; width: 42px; height: 42px;
    border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer;
  }
  .menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); transition: transform .25s; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 12px;
    background: rgba(6, 10, 18, 0.96); border: 1px solid var(--line); border-radius: 20px;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .nav.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .25s, transform .25s; }
  .nav a { padding: 12px 16px; }
  .cards, .projects { grid-template-columns: 1fr; }
  .feature { padding: 26px 20px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .section { padding-top: 90px; }
  .orbit { height: 220px; }
  .r3 { width: 200px; height: 200px; }
}
@media (max-width: 420px) {
  .metrics, .feature-stats { grid-template-columns: 1fr 1fr; }
  .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
