:root {
  color-scheme: dark;
  --panel: #0a0a0a;
  --panel-soft: rgba(23, 23, 23, 0.82);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(103, 232, 249, 0.42);
  --text: #ffffff;
  --muted: #d4d4d4;
  --subtle: #a3a3a3;
  --cyan: #67e8f9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #000;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    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: 60px 60px;
  opacity: 0.55;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  border-radius: 6px;
  background: #fff;
  color: #000;
  padding: 8px 10px;
}

.skip-link:focus {
  left: 8px;
}

.wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.78));
  backdrop-filter: blur(14px);
}

.nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  width: 120px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
  transition: filter 0.3s ease;
}

.logo:hover img {
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.95));
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: flex-end;
  color: #d1d5db;
  font-size: 1rem;
}

.nav-links a {
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-links a:hover,
.nav-links .active {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.65);
}

.hero {
  position: relative;
  padding: 136px 0 72px;
  background:
    radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.14), transparent 28rem),
    radial-gradient(circle at 80% 12%, rgba(52, 211, 153, 0.1), transparent 24rem);
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 960px;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 900;
}

.gradient-text {
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #d4d4d4;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.8;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 740px;
  margin-top: 34px;
}

.stat,
.side,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.stat {
  padding: 16px;
}

.stat span {
  display: block;
  color: var(--subtle);
  font-size: 0.85rem;
}

.stat strong {
  display: block;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 1.75rem;
  line-height: 1;
}

.content,
.article-section {
  background: #000;
  padding: 30px 0 96px;
}

.featured,
.card,
.article-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.featured,
.card {
  display: grid;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.card {
  grid-template-rows: 220px 1fr;
}

.featured:hover,
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.featured-media,
.thumb,
.hero-media {
  position: relative;
  overflow: hidden;
  background: #171717;
}

.featured-media {
  min-height: 300px;
}

.hero-media {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.featured-media img,
.thumb img,
.hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-media img {
  min-height: 280px;
  aspect-ratio: 16 / 11;
}

.featured-media img,
.thumb img {
  transition: transform 0.45s ease;
}

.featured:hover img,
.card:hover img {
  transform: scale(1.035);
}

.placeholder {
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #9ca3af;
  text-align: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(52, 211, 153, 0.08));
}

.featured-body,
.card-body {
  display: grid;
  gap: 14px;
}

.featured-body {
  align-content: center;
  padding: clamp(24px, 5vw, 48px);
}

.card-body {
  padding: 22px;
}

.label {
  width: fit-content;
  border: 1px solid rgba(103, 232, 249, 0.4);
  border-radius: 6px;
  padding: 6px 10px;
  color: #cffafe;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(8, 47, 73, 0.24);
}

h2,
h3 {
  margin: 0;
  color: #fff;
  letter-spacing: 0;
  line-height: 1.15;
}

.featured h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.card h3 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.excerpt {
  margin: 0;
  color: #d4d4d4;
  font-size: 1rem;
  line-height: 1.75;
}

.meta,
.meta-row,
.article-tags,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta {
  color: #a3a3a3;
  font-size: 0.9rem;
}

.meta span,
.pill,
.chip {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #d4d4d4;
  padding: 7px 11px;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 36px;
}

.empty {
  padding: 28px;
  color: var(--muted);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

.side {
  position: relative;
  padding: 20px;
  isolation: isolate;
}

.side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(103, 232, 249, 0.04), transparent 28%);
  pointer-events: none;
}

.side strong {
  display: block;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side a {
  display: block;
  margin-top: 10px;
  color: #d4d4d4;
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.side a:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.22);
}

.side-progress {
  margin-bottom: 18px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.side-progress-bar {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.55);
  transition: width 0.18s ease;
}

.side .chips {
  margin-top: 18px;
}

.toc {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toc span {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.side .toc-link {
  position: relative;
  margin-top: 0;
  border-left: 2px solid rgba(103, 232, 249, 0.2);
  padding: 8px 0 8px 12px;
  color: #cbd5e1;
  line-height: 1.35;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.side .toc-link::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(103, 232, 249, 0.34);
  border-radius: 999px;
  background: #0a0a0a;
  transform: translateY(-50%) scale(0.8);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.side .toc-link:hover {
  border-color: var(--cyan);
  color: #fff;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent 75%);
  transform: translateX(3px);
}

.side .toc-link:hover::before,
.side .toc-link.is-active::before {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.75);
  transform: translateY(-50%) scale(1);
}

.side .toc-link.is-active {
  border-color: var(--cyan);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.02) 68%, transparent),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08);
  transform: translateX(5px);
}

.side .toc-link.level-3 {
  margin-left: 12px;
  color: #a3a3a3;
  font-size: 0.93rem;
}

.article-content {
  padding: clamp(24px, 5vw, 56px);
  color: #e5e5e5;
  font-size: clamp(1.02rem, 1.6vw, 1.12rem);
}

.article-content h2,
.article-content h3 {
  margin: 2.25rem 0 1rem;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0;
  scroll-margin-top: 96px;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.article-content h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.article-content h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

.article-content h2:first-child,
.article-content h3:first-child {
  margin-top: 0;
}

.article-content p {
  margin: 0 0 1.25rem;
  color: #e5e5e5;
}

.article-content ul {
  margin: 0 0 1.4rem;
  padding-left: 1.35rem;
}

.article-content li {
  margin: 0.45rem 0;
  padding-left: 0.2rem;
}

.article-content li::marker {
  color: var(--cyan);
}

.article-content strong {
  color: #fff;
}

.article-content em {
  color: #bbf7d0;
  font-style: normal;
}

.article-content a {
  color: var(--cyan);
  font-weight: 700;
  text-underline-offset: 4px;
}

.article-content h2:target,
.article-content h3:target {
  color: #cffafe;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.article-tags {
  padding: 0 clamp(24px, 5vw, 56px) clamp(24px, 5vw, 48px);
}

.back {
  display: inline-flex;
  width: fit-content;
  margin-top: 22px;
  border-radius: 6px;
  background: var(--cyan);
  color: #0a0a0a;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease;
}

.back:hover {
  background: #a5f3fc;
}

.footer {
  border-top: 1px solid rgba(34, 211, 238, 0.2);
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 56px 0;
}

.footer h2,
.footer h3 {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 1.15rem;
}

.footer p,
.footer li {
  color: #d1d5db;
  font-size: 0.95rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

.footer a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.55);
}

.footer-bottom {
  border-top: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(15, 23, 42, 0.6);
  padding: 22px 0;
  color: #9ca3af;
  text-align: center;
  font-size: 0.88rem;
}

@media (min-width: 640px) {
  .stats,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured {
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  }

  .featured-media {
    min-height: 520px;
  }

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

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  }

  .article-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .side {
    position: sticky;
    top: 92px;
  }

  .footer-grid {
    grid-template-columns: 1.35fr 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .nav-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-links {
    gap: 12px 16px;
    justify-content: flex-start;
    font-size: 0.92rem;
  }

  .hero {
    padding-top: 176px;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  .featured:hover,
  .card:hover {
    transform: none;
  }
}
