/*
 * Portfolio landing (index.html only) — full-width layout, no sidebar.
 * Theory pages keep ml_theory.css; programming keeps python_101_common.css etc.
 */
:root {
  --pl-bg0: #f0f6ff;
  --pl-bg1: #e8eef8;
  --pl-surface: rgba(99, 102, 241, 0.06);
  --pl-surface2: rgba(99, 102, 241, 0.12);
  --pl-border: rgba(99, 102, 241, 0.15);
  --pl-text: #0f172a;
  --pl-muted: #64748b;
  --pl-accent: #0891b2;
  --pl-accent2: #7c3aed;
  --pl-warn: #d97706;
  --pl-card-ink: #0f172a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Skip-to-main accessibility link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: #4f46e5;
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  transition: top 0.12s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

html { scroll-behavior: smooth; }

body.portfolio-landing {
  min-height: 100vh;
  color: var(--pl-text);
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 120% 60% at 10% 0%, rgba(99, 102, 241, 0.1), transparent),
    radial-gradient(ellipse 80% 50% at 90% 100%, rgba(34, 211, 238, 0.08), transparent),
    linear-gradient(165deg, #f8faff 0%, #eef2fb 45%, #f4f0ff 100%);
  background-attachment: fixed;
}

.pl-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* —— Top bar —— */
.pl-top {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(248, 250, 255, 0.92);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  margin: 0 -1.25rem;
  padding: 0.75rem 1.25rem;
}
.pl-top-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.pl-brand {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--pl-text);
  text-decoration: none;
}
.pl-brand span { color: var(--pl-accent); }
.pl-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}
.pl-nav a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pl-muted);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.pl-nav a:hover { color: var(--pl-text); background: var(--pl-surface); }
.pl-nav .pl-nav-cta {
  color: #fff;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  font-weight: 600;
}
.pl-nav .pl-nav-cta:hover { filter: brightness(1.08); color: #fff; }

/* —— Hero —— */
.pl-hero {
  padding: 2.75rem 0 2rem;
}
.pl-hero-badge {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pl-accent);
  border: 1px solid rgba(8, 145, 178, 0.4);
  background: rgba(8, 145, 178, 0.07);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
/* Hero name — scale aligned with interactive lab (large display type) */
.pl-hero-name {
  font-size: clamp(2.75rem, 10vw, 4.75rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--pl-text);
  margin: 0 0 0.5rem;
  max-width: none;
}
.pl-hero-tagline {
  font-size: clamp(1.35rem, 3.6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  max-width: 22ch;
  margin: 0;
  color: var(--pl-text);
}
.pl-hero-tagline em {
  font-style: normal;
  background: linear-gradient(120deg, var(--pl-accent), var(--pl-accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pl-hero-lead {
  margin-top: 1.1rem;
  color: var(--pl-muted);
  font-size: clamp(15px, 2vw, 1.1rem);
  max-width: 52ch;
}
.pl-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.pl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s;
}
.pl-btn:hover { transform: translateY(-1px); }
.pl-btn-primary {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #fff;
  box-shadow: 0 4px 20px rgba(8, 145, 178, 0.28);
}
.pl-btn-primary:hover { filter: brightness(1.07); }
.pl-btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--pl-text);
  border: 1px solid var(--pl-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.pl-btn-ghost:hover { background: white; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }

/* —— Sections —— */
.pl-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--pl-border);
}
section[id].pl-section {
  scroll-margin-top: 4.75rem;
}
.pl-section:first-of-type { margin-top: 2rem; padding-top: 0; border-top: none; }

.pl-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}
.pl-sec-head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pl-sec-head p {
  font-size: 14px;
  color: var(--pl-muted);
  max-width: 42ch;
}

.pl-pill {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-accent2);
  margin-bottom: 0.5rem;
}

