:root {
  --bg: #0a0a0c;
  --bg-elevated: #121218;
  --bg-soft: #1a1a22;
  --text: #f5f2f0;
  --text-muted: #a8a0a8;
  --accent: #ff2d6a;
  --accent-2: #ff8a3d;
  --gradient: linear-gradient(135deg, #ffcc33 0%, #ff8a3d 45%, #ff2d6a 100%);
  --line: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --max: 1120px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", 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(ellipse 80% 50% at 10% -10%, rgba(255, 45, 106, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(255, 138, 61, 0.14), transparent 50%),
    var(--bg);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #ff8fb0;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffd18a;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 12, 0.85);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before {
  transform: translateY(-6px);
}

.nav-toggle-icon::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  transform: rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.45) saturate(1.05);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 12, 0.35) 0%, rgba(10, 10, 12, 0.72) 55%, rgba(10, 10, 12, 0.96) 100%),
    linear-gradient(90deg, rgba(10, 10, 12, 0.55), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 0 3.5rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.1;
  margin: 0 0 0.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 500;
  margin: 0 0 1rem;
  max-width: 18em;
}

.hero-lead {
  max-width: 36em;
  color: var(--text-muted);
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: #1a0a10;
}

.btn-primary:hover {
  color: #1a0a10;
  filter: brightness(1.05);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02), transparent);
}

.section-head {
  margin-bottom: 1.8rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.55rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 48em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.4rem;
}

/* Showcase grid */
.showcase {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
}

.showcase-main,
.showcase-side {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.showcase-main img,
.showcase-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.showcase-side {
  display: grid;
  gap: 1.2rem;
}

.caption {
  padding: 1rem 1.1rem 1.2rem;
}

.caption h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-family: var(--font-display);
}

.caption p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Category chips */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 106, 0.35);
}

.cat-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.cat-item .caption h3 {
  font-size: 1.05rem;
}

/* Feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse .feature-copy {
  order: 2;
}

.feature-row.reverse .feature-visual {
  order: 1;
}

.feature-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.feature-visual img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  margin-inline: auto;
}

.feature-copy h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 0.7rem;
}

.feature-copy p {
  color: var(--text-muted);
  margin: 0 0 0.9rem;
}

.feature-copy ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.feature-copy li {
  margin-bottom: 0.35rem;
}

/* Article / long SEO */
.article {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.article h2,
.article h3 {
  font-family: var(--font-display);
}

.article h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.article h3 {
  margin-top: 1.8rem;
  font-size: 1.3rem;
}

.article p {
  color: #d8d0d6;
  margin: 0 0 1rem;
}

.article ul,
.article ol {
  color: #d8d0d6;
  padding-left: 1.2rem;
}

.article li {
  margin-bottom: 0.45rem;
}

.toc {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0 1.6rem;
  padding: 1rem 1.1rem;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.toc a {
  color: #ffb0c8;
}

/* Vlog strip */
.vlog-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.vlog-strip figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.vlog-strip img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}

.vlog-strip figcaption {
  padding: 0.7rem 0.8rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Page hero for inner pages */
.page-hero {
  padding: 3.2rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 0.6rem;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 42em;
}

.prose {
  padding: 2.5rem 0 4rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 2rem 0 0.7rem;
}

.prose p,
.prose li {
  color: #d8d0d6;
}

.prose ul {
  padding-left: 1.2rem;
}

/* Error pages */
.error-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  margin: 0 0 0.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-wrap p {
  color: var(--text-muted);
  margin: 0 0 1.4rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0 2rem;
  background: #070709;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.site-footer p,
.site-footer li {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.copyright {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: #7d7580;
  font-size: 0.85rem;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-brand {
    animation: rise 0.9s ease both;
  }

  .hero h1 {
    animation: rise 0.9s ease 0.12s both;
  }

  .hero-lead,
  .cta-row {
    animation: rise 0.9s ease 0.22s both;
  }

  .cat-item,
  .feature-row,
  .vlog-strip figure {
    animation: fade-up 0.7s ease both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.4rem);
    flex-direction: column;
    gap: 0;
    background: #15151c;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.5rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0.85rem;
  }

  .nav {
    position: relative;
  }

  .showcase,
  .feature-row,
  .feature-row.reverse,
  .footer-grid,
  .cat-grid,
  .vlog-strip {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-copy,
  .feature-row.reverse .feature-visual {
    order: initial;
  }

  .feature-visual img {
    max-height: 420px;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vlog-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 72vh;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.25rem, var(--max));
  }

  .brand span {
    font-size: 1.15rem;
  }

  .hero-brand {
    font-size: 2.3rem;
  }
}
