@import url("blog.css");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500&family=IBM+Plex+Sans:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap");
/* Samadhan Mishra — shared portal styles */

/* ── Default / Light Vintage ─────────────────────────────── */
:root,
[data-theme="light"] {
  --bg: #f7f0e3;
  --surface: #fffaf0;
  --surface-2: #f3e8d3;
  --card: #fffaf0;
  --ink: #1f2933;
  --muted: #6b6256;
  --soft: rgba(101, 87, 65, 0.22);
  --soft-solid: #d9cbb8;
  --blue: #255ea8;
  --blue-dark: #173f7a;
  --blue-light: rgba(37, 94, 168, 0.08);
  --accent: #a66f2f;
  --shadow: 0 18px 50px rgba(82, 64, 39, 0.13);
  --shadow-sm: 0 8px 28px rgba(82, 64, 39, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1120px;
}

/* ── Dark Mode (homepage premium editorial) ──────────────── */
[data-theme="dark"] {
  --bg: #050505;
  --surface: #0a0a0a;
  --surface-2: #111111;
  --card: rgba(255, 255, 255, 0.04);
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --soft: rgba(255, 255, 255, 0.1);
  --soft-solid: rgba(255, 255, 255, 0.14);
  --blue: rgba(255, 255, 255, 0.85);
  --blue-dark: #ffffff;
  --blue-light: rgba(255, 255, 255, 0.06);
  --accent: rgba(255, 255, 255, 0.7);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.3);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(37, 94, 168, 0.10), transparent 34rem),
    radial-gradient(circle at top right, rgba(166, 111, 47, 0.08), transparent 30rem),
    var(--bg);
}

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

