/* ============================================
   Specivo Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --navy-base: #12102e;
  --navy-soft: #1a1745;
  --navy-mid: #151235;
  --gold: #c49a3c;
  --gold-bright: #d4af5a;
  --gold-pale: #f0dca8;
  --gold-glow: rgba(196, 154, 60, 0.15);
  --gold-border: rgba(196, 154, 60, 0.12);
  --gold-border-hover: rgba(196, 154, 60, 0.3);
  --text: #e8e4f0;
  --text-muted: #9994ab;
  --text-dim: #6e6883;
  --code-bg: #0d0b20;
  --surface: rgba(21, 18, 47, 0.7);
  --surface-raised: rgba(28, 25, 64, 0.6);

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Lora', Georgia, serif;

  --max-width: 1140px;
  --section-pad: 120px;
  --section-pad-mobile: 64px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--navy-base);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-bright);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  letter-spacing: -0.01em;
}

p {
  color: var(--text-muted);
  max-width: 640px;
}

code, pre {
  font-family: var(--font-mono);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-pad) 0;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding: var(--section-pad-mobile) 0;
  }
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  background: rgba(18, 16, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* --- Logo: Image-based wordmark --- */
.wordmark {
  display: inline-flex;
  align-items: center;
}

.wordmark img {
  height: 1.75rem;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy-base);
    border-bottom: 1px solid var(--gold-border);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: #1a1100 !important;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(196, 154, 60, 0);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--gold-bright);
  color: #1a1100 !important;
  box-shadow: 0 0 20px rgba(196, 154, 60, 0.35), 0 0 0 1px rgba(196, 154, 60, 0.6);
}

/* Smaller button variant for nav */
.site-header .btn-primary {
  padding: 8px 20px;
  font-size: 0.8125rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gold-border-hover);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
  box-shadow: 0 0 16px rgba(196, 154, 60, 0.2), 0 0 0 1px rgba(196, 154, 60, 0.4);
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Hero with atmospheric gradient --- */
.hero {
  padding-top: 160px;
  padding-bottom: var(--section-pad);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(196, 154, 60, 0.06) 0%, rgba(90, 62, 158, 0.08) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(80px);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(90, 62, 158, 0.06) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(100px);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: 20px;
}

.hero-content h1 .accent {
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

/* Terminal without visible border — floats on the dark bg */
.hero-terminal {
  background: var(--code-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-bar span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  overflow-x: auto;
}

.terminal-body pre {
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--text-muted);
  white-space: pre;
}

.terminal-body .prompt {
  color: var(--gold);
}

.terminal-body .cmd {
  color: var(--text);
}

.terminal-body .result-title {
  color: var(--gold-pale);
}

.terminal-body .result-id {
  color: var(--gold);
}

.terminal-body .result-type {
  color: var(--text-dim);
}

.terminal-body .result-excerpt {
  color: var(--text-muted);
  font-style: italic;
}

.terminal-body .result-meta {
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
  }
}

/* --- Pillars — depth layer --- */
.pillars {
  background: linear-gradient(180deg, var(--navy-soft) 0%, var(--navy-base) 100%);
  position: relative;
}

.pillars::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
}

.pillars .section-header {
  text-align: center;
  margin-bottom: 64px;
}

