:root {
  --bg: #0b1220;
  --bg-soft: #121a2b;
  --bg-card: #162033;
  --line: rgba(148, 175, 220, 0.16);
  --text: #e8eef8;
  --muted: #9aadc8;
  --brand: #3b82f6;
  --brand-2: #60a5fa;
  --accent: #22d3ee;
  --warm: #f59e0b;
  --ok: #34d399;
  --danger: #f87171;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --container: 1120px;
  --nav-h: 72px;
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Sora", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(34, 211, 238, 0.12), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, #0b1220 40%, #0d1526 100%);
  min-height: 100vh;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.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(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  flex-shrink: 0;
  max-height: calc(var(--nav-h) - 20px);
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(96, 165, 250, 0.5);
  color: var(--brand-2);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(12, 18, 32, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  z-index: 999;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: block;
  animation: slideDown 0.22s ease;
}

.mobile-panel a {
  display: block;
  padding: 0.85rem 0.75rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.mobile-panel .mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: 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) 45%, 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 {
  padding: 4.5rem 0 3.5rem;
  max-width: 640px;
}

.hero-content .brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, #fff, var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.section-head p {
  max-width: 36rem;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.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-card);
  border: 1px solid var(--line);
  min-height: 280px;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  min-height: 210px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.45);
}

.category-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.18), transparent 65%), #0a101c;
  padding: 0.75rem;
}

.category-card .cat-body {
  padding: 0.9rem 1rem 1.1rem;
}

.category-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.category-card p {
  margin: 0;
  font-size: 0.88rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.4);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a101c;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--brand-2);
  font-size: 0.75rem;
  font-weight: 600;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--brand-2);
}

.article-card .body > p {
  flex: 1;
  font-size: 0.92rem;
}

.read-more {
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-list {
  display: grid;
  gap: 0.9rem;
}

.guide-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s ease;
}

.guide-item:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.guide-item img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 10px;
  background: #0a101c;
}

.guide-item h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.guide-item h3 a {
  color: var(--text);
}

.guide-item p {
  margin: 0;
  font-size: 0.88rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.94rem;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  filter: grayscale(0.2) brightness(1.05);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
}

.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.1), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand-2);
}

.breadcrumb span {
  opacity: 0.5;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.prose {
  background: rgba(22, 32, 51, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.8rem;
}

.prose h2 {
  margin-top: 1.75rem;
  font-size: 1.3rem;
}

.prose h3 {
  margin-top: 1.35rem;
  font-size: 1.08rem;
}

.prose ul,
.prose ol {
  color: var(--muted);
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose img.cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0.5rem 0 1.25rem;
}

.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.side-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.side-box h2,
.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-links {
  display: grid;
  gap: 0.65rem;
}

.side-links a {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
}

.side-links a:hover {
  color: var(--brand-2);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.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: 2rem;
  margin-bottom: 2rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--brand-2);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .guide-item {
    grid-template-columns: 72px 1fr;
  }

  .guide-item .btn {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .brand img {
    height: 34px;
    max-height: 34px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content {
    padding: 3.2rem 0 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .card-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .prose {
    padding: 1.15rem 1rem 1.4rem;
  }

  .article-card[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column;
  }

  .article-card[style*="grid-template-columns"] .thumb {
    min-height: 180px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
