:root {
  --bg: #080b14;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.68);
  --card-strong: rgba(17, 24, 39, 0.92);
  --text: #eef2ff;
  --muted: #a5b4fc;
  --muted-2: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #7c3aed;
  --accent-2: #22d3ee;
  --accent-3: #10b981;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 58, 237, 0.28), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.22), transparent 30rem),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.14), transparent 28rem),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: -2;
}

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

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 64%);
  transform: translate(-50%, -50%);
  filter: blur(4px);
  z-index: -1;
  opacity: 0;
  transition: opacity 250ms ease;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 10;
  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='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 11, 20, 0.64);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
}

.brand,
.github-chip,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 0.85rem;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.38);
}

.nav-links {
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.nav-links a,
.github-chip {
  border-radius: 999px;
  padding: 10px 14px;
  transition: 200ms ease;
}

.nav-links a:hover,
.github-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.github-chip {
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
}

.github-chip svg {
  width: 18px;
  fill: currentColor;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 44px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding-top: 56px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(3.25rem, 8vw, 7.4rem);
  line-height: 0.88;
  letter-spacing: -0.095em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 4.5vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.hero-text,
.about-content p,
.contact-section p,
.project-card p {
  color: var(--muted-2);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-text {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

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

.hero-actions.centered {
  justify-content: center;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.2);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.button:hover {
  transform: translateY(-3px);
}

.hero-card,
.project-card,
.contact-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.035));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: conic-gradient(from 180deg, transparent, rgba(34,211,238,0.16), transparent, rgba(124,58,237,0.2), transparent);
  animation: spin 9s linear infinite;
}

.terminal-topbar {
  display: flex;
  gap: 8px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.54);
}

.terminal-topbar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fb7185;
}

.terminal-topbar span:nth-child(2) { background: #fbbf24; }
.terminal-topbar span:nth-child(3) { background: #34d399; }

.terminal-body {
  padding: 28px;
  background: rgba(2, 6, 23, 0.58);
}

.prompt {
  color: var(--accent-3);
  font-family: "JetBrains Mono", monospace;
}

.terminal-body h2 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.muted {
  color: var(--muted);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.status-grid div,
.stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.status-grid span,
.stats span {
  display: block;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.status-grid strong,
.stats strong {
  display: block;
  margin-top: 6px;
}

pre {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 22px;
  color: #a7f3d0;
  background: rgba(8, 11, 20, 0.8);
  overflow: auto;
}

code {
  font-family: "JetBrains Mono", monospace;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
}

.section-heading {
  max-width: 760px;
}

.about-content {
  color: var(--muted-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.stats strong {
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.05em;
}

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

.project-card {
  position: relative;
  min-height: 360px;
  padding: 28px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 240ms ease, border-color 240ms ease;
}

.project-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
}

.card-orb {
  position: absolute;
  right: -54px;
  top: -54px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
  filter: blur(2px);
}

.project-tag {
  display: inline-flex;
  margin-bottom: 90px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  background: rgba(34, 211, 238, 0.07);
}

.project-card a {
  display: inline-flex;
  margin-top: 20px;
  color: #c4b5fd;
  font-weight: 800;
}

.stack-section {
  overflow: hidden;
}

.marquee {
  width: 100%;
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

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

.marquee span {
  flex: 0 0 auto;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
  font-weight: 800;
}

.contact-section {
  padding: 72px 30px;
  text-align: center;
}

.contact-section h2,
.contact-section p {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
}

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

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

.delay-1 { transition-delay: 120ms; }
.delay-2 { transition-delay: 220ms; }

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

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

@media (max-width: 900px) {
  .site-header {
    border-radius: 26px;
  }

  .nav-links {
    display: none;
  }

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

  .hero {
    min-height: auto;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section-shell {
    width: min(100% - 24px, 1180px);
    padding: 72px 0;
  }

  .site-header {
    width: min(100% - 18px, 1180px);
  }

  .brand span:last-child,
  .github-chip span {
    display: none;
  }

  .github-chip {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
  }

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

  .status-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 320px;
  }

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

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