:root {
  --bg: #06070d;
  --panel: rgba(9, 12, 25, 0.82);
  --panel-strong: rgba(16, 21, 41, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: #a9b1cf;
  --cyan: #55f6ff;
  --pink: #ff4fd8;
  --amber: #ffb347;
  --glow: 0 0 24px rgba(85, 246, 255, 0.3);
}

@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/PressStart2P-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 79, 216, 0.16), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(85, 246, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #070a16 0%, #05060c 100%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

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

code {
  padding: 0.12em 0.38em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #eef4ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82em;
  letter-spacing: 0;
}

.screen-noise,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.screen-noise {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px);
  background-size: 12px 12px, 18px 18px, 15px 15px;
  mix-blend-mode: screen;
}

.scanlines {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.12;
}

.topbar,
.hero-shell,
.content-shell,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
}

.brand {
  color: var(--cyan);
  font-family: "Press Start 2P", monospace;
  font-size: 0.9rem;
  text-shadow: var(--glow);
}

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

.nav a,
.footer a,
.text-link {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.nav a:hover,
.footer a:hover,
.text-link:hover {
  color: var(--cyan);
  text-shadow: var(--glow);
}

.hero-shell,
.content-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-shell {
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: 36px;
  padding: 12px 0 48px;
}

.hero-shell.home-with-rail {
  width: min(1540px, calc(100% - 40px));
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.85fr) 340px;
  align-items: stretch;
}

.hero,
.page-intro,
.card,
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 24px 80px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.hero {
  padding: clamp(24px, 4vw, 44px);
}

.eyebrow,
.card-tag,
.status-label {
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 20px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text);
  text-shadow:
    0 0 18px rgba(85, 246, 255, 0.32),
    0 0 42px rgba(255, 79, 216, 0.16);
}

.home-title {
  font-size: clamp(2.8rem, 4.5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

h2 {
  margin: 14px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 3vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lede,
.hero-note,
.card p,
.project-meta p,
.status-value {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-note {
  max-width: 36rem;
  margin-top: 18px;
}

.cta-row,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, rgba(85, 246, 255, 0.24), rgba(255, 79, 216, 0.18));
  border-color: rgba(85, 246, 255, 0.48);
  box-shadow: var(--glow);
}

.button-secondary {
  background: rgba(255, 79, 216, 0.1);
  border-color: rgba(255, 79, 216, 0.42);
  box-shadow: 0 0 24px rgba(255, 79, 216, 0.16);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.03);
}

.button-youtube {
  border-color: rgba(255, 179, 71, 0.42);
  color: var(--amber);
}

.newsart-page .content-with-rail {
  grid-template-columns: minmax(0, 1fr) 320px;
}

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

.newsart-page .card-grid .card:last-child {
  grid-column: 1 / -1;
}

.newsart-page .status-panel .status-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.newsart-page .status-value {
  color: var(--text);
}

.newsart-page .project-meta,
.newsart-page .card {
  max-width: none;
}

.status-panel {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
}

.grid-stage {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 24, 49, 0.9) 0%, rgba(4, 5, 10, 0.95) 100%);
}

.moon {
  position: absolute;
  top: 62px;
  left: 50%;
  width: min(28vw, 260px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.98) 0 14%, transparent 14.5%),
    radial-gradient(circle at 62% 42%, rgba(203, 215, 236, 0.85) 0 8%, transparent 8.5%),
    radial-gradient(circle at 44% 63%, rgba(170, 186, 214, 0.65) 0 10%, transparent 10.5%),
    radial-gradient(circle at 52% 48%, #eff5ff 0%, #cad5ea 54%, #9eabc3 76%, #6a7793 100%);
  box-shadow:
    0 0 45px rgba(177, 208, 255, 0.22),
    0 0 90px rgba(119, 165, 255, 0.14),
    0 0 120px rgba(255, 255, 255, 0.08);
}

.moon::before,
.moon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.moon::before {
  background:
    radial-gradient(circle at 26% 38%, rgba(121, 133, 158, 0.28) 0 7%, transparent 7.5%),
    radial-gradient(circle at 68% 28%, rgba(121, 133, 158, 0.24) 0 6%, transparent 6.5%),
    radial-gradient(circle at 63% 67%, rgba(121, 133, 158, 0.26) 0 9%, transparent 9.5%),
    radial-gradient(circle at 37% 72%, rgba(121, 133, 158, 0.2) 0 5%, transparent 5.5%);
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.moon::after {
  inset: 10% 8% 10% 38%;
  background: radial-gradient(circle at 15% 50%, rgba(13, 18, 34, 0.08) 0%, rgba(13, 18, 34, 0.82) 72%, rgba(13, 18, 34, 0.96) 100%);
  filter: blur(2px);
}

.grid {
  position: absolute;
  inset: 44% -10% -8%;
  background:
    linear-gradient(rgba(85, 246, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 246, 255, 0.18) 1px, transparent 1px);
  background-size: 100% 46px, 46px 100%;
  transform: perspective(520px) rotateX(72deg);
  transform-origin: center top;
  box-shadow: inset 0 40px 90px rgba(0, 0, 0, 0.7);
}

.page-intro {
  padding: clamp(22px, 3vw, 34px);
  margin-bottom: 24px;
}

.card-grid,
.project-list,
.content-with-rail,
.rail-main {
  display: grid;
  gap: 20px;
}

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

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

.card,
.project-card {
  padding: 24px;
}

.card-media {
  width: 100%;
  display: block;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

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

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

.project-meta {
  max-width: 780px;
}

.muted-card {
  opacity: 0.92;
}

.content-with-rail {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: stretch;
}

.ad-panel {
  padding: 24px;
  min-height: 100%;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 24px 80px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}

.ad-slot {
  margin-top: 18px;
  padding: 14px;
  min-height: 620px;
  flex: 1 1 auto;
  border: 1px solid rgba(85, 246, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(85, 246, 255, 0.08), rgba(255, 79, 216, 0.05)),
    rgba(255, 255, 255, 0.02);
}

.ad-slot .adsbygoogle {
  width: 100%;
  min-height: 100%;
}

.footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 20px 34px;
}

@media (max-width: 980px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .grid-stage {
    min-height: 360px;
  }

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

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

  .newsart-page .card-grid {
    grid-template-columns: 1fr;
  }

  .newsart-page .card-grid .card:last-child {
    grid-column: auto;
  }

  .content-with-rail {
    grid-template-columns: 1fr;
  }

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

  .ad-panel {
    min-height: auto;
  }

  .ad-slot {
    min-height: 320px;
  }
}

@media (max-width: 1320px) {
  .hero-shell.home-with-rail {
    width: min(1200px, calc(100% - 40px));
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-shell,
  .content-shell {
    width: min(100% - 24px, 1200px);
  }

  .nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .button {
    width: 100%;
  }

  .status-line {
    flex-direction: column;
    gap: 8px;
  }
}