/* —— Project cards —— */
.pl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* Internal links: indigo/violet hover */
.pl-card {
  display: block;
  text-decoration: none;
  color: var(--pl-card-ink);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition: border-color 0.22s, box-shadow 0.25s, transform 0.2s, background 0.25s, color 0.22s;
}
.pl-card:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 16px 48px rgba(79, 70, 229, 0.22);
  transform: translateY(-3px);
}
.pl-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.65rem;
}
.pl-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
  min-width: 10rem;
}
.pl-card-title-wrap h3 {
  margin-bottom: 0;
  flex: 1;
}
.pl-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pl-surface2);
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease;
}
.pl-card:hover .pl-card-icon {
  transform: scale(1.1) rotate(6deg);
  background: rgba(255, 255, 255, 0.25);
}

.pl-status {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pl-status-in-progress {
  background: #dbeafe;
  color: #0369a1;
}
.pl-status-production {
  background: #dcfce7;
  color: #15803d;
}
.pl-status-research {
  background: #ffedd5;
  color: #b45309;
}

.pl-timeline-hint {
  font-size: 12px;
  color: var(--pl-muted);
  margin: 0.35rem 0 0;
}

.pl-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #0f172a;
  transition: color 0.22s;
}
.pl-card .pl-card-head + p {
  margin-top: 0;
}
.pl-card .pl-card-head h3 {
  margin-bottom: 0;
}
.pl-card p {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  transition: color 0.22s;
}
.pl-card-meta {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  color: #0891b2;
  margin-top: 0.65rem;
  word-break: break-all;
  transition: color 0.22s;
}
.pl-card:hover h3,
.pl-card:hover p { color: white; }
.pl-card:hover .pl-card-meta { color: rgba(255, 255, 255, 0.65); }

/* External GitHub links: teal hover + ↗ indicator */
.pl-card.pl-card-ext {
  border-left: 4px solid #0d9488;
}
.pl-card.pl-card-ext .pl-card-meta { color: #0f766e; }
.pl-card.pl-card-ext h3::after {
  content: " ↗";
  font-size: 0.62em;
  opacity: 0.4;
  font-weight: 400;
  vertical-align: super;
  transition: opacity 0.2s;
}
.pl-card.pl-card-ext:hover {
  background: linear-gradient(135deg, #0e7490 0%, #0d9488 100%);
  border-color: transparent;
  box-shadow: 0 16px 48px rgba(14, 116, 144, 0.22);
}
.pl-card.pl-card-ext:hover h3::after { opacity: 0.9; }
.pl-card.pl-card-ext:hover .pl-status {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

/* Non-link flagship / narrative card */
.pl-card.pl-card-static {
  cursor: default;
  border-left: 4px solid #6366f1;
}
.pl-card.pl-card-static:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--pl-card-ink);
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.08);
}
.pl-card.pl-card-static:hover h3,
.pl-card.pl-card-static:hover p {
  color: #0f172a;
}
.pl-card.pl-card-static:hover .pl-card-meta {
  color: #4f46e5;
}
.pl-card.pl-card-static:hover .pl-status {
  color: #0369a1;
  background: #e0e7ff;
}

.pl-more {
  margin-top: 1rem;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pl-border);
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.pl-more-intro {
  margin: 0 0 1rem;
  font-size: 15px;
  font-weight: 600;
  color: var(--pl-text);
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 40rem;
}
.pl-more > p.pl-more-tail {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--pl-border);
  font-size: 13px;
  color: var(--pl-muted);
  line-height: 1.6;
}
.pl-more-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 0.85rem;
  align-items: stretch;
}
.pl-more-group {
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 0.95rem 1rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pl-more-group:hover {
  border-color: rgba(8, 145, 178, 0.22);
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.08);
}
.pl-more-domain {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--pl-accent2);
  margin: 0 0 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  line-height: 1.3;
}
.pl-more ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  flex: 1;
}
.pl-more ul li {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  border-radius: 6px;
}
.pl-more ul li a {
  display: block;
  color: var(--pl-accent);
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.45rem;
  margin: 0 -0.45rem;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.pl-more ul li a:hover {
  background: rgba(8, 145, 178, 0.08);
  text-decoration: none;
  color: #0e7490;
}
.pl-more a {
  color: var(--pl-accent);
  font-weight: 600;
  text-decoration: none;
}
.pl-more a:hover {
  text-decoration: underline;
}

.pl-sub {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pl-muted);
}

