:root {
  color-scheme: dark;
  --bg: #0a0b10;
  --bg-2: #10131d;
  --surface: rgba(16, 19, 29, 0.68);
  --surface-strong: rgba(18, 22, 34, 0.86);
  --text: #f6f8ff;
  --muted: #a8b0c8;
  --soft: #6f7892;
  --cyan: #00f2fe;
  --blue: #4facfe;
  --pink: #ff0844;
  --amber: #ffb199;
  --line: rgba(255, 255, 255, 0.14);
  --line-hot: rgba(0, 242, 254, 0.38);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --glow-cyan: 0 0 28px rgba(0, 242, 254, 0.22);
  --glow-pink: 0 0 32px rgba(255, 8, 68, 0.22);
  --radius: 8px;
  --font-sans: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container: min(1120px, calc(100% - 40px));
  --header-h: 76px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9ff;
  --bg-2: #edf3ff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #101525;
  --muted: #47526d;
  --soft: #69738c;
  --line: rgba(16, 21, 37, 0.12);
  --line-hot: rgba(0, 99, 120, 0.28);
  --shadow: 0 22px 70px rgba(30, 50, 95, 0.16);
  --glow-cyan: 0 0 30px rgba(0, 137, 168, 0.14);
  --glow-pink: 0 0 30px rgba(255, 8, 68, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  font-family: var(--font-sans);
  background:
    linear-gradient(135deg, rgba(0, 242, 254, 0.07), transparent 28%),
    linear-gradient(220deg, rgba(255, 8, 68, 0.08), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  overflow-x: hidden;
}

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

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.08), rgba(255, 8, 68, 0.04), rgba(255, 177, 153, 0.07));
  opacity: 0.36;
  mix-blend-mode: screen;
  z-index: -3;
}

body.nav-open {
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--pink));
  border: 3px solid var(--bg);
  border-radius: 999px;
}

::selection {
  background: rgba(0, 242, 254, 0.28);
  color: var(--text);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img,
svg,
canvas {
  display: block;
}

img {
  max-width: 100%;
}

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

#cursor-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.82;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 14px 0;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  width: var(--container);
  min-height: 48px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.18), rgba(255, 8, 68, 0.15));
  color: var(--text);
  font-weight: 800;
  box-shadow: var(--glow-cyan);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 100;
  pointer-events: auto;
}

.nav-links a,
.theme-toggle,
.nav-toggle,
.filter-btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-links a {
  position: relative;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
}

.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible,
.filter-btn:focus-visible,
.icon-btn:focus-visible,
.social-links a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.nav-links a.active,
.nav-links a:hover,
.theme-toggle:hover,
.filter-btn:hover,
.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-hot);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--glow-cyan);
}

.theme-toggle,
.nav-toggle,
.icon-btn {
  cursor: pointer;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-left: 6px;
  pointer-events: auto;
}

.theme-toggle svg,
.icon-btn svg,
.social-links svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-links svg {
  fill: currentColor;
  stroke: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border-color: var(--line);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
  grid-column: 1;
  grid-row: 1;
  transition: transform 180ms ease;
}

.nav-toggle span:first-child {
  transform: translateY(-5px);
}

.nav-toggle span:last-child {
  transform: translateY(5px);
}

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

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

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

.hero {
  position: relative;
  width: 100%;
  min-height: calc(100svh - var(--header-h));
  padding: 70px max(20px, calc((100% - 1120px) / 2)) 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.78fr);
  gap: 48px;
  align-items: center;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

