/* ==========================================================================
   AlanScholl.com — Stage 1 stylesheet
   Design language: enterprise command center + cloud lab notebook
   Palette: navy / cyan / charcoal / white, sparse terminal-green CLI accents
   Works identically under file:// and https://
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --navy-900: #0a1628;
  --navy-800: #0f2038;
  --navy-700: #16304f;
  --navy-600: #1e3f66;
  --cyan-500: #22d3ee;
  --cyan-400: #38e0f5;
  --cyan-600: #0e9fb8;
  --charcoal: #1a1f2b;
  --slate-300: #c3cdda;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --white: #f7fafc;
  --term-green: #4ade80;

  --bg: var(--navy-900);
  --bg-alt: var(--navy-800);
  --panel: rgba(22, 48, 79, 0.55);
  --panel-solid: #16304f;
  --panel-border: rgba(56, 224, 245, 0.22);
  --text: var(--white);
  --text-muted: var(--slate-300);
  --accent: var(--cyan-500);
  --accent-strong: var(--cyan-400);

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --gap: 1.5rem;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 68px;
}

/* ---------- Reset-ish base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(700px 400px at 0% 10%, rgba(30, 63, 102, 0.35), transparent 55%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1rem; }

ul { margin: 0 0 1rem; padding-left: 1.2rem; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  scroll-margin-top: var(--header-h);
}

.section-alt {
  background: linear-gradient(180deg, rgba(15, 32, 56, 0.6), rgba(10, 22, 40, 0));
}

/* Full-screen-ish desktop grouping (homepage): bundles a few related sections
   into one jump-navigation stop, so the floating arrows advance roughly one
   screen at a time instead of many small sub-sections. Deliberately has no
   forced min-height — an artificial height would just relocate dead space
   (top, bottom, or centered padding) rather than remove it. Each group is
   sized by its real content, which the compacted hero/cards above are meant
   to keep close to one viewport on common desktop sizes. */
.section-group {
  scroll-margin-top: var(--header-h);
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h2 {
  text-wrap: balance;
}

.section-head .lede {
  max-width: 720px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--term-green);
  margin-bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.eyebrow::before {
  content: ">";
  color: var(--term-green);
  font-weight: 700;
}

/* Typewriter effect for the green terminal eyebrow text */
.eyebrow {
  min-height: 1.2em; /* reserve space so headline doesn't jump while typing */
}

.eyebrow__text {
  white-space: pre;
}

.eyebrow.is-typing .eyebrow__text::after {
  content: "\258B"; /* ▋ block caret */
  margin-left: 1px;
  color: var(--term-green);
  animation: caret-blink 0.8s step-end infinite;
}

.eyebrow__status {
  font-weight: 700;
  color: var(--term-green);
}

.blink {
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.text-muted { color: var(--text-muted); }

.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Glass / panel cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(56, 224, 245, 0.5);
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Fallback when backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .card,
  .site-header {
    background: var(--panel-solid);
  }
}

.card h3 { margin-top: 0; }

/* Horizontal card layout (homepage degree cards): title/badge on the left,
   description + action on the right, so each card is shorter and both fit
   comfortably in one desktop viewport alongside the hero. */
.card--horizontal {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.6fr);
  gap: 1rem 1.75rem;
  align-items: start;
}

@media (max-width: 640px) {
  .card--horizontal { grid-template-columns: 1fr; }
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  color: var(--navy-900);
}

.btn--ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

/* ---------- Tags / chips ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent-strong);
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
}

.badge--awarded {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: var(--term-green);
}

.badge--active {
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--accent-strong);
}

.badge--planned {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--slate-300);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 22, 40, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(56, 224, 245, 0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.brand:hover { text-decoration: none; }

.brand__mark {
  font-family: var(--font-mono);
  color: var(--term-green);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  font-size: 0.85rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
}

.nav a:hover {
  color: var(--text);
  background: rgba(56, 224, 245, 0.08);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--accent-strong);
  background: rgba(56, 224, 245, 0.12);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 6vw, 5rem);
  position: relative;
  scroll-margin-top: var(--header-h);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Equal-weight two-column hero (homepage, contact, resume): matched column heights */
