:root {
  color-scheme: dark;
  --bg-primary: #050713;
  --bg-secondary: #0c1024;
  --bg-hero: linear-gradient(180deg, rgba(132, 94, 247, 0.14) 0%, rgba(79, 70, 229, 0.08) 45%, rgba(15, 23, 42, 0.9) 100%);
  --bg-card: linear-gradient(160deg, rgba(15, 23, 42, 0.85) 0%, rgba(9, 14, 30, 0.92) 100%);
  --bg-card-hover: linear-gradient(150deg, rgba(37, 99, 235, 0.35) 0%, rgba(12, 74, 110, 0.4) 65%, rgba(15, 23, 42, 0.95) 100%);
  --bg-post: rgba(7, 10, 24, 0.88);
  --text-primary: #f7f9ff;
  --text-secondary: rgba(196, 210, 255, 0.86);
  --text-muted: rgba(158, 174, 219, 0.7);
  --accent: #8b5cf6;
  --accent-strong: #38bdf8;
  --border-faint: rgba(148, 163, 184, 0.15);
  --shadow-soft: 0 28px 70px rgba(9, 12, 28, 0.55);
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 10% 20%, rgba(67, 56, 202, 0.25), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.2), transparent 45%),
    var(--bg-primary);
  color: var(--text-secondary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, transparent 22%, transparent 78%, rgba(148, 197, 255, 0.06) 100%),
    url('data:image/svg+xml,%3Csvg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 159.5L159.5 0.5" stroke="rgba(148, 163, 184, 0.06)"/%3E%3C/svg%3E') repeat;
  mix-blend-mode: soft-light;
  opacity: 0.7;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.site-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(28px);
  background: rgba(4, 7, 16, 0.78);
  border-bottom: 1px solid var(--border-faint);
}

.site-header .inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-right {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
}

.site-title {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links {
  display: inline-flex;
  gap: 1.6rem;
  align-items: center;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links a {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lang-option {
  color: inherit;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.lang-option:hover {
  color: var(--text-primary);
  opacity: 1;
}

.lang-option.lang-current {
  color: var(--text-primary);
  opacity: 1;
}

.lang-divider {
  color: rgba(148, 197, 255, 0.5);
}

main {
  flex: 1;
}

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 120px 28px 80px;
}

.hero-inner {
  background: var(--bg-hero);
  border: 1px solid rgba(148, 197, 255, 0.18);
  border-radius: 32px;
  padding: 60px clamp(24px, 6vw, 80px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.hero-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.35), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: rgba(191, 219, 254, 0.95);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.2rem);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 1.6rem 0 1.2rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.75;
  max-width: 640px;
  color: var(--text-secondary);
  margin: 0 0 2.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.6rem;
}

.stat-card {
  padding: 1.25rem 1.4rem;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 197, 255, 0.14);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.3), transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.stat-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 197, 255, 0.4);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(14, 165, 233, 0.18));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.button.secondary {
  background: transparent;
  border-color: rgba(148, 197, 255, 0.25);
  color: var(--text-secondary);
}

.button.ghost {
  background: transparent;
  border-color: rgba(139, 92, 246, 0.5);
  color: var(--accent);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.35);
}

.latest {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 28px 120px;
}

.section-heading {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.8rem;
}

.section-heading .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.section-heading h2 {
  font-size: clamp(2.1rem, 4vw, 2.6rem);
  color: var(--text-primary);
  margin: 0;
}

.section-heading p {
  margin: 0;
  line-height: 1.7;
  color: var(--text-secondary);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.post-card {
  position: relative;
  padding: 30px;
  border-radius: 28px;
  background: var(--bg-card);
  border: 1px solid rgba(148, 197, 255, 0.18);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.35), rgba(139, 92, 246, 0.2));
  filter: blur(40px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.post-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.55);
  background: var(--bg-card-hover);
}

.post-card:hover::before {
  opacity: 0.6;
}

.post-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-card__badge {
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  color: rgba(216, 180, 254, 0.9);
}

.post-card__date {
  color: rgba(191, 219, 254, 0.75);
}

.post-card__title {
  font-size: 1.4rem;
  margin: 0;
  color: var(--text-primary);
}

.post-card__title a {
  color: inherit;
}

.post-card__excerpt {
  margin: 0;
  line-height: 1.7;
  color: var(--text-secondary);
}

.post-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: rgba(191, 219, 254, 0.92);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer {
  padding: 40px 28px 60px;
  border-top: 1px solid var(--border-faint);
  background: rgba(4, 7, 18, 0.85);
}

.site-footer .inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-page main {
  max-width: 940px;
  margin: 0 auto;
  padding: 140px 28px 160px;
}

.post-page article {
  background: var(--bg-post);
  border: 1px solid rgba(148, 197, 255, 0.18);
  border-radius: 32px;
  padding: clamp(36px, 4vw, 64px);
  box-shadow: var(--shadow-soft);
}

.post-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.post-page .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.post-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.32);
  color: rgba(233, 213, 255, 0.92);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.24);
  color: rgba(196, 210, 255, 0.9);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  color: var(--text-primary);
  margin: 2.8rem 0 1.4rem;
  font-weight: 600;
}

.post-body p {
  line-height: 1.85;
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 1.2rem 0;
}

.post-body strong {
  color: var(--text-primary);
}

.post-body em {
  color: var(--text-muted);
}

.post-body ul,
.post-body ol {
  margin: 1.8rem 0;
  padding-left: 1.6rem;
  color: var(--text-secondary);
}

.post-body li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.post-body pre {
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), rgba(12, 20, 36, 0.95));
  border-radius: 22px;
  padding: 28px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: inset 0 0 0 1px rgba(8, 47, 73, 0.35);
}

.post-body code {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  color: rgba(125, 211, 252, 0.95);
}

.post-body blockquote {
  margin: 2.2rem 0;
  padding: 1.6rem 2rem;
  border-left: 3px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 18px;
  color: rgba(219, 234, 254, 0.9);
  font-style: italic;
}

.post-body hr {
  border: none;
  height: 1px;
  background: rgba(148, 197, 255, 0.18);
  margin: 3rem 0;
}

@media (max-width: 900px) {
  .hero-inner {
    padding: 48px 28px;
  }

  .hero-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .header-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .hero {
    padding-top: 100px;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .post-page article {
    padding: 28px;
  }

  .hero-cta {
    width: 100%;
  }

  .button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .feed-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
