:root {
  --bg: #07111d;
  --bg-soft: #0f1d30;
  --panel: rgba(11, 22, 37, 0.7);
  --panel-strong: rgba(18, 33, 54, 0.88);
  --panel-light: rgba(27, 46, 73, 0.74);
  --text: #edf2f7;
  --muted: #8ea2b8;
  --line: rgba(179, 209, 255, 0.14);
  --accent: #ff7b57;
  --accent-soft: rgba(255, 123, 87, 0.18);
  --secondary: #63e6be;
  --tertiary: #90b4ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1180px;
  --display: "Iowan Old Style", "Baskerville", "Songti SC", serif;
  --sans:
    "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei",
    sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 123, 87, 0.18), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(99, 230, 190, 0.16), transparent 22%),
    radial-gradient(circle at 50% 120%, rgba(144, 180, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #05101a 0%, #08111f 28%, #09192c 100%);
  overflow-x: hidden;
}

body[data-period="night"] {
  background:
    radial-gradient(circle at 12% 18%, rgba(130, 107, 255, 0.16), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(89, 184, 255, 0.16), transparent 20%),
    radial-gradient(circle at 50% 120%, rgba(32, 99, 189, 0.24), transparent 30%),
    linear-gradient(180deg, #02050b 0%, #07101c 32%, #071425 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
  pointer-events: none;
  opacity: 0.32;
}

.progress-bar {
  position: fixed;
  inset: 0 auto auto 0;
  width: var(--scroll-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  box-shadow: 0 0 18px rgba(99, 230, 190, 0.5);
  z-index: 40;
}

.noise,
.aurora,
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.08;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.7) 0.7px, transparent 0.7px);
  background-size: 10px 10px;
  mix-blend-mode: soft-light;
}

.aurora {
  filter: blur(80px);
  opacity: 0.34;
  animation: drift 18s ease-in-out infinite alternate;
}

.aurora-a {
  background: radial-gradient(circle, rgba(255, 123, 87, 0.5), transparent 55%);
  transform: translate(-14%, -20%);
}

.aurora-b {
  background: radial-gradient(circle, rgba(99, 230, 190, 0.34), transparent 58%);
  transform: translate(40%, 10%);
  animation-duration: 22s;
}

