/* ============================================================
   ARUBHE — Article page styles
   Shares the design tokens from index.html / contact.html
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:root {
  --bg: #08090a;
  --bg-panel: #0f1011;
  --bg-elevated: #131416;
  --text: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-tertiary: #8a8f98;
  --text-quaternary: #62666d;
  --border: rgba(255,255,255,0.08);
  --border-subtle: rgba(255,255,255,0.05);
  --border-strong: rgba(255,255,255,0.14);
  --surface-1: rgba(255,255,255,0.02);
  --surface-2: rgba(255,255,255,0.04);
  --success: #10b981;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 760px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv01', 'ss03', 'ss02';
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.serif-i { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.skip-link {
  position: absolute; left: 12px; top: 12px;
  padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 600;
  transform: translateY(-200%);
  transition: transform 200ms var(--easing);
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* ---- Nav ---- */
.nav-wrap { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 16px 0; pointer-events: none; }
.nav-wrap .container { max-width: 1200px; }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 10px 14px 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(15, 16, 17, 0.68);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--text);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); flex-shrink: 0;
}
.brand-mark svg { width: 14px; height: 14px; }
.brand-name { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-links { display: none; align-items: center; gap: 22px; }
.nav-links a { font-size: 13.5px; color: var(--text-secondary); transition: color 150ms var(--easing); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { padding: 7px 14px; border-radius: var(--radius-pill); background: var(--text); color: var(--bg); font-size: 13px; font-weight: 500; }
.menu-btn { padding: 7px 12px; border-radius: var(--radius-pill); background: var(--surface-1); border: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}

#mobileMenu { position: fixed; inset: 0; z-index: 60; background: rgba(8,9,10,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: none; }
#mobileMenu.open { display: block; }
#mobileMenu .panel { width: calc(100% - 32px); max-width: 420px; margin: 80px auto 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 20px; }
#mobileMenu nav { display: grid; gap: 2px; margin-top: 16px; }
#mobileMenu nav a { padding: 12px 14px; border-radius: var(--radius-md); font-size: 15px; color: var(--text-secondary); transition: background 150ms var(--easing); }
#mobileMenu nav a:hover { background: var(--surface-1); color: var(--text); }
#mobileMenu .nav-cta { display: block; text-align: center; margin-top: 6px; padding: 12px 16px; font-size: 14px; }

/* ---- Article page ---- */
.article-page {
  position: relative;
  padding: 120px 0 64px;
  background:
    radial-gradient(800px 400px at 50% -10%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(180deg, #0a0b0c 0%, var(--bg) 60%);
  overflow: hidden;
}
@media (min-width: 768px) { .article-page { padding: 152px 0 96px; } }
.article-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center top, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center top, black, transparent 70%);
}
.article-page > .container { position: relative; z-index: 1; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--text-tertiary);
  margin-bottom: 28px;
  transition: color 150ms var(--easing);
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 14px; height: 14px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--surface-1); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
}
.meta {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-tertiary);
}

.article-head { margin-bottom: 40px; }
.article-eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-bottom: 22px;
}
.article-date { font-size: 12px; color: var(--text-tertiary); letter-spacing: 0.04em; }

.article-head h1 {
  font-size: clamp(34px, 5.4vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.028em;
  color: var(--text);
  margin-bottom: 22px;
}
.article-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 640px;
}
@media (min-width: 768px) { .article-lede { font-size: 19px; } }

/* Figure */
.article-figure {
  margin: 40px 0 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #131416 0%, #0a0b0c 100%);
  border: 1px solid var(--border);
  aspect-ratio: 2 / 1;
}
.article-figure svg { width: 100%; height: 100%; }

/* Prose */
.prose {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}
@media (min-width: 768px) { .prose { font-size: 17px; line-height: 1.75; } }

.prose h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 590; font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
}
.prose h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}
.prose p { margin-bottom: 18px; }
.prose p + p { margin-top: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; color: var(--text); }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--text); }

.prose ul, .prose ol { margin: 18px 0 24px; padding-left: 0; }
.prose ul li, .prose ol li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}
.prose ul li::before {
  content: "";
  position: absolute; left: 4px; top: 13px;
  width: 12px; height: 1px;
  background: var(--text-quaternary);
}
.prose ol { counter-reset: list; }
.prose ol li { counter-increment: list; }
.prose ol li::before {
  content: counter(list);
  position: absolute; left: 0; top: 0;
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  margin-top: 4px;
}

.prose blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 2px solid var(--text-tertiary);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  font-style: normal;
  letter-spacing: -0.014em;
  background: var(--surface-1);
  border-radius: 4px;
}

.prose .callout {
  margin: 28px 0;
  padding: 22px 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15.5px;
  color: var(--text-secondary);
}
.prose .callout strong { display: block; color: var(--text); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.prose th, .prose td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.prose th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.prose td { color: var(--text-secondary); }
.prose tr:last-child td { border-bottom: 0; }

/* CTA card */
.article-cta-card {
  margin-top: 64px;
  padding: 32px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: grid; gap: 24px;
}
@media (min-width: 640px) { .article-cta-card { grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 36px; } }
.article-cta-card h3 {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.016em;
  line-height: 1.25;
  color: var(--text);
}
.article-cta-card p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-tertiary);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em; white-space: nowrap;
  transition: background 200ms var(--easing), border-color 200ms var(--easing), transform 200ms var(--easing);
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: #fff; }
.btn svg { width: 14px; height: 14px; transition: transform 200ms var(--easing); }
.btn:hover svg { transform: translateX(2px); }

/* More insights nav */
.article-nav { margin-top: 56px; }
.article-nav .meta { margin-bottom: 16px; }
.article-nav-grid {
  display: grid; gap: 12px;
}
@media (min-width: 640px) { .article-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-article {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 22px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 200ms var(--easing), border-color 200ms var(--easing), transform 200ms var(--easing);
}
.mini-article:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }
.mini-article strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 590; font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
}
.mini-article .article__cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
  margin-top: 4px;
  transition: color 200ms var(--easing);
}
.mini-article .article__cta svg { width: 12px; height: 12px; transition: transform 200ms var(--easing); }
.mini-article:hover .article__cta { color: var(--text); }
.mini-article:hover .article__cta svg { transform: translateX(3px); }

/* Footer */
.article-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
}
.article-footer .container {
  max-width: 1200px;
  display: flex; flex-direction: column; gap: 12px;
  justify-content: space-between; align-items: flex-start;
  font-size: 12px; color: var(--text-tertiary);
}
@media (min-width: 640px) { .article-footer .container { flex-direction: row; align-items: center; } }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