.hero__grid--equal {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.hero__grid--equal .hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__photo {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Headshot variant: bias crop toward the face if the column stretches taller/narrower */
.hero__photo--portrait {
  object-position: center top;
}

/* Smaller hero visual (homepage): keeps the equal-column treatment but caps how
   tall the photo needs to be, so the hero as a whole reads as more compact. */
.hero__photo--compact {
  min-height: 220px;
}

.hero h1 {
  margin-bottom: 0.75rem;
}

.hero__headline {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  margin-bottom: 1rem;
  text-transform: none;
}

.hero__summary {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 46ch;
}

/* ---------- Stat / proof row ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  text-align: left;
}

.stat__num {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-strong);
  display: block;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Timeline (cert plan) ---------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.timeline__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.timeline__marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.4rem;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}

/* ---------- Definition / detail lists ---------- */
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.kv dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding-top: 0.1rem;
}

.kv dd { margin: 0; color: var(--text-muted); }

/* ---------- CLI accent block ---------- */
.cli {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: #06101f;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  color: var(--slate-300);
  overflow-x: auto;
}

.cli .prompt { color: var(--term-green); }
.cli .comment { color: var(--slate-500); }

/* ---------- Data tables (credential matrix, etc.) ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  white-space: nowrap;
}

.matrix th,
.matrix td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.matrix th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(15, 32, 56, 0.6);
}

.matrix tr:last-child td { border-bottom: none; }
.matrix tbody tr:hover td { background: rgba(56, 224, 245, 0.05); }

/* ---------- Diagram / asset placeholders ---------- */
.diagram-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 1.5rem;
  margin-top: 1rem;
}

/* ---------- Project page meta ---------- */
.project-crumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.project-section {
  margin-top: 2rem;
}

.project-section h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* Tighter hero/section spacing for project pages where a PDF preview
   sits directly above the next content section (no dead-space gap). */
.hero--tight {
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

.section--tight-top {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.section--tight-bottom {
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

/* ---------- Capstone overview cards (capstones.html) ---------- */
.capstone-grid .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.capstone-grid .card__footer {
  margin-top: auto;
}

/* ---------- Embedded PDF preview (project pages) ---------- */
.pdf-embed {
  margin-top: 1.5rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #333;
  box-shadow: var(--shadow);
}

.pdf-embed iframe {
  display: block;
  width: 100%;
  height: clamp(420px, 70vh, 820px);
  border: 0;
}

/* ---------- PDF thumbnail preview ---------- */
.pdf-preview {
  display: block;
  width: 100%;
  max-width: 220px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-solid);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.pdf-preview:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.pdf-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 1165;
  object-fit: cover;
  border-bottom: 1px solid var(--panel-border);
}

.pdf-preview__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.pdf-preview--lg { max-width: 440px; width: 100%; }

/* ---------- Card footer (capstone meta + CTA) ---------- */
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.18);
}

.card__meta--footer {
  margin: 0;
  opacity: 0.85;
}

/* ---------- WGU enrollment card ---------- */
.wgu-card__row {
  margin: 0.5rem 0 0.75rem;
}

.wgu-card h3 {
  margin-bottom: 0;
}

/* ---------- Floating section-jump navigation ---------- */
.section-jump-nav {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(1.25rem, 6vh, 3rem);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.section-jump-nav[hidden] {
  display: none;
}

.section-jump-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--accent-strong);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.section-jump-btn:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15), var(--shadow);
}

