/* === Article page — shared styles === */

:root {
  --bg-base: #f6f7fb;
  --bg-elevated: #ffffff;
  --bg-deepest: #ede9fe;
  --border: rgba(15, 16, 30, 0.08);
  --border-strong: rgba(15, 16, 30, 0.16);
  --text-primary: #0d0e1a;
  --text-secondary: #4a4a60;
  --text-tertiary: #6b6b80;
  --accent-1: #7c5cff;
  --accent-2: #5b3fd8;
  --accent-3: #3b82f6;
  --accent-4: #a78bfa;
  --gradient-text: linear-gradient(90deg, #7c5cff 0%, #5b3fd8 50%, #3b82f6 100%);
}

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Geist', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  letter-spacing: -0.01em;
  line-height: 1.5;
}

/* Atmosphere */
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(800px circle at 20% 0%, rgba(124, 92, 255, 0.10), transparent 50%),
    radial-gradient(700px circle at 80% 60%, rgba(59, 130, 246, 0.10), transparent 50%),
    linear-gradient(rgba(15, 16, 30, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 16, 30, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 6rem 6rem, 6rem 6rem;
}

/* Typography */
.font-serif-italic { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
.font-mono { font-family: 'Geist Mono', monospace; }
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* Selection / scrollbar */
::selection { background: var(--accent-1); color: #ffffff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-1), var(--accent-3));
  border-radius: 8px; border: 2px solid var(--bg-base);
}

/* Header */
.article-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.article-header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.article-header a { color: inherit; text-decoration: none; }
.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-secondary);
  transition: color 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-back:hover { color: var(--text-primary); transform: translateX(-2px); }
.article-brand {
  font-family: 'Geist', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
}

.article-brand .article-brand-mark {
  height: 1.85rem !important;
  width: auto !important;
  max-width: 2.2rem !important;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

/* === Language switcher (article pages) === */
.article-header-inner {
  gap: 1rem;
}

.article-header-inner .lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(15, 16, 30, 0.04);
  border: 1px solid var(--border);
  font-family: 'Geist Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-left: auto;
}

.article-header-inner .lang-switch-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: var(--gradient-text);
  color: #ffffff;
}

.article-header-inner .lang-switch-other {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.article-header-inner .lang-switch-other:hover {
  color: var(--accent-2);
  background: rgba(124, 92, 255, 0.10);
}

.article-brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  line-height: 1;
}

.article-brand-name em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Article container */
.article-shell { position: relative; z-index: 1; }
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

/* Article meta + title */
.article-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}
.article-meta .cat { color: var(--accent-2); }
.article-meta .sep { opacity: 0.5; }
.article-title {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--text-primary);
}
.article-lede {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0 0 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* Prose */
.prose { color: var(--text-primary); }
.prose > * + * { margin-top: 1.4em; }
.prose p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
.prose h2 {
  font-family: 'Geist', sans-serif;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 64px 0 20px;
  color: var(--text-primary);
}
.prose h2 + p { margin-top: 0; }
.prose h3 {
  font-family: 'Geist', sans-serif;
  font-size: 19px; font-weight: 600;
  margin: 40px 0 12px;
  color: var(--text-primary);
}
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
.prose a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 63, 216, 0.30);
  transition: border-color 0.3s;
}
.prose a:hover { border-bottom-color: var(--accent-2); }

.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative; padding-left: 1.4em;
  margin-bottom: 0.5em;
  font-size: 17px; line-height: 1.7;
}
.prose ul li::before {
  content: ''; position: absolute;
  left: 0; top: 0.7em;
  width: 14px; height: 1px;
  background: var(--accent-2);
}
.prose ol { padding-left: 1.6em; }
.prose ol li { margin-bottom: 0.5em; font-size: 17px; line-height: 1.7; }
.prose ol li::marker { color: var(--text-tertiary); font-family: 'Geist Mono', monospace; font-size: 13px; }

.prose blockquote {
  border-left: 2px solid var(--accent-2);
  padding: 4px 0 4px 22px;
  margin: 32px 0;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 21px; line-height: 1.5;
  color: var(--text-secondary);
}

.prose code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-deepest);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-2);
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 56px 0;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.prose th {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-tertiary);
  font-weight: 500;
  border-bottom-color: var(--border-strong);
}
.prose td { color: var(--text-primary); }
.prose tbody tr:hover { background: rgba(124, 92, 255, 0.04); }

/* Footer CTA */
.article-cta {
  max-width: 720px;
  margin: 80px auto 0;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(91, 63, 216, 0.08);
  position: relative; overflow: hidden;
}
.article-cta::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, transparent 30%, rgba(124, 92, 255, 0.45) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.5; pointer-events: none;
}
.article-cta-eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.article-cta-title {
  font-family: 'Geist', sans-serif;
  font-size: 24px; line-height: 1.2;
  letter-spacing: -0.025em; font-weight: 500;
  margin: 0 0 8px;
}
.article-cta-desc {
  color: var(--text-secondary);
  font-size: 14px; margin: 0 0 22px;
}
.article-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: var(--gradient-text);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(91, 63, 216, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(91, 63, 216, 0.32);
}
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.85);
}
.btn-ghost:hover { background: var(--bg-deepest); border-color: var(--accent-1); color: var(--accent-2); }

/* Footer mini */
.article-foot {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 32px 24px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-tertiary);
  text-align: center;
}
.article-foot a { color: var(--text-tertiary); text-decoration: none; transition: color 0.3s; }
.article-foot a:hover { color: var(--accent-2); }

@media (max-width: 600px) {
  .article-wrap { padding: 56px 20px 80px; }
  .article-lede { font-size: 19px; }
  .prose p, .prose ul li, .prose ol li { font-size: 16px; }
  .prose h2 { font-size: 24px; }
}