/* —— Callout —— */
.pl-callout {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pl-border);
  font-size: 14px;
  color: var(--pl-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.pl-callout strong { color: var(--pl-text); }
.pl-callout a { color: var(--pl-accent); text-decoration: none; font-weight: 600; }
.pl-callout a:hover { text-decoration: underline; }

/* —— Demo block —— */
.pl-demo {
  margin-top: 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #020617;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
.pl-demo-cap {
  padding: 0.65rem 1rem;
  font-size: 13px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}
.pl-demo-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
}
.pl-demo-inner img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(80vh, 680px);
  object-fit: contain;
}

/* —— Cross-link note (avoid duplicating hub-only pages) —— */
.pl-ev-note {
  margin: 0.75rem 0 0;
  max-width: 52rem;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pl-muted);
}
.pl-ev-note a {
  color: var(--pl-accent);
  font-weight: 600;
  text-decoration: none;
}
.pl-ev-note a:hover { text-decoration: underline; }

/* —— Tool strip —— */
.pl-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pl-tool-row a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--pl-accent);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--pl-border);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.pl-tool-row a:hover {
  background: white;
  color: var(--pl-accent2);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

/* —— Execution arc timeline (separate from .pl-section :first-of-type rules) —— */
.pl-execution-arc {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--pl-border);
}
.pl-execution-arc .pl-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}
.pl-execution-arc .pl-sec-head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pl-execution-arc .pl-sec-head p {
  font-size: 14px;
  color: var(--pl-muted);
  max-width: 42ch;
}
.pl-timeline {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid rgba(99, 102, 241, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pl-timeline-phase {
  position: relative;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.75);
}
.pl-timeline-phase::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 5px);
  top: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #94a3b8;
}
.pl-timeline-done {
  border-left: 3px solid #16a34a;
  background: #f0fdf4;
}
.pl-timeline-done::before {
  border-color: #16a34a;
}
.pl-timeline-active {
  border-left: 3px solid #0369a1;
  background: #f0f9ff;
}
.pl-timeline-active::before {
  border-color: #0369a1;
}
.pl-timeline-planned {
  opacity: 0.92;
  border-left: 3px solid #cbd5e1;
}
.pl-timeline-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--pl-text);
}
.pl-timeline-body {
  font-size: 13px;
  color: var(--pl-muted);
  margin: 0;
  line-height: 1.45;
}

/* —— Footer —— */
.pl-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--pl-border);
  font-size: 13px;
  color: var(--pl-muted);
}
.pl-footer a { color: var(--pl-accent); }
.pl-footer a:hover { text-decoration: underline; }

.pl-footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.pl-footer-col-title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-muted);
  margin-bottom: 0.5rem;
}
.pl-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pl-footer-list li {
  margin-bottom: 0.35rem;
}
.pl-footer-copy {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.pl-nav a:focus-visible,
.pl-btn:focus-visible,
.pl-card:focus-visible,
.pl-tool-row a:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pl-btn:hover,
  .pl-card:hover {
    transform: none;
  }
}

@media (max-width: 640px) {
  .pl-top-inner { flex-direction: column; align-items: flex-start; }
  .pl-nav { width: 100%; }
}

/* === Domain legend === */
.pl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0.875rem 1.25rem;
  background: var(--pl-surface);
  border-radius: 10px;
  border: 1px solid var(--pl-border);
}

.pl-legend::before {
  content: 'Domain';
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-muted);
  margin-right: 0.25rem;
}

.pl-cat {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}