h1,
h2 {
  max-width: 780px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 {
  font-size: 4.8rem;
  background: linear-gradient(135deg, var(--text) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 3.4rem;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-lede,
.section-heading + p,
.glass-panel p,
.project-card p,
.visualizer-copy p,
.footer p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.hero-lede {
  max-width: 650px;
  margin-top: 24px;
  font-size: 1.2rem;
}

.hero-actions,
.control-row,
.metric-row,
.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

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

.btn:hover,
.project-card:hover,
.social-links a:hover,
.filter-btn:hover,
.icon-btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #061018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-color: transparent;
  box-shadow: var(--glow-cyan);
}

.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.terminal-strip {
  width: min(100%, 560px);
  margin-top: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.terminal-strip strong {
  color: var(--text);
}

.hero-art {
  position: relative;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), var(--glow-pink);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.stats-band {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stats-band article,
.glass-panel,
.project-card,
.visualizer-panel,
.contact-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.stats-band article {
  min-height: 96px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-value {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-heading {
  margin-bottom: 34px;
}

.about-grid,
.arena-grid,
.visualizer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: 22px;
  align-items: stretch;
}

.glass-panel {
  padding: 28px;
}

.glass-panel p + p {
  margin-top: 16px;
}

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

.skill-stack span,
.metric-row span,
.project-topline code,
.project-topline span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 600;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-btn {
  min-height: 40px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
}

.filter-btn.active,
.icon-btn.active {
  color: #061018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  box-shadow: var(--glow-cyan);
}

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

.project-card {
  min-height: 252px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card.is-hidden {
  display: none;
}

.project-card:hover {
  border-color: var(--line-hot);
  box-shadow: var(--shadow), var(--glow-cyan);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-topline code,
.project-topline span {
  min-height: 30px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.project-card a {
  width: fit-content;
  margin-top: auto;
  color: var(--cyan);
  font-weight: 700;
}

.project-card a::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transform-origin: left;
  transform: scaleX(0.3);
  transition: transform 180ms ease;
}

.project-card a:hover::after {
  transform: scaleX(1);
}

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

.arena h3,
.glass-panel h3 {
  margin-bottom: 12px;
}

.metric-row {
  margin-top: 22px;
}

.metric-row span {
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.visualizer-grid {
  grid-template-columns: minmax(260px, 0.56fr) minmax(0, 1fr);
}

.visualizer-copy {
  align-self: center;
}

.control-row {
  margin-top: 22px;
}

.icon-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.visualizer-panel {
  padding: 12px;
  min-height: 420px;
}

#rhythm-canvas {
  width: 100%;
  height: 396px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 242, 254, 0.13), rgba(255, 8, 68, 0.12)),
    rgba(0, 0, 0, 0.16);
  outline: none;
}

#rhythm-canvas:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.36);
}

.contact-shell {
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact-shell h2 {
  max-width: 720px;
  font-size: 4rem;
}

.social-links a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--line-hot);
  box-shadow: var(--glow-cyan);
}

.footer {
  width: var(--container);
  margin: 0 auto;
  padding: 34px 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--cyan);
  font-weight: 700;
}

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

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

@media (max-width: 920px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    left: 20px;
    right: 20px;
    top: 78px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a,
  .theme-toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .theme-toggle {
    margin-left: 0;
    padding-left: 12px;
  }

  .hero-grid,
  .about-grid,
  .visualizer-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3.8rem;
  }

  h2,
  .contact-shell h2 {
    font-size: 2.8rem;
  }

  .hero {
    justify-content: flex-start;
    padding-top: 54px;
  }

  .hero-art {
    max-width: 520px;
  }

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

  .contact-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  #cursor-canvas {
    display: none;
  }

  .section {
    padding: 76px 0;
  }

  .hero {
    min-height: auto;
    padding-bottom: 36px;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-lede {
    font-size: 1.05rem;
  }

  h1 {
    font-size: 2.8rem;
  }

  h2,
  .contact-shell h2 {
    font-size: 2.2rem;
  }

  .stats-band,
  .project-grid,
  .arena-grid,
  .skill-stack {
    grid-template-columns: 1fr;
  }

  .stats-band article {
    min-height: 82px;
  }

  .glass-panel,
  .project-card,
  .contact-shell {
    padding: 22px;
  }

  .visualizer-panel {
    min-height: 330px;
  }

  #rhythm-canvas {
    height: 306px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  #hero-canvas,
  #cursor-canvas {
    display: none;
  }

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