:root {
  --bg: #05020a;
  --bg-alt: #080b18;
  --surface: rgba(255, 255, 255, .07);
  --surface-strong: rgba(255, 255, 255, .11);
  --border: rgba(192, 132, 252, .28);
  --border-soft: rgba(255, 255, 255, .12);
  --text: #fff;
  --muted: #d8d0ea;
  --soft: #afa4c7;
  --purple: #8b5cf6;
  --purple-light: #c084fc;
  --amber: #f59e0b;
  --green: #22c55e;
  --focus: #f8d08b;
  --shadow: 0 24px 62px rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(139, 92, 246, .22), transparent 28rem),
    linear-gradient(180deg, var(--bg), #050711 42%, var(--bg-alt));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(192, 132, 252, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, .045) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: #111;
  font-weight: 800;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 16px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--purple-light));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 2, 10, .88);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-family: Sora, Inter, sans-serif;
  font-size: .95rem;
}

.brand span {
  display: block;
  color: rgba(216, 208, 234, .72);
  font-size: .74rem;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(216, 208, 234, .84);
  font-size: .86rem;
  font-weight: 750;
}

.nav-links a {
  text-decoration: none;
  transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
}

.button,
.nav-cta,
.icon-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--green), #15803d);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 16px 42px rgba(34, 197, 94, .24);
  cursor: pointer;
}

.button.secondary,
.icon-button {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border-color: rgba(192, 132, 252, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.icon-button {
  width: 46px;
  padding: 0;
}

.hero {
  padding: 74px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 38px;
  align-items: center;
}

.eyebrow {
  color: var(--purple-light);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1,
.post-hero h1,
.page-hero h1 {
  margin: 16px 0 18px;
  font-family: Sora, Inter, sans-serif;
  font-size: 4.6rem;
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.gradient-text {
  background: linear-gradient(90deg, #fff 0%, #f8d08b 36%, #f07a1a 58%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 720px;
  color: rgba(216, 208, 234, .88);
  font-size: 1.13rem;
  line-height: 1.72;
}

.hero-actions,
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.authority-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
  max-width: 760px;
}

.authority-strip div,
.info-panel,
.content-box,
.author-box,
.cta-panel,
.category-card,
.post-card,
.aside-box,
.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .04));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.authority-strip div {
  padding: 14px;
}

.authority-strip strong {
  display: block;
  margin-top: 6px;
  font-family: Sora, Inter, sans-serif;
}

.hero-media {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #090315;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
}

.hero-media img {
  width: 100%;
  min-height: 510px;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) contrast(1.07) brightness(.82);
}

.hero-feature {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(5, 2, 10, .78);
  backdrop-filter: blur(16px);
  text-decoration: none;
}

.hero-feature p {
  margin: 0 0 10px;
  color: var(--purple-light);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-feature h2 {
  margin: 0;
  font-family: Sora, Inter, sans-serif;
  font-size: 1.65rem;
  line-height: 1.13;
}

.section,
.page-section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 26px;
}

.section h2,
.page-section h2,
.newsletter h2 {
  margin: 8px 0 0;
  font-family: Sora, Inter, sans-serif;
  font-size: 2.8rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.section-copy {
  max-width: 760px;
  color: rgba(216, 208, 234, .78);
  line-height: 1.7;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin: 24px 0 30px;
}

.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  outline: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 34px;
}

.category-card {
  min-height: 152px;
  padding: 16px;
  color: rgba(216, 208, 234, .82);
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.category-card svg,
.category-card i {
  width: 24px;
  height: 24px;
  color: var(--purple-light);
}

.category-card strong {
  display: block;
  margin: 12px 0 8px;
  color: #fff;
  font-family: Sora, Inter, sans-serif;
}

.category-card span {
  display: block;
  font-size: .82rem;
  line-height: 1.5;
}

.category-card small {
  display: inline-flex;
  margin-top: 10px;
  color: #fed7aa;
  font-weight: 800;
}

.category-card.active,
.category-card:hover,
.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, .62);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .055));
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-color: var(--border);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.post-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
}

.post-body {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(216, 208, 234, .68);
  font-size: .78rem;
  font-weight: 750;
}

.tag {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(192, 132, 252, .14);
  color: #f1e7ff;
}

.tag.amber {
  background: rgba(245, 158, 11, .14);
  color: #fed7aa;
}

.tag.green {
  background: rgba(34, 197, 94, .14);
  color: #bbf7d0;
}

.tag.blue {
  background: rgba(96, 165, 250, .14);
  color: #bfdbfe;
}

.post-card h3 {
  margin: 0 0 12px;
  font-family: Sora, Inter, sans-serif;
  font-size: 1.35rem;
  line-height: 1.18;
}