.pl-cat-agentic   { background: #7c3aed; }
.pl-cat-aiml      { background: #0891b2; }
.pl-cat-robotics  { background: #059669; }
.pl-cat-industrial{ background: #d97706; }
.pl-cat-software  { background: #2563eb; }
.pl-cat-elt       { background: #db2777; }
.pl-cat-pm        { background: #dc2626; }

/* === Project groups === */
.pl-group {
  margin-bottom: 2.75rem;
}

.pl-group-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.pl-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* —— About section —— */
.pl-about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.75rem;
  align-items: start;
}

.pl-about-bio {
  font-size: 15px;
  color: var(--pl-muted);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.pl-about-skills {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--pl-border);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pl-about-skill-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.pl-about-skill-area {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pl-accent2);
}

.pl-about-skill-list {
  font-size: 12.5px;
  color: var(--pl-muted);
  line-height: 1.45;
}

.pl-about-right {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pl-about-stat {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--pl-border);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
}

.pl-about-stat-active {
  border-left: 3px solid #0369a1;
  background: #f0f9ff;
}

.pl-about-stat-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-muted);
  margin-bottom: 0.3rem;
}

.pl-about-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--pl-text);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.pl-about-stat-sub {
  font-size: 12px;
  color: var(--pl-muted);
  margin-bottom: 0.4rem;
}

.pl-about-stat-link {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--pl-accent);
  text-decoration: none;
  font-weight: 600;
}
.pl-about-stat-link:hover { text-decoration: underline; }

.pl-about-links {
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pl-about-links a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pl-accent);
  text-decoration: none;
  padding: 0.3rem 0.45rem;
  margin: 0 -0.45rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.pl-about-links a:hover {
  background: rgba(8, 145, 178, 0.08);
  color: #0e7490;
}

@media (max-width: 720px) {
  .pl-about {
    grid-template-columns: 1fr;
  }
  .pl-about-skill-row {
    grid-template-columns: 7.5rem 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   Factory AI Platform — Flagship ongoing project section
   ══════════════════════════════════════════════════════════════ */

/* Live badge next to the section heading */
.fai-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid rgba(22, 163, 74, 0.28);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.6rem;
  position: relative;
  top: -2px;
}

/* ── Hero panel ── */
.fai-hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.75rem;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1a2744 55%, #0f2640 100%);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  color: #fff;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.22);
  position: relative;
  overflow: hidden;
}

/* Cyan ambient glow top-right */
.fai-hero-panel::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(ellipse at top right, rgba(8, 145, 178, 0.18), transparent 65%);
  pointer-events: none;
}

/* Subtle grid texture */
.fai-hero-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.fai-hero-left {
  position: relative;
  z-index: 1;
}

.fai-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(34, 211, 238, 0.75);
  margin-bottom: 0.5rem;
}

.fai-tagline {
  font-size: clamp(14px, 2vw, 1.05rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
  max-width: 46ch;
  margin-bottom: 1.35rem;
}

.fai-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Ghost btn override for dark background */
.fai-hero-panel .pl-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}
.fai-hero-panel .pl-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
}

.fai-hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 190px;
}

.fai-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.03em;
}

/* Pulsing live dot */
.fai-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  flex-shrink: 0;
  animation: fai-pulse-ring 2.2s ease-in-out infinite;
}

@keyframes fai-pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.65); }
  50%       { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); }
}

.fai-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fai-hero-stat {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.fai-hero-stat-value {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #22d3ee;
  line-height: 1;
}

.fai-hero-stat-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

/* ── Shared block container ── */
.fai-block {
  margin-top: 1.1rem;
  padding: 1.3rem 1.5rem;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pl-border);
  border-radius: 14px;
}

.fai-block-title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pl-accent2);
  margin-bottom: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
}

/* ── Problem — three isolated silos ── */
.fai-problem-grid {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.fai-silo {
  flex: 1;
  min-width: 130px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.fai-silo-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.fai-silo-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pl-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fai-silo-badge {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
}

.fai-silo-badge-unified {
  background: #dcfce7;
  color: #15803d;
}

.fai-silo-q {
  font-size: 11.5px;
  color: var(--pl-muted);
  font-style: italic;
  line-height: 1.4;
}

.fai-silo-arrow {
  font-size: 1.35rem;
  color: #94a3b8;
  flex-shrink: 0;
  font-weight: 300;
  line-height: 1;
}

.fai-platform-result {
  flex: 1.25;
  min-width: 150px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.07), rgba(99, 102, 241, 0.07));
  border: 1.5px solid rgba(8, 145, 178, 0.28);
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* ── 5-layer stack ── */
.fai-layers {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fai-layer {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 4px solid;
  transition: box-shadow 0.18s, transform 0.18s;
}

.fai-layer:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
  transform: translateX(2px);
}

.fai-layer-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  min-width: 1.6rem;
  flex-shrink: 0;
}