/* ============================================================
   Site navigation — matches React homepage Navigation.jsx
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(5, 5, 5, 0.55);
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  transition: background 0.35s ease, border-color 0.35s ease;
}

[data-theme="light"] .site-nav {
  background: rgba(247, 240, 227, 0.92);
  border-bottom-color: rgba(101, 87, 65, 0.15);
}

.site-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 16px;
}

@media (min-width: 768px) {
  .site-nav-inner { padding: 20px 48px; }
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.site-logo-box {
  display: inline-flex;
  height: 28px;
  width: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.3));
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.site-brand:hover .site-logo-box {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

[data-theme="light"] .site-brand:hover .site-logo-box {
  background: #1f2933;
  color: #f7f0e3;
  border-color: #1f2933;
}

.site-brand-text {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--muted);
}

.site-menu {
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.1vw, 18px);
  min-width: 0;
  padding: 0 4px;
  flex-wrap: nowrap;
}

@media (min-width: 1100px) {
  .site-menu { display: flex; }
}

.site-menu-link {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  transition: color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-menu-link--blog {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-menu-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
  animation: siteTimeBlink 1.4s ease-in-out infinite;
}

.site-menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-menu-link:hover,
.site-menu-link.is-active {
  color: var(--ink);
}

.site-menu-link:hover::after,
.site-menu-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.site-nav-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-time {
  display: none;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--muted);
}

.site-time .site-time-dot {
  display: none;
}

@media (min-width: 768px) {
  .site-time { display: flex; }
}

.site-time-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: siteTimeBlink 1.4s ease-in-out infinite;
}

@keyframes siteTimeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.site-theme-toggle {
  display: none;
  height: 32px;
  width: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.2));
  background: transparent;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
  .site-theme-toggle { display: inline-flex; }
}

.site-theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.site-nav-toggle {
  display: inline-flex;
  height: 36px;
  width: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.2));
  background: transparent;
  cursor: pointer;
  padding: 0;
}

@media (min-width: 1100px) {
  .site-nav-toggle { display: none; }
}

.site-nav-toggle-bar {
  display: block;
  height: 1px;
  width: 16px;
  background: var(--ink);
  transition: transform 0.45s ease;
}

html.site-nav-open .site-nav-toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

html.site-nav-open .site-nav-toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.site-nav-mobile {
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  background: var(--bg);
  padding: 24px;
}

.site-nav-mobile nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-nav-mobile .site-menu-link {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  text-transform: none;
}

.site-nav-mobile .site-menu-link::after { display: none; }

/* Legacy navbar — redirect/minimal pages */
.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(5, 5, 5, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .navbar {
  background: rgba(247, 240, 227, 0.92);
  border-color: rgba(101, 87, 65, 0.15);
}

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

.brand {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand span { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

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

/* Static portal pages — content above dot field */
.portal-page main,
.portal-page .page,
.portal-page header.hero,
.portal-page .site-footer {
  position: relative;
  z-index: 1;
}

/* Breadcrumbs */
.breadcrumbs {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { color: var(--soft); user-select: none; }
.breadcrumbs .current { color: var(--ink); font-weight: 500; }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 42px;
  align-items: center;
}

.hero-compact { padding-top: 24px; padding-bottom: 32px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 18px;
}

[data-theme="light"] .eyebrow {
  padding: 8px 14px;
  border: 1px solid #bfdbfe;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.hero h1 {
  font-family: "Outfit", sans-serif;
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}

.hero-home h1 {
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.94;
}

.hero-text {
  font-size: 19px;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 850;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.20);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--soft);
}

.button.ghost {
  background: transparent;
  color: var(--blue);
  border: 1px solid #bfdbfe;
  min-height: 44px;
  font-size: 14px;
}

.button:hover { transform: translateY(-2px); }

.button.disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

.profile-card {
  background: linear-gradient(145deg, #0f172a, #1e3a8a);
  color: white;
  border-radius: 34px;
  padding: 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.22);
  right: -90px;
  top: -90px;
}

.profile-card-content { position: relative; z-index: 1; }

.profile-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.profile-card p { margin: 0; color: #dbeafe; }

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

/* Page layout */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px 80px;
}

.section-header {
  margin: 42px 0 18px;
}

.section-header h2 {
  font-family: "Outfit", sans-serif;
  font-weight: 300;
  font-size: 34px;
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.section-header p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 680px;
}

/* Cards */
.card,
.featured-card,
.about-card,
.content-section {
  background: var(--card);
  border: 1px solid var(--soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover:not(.disabled) {
  transform: translateY(-4px);
  border-color: var(--line-strong, #93c5fd);
}

[data-theme="dark"] .card:hover:not(.disabled) {
  border-color: rgba(255, 255, 255, 0.22);
}

.card.disabled {
  opacity: 0.72;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 900;
  margin-bottom: 16px;
  font-size: 14px;
}

.kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.card h3,
.featured-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.card p,
.featured-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.live {
  background: #dcfce7;
  color: #166534;
}

.badge.soon {
  background: #f1f5f9;
  color: var(--muted);
}

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

.featured {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.featured-card {
  padding: 32px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.95)), white;
  box-shadow: var(--shadow);
}

.featured-card h3 { font-size: 32px; line-height: 1.08; }

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 900;
}

.side-stack { display: grid; gap: 18px; }

/* Lists */
.chapter-list,
.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.chapter-list li,
.module-list li {
  border: 1px solid var(--soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.chapter-list a,
.module-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  transition: background 0.15s;
}

.chapter-list a:hover { background: var(--blue-light); }

.chapter-list .item-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  color: var(--muted);
}

.chapter-num {
  font-size: 12px;
  font-weight: 900;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* About */
.about-card {
  padding: 34px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), transparent), white;
  box-shadow: var(--shadow);
}

.about-card h2 {
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 0;
}

.about-card p { color: var(--muted); margin: 0 0 14px; }

.principles { display: grid; gap: 12px; }

.principle {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--soft);
  color: var(--muted);
  font-weight: 650;
  font-size: 15px;
}

/* Article layout */
.article-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}