.pillars .section-header h2 .accent {
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.pillars .section-header p {
  margin: 16px auto 0;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pillar-card {
  background: rgba(30, 27, 60, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 40px 32px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}

.pillar-card:hover {
  border-color: var(--gold-border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.pillar-icon {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gold-glow);
  border-radius: 10px;
  border: 1px solid var(--gold-border);
}

.pillar-card h3 {
  margin-bottom: 12px;
}

.pillar-card p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* --- MCP Integration --- */
.mcp-section {
  position: relative;
  overflow: hidden;
}

.mcp-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
}

.mcp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.mcp-content h2 {
  margin-bottom: 20px;
}

.mcp-content h2 .accent {
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.mcp-content p {
  margin-bottom: 16px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.mcp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.mcp-tool {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--gold-glow);
  color: var(--gold-pale);
  border: 1px solid var(--gold-border);
  letter-spacing: 0.02em;
}

.mcp-terminal {
  background: var(--code-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 960px) {
  .mcp-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* --- Built for Both --- */
.built-for-both {
  position: relative;
  overflow: hidden;
}

.built-for-both::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
}

.both-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.both-content h2 {
  margin-bottom: 24px;
}

.both-content h2 .accent {
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.both-content p {
  margin: 0 auto 20px;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.both-content p:last-child {
  margin-bottom: 0;
}

/* --- AI Optional — atmospheric section --- */
.ai-optional {
  position: relative;
  overflow: hidden;
}

.ai-optional::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(196, 154, 60, 0.04) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(60px);
}

.ai-optional .section-header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  z-index: 1;
}

.ai-optional .section-header h2 .accent {
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.ai-optional .section-header p {
  margin: 16px auto 0;
  max-width: 600px;
}

.ai-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.ai-option {
  background: rgba(30, 27, 60, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.ai-option:hover {
  border-color: var(--gold-border-hover);
  transform: translateY(-2px);
}

.ai-option-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.ai-option h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.ai-option p {
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .ai-options {
    grid-template-columns: 1fr;
  }
}

/* --- Self-Hosted — depth layer --- */
.self-hosted {
  background: linear-gradient(180deg, var(--navy-soft) 0%, var(--navy-base) 100%);
  position: relative;
}

.self-hosted::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
}

.self-hosted .container {
  max-width: 800px;
}

.self-hosted .section-header {
  text-align: center;
  margin-bottom: 48px;
}

.self-hosted .section-header h2 .accent {
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.self-hosted .section-header p {
  margin: 16px auto 0;
}

/* Install block — floating, no harsh border */
.install-block {
  background: var(--code-bg);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.install-block .terminal-bar {
  padding: 12px 16px;
}

.install-block pre {
  padding: 28px;
  font-size: 0.9375rem;
  line-height: 2;
  color: var(--text);
  overflow-x: auto;
}

.install-block .comment {
  color: var(--text-dim);
}

.install-block .prompt {
  color: var(--gold);
}

.self-hosted-footer {
  text-align: center;
}

.self-hosted-footer .pricing-callout {
  font-size: 1.125rem;
  color: var(--text);
  margin: 0 auto 16px;
  max-width: 560px;
}

.self-hosted-footer .pricing-callout strong {
  color: var(--gold);
}

.self-hosted-footer p {
  margin: 0 auto 12px;
  max-width: 560px;
}

.self-hosted-footer .note {
  font-size: 0.875rem;
  color: var(--text-dim);
  font-style: italic;
}

/* --- Blog Teaser --- */
.blog-teaser {
  position: relative;
}

.blog-teaser::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
}

.blog-teaser .section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}

.blog-teaser .section-header a {
  font-size: 0.875rem;
  font-weight: 500;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.blog-card {
  background: rgba(30, 27, 60, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 32px;
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--gold-border-hover);
  transform: translateY(-2px);
}

.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.blog-card h3 {
  margin-bottom: 12px;
  line-height: 1.35;
}

.blog-card h3 a {
  color: var(--text);
}

.blog-card h3 a:hover {
  color: var(--gold);
}

.blog-card p {
  font-size: 0.9375rem;
  flex-grow: 1;
}

.blog-card .read-more {
  margin-top: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold);
}

@media (max-width: 768px) {
  .blog-cards {
    grid-template-columns: 1fr;
  }

  .blog-teaser .section-header {
    flex-direction: column;
    gap: 8px;
  }
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 140px 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(90, 62, 158, 0.1) 0%, rgba(196, 154, 60, 0.05) 40%, transparent 65%);
  pointer-events: none;
  filter: blur(80px);
}

.cta-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: 16px;
}

.cta-content p {
  margin: 0 auto 40px;
  font-size: 1.125rem;
}

/* --- Footer --- */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--gold-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Cookie Consent Bar --- */
.cc-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(18, 16, 46, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--gold-border);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.4);
  animation: cc-slide-up 0.5s var(--ease-out) both;
}

@keyframes cc-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cc-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cc-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  max-width: none;
  line-height: 1.5;
}

.cc-link {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold-border-hover);
  text-underline-offset: 2px;
}

.cc-link:hover {
  color: var(--gold-bright);
  text-decoration-color: var(--gold-bright);
}

.cc-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cc-btn {
  padding: 8px 20px;
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .cc-inner {
    flex-direction: column;
    text-align: center;
    padding: 20px 20px 24px;
    gap: 14px;
  }

  .cc-actions {
    width: 100%;
  }

  .cc-btn {
    flex: 1;
  }
}

/* ============================================
   Blog Page Styles
   ============================================ */

/* --- Blog Index --- */
.blog-hero {
  padding-top: 140px;
  padding-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 20%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(196, 154, 60, 0.04) 0%, rgba(90, 62, 158, 0.05) 40%, transparent 65%);
  pointer-events: none;
  filter: blur(80px);
}