.fai-layer-content {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
}

.fai-layer-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pl-text);
  min-width: 11rem;
}

.fai-layer-q {
  font-size: 12.5px;
  color: var(--pl-muted);
  font-style: italic;
}

/* Each layer gets a distinct accent color */
.fai-layer-1 { border-left-color: #d97706; } /* Observability  → amber   */
.fai-layer-2 { border-left-color: #dc2626; } /* Anomaly        → red     */
.fai-layer-3 { border-left-color: #2563eb; } /* Streaming      → blue    */
.fai-layer-4 { border-left-color: #7c3aed; } /* Analytics      → violet  */
.fai-layer-5 { border-left-color: #059669; } /* AI Reasoning   → emerald */

/* ── Tables ── */
.fai-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fai-table th {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pl-muted);
  text-align: left;
  padding: 0.5rem 0.8rem;
  border-bottom: 2px solid rgba(99, 102, 241, 0.12);
  background: rgba(99, 102, 241, 0.03);
  white-space: nowrap;
}

.fai-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--pl-text);
  line-height: 1.45;
  vertical-align: middle;
}

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

.fai-table tbody tr:hover td {
  background: rgba(8, 145, 178, 0.04);
}

.fai-tech {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pl-accent);
  white-space: nowrap;
}

/* Business value table */
.fai-value-table td:first-child {
  font-weight: 600;
  color: var(--pl-text);
  white-space: nowrap;
  font-size: 13px;
}

.fai-value-table td:last-child {
  color: #475569;
}

.fai-value-table td strong {
  color: #15803d;
  font-weight: 700;
}

/* ── Hiring signals grid ── */
.fai-signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0.6rem;
}

.fai-signal {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.fai-signal:hover {
  border-color: rgba(8, 145, 178, 0.22);
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.07);
}

.fai-signal-check {
  font-size: 1.05rem;
  flex-shrink: 0;
  line-height: 1.45;
}

.fai-signal strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--pl-text);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.fai-signal p {
  font-size: 12px;
  color: var(--pl-muted);
  margin: 0;
  line-height: 1.4;
}

/* ── Status timeline inside fai-block ── */
.fai-timeline {
  margin-top: 0 !important;
}

/* ── Flagship card variant (links to factory-ai.html from the project grid) ── */
.pl-card-flagship {
  cursor: pointer;
}

.pl-card-flagship .pl-card-meta {
  color: #4f46e5 !important;
  font-style: italic;
}

.pl-card-flagship:hover {
  background: rgba(255, 255, 255, 0.96) !important;
  border-left-color: rgba(99, 102, 241, 0.5) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  color: var(--pl-card-ink) !important;
  box-shadow: 0 10px 36px rgba(99, 102, 241, 0.1) !important;
}