.article-meta-bar span::before {
  content: "·";
  margin-right: 10px;
  color: var(--soft);
}

.article-meta-bar span:first-child::before { content: none; margin: 0; }

.toc {
  position: sticky;
  top: 88px;
  padding: 20px 18px;
  border-radius: var(--radius-sm);
}

.toc-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 0 0 12px;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.toc li { margin-bottom: 7px; color: var(--muted); }
.toc a { font-weight: 650; color: var(--muted); }
.toc a:hover { color: var(--blue); }

.content-section {
  padding: 32px 36px;
  margin-bottom: 24px;
}

.content-section h2 {
  font-size: 26px;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  line-height: 1.15;
}

.content-section h3 {
  font-size: 19px;
  letter-spacing: -0.03em;
  margin: 24px 0 10px;
}

.content-section p { margin: 0 0 14px; }
.content-section ul, .content-section ol { margin: 0 0 14px; padding-left: 22px; }
.content-section li { margin-bottom: 6px; }

.content-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--blue-dark);
}

.example-sentence {
  font-size: 17px;
  font-weight: 650;
  font-style: italic;
  padding: 16px 20px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px dashed var(--soft);
  margin: 16px 0;
}

.callout {
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 20px 0;
  border-left: 4px solid var(--blue);
}

.callout.insight { background: var(--blue-light); }
.callout.example { background: #fffbeb; border-color: var(--accent); }
.callout.product { background: #f0fdf4; border-color: #22c55e; }
.callout.warning { background: #fef2f2; border-color: #ef4444; }

.callout-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.callout p { margin: 0; font-size: 15px; }

.concept-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.concept-item {
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--soft);
  text-align: center;
}

.concept-item strong {
  display: block;
  font-size: 14px;
  color: var(--blue);
  margin-bottom: 6px;
}

.concept-item span { font-size: 13px; color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--soft);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--soft);
}

th {
  background: var(--surface-2);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td { border-bottom: none; }

/* Quiz */
.quiz { display: grid; gap: 16px; }

.quiz-item {
  padding: 18px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--soft);
}

.quiz-item strong { display: block; margin-bottom: 8px; }

.quiz-item details {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.quiz-item summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 750;
}

/* Chapter nav */
.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 24px;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.outcome {
  padding: 14px 16px;
  background: var(--blue-light);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  color: var(--blue-dark);
}

/* Footer */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 60px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--soft);
}

/* Redirect page */
.redirect-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.redirect-card {
  max-width: 520px;
  padding: 40px;
  text-align: center;
}

.redirect-card h1 {
  font-size: 28px;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}

.redirect-card p { color: var(--muted); margin: 0 0 24px; }

/* Portfolio */
.work-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.work-card h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.work-meta {
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.work-meta dt {
  font-weight: 800;
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 2px;
}

.work-meta dd { margin: 0 0 8px; }

.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.theme-tag {
  padding: 5px 10px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.portfolio-detail {
  padding: 32px;
  margin-bottom: 22px;
}

.portfolio-detail h3 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.portfolio-detail p {
  color: var(--muted);
  margin: 0 0 12px;
}

.portfolio-detail ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--muted);
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-badge {
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid var(--soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

footer.site-footer {
  justify-content: center;
  text-align: center;
}

.nav-links a.active {
  color: var(--blue);
}

.hero-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 20px;
}

@media (max-width: 900px) {
  .hero-grid,
  .featured,
  .about-card,
  .grid-3,
  .grid-2,
  .concept-block,
  .outcomes {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc { position: static; }

  .nav-links { display: none; }

  footer { flex-direction: column; }

  .content-section { padding: 24px 20px; }
}

/* ============================================================
   DARK MODE — Portfolio / legacy page overrides
   ============================================================ */
[data-theme="dark"] .card,
[data-theme="dark"] .featured-card,
[data-theme="dark"] .about-card,
[data-theme="dark"] .content-section {
  background: var(--card);
  border-color: rgba(148, 163, 184, 0.12);
  color: var(--ink);
}

[data-theme="dark"] .card:hover:not(.disabled) { border-color: rgba(59, 130, 246, 0.4); }

[data-theme="dark"] .card h3,
[data-theme="dark"] .featured-card h3 { color: var(--ink); }

[data-theme="dark"] .card p,
[data-theme="dark"] .featured-card p { color: var(--muted); }

[data-theme="dark"] .eyebrow {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--blue-dark);
}

[data-theme="dark"] .button.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .button.secondary {
  background: var(--surface);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--ink);
}

[data-theme="dark"] .button.ghost {
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--blue);
}

