@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap");

:root {
  color-scheme: dark light;
  --bg: #060b11;
  --bg-soft: rgba(9, 15, 24, 0.85);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(15, 25, 37, 0.92);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f6f9ff;
  --muted: #a8b5c8;
  --brand: #5df2d6;
  --brand-strong: #1abf9a;
  --brand-2: #8da6ff;
  --shadow: 0 35px 70px rgba(3, 6, 12, 0.65);
  --radius: 28px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-soft: rgba(255, 255, 255, 0.96);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --border: rgba(11, 30, 50, 0.08);
  --text: #0e1727;
  --muted: #4c5d75;
  --brand: #1abf9a;
  --brand-strong: #0f8b6c;
  --brand-2: #3055ff;
  --shadow: 0 30px 60px rgba(21, 45, 70, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img {
  width: 100%;
  display: block;
  height: auto;
}

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

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

.article-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(141, 166, 255, 0.15), transparent 45%),
    radial-gradient(circle at 70% 0, rgba(93, 242, 214, 0.14), transparent 55%), var(--bg);
  padding-bottom: 72px;
}

.article-header {
  width: min(950px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) 0 24px;
  display: grid;
  gap: 18px;
}

.article-back {
  display: flex;
  justify-content: flex-start;
}

.back-link {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 22px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #02181b;
}

.article-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ghost-link {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 18px;
  color: var(--text);
  font-weight: 600;
  opacity: 0.85;
}

.theme-switch {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.theme-switch:hover,
.theme-switch:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.title-container,
.lede-container {
  background: var(--surface);
  border-radius: calc(var(--radius) - 12px);
  border: 1px solid var(--border);
  padding: clamp(16px, 4vw, 28px);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.25);
}

.title-container h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}

.lede-container .lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-chip::before {
  content: "•";
  color: var(--brand);
}

.article-main {
  width: min(950px, calc(100% - 48px));
  margin: 0 auto;
  background: var(--surface-strong);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow);
}


.article-hero-container {
  border-radius: calc(var(--radius) - 8px);
  border: 1px solid var(--border);
  padding: clamp(12px, 3vw, 24px);
  background: var(--surface);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.article-hero {
  margin: 0;
  border-radius: calc(var(--radius) - 16px);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.tag-row-container {
  margin: 22px 0;
  border-radius: calc(var(--radius) - 16px);
  padding: 16px;
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.1);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(93, 242, 214, 0.15);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

.article-body-container {
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  padding: clamp(18px, 4vw, 36px);
}

.article-body {
  display: grid;
  gap: 26px;
  color: var(--text);
}

.article-body article {
  background: rgba(0, 0, 0, 0.25);
  padding: clamp(18px, 4vw, 32px);
  border-radius: calc(var(--radius) - 18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.article-body article h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.article-body article p {
  color: var(--muted);
  margin: 0 0 12px;
}

.article-cta-container {
  margin-top: 32px;
}

.article-cta {
  padding: 20px;
  border-radius: calc(var(--radius) - 10px);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #042b2d;
  font-weight: 600;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.article-footer {
  width: min(950px, calc(100% - 48px));
  margin: 28px auto 0;
  text-align: center;
  color: var(--muted);
}

.article-footer a {
  color: var(--brand);
  font-weight: 600;
}

@media (max-width: 720px) {
  .article-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .article-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .article-main,
  .article-header,
  .article-footer {
    width: calc(100% - 32px);
  }
  .article-meta {
    flex-direction: column;
  }
}
