:root {
  color-scheme: dark;
  --bg: #050914;
  --panel: #0d1525;
  --panel-2: #111c2f;
  --line: #22324d;
  --text: #eef4ff;
  --muted: #a8b4c8;
  --soft: #7f8ba3;
  --cyan: #45d5ff;
  --green: #7be0b1;
  --amber: #f1b866;
  --coral: #ff7d7d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(69, 213, 255, 0.08), transparent 36%),
    linear-gradient(240deg, rgba(123, 224, 177, 0.06), transparent 42%),
    linear-gradient(180deg, #050914 0%, #07101d 42%, #050914 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 75%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(69, 213, 255, 0.34);
  border-radius: 8px;
  background: #0e1c31;
  color: var(--cyan);
  font-weight: 800;
  box-shadow: 0 0 0 0 rgba(69, 213, 255, 0.24);
  animation: brandSignal 4s var(--ease-out) infinite;
}

.brand strong,
.brand small {
  display: block;
}

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

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(9, 16, 30, 0.82);
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

main {
  overflow: hidden;
}

.hero-section,
.project-band,
.preview-band,
.about-band {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
  min-height: 500px;
  padding: 54px 0 70px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: 3.5rem;
  line-height: 1.05;
}

.hero-text {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.primary-action,
.secondary-action,
.project-actions a,
.project-actions button,
.preview-toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-action {
  padding: 0 18px;
  border: 1px solid rgba(69, 213, 255, 0.72);
  background: var(--cyan);
  color: #04101d;
}

.secondary-action {
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero-metrics {
  display: grid;
  gap: 12px;
}

.hero-dynamic {
  display: grid;
  gap: 12px;
  perspective: 1200px;
}

.console-panel {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(69, 213, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(17, 28, 47, 0.94), rgba(8, 15, 29, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.03) 18px 19px);
  box-shadow: var(--shadow);
  transform: rotateX(var(--panel-rx, 0deg)) rotateY(var(--panel-ry, 0deg));
  transition:
    transform 480ms var(--ease-out),
    border-color 480ms var(--ease-out);
}

.console-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 0%, rgba(69, 213, 255, 0.12) 42%, transparent 62%);
  transform: translateX(-120%);
  animation: consoleSweep 7s var(--ease-out) infinite;
}

.console-panel:hover {
  border-color: rgba(69, 213, 255, 0.38);
}

.console-head,
.console-switcher,
.console-meter,
.console-screen,
.signal-board {
  position: relative;
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.status-pill i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(123, 224, 177, 0.7);
}

.console-screen {
  min-height: 142px;
  margin-top: 28px;
}

.console-label {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.console-screen h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.console-screen p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 7px;
  height: 76px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(3, 10, 20, 0.42);
}

.signal-board span {
  display: block;
  min-height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  opacity: 0.78;
  transform-origin: bottom;
  animation: signalRise 1.8s var(--ease-out) infinite;
}

.signal-board span:nth-child(2) {
  animation-delay: 120ms;
}

.signal-board span:nth-child(3) {
  animation-delay: 240ms;
}

.signal-board span:nth-child(4) {
  animation-delay: 360ms;
}

.signal-board span:nth-child(5) {
  animation-delay: 480ms;
}

.signal-board span:nth-child(6) {
  animation-delay: 600ms;
}

.signal-board span:nth-child(7) {
  animation-delay: 720ms;
}

.signal-board span:nth-child(8) {
  animation-delay: 840ms;
}

.console-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.console-switcher button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    color 240ms var(--ease-out),
    background 240ms var(--ease-out),
    border-color 240ms var(--ease-out);
}

.console-switcher button.active,
.console-switcher button:hover,
.console-switcher button:focus-visible {
  border-color: rgba(69, 213, 255, 0.5);
  background: rgba(69, 213, 255, 0.13);
  color: var(--text);
  outline: none;
}

.console-meter {
  overflow: hidden;
  height: 4px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.console-meter span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber));
  transition: width 620ms var(--ease-out);
}

.metric {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(13, 21, 37, 0.78);
  box-shadow: var(--shadow);
  transition:
    transform 420ms var(--ease-out),
    border-color 420ms var(--ease-out),
    background 420ms var(--ease-out);
}

.metric:hover {
  transform: translateY(-3px);
  border-color: rgba(69, 213, 255, 0.28);
  background: rgba(17, 28, 47, 0.92);
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--soft);
}

.project-band,
.preview-band,
.about-band {
  padding: 74px 0;
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2,
.about-copy h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}

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

.project-card {
  --rx: 0deg;
  --ry: 0deg;
  --reveal-y: 0px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translateY(var(--reveal-y)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition:
    transform 520ms var(--ease-out),
    border-color 420ms var(--ease-out),
    background 420ms var(--ease-out);
}

.project-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.13), transparent);
  opacity: 0;
  transform: translateX(-120%);
  transition: opacity 300ms var(--ease-out);
}

.project-card:hover {
  border-color: rgba(69, 213, 255, 0.32);
  background: var(--panel-2);
}

.project-card:hover::after {
  opacity: 1;
  animation: cardGlint 1.1s var(--ease-out);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #111a2b;
  transition: transform 720ms var(--ease-out), filter 720ms var(--ease-out);
}

