:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-soft: #182338;
  --surface: #1c2740;
  --line: rgba(148, 176, 220, 0.18);
  --text: #e8eef8;
  --text-muted: #8fa0b8;
  --text-soft: #b7c5dc;
  --brand: #3ba0ff;
  --brand-strong: #1f7fe0;
  --accent: #6ec8ff;
  --gold: #d4b36a;
  --danger: #ef6b6b;
  --ok: #4ecb8d;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --header-h: 72px;
  --font-display: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(59, 160, 255, 0.18), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(110, 200, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, #0b1220 40%, #0d1524 100%);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #9fd8ff;
}

ul, ol {
  list-style: none;
}

button, .btn {
  font: inherit;
  cursor: pointer;
  border: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10, 16, 28, 0.92);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 1 auto;
  max-width: min(200px, 46vw);
  max-height: calc(var(--header-h) - 16px);
  overflow: hidden;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--text-soft);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #fff;
  background: rgba(59, 160, 255, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 24px rgba(31, 127, 224, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  margin-left: auto;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.is-open .icon-menu {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: block;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(12, 18, 32, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-panel a {
  display: block;
  padding: 0.85rem 1rem;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
}

.mobile-panel a:hover,
.mobile-panel a.active {
  background: rgba(59, 160, 255, 0.12);
  color: #fff;
}

.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.mobile-actions .btn {
  width: 100%;
}

.page-main {
  padding-top: var(--header-h);
}

.hero {
  position: relative;
  min-height: clamp(420px, 72vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 22, 0.92) 0%, rgba(8, 12, 22, 0.72) 48%, rgba(8, 12, 22, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 12, 22, 0.2) 0%, rgba(8, 12, 22, 0.88) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto 3.5rem;
  max-width: 680px;
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #fff 20%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 0.9rem;
  color: #f3f7ff;
}

.hero p {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 54ch;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(24, 35, 56, 0.45), rgba(24, 35, 56, 0.15));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.25;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-soft);
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.prose {
  color: var(--text-soft);
  max-width: 78ch;
}

.prose p + p {
  margin-top: 1rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.intro-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: floaty 5s ease-in-out infinite;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-item:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 160, 255, 0.45);
}

.category-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #05070d;
}

.category-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 16, 0.92));
  color: #fff;
  font-weight: 650;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 160, 255, 0.4);
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #05070d;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.15rem 1.2rem 1.35rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.card-body h3 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 0.55rem;
}

.card-body h3 a {
  color: var(--text);
}

.card-body h3 a:hover {
  color: var(--accent);
}

.card-body p {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 860px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.05);
  opacity: 0.85;
}

.page-hero {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 39, 64, 0.55), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--text-soft);
  max-width: 70ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.55;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}

.article-body {
  background: rgba(18, 26, 43, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.article-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.35rem;
  border: 1px solid var(--line);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #05070d;
}

.article-body h2 {
  font-size: 1.35rem;
  margin: 1.6rem 0 0.7rem;
}

.article-body h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.55rem;
}

.article-body p,
.article-body li {
  color: var(--text-soft);
}

.article-body p + p {
  margin-top: 0.95rem;
}

.article-body ul,
.article-body ol {
  margin: 0.85rem 0 0.85rem 1.2rem;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

.article-body li + li {
  margin-top: 0.4rem;
}

.sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.side-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h2 {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.side-links {
  display: grid;
  gap: 0.65rem;
}

.side-links a {
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

.side-links a:hover {
  color: var(--accent);
}

.list-page .cards {
  margin-top: 0.5rem;
}

.cta-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(31, 127, 224, 0.2), rgba(18, 26, 43, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow: hidden;
}

.cta-banner img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin-inline: auto;
}

.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
}

.error-page p {
  color: var(--text-soft);
  max-width: 48ch;
  margin: 0 auto 1.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #080d18;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p,
.footer-col a,
.footer-bottom {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  margin-bottom: 0.45rem;
}

.footer-bottom {
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(59, 160, 255, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-layout,
  .cta-banner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-desktop,
  .header-actions {
    display: none;
  }

  .menu-toggle,
  .mobile-panel {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-panel {
    display: block;
  }

  .hero {
    min-height: 520px;
    align-items: flex-end;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(8, 12, 22, 0.35) 0%, rgba(8, 12, 22, 0.88) 58%, rgba(8, 12, 22, 0.96) 100%);
  }

  .hero-content {
    margin-bottom: 2.2rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .brand img {
    height: 36px;
    max-width: 150px;
  }

  .cards,
  .related-grid,
  .category-grid,
  .brand-strip {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 3rem 0;
  }

  .article-body {
    padding: 1.15rem;
  }
}