.post-card p {
  margin: 0;
  color: rgba(216, 208, 234, .76);
  line-height: 1.62;
}

.read-more {
  margin-top: auto;
  padding-top: 20px;
  color: #fff;
  font-weight: 900;
}

.newsletter,
.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 58px;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, .2), rgba(245, 158, 11, .08)),
    rgba(255, 255, 255, .05);
}

.newsletter p,
.cta-panel p,
.info-panel p,
.author-box p {
  margin: 0;
  color: rgba(216, 208, 234, .8);
  line-height: 1.65;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: rgba(216, 208, 234, .78);
  background: rgba(255, 255, 255, .05);
}

.empty-state.visible {
  display: block;
}

.page-hero,
.post-hero {
  padding: 54px 0 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(216, 208, 234, .68);
  font-size: .86rem;
}

.breadcrumb a {
  color: rgba(216, 208, 234, .88);
  text-decoration: none;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 780px) 286px;
  gap: 44px;
  align-items: start;
  padding-bottom: 72px;
}

.article-cover {
  width: 100%;
  margin: 20px 0 32px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: rgba(255, 255, 255, .06);
}

.article {
  color: rgba(255, 255, 255, .94);
  font-size: 1.08rem;
  line-height: 1.78;
}

.article h2 {
  margin: 44px 0 14px;
  font-family: Sora, Inter, sans-serif;
  font-size: 2rem;
  line-height: 1.16;
}

.article h3 {
  margin: 28px 0 10px;
  font-family: Sora, Inter, sans-serif;
  font-size: 1.32rem;
}

.article p {
  margin: 0 0 20px;
  color: rgba(216, 208, 234, .86);
}

.article ul,
.article ol {
  margin: 0 0 24px;
  padding-left: 1.25rem;
  color: rgba(216, 208, 234, .86);
}

.article li {
  margin: 9px 0;
}

.article a {
  color: #f8d08b;
  font-weight: 800;
}

.content-box {
  margin: 24px 0;
  padding: 20px;
}

.content-box h2,
.content-box h3 {
  margin-top: 0;
}

.content-box.summary {
  border-color: rgba(245, 158, 11, .34);
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(139, 92, 246, .08));
}

.content-box.answer {
  border-color: rgba(34, 197, 94, .34);
  background: linear-gradient(135deg, rgba(34, 197, 94, .1), rgba(139, 92, 246, .07));
}

.content-box.warning {
  border-color: rgba(248, 208, 139, .4);
}

.content-box.example {
  border-color: rgba(192, 132, 252, .42);
}

.aside-box {
  position: sticky;
  top: 98px;
  padding: 18px;
}

.aside-box h2 {
  margin: 0 0 12px;
  font-family: Sora, Inter, sans-serif;
  font-size: 1rem;
}

.aside-box a,
.aside-box button {
  width: 100%;
  display: block;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: transparent;
  color: rgba(216, 208, 234, .82);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.toc a {
  font-size: .92rem;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.faq-item {
  padding: 18px;
}

.faq-item h3 {
  margin-top: 0;
}

.author-box {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 34px 0;
  padding: 18px;
}

.author-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(192, 132, 252, .55);
}

.author-box h2 {
  margin: 0 0 6px;
  font-family: Sora, Inter, sans-serif;
  font-size: 1.15rem;
}

.related-grid,
.about-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-panel {
  padding: 20px;
}

.info-panel h2,
.info-panel h3 {
  margin-top: 0;
  font-family: Sora, Inter, sans-serif;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.footer {
  padding: 36px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(216, 208, 234, .62);
  background: #050711;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: rgba(216, 208, 234, .78);
  text-decoration: none;
}

@media (max-width: 1080px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .hero-grid,
  .article-shell,
  .newsletter,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .post-hero h1,
  .page-hero h1 {
    font-size: 3.2rem;
  }

  .hero-media,
  .hero-media img {
    min-height: 360px;
  }

  .posts-grid,
  .related-grid,
  .about-grid,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aside-box {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 46px;
  }

  .hero h1,
  .post-hero h1,
  .page-hero h1 {
    font-size: 2.45rem;
    line-height: 1.05;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions,
  .post-actions,
  .search-row,
  .authority-strip,
  .category-grid,
  .posts-grid,
  .related-grid,
  .about-grid,
  .service-grid,
  .author-box {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .post-actions {
    display: grid;
  }

  .button,
  .nav-cta {
    width: 100%;
  }

  .section-head {
    display: block;
  }

  .post-body {
    min-height: 0;
  }

  .brand span span {
    display: none;
  }

  .hero-feature {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 14px;
  }

  .section h2,
  .page-section h2,
  .newsletter h2 {
    font-size: 2rem;
  }

  .article h2 {
    font-size: 1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