.blog-hero h1 {
  margin-bottom: 12px;
  position: relative;
}

.blog-hero p {
  font-size: 1.0625rem;
  position: relative;
  max-width: none;
}

.blog-list {
  padding-top: 0;
  padding-bottom: var(--section-pad);
}

.blog-list-item {
  border-bottom: 1px solid var(--gold-border);
  padding: 40px 0;
  transition: background 0.2s ease;
}

.blog-list-item:hover {
  background: rgba(30, 27, 60, 0.4);
  margin: 0 -24px;
  padding: 40px 24px;
  border-radius: 8px;
}

.blog-list-item:first-child {
  border-top: 1px solid var(--gold-border);
}

.blog-list-item a {
  display: block;
  color: var(--text);
}

.blog-list-item a:hover h2 {
  color: var(--gold);
}

.blog-list-item h2 {
  font-size: 1.375rem;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.blog-list-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.blog-list-item p {
  font-size: 0.9375rem;
  color: #c4c0d4;
}

/* --- Blog Article --- */
.article-header {
  padding-top: 140px;
  padding-bottom: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-header::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(196, 154, 60, 0.04) 0%, rgba(90, 62, 158, 0.06) 40%, transparent 65%);
  pointer-events: none;
  filter: blur(80px);
}

.article-header .container {
  max-width: 860px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.article-back:hover {
  color: var(--gold);
}

.article-header h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.article-body {
  padding-bottom: var(--section-pad);
}

.article-body .container {
  max-width: 820px;
}

.article-body h2 {
  font-size: 1.5rem;
  margin-top: 56px;
  margin-bottom: 20px;
}

.article-body h3 {
  font-size: 1.2rem;
  margin-top: 40px;
  margin-bottom: 16px;
}

.article-body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #c4c0d4;
  margin-bottom: 24px;
  max-width: none;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

.article-body ul, .article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-muted);
}

.article-body li {
  margin-bottom: 8px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #c4c0d4;
}

.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--gold-glow);
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
}

.article-body pre {
  background: var(--code-bg);
  border-radius: 12px;
  padding: 28px;
  margin: 40px 0;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.75;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.article-body code {
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold-pale);
  border: 1px solid var(--gold-border);
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

.article-body figure,
.article-body .article-figure {
  margin: 40px 0;
}

.article-body figure img,
.article-body .article-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-body figcaption {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 12px;
  font-style: italic;
}

.article-body .highlight-comment {
  color: #8a8599;
}

.article-body .highlight-string {
  color: var(--gold-pale);
}

.article-body .highlight-keyword {
  color: var(--gold);
}

.article-body a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold-border-hover);
}

.article-body a:hover {
  text-decoration-color: var(--gold);
}

/* --- Article next teaser --- */
/* --- Article URL copy widget --- */
.article-url-row {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  margin-top: 48px;
  margin-bottom: 48px;
}

.article-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 10px 16px;
  outline: none;
  cursor: text;
}

.article-url-copy {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 8px 8px 0;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.article-url-copy:hover {
  color: var(--gold);
  border-color: var(--gold-border-hover);
}

/* --- Article next teaser --- */
.article-next {
  border-top: 1px solid var(--gold-border);
  padding: 48px 0;
}

.article-next .container {
  max-width: 820px;
}

.article-next-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #8a8599;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.article-next a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.article-next a:hover {
  color: var(--gold);
}

/* ============================================
   Contact Page
   ============================================ */

.contact-page {
  padding-top: 140px;
  padding-bottom: var(--section-pad);
  min-height: 80vh;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-info h1 {
  margin-bottom: 16px;
}

.contact-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.contact-channel a {
  color: var(--gold);
}

.contact-channel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold-glow);
  color: var(--gold);
  flex-shrink: 0;
}

/* --- Form --- */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  padding: 36px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-input {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--code-bg);
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  width: 100%;
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 154, 60, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-group.has-error .form-input {
  border-color: #e05252;
}

.form-error {
  font-size: 0.8125rem;
  color: #e05252;
  margin-top: 6px;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 4px;
}

/* --- Flash messages --- */
.alert {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.9375rem;
  margin-bottom: 18px;
}

.alert-success {
  background: rgba(74, 180, 100, 0.12);
  border: 1px solid rgba(74, 180, 100, 0.3);
  color: #6dd492;
}

.alert-error {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.3);
  color: #e87272;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-form-wrap {
    padding: 24px;
  }

  .contact-submit {
    width: 100%;
  }
}