[data-theme="dark"] .badge.live {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

[data-theme="dark"] .badge.soon {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

[data-theme="dark"] .section-header h2 { color: var(--ink); }

[data-theme="dark"] th { background: var(--surface-2); color: var(--muted); }
[data-theme="dark"] td { color: var(--muted); }
[data-theme="dark"] th, [data-theme="dark"] td { border-color: rgba(148, 163, 184, 0.1); }

[data-theme="dark"] .table-wrap { border-color: rgba(148, 163, 184, 0.12); }

[data-theme="dark"] .profile-card { background: linear-gradient(145deg, #0d1324, #173f7a); }

[data-theme="dark"] .featured-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(17,24,39,0.9));
}

[data-theme="dark"] .about-card {
  background: linear-gradient(135deg, rgba(17,24,39,0.6), rgba(13,19,36,0.95));
}

[data-theme="dark"] .callout.insight { background: rgba(59,130,246,0.1); }
[data-theme="dark"] .callout.product { background: rgba(74,222,128,0.08); }
[data-theme="dark"] .callout.example { background: rgba(245,158,11,0.1); }
[data-theme="dark"] .callout.warning { background: rgba(239,68,68,0.1); }

[data-theme="dark"] .concept-item {
  background: var(--surface-2);
  border-color: rgba(148,163,184,0.12);
}

[data-theme="dark"] .quiz-item {
  background: var(--surface-2);
  border-color: rgba(148,163,184,0.12);
}

[data-theme="dark"] .portfolio-detail { border-color: rgba(148,163,184,0.1); }

[data-theme="dark"] footer { border-color: rgba(148,163,184,0.1); }

[data-theme="dark"] .meta-badge {
  background: var(--surface-2);
  border-color: rgba(148,163,184,0.15);
  color: var(--muted);
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--soft-solid, rgba(101,87,65,0.3));
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.theme-toggle-icon {
  line-height: 1;
  display: block;
  pointer-events: none;
  font-style: normal;
}

/* ============================================================
   ORBIT SYSTEM — two-level circular orbit animation
   Used on /blog/ and /blog/ai-learning/ heroes
   ============================================================ */
.orbit-system {
  position: relative;
  width: 420px;
  height: 420px;
  flex-shrink: 0;
  margin: auto;
}

.orbit-system .orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: none !important;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 3;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.orbit-system .orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  transform: translate(-50%, -50%);
  background: transparent;
  z-index: 1;
}

.orbit-ring-inner {
  --r: 122px;
  --step: 90deg;
  --dur: 28s;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  animation: orbitCW var(--dur) linear infinite;
}

.orbit-ring-outer {
  --r: 196px;
  --step: 60deg;
  --dur: 42s;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  /* Half-step offset so inner/outer pills interleave symmetrically */
  animation: orbitCW var(--dur) linear infinite;
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform:
    rotate(calc(var(--i, 0) * var(--step, 90deg)))
    translateY(calc(-1 * var(--r, 122px)));
}

.orbit-ring-outer .orbit-item {
  transform:
    rotate(calc((var(--i, 0) + 0.5) * var(--step, 60deg)))
    translateY(calc(-1 * var(--r, 196px)));
}

/* Cancels placement angle + ring spin so pills stay horizontal */
.orbit-ring-inner .orbit-item {
  --tilt: calc(-1 * var(--i, 0) * var(--step, 90deg));
}

.orbit-ring-outer .orbit-item {
  --tilt: calc(-1 * (var(--i, 0) + 0.5) * var(--step, 60deg));
}

.orbit-label-spin {
  display: flex;
  justify-content: center;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  animation: orbitLabelUpright var(--dur, 28s) linear infinite;
}

.orbit-system .orbit-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  white-space: nowrap;
  background: var(--cg-dark-card, var(--surface, rgba(255,255,255,0.06)));
  border: 1px solid var(--cg-border, var(--soft, rgba(255,255,255,0.1)));
  color: var(--cg-text-muted, var(--muted));
  position: relative;
  z-index: 2;
}

