:root {
  --bg: #021c3a;
  --paper: #062445;
  --ink: #f2f7ff;
  --muted: #9bb4d4;
  --line: #163a63;
  --accent: #3da9ff;
  --accent-2: #1478d4;
  --card: #0a2a4f;
  --shadow: 0 12px 40px rgb(0 12 36 / .5);
  --radius: 18px;
  --display: "Fraunces", Georgia, serif;
  --sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --navy: #021c3a;
  --sky: #7ec8ff;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f7fc;
  --paper: #ffffff;
  --ink: #0a2342;
  --muted: #5a6d8c;
  --line: #d5e0f0;
  --accent: #1f6fe0;
  --accent-2: #0a3d8f;
  --card: #ffffff;
  --shadow: 0 12px 40px rgb(10 35 66 / .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1100px 500px at 8% -12%, rgb(61 169 255 / .18), transparent 55%),
    radial-gradient(900px 460px at 95% 0%, rgb(20 120 212 / .14), transparent 50%),
    linear-gradient(180deg, #032449 0%, var(--bg) 38%, #01152c 100%);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}
[data-theme="light"] body {
  background:
    radial-gradient(1100px 480px at 10% -8%, rgb(47 124 240 / .14), transparent 55%),
    radial-gradient(800px 420px at 92% 0%, rgb(74 163 255 / .12), transparent 50%),
    linear-gradient(180deg, #eaf2fb 0%, var(--bg) 40%, var(--bg) 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner, .nav-cats {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.header-inner {
  padding: 4px 0;
  min-height: 0;
}
.logo {
  display: inline-flex; align-items: center; flex-shrink: 0;
  line-height: 0;
  margin: -6px 0;
}
.logo-img {
  height: 84px;
  width: auto;
  max-width: min(360px, 54vw);
  object-fit: contain;
}
.logo-img-light { display: none; }
.logo-img-dark { display: block; }
[data-theme="light"] .logo-img-light { display: block; }
[data-theme="light"] .logo-img-dark { display: none; }
.footer-brand .logo-img { height: 48px; }
.search {
  display: flex; flex: 1; max-width: 420px; height: 40px;
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card);
}
.search input { border: 0; background: transparent; padding: 0 14px; width: 100%; color: var(--ink); font: inherit; }
.search button, .btn, .icon-btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.search button { background: var(--accent); color: #fff; padding: 0 16px; height: 100%; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--card);
  height: 36px;
}
.lang-switch a {
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px; color: var(--muted);
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: var(--accent); color: #fff; }
.icon-btn { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--ink); }
button.icon-btn.theme-lamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: #ffffff;
  color: #0a2342;
}
button.icon-btn.theme-lamp svg { display: block; }
button.icon-btn.theme-lamp .lamp-glow,
button.icon-btn.theme-lamp .lamp-base {
  fill: currentColor;
  stroke: currentColor;
}
html[data-theme="light"] button.icon-btn.theme-lamp {
  background: #0a2342;
  color: #ffffff;
}
.nav-cats { padding: 2px 0 10px; overflow-x: auto; gap: 18px; font-size: .9rem; color: var(--muted); }
.nav-cats a:hover, .nav-cats a.active { color: var(--accent); }
.hero { display: grid; grid-template-columns: 1.35fr .85fr; gap: 16px; padding: 10px 0 0; align-items: stretch; }
.hero-main {
  position: relative;
  height: 100%;
  min-height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #032449;
  align-self: stretch;
}
.hero-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 0;
  max-height: none;
}
.hero-copy {
  position: absolute; inset: auto 0 0; z-index: 1; padding: 14px 16px 16px;
  background: linear-gradient(transparent, rgb(4 10 24 / .92)); color: #fff;
}
.kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; color: var(--accent); font-weight: 800; }
.hero-copy .kicker { color: #8ec5ff; }
h1, h2, h3, .display { font-family: var(--display); line-height: 1.12; }
.hero-copy h1 { font-size: clamp(1.2rem, 2.4vw, 1.85rem); margin: 4px 0 4px; }
.hero-copy p { margin: 0; font-size: .9rem; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero aside {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hero aside h2 { font-size: 1.25rem; margin: 0 0 4px; }
.hero .popular { margin: 0; padding: 0; list-style: none; flex: 1; }
.hero .popular li { padding: 7px 0; }
.hero .popular img { width: 64px; height: 48px; }
.hero .popular .meta { font-size: .72rem; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card img { height: 180px; width: 100%; object-fit: cover; background: #1a2b4a; }
.card .body { padding: 16px; }
.card h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.meta { color: var(--muted); font-size: .82rem; }
.section { padding: 42px 0; }
.section h2 { font-size: 2rem; margin: 0 0 18px; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.popular li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.popular img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 36px; padding: 28px 0 64px; }
.prose { font-size: 1.08rem; }
.prose h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.25rem; margin: 1.3em 0 .4em; }
.prose p { margin: 0 0 1em; }
.prose img, .prose iframe { border-radius: 16px; margin: 1.2em 0; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 1.4em 0; padding: 0 0 0 16px; color: var(--muted); font-style: italic; }
.prose pre { background: #0a162c; color: #e8eef8; padding: 14px; border-radius: 12px; overflow: auto; }
.cover { border-radius: 24px; width: 100%; max-height: 460px; object-fit: cover; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 18px 0 28px; }
.toc a { display: block; padding: 4px 0; color: var(--muted); }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.share a, .btn {
  background: var(--accent); color: #fff; border-radius: 999px; padding: 10px 14px; font-size: .88rem;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .8rem; }
.newsletter {
  background: linear-gradient(135deg, #021c3a 0%, #1478d4 55%, #3da9ff 100%);
  color: #f5f9ff; border-radius: 28px; padding: 32px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: center;
}
.newsletter input { width: 100%; border: 0; border-radius: 999px; padding: 12px 14px; font: inherit; }
.site-footer { border-top: 1px solid var(--line); padding: 42px 0 24px; margin-top: 24px; color: var(--muted); }
.footer-brand {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
}
.footer-brand img { height: 40px; width: auto; }
.crumbs { color: var(--muted); font-size: .88rem; padding: 16px 0 0; }
.form input, .form textarea, .form select {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; font: inherit; margin-bottom: 10px;
}
.pager { display: flex; gap: 8px; margin-top: 24px; }
.flash { background: #ecfdf3; color: #166534; padding: 10px 12px; border-radius: 12px; }
.mobile-toggle { display: none; }
@media (max-width: 900px) {
  .hero, .split, .article-layout, .newsletter, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .mobile-toggle { display: inline-flex; }
  .nav-cats { display: none; }
  .nav-cats.open { display: flex; flex-wrap: wrap; }
  .search { max-width: none; }
  .logo-img { height: 68px; max-width: min(300px, 68vw); }
  .hero-main { height: 240px; min-height: 240px; }
  .hero-main img { position: absolute; }
}