.project-card:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.025);
}

.project-body {
  padding: 18px;
}

.project-kicker {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.project-card p:not(.project-kicker) {
  min-height: 70px;
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.project-actions a,
.project-actions button {
  flex: 1 1 110px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.project-actions button {
  color: #06101d;
  background: var(--green);
}

.project-actions a:hover,
.project-actions a:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible,
.preview-toolbar a:hover,
.preview-toolbar a:focus-visible {
  border-color: rgba(69, 213, 255, 0.45);
  background: rgba(69, 213, 255, 0.12);
  outline: none;
}

.project-actions button:hover,
.project-actions button:focus-visible,
.primary-action:hover,
.primary-action:focus-visible {
  filter: brightness(1.04);
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.preview-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #08101f;
  box-shadow: var(--shadow);
  transition:
    border-color 420ms var(--ease-out),
    transform 420ms var(--ease-out);
}

.preview-shell.is-changing {
  border-color: rgba(123, 224, 177, 0.38);
  transform: translateY(-2px);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-toolbar span {
  font-weight: 800;
}

.preview-toolbar a {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.9rem;
}

iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: #050914;
  transition:
    opacity 260ms var(--ease-out),
    filter 260ms var(--ease-out);
}

.preview-shell.is-changing iframe {
  opacity: 0.36;
  filter: blur(5px);
}

[data-reveal] {
  --reveal-y: 28px;
  opacity: 0;
  transition:
    opacity 760ms var(--ease-out),
    transform 760ms var(--ease-out);
}

[data-reveal].is-visible {
  --reveal-y: 0px;
  opacity: 1;
}

.hero-copy[data-reveal],
.hero-dynamic[data-reveal],
.section-head[data-reveal],
.preview-shell[data-reveal],
.about-copy[data-reveal] {
  transform: translateY(var(--reveal-y));
}

.project-card[data-reveal] {
  transform: translateY(var(--reveal-y)) rotateX(var(--rx)) rotateY(var(--ry));
}

.hero-copy[data-reveal].is-visible,
.hero-dynamic[data-reveal].is-visible,
.section-head[data-reveal].is-visible,
.preview-shell[data-reveal].is-visible,
.about-copy[data-reveal].is-visible {
  transform: translateY(0);
}

.about-band {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.about-copy {
  max-width: 760px;
}

.about-copy p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.music-fab {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 30;
}

.music-toggle {
  appearance: none;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(69, 213, 255, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(123, 224, 177, 0.28), transparent 32%),
    linear-gradient(145deg, rgba(16, 29, 50, 0.94), rgba(5, 10, 20, 0.94));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    inset 0 0 18px rgba(69, 213, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    opacity 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

.music-toggle:hover {
  border-color: rgba(123, 224, 177, 0.68);
  box-shadow:
    0 18px 48px rgba(69, 213, 255, 0.2),
    inset 0 0 22px rgba(123, 224, 177, 0.16);
  transform: translateY(-1px);
}

.music-toggle:focus-visible {
  outline: 3px solid rgba(69, 213, 255, 0.38);
  outline-offset: 4px;
}

.music-toggle:disabled {
  cursor: wait;
  opacity: 0.55;
}

.music-disc {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #08101f 0 14%, transparent 15%),
    conic-gradient(from 20deg, var(--cyan), var(--green), var(--amber), var(--cyan));
  box-shadow: 0 0 22px rgba(69, 213, 255, 0.28);
}

.music-note {
  color: #04101b;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.music-toggle.is-playing {
  border-color: rgba(123, 224, 177, 0.72);
}

.music-toggle.is-playing .music-disc {
  animation: musicSpin 3.8s linear infinite;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 44px;
  color: var(--soft);
}

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

@media (max-width: 980px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 58px;
  }

  .hero-dynamic {
    max-width: 100%;
  }

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

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

  .project-card {
    display: grid;
    grid-template-columns: 40% minmax(0, 1fr);
  }

  .project-card img {
    height: 100%;
    min-height: 260px;
  }

  iframe {
    height: 680px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 28px, 1180px);
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .music-fab {
    top: 72px;
    right: 14px;
  }

  .hero-section,
  .project-band,
  .preview-band,
  .about-band,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .hero-copy h1 {
    font-size: 2.25rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .console-panel {
    min-height: 300px;
  }

  .console-switcher {
    grid-template-columns: 1fr;
  }

  .project-card {
    display: block;
  }

  .project-card img {
    min-height: 0;
  }

  .site-footer,
  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-toolbar {
    padding: 14px;
  }

  iframe {
    height: 620px;
  }
}

@keyframes brandSignal {
  0%,
  70%,
  100% {
    box-shadow: 0 0 0 0 rgba(69, 213, 255, 0.22);
  }
  30% {
    box-shadow: 0 0 0 8px rgba(69, 213, 255, 0);
  }
}

@keyframes consoleSweep {
  0%,
  55% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes signalRise {
  0%,
  100% {
    transform: scaleY(0.28);
  }
  45% {
    transform: scaleY(1);
  }
}

@keyframes cardGlint {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

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

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

  [data-reveal] {
    --reveal-y: 0px;
    opacity: 1;
  }

  .music-toggle.is-playing .music-disc {
    animation: none;
  }
}
