:root {
  --bg: #0d0d0d;
  --panel: rgba(10, 18, 32, 0.78);
  --panel-strong: rgba(13, 28, 52, 0.92);
  --yinmn: #2e5090;
  --electric: #00aeef;
  --cyan: #00ffff;
  --purple: #aa00ff;
  --white: #ffffff;
  --muted: #b8d9f7;
  --line: rgba(0, 255, 255, 0.24);
  --shadow: 0 0 24px rgba(0, 174, 239, 0.26);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--cyan) #07111f;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--white);
  background: var(--bg);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 20% 15%, rgba(0, 174, 239, 0.2), transparent 24rem),
    radial-gradient(circle at 80% 10%, rgba(170, 0, 255, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(46, 80, 144, 0.16), transparent 42%);
}

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

body::-webkit-scrollbar-track {
  background: #07111f;
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--electric), var(--purple));
  border: 3px solid #07111f;
  border-radius: 999px;
}

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

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

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: -5;
  width: 100%;
  height: 100%;
  background: #070707;
}

.particle-field,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.particle-field {
  z-index: -4;
  background-image:
    radial-gradient(circle, rgba(0, 255, 255, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(0, 174, 239, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(170, 0, 255, 0.45) 0 1px, transparent 2px);
  background-position: 10% 20%, 70% 30%, 45% 80%;
  background-size: 130px 130px, 190px 190px, 250px 250px;
  animation: particleDrift 18s linear infinite;
  opacity: 0.42;
}

.scanlines {
  z-index: 30;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.os-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.brand-chip,
.site-nav a,
.quick-actions a,
.social-button {
  position: relative;
  overflow: hidden;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(0, 255, 255, 0.35);
  border-radius: var(--radius);
  color: var(--cyan);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  background: rgba(0, 174, 239, 0.08);
  box-shadow: var(--shadow);
}

.brand-pulse {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(0, 255, 255, 0.45);
  border-radius: var(--radius);
  color: var(--white);
  background: rgba(0, 174, 239, 0.12);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  width: 20px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.site-nav {
  position: fixed;
  top: 66px;
  left: 1rem;
  right: 1rem;
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 12, 22, 0.96);
  box-shadow: var(--shadow);
  transform: translateY(-1rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.site-nav a {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(46, 80, 144, 0.55);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(46, 80, 144, 0.13);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--white);
  border-color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(0, 255, 255, 0.13), 0 0 18px rgba(0, 255, 255, 0.18);
}

.os-shell {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.section-panel {
  position: relative;
  min-height: 80vh;
  margin: 1.25rem 0 2rem;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.08), transparent 42%),
    rgba(4, 8, 15, 0.74);
  box-shadow: 0 0 0 1px rgba(0, 174, 239, 0.06), var(--shadow);
  backdrop-filter: blur(8px);
}

.section-panel::before,
.hud-card::before,
.project-card::before,
.achievement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--cyan), transparent 24%) top left / 46% 1px no-repeat,
    linear-gradient(90deg, transparent, var(--purple)) bottom right / 46% 1px no-repeat,
    linear-gradient(var(--cyan), transparent 36%) top left / 1px 46% no-repeat,
    linear-gradient(transparent, var(--purple)) bottom right / 1px 46% no-repeat;
}

.hero-section {
  padding-top: clamp(1.5rem, 5vw, 3rem);
}

.hero-grid,
.split-layout,
.now-grid {
  display: grid;
  gap: 1.25rem;
}

.hero-copy {
  display: grid;
  align-content: center;
}

.system-kicker,
.panel-label,
.project-type {
  color: var(--cyan);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.glitch-title {
  position: relative;
  max-width: 100%;
  margin: 0.2rem 0 0.9rem;
  color: var(--white);
  font-family: Orbitron, Inter, sans-serif;
  font-size: clamp(1.85rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: normal;
  text-shadow:
    0 0 14px rgba(0, 255, 255, 0.85),
    0 0 36px rgba(0, 174, 239, 0.55),
    2px 0 rgba(170, 0, 255, 0.7);
  cursor: pointer;
  animation: titleGlow 3.2s ease-in-out infinite;
}

.glitch-title::after {
  content: attr(data-easter-title);
  position: absolute;
  inset: 0;
  color: rgba(170, 0, 255, 0.45);
  transform: translate(2px, 0);
  clip-path: inset(52% 0 22% 0);
  animation: glitchSlice 2.8s steps(2, end) infinite;
}

.online-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.online-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #4dff88;
  box-shadow: 0 0 18px #4dff88;
}

.status-message {
  color: var(--cyan);
}

.hero-text,
.section-heading p,
.hud-card p,
.project-card p,
.achievement-card p,
.social-button small {
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  margin: 1.25rem 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
}

.quick-actions,
.genre-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-actions a,
.genre-bar span {
  min-height: 44px;
  padding: 0.72rem 0.95rem;
  border: 1px solid rgba(0, 255, 255, 0.36);
  border-radius: var(--radius);
  color: var(--white);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.24), rgba(170, 0, 255, 0.12));
  box-shadow: inset 0 0 18px rgba(0, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.quick-actions a:hover,
.social-button:hover,
.project-card:hover,
.achievement-card:hover,
.hud-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 0 28px rgba(0, 255, 255, 0.22);
}

.profile-core {
  display: grid;
  gap: 1rem;
  place-items: center;
}

.profile-rings {
  position: relative;
  display: grid;
  place-items: center;
  width: min(72vw, 310px);
  aspect-ratio: 1;
}