.pl-card-flagship:hover h3,
.pl-card-flagship:hover p { color: #0f172a !important; }

.pl-card-flagship:hover .pl-card-meta { color: #4f46e5 !important; }

/* —— Spotlight cards (index → detail pages) —— */
.pl-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.pl-spotlight-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.35rem 1.4rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--pl-border);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.06);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  min-height: 11rem;
}
.pl-spotlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.28);
}
.pl-spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.pl-spotlight-icon { font-size: 1.75rem; line-height: 1; }
.pl-spotlight-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  white-space: nowrap;
}
.pl-spotlight-fai .pl-spotlight-badge { background: rgba(79, 70, 229, 0.12); color: #4338ca; }
.pl-spotlight-mvp .pl-spotlight-badge { background: rgba(8, 145, 178, 0.12); color: #0e7490; }
.pl-spotlight-card h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.pl-spotlight-card p { font-size: 0.92rem; color: var(--pl-muted); line-height: 1.45; flex: 1; }
.pl-spotlight-cta { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; color: var(--pl-accent); }
.pl-spotlight-fai { border-left: 4px solid #6366f1; }
.pl-spotlight-mvp { border-left: 4px solid #0891b2; }

/* —— MVP demos page —— */
.mvp-page .pl-sec-head { margin-bottom: 1.25rem; }
.mvp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.mvp-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--pl-border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.mvp-card-soon { border-style: dashed; background: rgba(248, 250, 255, 0.6); }
.mvp-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.mvp-card-title { display: flex; align-items: center; gap: 0.6rem; }
.mvp-card-title h3 { font-size: 1.1rem; font-weight: 800; }
.mvp-card-icon { font-size: 1.5rem; }
.mvp-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.mvp-badge-live { background: rgba(5, 150, 105, 0.12); color: #047857; }
.mvp-badge-soon { background: rgba(100, 116, 139, 0.12); color: #475569; }
.mvp-card-desc { font-size: 0.92rem; color: var(--pl-muted); margin-bottom: 0.5rem; }
.mvp-card-stack {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--pl-accent);
  margin-bottom: 0.85rem;
}
.mvp-demo { margin: 0 0 1rem; }
.mvp-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mvp-soon-list { margin: 0.5rem 0 0.75rem; padding-left: 1.15rem; font-size: 0.9rem; color: var(--pl-muted); }
.mvp-soon-list li { margin: 0.25rem 0; }
.mvp-card-note { font-size: 0.88rem; color: var(--pl-muted); }
.mvp-card-note a { color: var(--pl-accent); font-weight: 600; text-decoration: none; }
.mvp-card-note a:hover { text-decoration: underline; }

.pl-nav .pl-nav-active { color: var(--pl-text); background: var(--pl-surface); font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 760px) {
  .fai-hero-panel {
    grid-template-columns: 1fr;
  }

  .fai-hero-right {
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
  }

  .fai-hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
  }

  .fai-hero-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .fai-problem-grid {
    flex-direction: column;
  }

  .fai-silo-arrow {
    transform: rotate(90deg);
  }

  .fai-silo,
  .fai-platform-result {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .fai-hero-panel {
    padding: 1.25rem 1.1rem;
  }

  .fai-block {
    padding: 1rem 1rem;
  }

  .fai-layer-name {
    min-width: unset;
  }
}

/* ══════════════════════════════════════════════════════════════
   Theory & Programming — expanded learn section
   ══════════════════════════════════════════════════════════════ */

.pl-learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.pl-learn-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pl-border);
  border-radius: 14px;
  overflow: hidden;
}

/* Hub card — clickable header of each column */
.pl-learn-hub {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--pl-card-ink);
  border-bottom: 1px solid var(--pl-border);
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.18s, color 0.18s;
}

.pl-learn-hub:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border-bottom-color: transparent;
}

.pl-learn-hub-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.pl-learn-hub-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pl-learn-hub-text strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.pl-learn-hub-text span {
  font-size: 12px;
  color: var(--pl-muted);
  line-height: 1.35;
  transition: color 0.18s;
}

.pl-learn-hub:hover .pl-learn-hub-text span {
  color: rgba(255, 255, 255, 0.75);
}

.pl-learn-hub-arrow {
  font-size: 1.1rem;
  color: var(--pl-muted);
  flex-shrink: 0;
  transition: color 0.18s, transform 0.18s;
}

.pl-learn-hub:hover .pl-learn-hub-arrow {
  color: rgba(255, 255, 255, 0.85);
  transform: translateX(3px);
}

/* Individual topic links list */
.pl-learn-links {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.pl-learn-links li {
  margin: 0;
}

.pl-learn-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--pl-accent);
  text-decoration: none;
  padding: 0.48rem 1.25rem;
  border-radius: 0;
  transition: background 0.14s, color 0.14s, padding-left 0.14s;
}

.pl-learn-links a::before {
  content: '·';
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.14s;
}

.pl-learn-links a:hover {
  background: rgba(8, 145, 178, 0.06);
  color: #0e7490;
  padding-left: 1.5rem;
}

.pl-learn-links a:hover::before {
  color: var(--pl-accent);
}

@media (max-width: 640px) {
  .pl-learn-grid {
    grid-template-columns: 1fr;
  }
}