/* No blue marker dots on rings */
.orbit-system .orbit-ring::after {
  display: none;
}

@keyframes orbitCW {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbitLabelUpright {
  to {
    transform: translate(-50%, -50%) rotate(calc(var(--tilt, 0deg) - 360deg));
  }
}

/* Light vintage theme — orbit */
[data-theme="light"] .orbit-system .orbit-core {
  background: transparent !important;
  border-color: rgba(31, 41, 51, 0.35) !important;
  box-shadow: none !important;
  color: var(--muted);
}

[data-theme="light"] .orbit-system .orbit-ring {
  border-color: rgba(101, 87, 65, 0.22);
}

[data-theme="light"] .orbit-system .orbit-label {
  background: rgba(255, 250, 240, 0.92);
  border-color: rgba(101, 87, 65, 0.2);
  color: #5c4f3d;
}

/* Dark theme — orbit */
[data-theme="dark"] .orbit-system .orbit-core {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: none !important;
}

[data-theme="dark"] .orbit-system .orbit-ring {
  border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .orbit-system .orbit-label {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .orbit-ring { animation: none !important; border-style: solid; }
  .orbit-label-spin { animation: none !important; }
  .orbit-item {
    position: static !important;
    display: inline-flex;
    transform: none !important;
  }
  .orbit-ring-inner,
  .orbit-ring-outer {
    position: static !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    transform: none !important;
  }
  .orbit-system {
    width: auto !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .orbit-system .orbit-core {
    position: static !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    border-radius: 20px !important;
    padding: 8px 18px !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* Mobile — hide orbit on narrow viewports */
@media (max-width: 960px) {
  .orbit-system { display: none; }
}

/* =============================================
   Animated Dot Field — moving grid (homepage match)
   ============================================= */

@keyframes dotDriftSlow {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(48px, 48px, 0); }
}

@keyframes dotDriftFast {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-36px, 36px, 0); }
}

.animated-dot-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.animated-dot-field::before,
.animated-dot-field::after {
  content: "";
  position: absolute;
  inset: -80px;
  will-change: transform;
}

.animated-dot-field::before {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1.25px, transparent 1.25px);
  background-size: 40px 40px;
  animation: dotDriftSlow 55s linear infinite;
}

.animated-dot-field::after {
  background-image: radial-gradient(circle, rgba(96,  165, 250, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 14px 14px;
  opacity: 0.85;
  animation: dotDriftFast 38s linear infinite reverse;
}

[data-theme="light"] .animated-dot-field::before {
  background-image: radial-gradient(circle, rgba(90, 80, 65, 0.22) 1.25px, transparent 1.25px);
}

[data-theme="light"] .animated-dot-field::after {
  background-image: radial-gradient(circle, rgba(166, 111, 47, 0.18) 1px, transparent 1px);
}

.cg-blog-theme .animated-dot-field { z-index: 0; }

@media (prefers-reduced-motion: reduce) {
  .animated-dot-field::before,
  .animated-dot-field::after { animation: none; }
}