.ring,
.avatar-core {
  position: absolute;
  border-radius: 50%;
}

.ring {
  border: 1px solid rgba(0, 255, 255, 0.45);
}

.ring-one {
  inset: 0;
  border-top-color: var(--purple);
  animation: rotateClockwise 12s linear infinite;
}

.ring-two {
  inset: 10%;
  border-right-color: var(--electric);
  animation: rotateCounter 8s linear infinite;
}

.ring-three {
  inset: 20%;
  border-bottom-color: var(--cyan);
  animation: rotateClockwise 5s linear infinite;
}

.avatar-core {
  inset: 30%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background:
    radial-gradient(circle, rgba(0, 255, 255, 0.22), transparent 62%),
    linear-gradient(135deg, rgba(46, 80, 144, 0.62), rgba(170, 0, 255, 0.22));
  box-shadow: inset 0 0 30px rgba(0, 255, 255, 0.2), 0 0 26px rgba(0, 174, 239, 0.3);
}

.avatar-core span {
  font-family: Orbitron, Inter, sans-serif;
  font-size: clamp(1.5rem, 7vw, 2.7rem);
  font-weight: 900;
}

.player-card,
.hud-card,
.project-card,
.achievement-card,
.social-button {
  position: relative;
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.player-card {
  width: 100%;
  padding: 1rem;
}

.dashboard-grid,
.info-grid,
.project-grid,
.achievement-grid,
.gallery-grid,
.social-grid,
.mini-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-grid {
  margin-top: 1.25rem;
}

.hud-card,
.project-card,
.achievement-card {
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.feature-card {
  background: var(--panel-strong);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.25rem;
}

.section-heading h2,
.hud-card h2,
.player-card h2,
.hud-card h3,
.project-card h3,
.achievement-card h3 {
  margin: 0.25rem 0 0.5rem;
  color: var(--white);
  font-family: Orbitron, Inter, sans-serif;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 8vw, 3.2rem);
}

.system-list {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 0.75rem 0 0;
  color: var(--muted);
  list-style: none;
}

.system-list li {
  position: relative;
  padding-left: 1.1rem;
}

.system-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--cyan);
}

.genre-bar {
  margin-top: 1rem;
}

.genre-bar span {
  display: inline-flex;
  align-items: center;
}

.project-card {
  min-height: 220px;
  background:
    linear-gradient(160deg, rgba(0, 174, 239, 0.12), transparent 44%),
    var(--panel);
}

.project-type {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0, 255, 255, 0.28);
  border-radius: 999px;
}

.achievement-card {
  display: grid;
  gap: 0.4rem;
}

.badge-icon {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 255, 255, 0.46);
  border-radius: 50%;
  color: var(--cyan);
  font-family: Orbitron, Inter, sans-serif;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(0, 255, 255, 0.16), 0 0 20px rgba(0, 174, 239, 0.2);
}

.achievement-card.unlocked .badge-icon {
  color: var(--white);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.25), rgba(170, 0, 255, 0.2));
}

.gallery-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), transparent 46%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 12px),
    rgba(9, 19, 34, 0.78);
  overflow: hidden;
}

.gallery-slot::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(0, 255, 255, 0.26);
}

.gallery-slot span {
  z-index: 1;
  color: var(--muted);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.social-button {
  display: grid;
  gap: 0.4rem;
  min-height: 96px;
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.social-button span {
  color: var(--white);
  font-family: Orbitron, Inter, sans-serif;
  font-weight: 800;
}

.social-button::after,
.quick-actions a::after,
.site-nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
  transition: transform 420ms ease;
}

.social-button:hover::after,
.quick-actions a:hover::after,
.site-nav a:hover::after {
  transform: translateX(120%);
}

.easter-egg {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 60;
  width: min(92vw, 520px);
  padding: 1rem;
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  color: var(--white);
  text-align: center;
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  background: rgba(5, 12, 24, 0.95);
  box-shadow: 0 0 36px rgba(0, 255, 255, 0.32);
  transform: translate(-50%, 140%);
  transition: transform 240ms ease;
}

.easter-egg.is-visible {
  transform: translate(-50%, 0);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.75rem;
}

.site-footer a {
  color: var(--cyan);
}

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

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

.click-spark {
  position: fixed;
  z-index: 70;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan), 0 0 28px var(--electric);
  animation: sparkPop 620ms ease-out forwards;
}

@media (min-width: 720px) {
  .dashboard-grid,
  .info-grid,
  .project-grid,
  .achievement-grid,
  .social-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-grid,
  .split-layout,
  .now-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    align-items: center;
  }
}

@media (min-width: 1020px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.55rem 0.65rem;
    font-size: 0.66rem;
  }

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

  .project-grid,
  .achievement-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .now-grid {
    grid-template-columns: 1.25fr 0.85fr 0.85fr;
  }
}

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

@keyframes particleDrift {
  from {
    background-position: 10% 20%, 70% 30%, 45% 80%;
  }
  to {
    background-position: 20% 80%, 60% 5%, 55% 20%;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes titleGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(0, 255, 255, 0));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(0, 255, 255, 0.62));
  }
}

@keyframes glitchSlice {
  0%,
  88%,
  100% {
    transform: translate(2px, 0);
  }
  90% {
    transform: translate(-3px, 2px);
  }
  94% {
    transform: translate(4px, -2px);
  }
}

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

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

@keyframes sparkPop {
  to {
    transform: translate(var(--spark-x), var(--spark-y)) scale(0);
    opacity: 0;
  }
}