.cursor-glow {
  background:
    radial-gradient(
      280px circle at var(--cursor-x, 50%) var(--cursor-y, 50%),
      rgba(144, 180, 255, 0.16),
      transparent 70%
    );
  opacity: 0.9;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(5, 11, 20, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner,
.shell,
.footer {
  width: min(calc(100% - 28px), var(--max-width));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.brand,
.nav a {
  color: inherit;
  text-decoration: none;
}

.brand {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  font-size: 14px;
  transition: color 180ms ease;
}

.nav a:hover {
  color: var(--text);
}

.shell {
  padding: 24px 0 72px;
}

.panel,
.feature-card,
.section-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel::after,
.feature-card::after,
.section-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    transparent 20%,
    transparent 70%,
    rgba(255, 255, 255, 0.04)
  );
  pointer-events: none;
}

.hero {
  padding: 34px;
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
}

.eyebrow,
.panel-label,
.meta-tag,
.hero-chip,
.metric-label,
.item-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow,
.panel-label,
.meta-tag {
  color: var(--muted);
}

.hero-chip {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid rgba(255, 123, 87, 0.22);
  background: var(--accent-soft);
}

.hero-copy h1 {
  margin: 18px 0 12px;
  font-family: var(--display);
  font-size: clamp(52px, 10vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.tagline {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--secondary);
}

.description,
.notes-list,
.footer,
.link-description,
.item-description,
.manifesto-copy,
.clock-date {
  color: var(--muted);
}

.description {
  margin: 16px 0 0;
  max-width: 720px;
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions,
.hero-metrics,
.snapshot-grid,
.manifesto-grid,
.feature-grid,
.links-grid {
  display: grid;
  gap: 14px;
}

.hero-actions {
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hero-action {
  position: relative;
  padding: 18px 18px 18px 20px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.hero-action:hover,
.link-item:hover,
.feature-card:hover,
.snapshot-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.hero-action strong,
.link-head h3,
.feature-card h3,
.manifesto-card h3 {
  display: block;
  font-size: 18px;
}

.hero-action span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-aside {
  display: grid;
  gap: 16px;
}

.signal-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.clock-card,
.orbit-card,
.metric-card,
.manifesto-card,
.snapshot-card,
.link-item,
.empty-card {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.clock-card,
.metric-card,
.manifesto-card,
.snapshot-card {
  padding: 18px;
}

.clock-time {
  display: block;
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 48px);
}

.clock-date {
  margin: 10px 0 0;
  line-height: 1.7;
}

.orbit-card {
  min-height: 220px;
  background:
    radial-gradient(circle at center, rgba(255, 123, 87, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.03);
}

.orbit,
.orbit-core,
.scanline {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.orbit {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.orbit-1 {
  width: 76px;
  height: 76px;
  animation: spin 8s linear infinite;
}

.orbit-2 {
  width: 128px;
  height: 128px;
  animation: spin-reverse 14s linear infinite;
}

.orbit-3 {
  width: 186px;
  height: 186px;
  border-style: dashed;
  animation: spin 18s linear infinite;
}

.orbit-core {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  box-shadow: 0 0 30px rgba(255, 123, 87, 0.5);
}

.scanline {
  width: 220px;
  height: 220px;
  border-top: 2px solid rgba(99, 230, 190, 0.6);
  animation: sweep 3s linear infinite;
}

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

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
}

.metric-label {
  color: var(--secondary);
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.ticker {
  margin-top: 18px;
  padding: 16px 0;
  border-radius: 999px;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  box-shadow: 0 0 18px rgba(99, 230, 190, 0.46);
}

.dashboard-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

#manifesto-panel,
#snapshot-panel,
.notes-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.manifesto-grid,
.snapshot-grid {
  margin-top: 18px;
}

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

.manifesto-card {
  min-height: 180px;
}

.manifesto-card h3,
.snapshot-card h3 {
  margin: 12px 0 10px;
}

.manifesto-copy,
.item-description {
  line-height: 1.8;
}

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

.snapshot-card strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
}

.feature-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  min-height: 220px;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.feature-card h3 {
  margin: 12px 0 10px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.feature-accent {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 123, 87, 0.26), rgba(99, 230, 190, 0.16));
}

.section-stack {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.section-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.section-card-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-card-header h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.section-card-header p:last-child {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.link-item,
.empty-card {
  padding: 18px;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.link-item {
  text-decoration: none;
  color: inherit;
}

.empty-card {
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
}

.link-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.link-head h3 {
  margin: 0;
}

.item-tag {
  color: var(--accent);
}

.link-description,
.item-description {
  margin: 12px 0 0;
}

.notes-list {
  margin: 18px 0 0;
  padding-left: 22px;
  line-height: 1.9;
}

.footer {
  padding-bottom: 38px;
  font-size: 14px;
}

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

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

.tilt-card {
  transform:
    perspective(1200px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateY(var(--lift, 0px));
  transform-style: preserve-3d;
  transition: transform 180ms ease;
}

@keyframes drift {
  from {
    transform: translate(-12%, -18%) scale(1);
  }

  to {
    transform: translate(16%, 10%) scale(1.2);
  }
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes spin-reverse {
  from {
    transform: translate(-50%, -50%) rotate(360deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(0deg);
  }
}

@keyframes sweep {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

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

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

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

@media (max-width: 1040px) {
  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar-inner {
    min-height: 62px;
  }

  .nav {
    gap: 12px;
  }

  .hero,
  #manifesto-panel,
  #snapshot-panel,
  .section-card,
  .feature-card,
  .notes-panel {
    padding: 18px;
  }

  .signal-board,
  .manifesto-grid,
  .snapshot-grid,
  .hero-metrics,
  .feature-grid,
  .links-grid {
    grid-template-columns: 1fr;
  }

  .section-card-header {
    display: grid;
  }

  .ticker {
    border-radius: 24px;
  }
}

@media (max-width: 560px) {
  .shell,
  .topbar-inner,
  .footer {
    width: min(calc(100% - 18px), var(--max-width));
  }

  .hero-copy h1 {
    font-size: 50px;
  }

  .tagline {
    font-size: 24px;
  }
}