.section-jump-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 560px) {
  .section-jump-nav {
    right: 0.6rem;
    bottom: 0.75rem;
  }
  .section-jump-btn { width: 38px; height: 38px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .section-jump-btn { transition: none; }
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 1.1rem;
  margin-bottom: 0.75rem;
  background: var(--panel);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::before {
  content: "+";
  color: var(--accent);
  font-family: var(--font-mono);
  margin-right: 0.6rem;
}

.faq details[open] summary::before { content: "\2013"; }

/* ---------- Live lab status widget ---------- */
.lab-status__head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.lab-status__dot {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: 0.35rem;
  background: var(--slate-500);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
}

.lab-status__label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.lab-status__sub {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.lab-status__actions:empty { display: none; }

/* State: checking */
.lab-status.is-checking .lab-status__dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}
.lab-status.is-checking .lab-status__label { color: var(--accent-strong); }

/* State: online */
.lab-status.is-online .lab-status__dot {
  background: var(--term-green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
  animation: pulse-dot 1.6s ease-out infinite;
}
.lab-status.is-online .lab-status__label { color: var(--term-green); }

/* State: on-demand */
.lab-status.is-ondemand .lab-status__dot {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
}
.lab-status.is-ondemand .lab-status__label { color: #fbbf24; }

/* State: offline */
.lab-status.is-offline .lab-status__dot {
  background: var(--slate-400);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.15);
}
.lab-status.is-offline .lab-status__label { color: var(--slate-300); }

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .lab-status.is-online .lab-status__dot { animation: none; }
}

/* Compact status pill (hero, upper-left) */
.lab-status--compact {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
}
.lab-status--compact .lab-status__dot {
  width: 11px;
  height: 11px;
  margin-top: 0;
}
.lab-status--compact .lab-status__label { font-size: 0.82rem; }
.lab-status--compact .lab-status__sub { display: none; }
.lab-status--compact .lab-status__actions { display: inline-flex; gap: 0.35rem; }
.lab-status--compact .btn {
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
}
.lab-status--compact .btn:hover { transform: none; }

/* Compact build pipeline cards (Planned / Built / Deployed) */
.pipeline-grid .card { padding: 0.9rem 1.05rem; }
.pipeline-grid .card__meta { font-size: 0.7rem; }
.pipeline-grid .card h3 { font-size: 1.02rem; margin: 0.15rem 0 0.3rem; }
.pipeline-grid .card p { font-size: 0.85rem; margin: 0; }

/* ---------- PDF modal viewer ---------- */
.pdf-modal[hidden] { display: none; }

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 3vw, 2rem);
}

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 20, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pdf-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1000px, 100%);
  height: min(90vh, 100%);
  background: var(--navy-800);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.pdf-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem 0.6rem 1.1rem;
  background: rgba(10, 22, 40, 0.9);
  border-bottom: 1px solid var(--panel-border);
}

.pdf-modal__title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-modal__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
}

.pdf-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pdf-modal__btn:hover {
  background: rgba(56, 224, 245, 0.12);
  border-color: var(--accent);
  text-decoration: none;
}

.pdf-modal__btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.pdf-modal__close {
  border-color: rgba(248, 113, 113, 0.4);
}

.pdf-modal__close:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.7);
}

.pdf-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  background: #333;
}

.pdf-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .pdf-modal { padding: 0; }
  .pdf-modal__dialog { height: 100%; width: 100%; border-radius: 0; border: 0; }
  .pdf-modal__title { font-size: 0.78rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-800);
  border-top: 1px solid rgba(56, 224, 245, 0.15);
  padding-block: 1.1rem;
  margin-top: 1rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}

.footer__links a { color: var(--text-muted); font-size: 0.92rem; }
.footer__links a:hover { color: var(--accent-strong); }

.footer__note {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-top: 0.3rem;
}

/* ---------- Copy-email button ---------- */
.copy-email {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.copy-email__status {
  color: var(--term-green);
  font-size: 0.8rem;
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-email__status.is-visible { opacity: 1; }

/* ---------- Skip link + focus ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--navy-900);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Safety net: if main.js never runs (blocked/fails/disabled), <html>
   keeps the "no-js" class and nothing would ever mark .reveal visible.
   Force it visible in that case instead of leaving the page blank. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Visually hidden (screen-reader only) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    background: rgba(10, 22, 40, 0.98);
    border-bottom: 1px solid rgba(56, 224, 245, 0.2);
    padding: 0.75rem 1rem 1.25rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
  }

  .nav.is-open { transform: translateY(0); }

  .nav a { padding: 0.75rem 0.8rem; }

  .hero__grid { grid-template-columns: 1fr; }

  .hero__media { order: -1; max-width: 420px; }

  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .btn-row .btn { flex: 1 1 auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
