:root {
  --pf-bg: #0a0e14;
  --pf-bg-deep: #060a0f;
  --pf-surface: #0d1520;
  --pf-surface-2: #11151d;
  --pf-surface-3: #131d2a;
  --pf-border: #2a3b52;
  --pf-border-soft: #3d5574;
  --pf-border-hair: #1e2a3a;
  --pf-border-blue: rgba(147, 197, 253, 0.28);
  --pf-cyan: #4fc3f7;
  --pf-cyan-hover: #29b6f6;
  --pf-cyan-bright: #22d3ee;
  --pf-cyan-a70: rgba(79, 195, 247, 0.7);
  --pf-cyan-a20: rgba(79, 195, 247, 0.18);
  --pf-cyan-a04: rgba(79, 195, 247, 0.04);
  --pf-green: #26de81;
  --pf-green-alt: #10b981;
  --pf-green-a20: rgba(38, 222, 129, 0.2);
  --pf-violet: #a78bfa;
  --pf-amber: #f0a500;
  --pf-red: #ff6b6b;
  --pf-icon-tile: #eef1f5;
  --pf-text-strong: #ffffff;
  --pf-text: #e0e6f0;
  --pf-text-2: #c9d6e3;
  --pf-text-3: #9fb4c7;
  --pf-text-muted: #7a9eb8;
  --pf-text-muted-2: #8899aa;
  --pf-text-faint: #3a4a5a;
  --surface-page: var(--pf-bg);
  --surface-card: var(--pf-surface);
  --surface-well: var(--pf-bg-deep);
  --surface-chip: var(--pf-surface-3);
  --border-default: var(--pf-border);
  --border-strong: var(--pf-border-soft);
  --border-hair: var(--pf-border-hair);
  --accent: var(--pf-cyan);
  --accent-hover: var(--pf-cyan-hover);
  --accent-on: var(--pf-bg);
  --success: var(--pf-green);
  --warning: var(--pf-amber);
  --danger: var(--pf-red);
  --text-strong: var(--pf-text-strong);
  --text-body: var(--pf-text);
  --text-secondary: var(--pf-text-2);
  --text-3: var(--pf-text-3);
  --text-muted: var(--pf-text-muted);
  --text-muted-2: var(--pf-text-muted-2);
  --text-faint: var(--pf-text-faint);
  --text-accent: var(--pf-cyan);
  --accent-alpha-70: var(--pf-green-a20);
  --accent-alpha-20: var(--pf-green-a20);
  --accent-cyan: var(--pf-cyan-bright);
  --accent-cyan-alpha-70: var(--pf-cyan-a70);
  --accent-cyan-alpha-20: var(--pf-cyan-a20);
  --background: var(--pf-bg);
  --terminal-panel: var(--pf-surface-2);
  --terminal-border: var(--pf-border-blue);
  --terminal-muted: var(--pf-text-muted-2);
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --font-mono-custom: "JetBrains Mono", "Fira Code", monospace;
  --font-body: var(--font-mono);
  --font-heading: var(--font-display);
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fs-hero: clamp(2rem, 6vw, 3.5rem);
  --fs-h1: 2.2rem;
  --fs-h2: 1.5rem;
  --fs-h3: 1.125rem;
  --fs-title: 15px;
  --fs-body: 13px;
  --fs-code: 12px;
  --fs-label: 11px;
  --fs-micro: 10px;
  --lh-tight: 1.1;
  --lh-snug: 1.4;
  --lh-body: 1.6;
  --lh-relaxed: 1.8;
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.05em;
  --ls-wider: 0.1em;
  --sp-1: 4px;
  --sp-2: 6px;
  --sp-3: 8px;
  --sp-4: 12px;
  --sp-5: 16px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 48px;
  --sp-9: 64px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 20px;
  --border-hairline: 0.5px;
  --border-accent: 2px;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.55);
  --glow-cyan: 0 0 0 1px var(--accent), 0 8px 28px rgba(79, 195, 247, 0.16);
  --container: 1180px;
  --container-narrow: 800px;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.2s;
  --dur: 0.25s;
  --dur-slow: 0.4s;
  --lift: -3px;
  --lift-sm: -2px;
}

body {
  font-family: var(--font-mono-custom);
}

.container {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.content {
  max-width: 1180px;
}

.post-title,
.post-meta {
  display: none;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

.post-content h1 {
  margin-top: 0;
  font-size: 2.2rem;
  background: linear-gradient(120deg, var(--accent-cyan) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.post-content h2 {
  margin-top: 3rem;
  border-bottom: 1px solid var(--accent-cyan-alpha-20);
  padding-bottom: 0.35rem;
}

.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.2rem;
}

.post-content a {
  color: var(--accent-cyan);
}

.post-content code {
  color: var(--accent-cyan);
}

.post-content pre {
  border: 1px solid var(--accent-alpha-20);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: hidden;
}

.post-content table {
  display: table;
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  border: 1px solid var(--accent-alpha-20);
  padding: 0.75rem;
  vertical-align: top;
}

.post-content th {
  color: var(--accent);
  text-align: left;
}

.post-content ul {
  margin-top: 0.75rem;
}

.post-content li + li {
  margin-top: 0.45rem;
}

@media (max-width: 684px) {
  .post-content table,
  .post-content thead,
  .post-content tbody,
  .post-content tr,
  .post-content th,
  .post-content td {
    display: block;
    width: 100%;
  }

  .post-content tr {
    border: 1px solid var(--accent-alpha-20);
    margin-bottom: 1rem;
  }

  .post-content th,
  .post-content td {
    border: 0;
  }
}

/* === Homepage (matches alaric_portfolio_animated.html reference) === */

/* The custom .pf-nav/.pf-footer replace the theme's default chrome on the homepage. */
.header:has(+ .content .pf),
.content:has(.pf) + .footer {
  display: none;
}

.container:has(.pf) {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border-right: 0;
}

.content:has(.pf) {
  display: block;
  width: 100%;
  max-width: none;
}

.pf {
  font-family: var(--font-body);
  background: #0a0e14;
  color: #e0e6f0;
  min-height: 100vh;
  overflow-x: hidden;
}

.pf-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 0.5px solid #1e2a3a;
  position: sticky;
  top: 0;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.pf-nav-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #4fc3f7;
  letter-spacing: 0.05em;
}

.pf-nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pf-nav-links a {
  font-size: 12px;
  color: #8899aa;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.pf-nav-links a:hover {
  color: #4fc3f7;
}

.pf-hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pf-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(79, 195, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 195, 247, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: pf-gridpan 30s linear infinite;
}

@keyframes pf-gridpan {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 40px;
  }
}

.pf-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #4fc3f7;
  border: 0.5px solid #4fc3f7;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.pf-hero-name {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.pf-hero-name strong {
  font-weight: 500;
  color: #fff;
}

.pf-hero-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #4fc3f7;
  margin-bottom: 2rem;
}

.pf-typed {
  border-right: 2px solid #4fc3f7;
  animation: pf-cursor 0.8s step-end infinite;
}

@keyframes pf-cursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.pf-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #0d1520;
  border: 1px solid #2a3b52;
  border-left: 2px solid #26de81;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: left;
  line-height: 1.8;
  color: #7a9eb8;
}

.pf-status .hl {
  color: #26de81;
}

.pf-status .hl2 {
  color: #4fc3f7;
}

.pf-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pf-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  display: inline-block;
}

.pf-btn-primary {
  background: #4fc3f7;
  color: #0a0e14;
  font-weight: 500;
}

.pf-btn-primary:hover {
  background: #29b6f6;
  transform: translateY(-2px);
}

.pf-btn-ghost {
  background: transparent;
  border: 0.5px solid #2a3a4a;
  color: #8899aa;
}

.pf-btn-ghost:hover {
  border-color: #4fc3f7;
  color: #4fc3f7;
  transform: translateY(-2px);
}

.pf-section {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  scroll-margin-top: 4.5rem;
}

.pf-section-wide {
  max-width: 1120px;
}

.pf-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #4fc3f7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: #1e2a3a;
}

.pf-skill-tag {
  font-size: 11px;
  background: #131d2a;
  color: #7a9eb8;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.pf-tools-category-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #a78bfa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-tools-category-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: #1e2a3a;
}

.pf-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
}

/* Dark well, cyan glyph. The tile used to be a light plate because it carried
   fixed-colour vendor logos; the glyphs are Lucide type marks now, stroke-only
   and currentColor, so the tile can sit in the page instead of on top of it. */
.pf-tool-icon {
  width: 56px;
  height: 56px;
  background: var(--surface-well);
  border: 1px solid var(--pf-border-hair);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pf-cyan);
  transition: all 0.25s;
}

.pf-tool-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.75;
}

.pf-tool:hover .pf-tool-icon {
  border-color: #4fc3f7;
  box-shadow: 0 0 0 1px #4fc3f7, 0 8px 28px rgba(79, 195, 247, 0.16);
  transform: translateY(-3px);
}

.pf-tool-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #7a9eb8;
  text-align: center;
}

.pf-project-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pf-tool-sm {
  gap: 4px;
}

.pf-tool-sm .pf-tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.pf-tool-sm .pf-tool-icon svg {
  width: 20px;
  height: 20px;
}

.pf-tool-sm .pf-tool-label {
  font-size: 9px;
}

.pf-timeline {
  position: relative;
  padding-left: 1.5rem;
}

.pf-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.5px;
  background: #1e2a3a;
}

.pf-job {
  position: relative;
  margin-bottom: 2rem;
  transition: all 0.4s;
}

html.js-reveal .pf-job {
  opacity: 0;
  transform: translateX(-12px);
}

html.js-reveal .pf-job.visible {
  opacity: 1;
  transform: translateX(0);
}

.pf-job::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4fc3f7;
  transform: translateX(-3.5px);
}

.pf-job-title {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.pf-job-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #4fc3f7;
  margin-bottom: 0.75rem;
}

.pf-job-points {
  list-style: none;
  color: #7a9eb8;
  font-size: 13px;
  line-height: 1.7;
}

.pf-job-points li::before {
  content: '\25b8 ';
  color: #4fc3f7;
}


.pf-contact {
  background: #0d1520;
  border: 1px solid #2a3b52;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.pf-contact-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #4fc3f7;
  text-decoration: none;
  border: 0.5px solid #4fc3f7;
  padding: 10px 24px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 1rem;
  transition: all 0.2s;
}

.pf-contact-link:hover {
  background: #4fc3f7;
  color: #0a0e14;
}

.pf-footer {
  text-align: center;
  padding: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #3a4a5a;
  border-top: 0.5px solid #1e2a3a;
}

@media (prefers-reduced-motion: reduce) {
  .pf-grid-bg,
  .pf-typed {
    animation: none;
  }

  html.js-reveal .pf-job,
  html.js-reveal .pf-project-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* === Projects === */

.pf-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* An odd-numbered final card would leave a hole in the 2-up grid; widen it
   to fill the row instead. */
.pf-projects > .pf-project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 684px) {
  .pf-projects {
    grid-template-columns: 1fr;
  }
}

.pf-project-card {
  background: #0d1520;
  border: 1px solid #2a3b52;
  border-left: 2px solid #4fc3f7;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: all 0.25s;
}

.pf-project-card:hover {
  box-shadow: 0 0 0 1px #4fc3f7, 0 8px 28px rgba(79, 195, 247, 0.16);
  transform: translateY(-3px);
}

.pf-card-violet { border-left-color: #a78bfa; }
.pf-card-green { border-left-color: #26de81; }
.pf-card-amber { border-left-color: #ffb86c; }
.pf-card-blue { border-left-color: #4285f4; }
.pf-card-red { border-left-color: #ff6b6b; }

.pf-card-violet:hover { box-shadow: 0 0 0 1px #a78bfa, 0 8px 28px rgba(167, 139, 250, 0.16); }
.pf-card-green:hover { box-shadow: 0 0 0 1px #26de81, 0 8px 28px rgba(38, 222, 129, 0.16); }
.pf-card-amber:hover { box-shadow: 0 0 0 1px #ffb86c, 0 8px 28px rgba(255, 184, 108, 0.16); }
.pf-card-blue:hover { box-shadow: 0 0 0 1px #4285f4, 0 8px 28px rgba(66, 133, 244, 0.16); }
.pf-card-red:hover { box-shadow: 0 0 0 1px #ff6b6b, 0 8px 28px rgba(255, 107, 107, 0.16); }

.pf-project-card.pf-project-hidden {
  display: none;
}

html.js-reveal .pf-project-card {
  opacity: 0;
  transform: translateY(16px);
}

html.js-reveal .pf-project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

html.js-reveal .pf-project-card.pf-project-hidden.visible {
  transform: none;
}

.pf-project-illo {
  position: relative;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: #080c12;
  border: 0.5px solid #1e2a3a;
}

.pf-illo-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}

.pf-illo-cyan { color: #4fc3f7; background: radial-gradient(circle at 75% 25%, rgba(79, 195, 247, 0.14), transparent 60%); }
.pf-illo-violet { color: #a78bfa; background: radial-gradient(circle at 75% 25%, rgba(167, 139, 250, 0.14), transparent 60%); }
.pf-illo-green { color: #26de81; background: radial-gradient(circle at 75% 25%, rgba(38, 222, 129, 0.14), transparent 60%); }
.pf-illo-amber { color: #ffb86c; background: radial-gradient(circle at 75% 25%, rgba(255, 184, 108, 0.14), transparent 60%); }
.pf-illo-blue { color: #4285f4; background: radial-gradient(circle at 75% 25%, rgba(66, 133, 244, 0.14), transparent 60%); }
.pf-illo-red { color: #ff6b6b; background: radial-gradient(circle at 75% 25%, rgba(255, 107, 107, 0.14), transparent 60%); }

.pf-illo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pf-illo-svg path,
.pf-illo-svg line {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-opacity: 0.5;
  fill: none;
}

.pf-illo-svg path.pf-illo-trend,
.pf-illo-svg line.pf-illo-trend {
  stroke-dasharray: 4 4;
  stroke-opacity: 0.95;
}

.pf-illo-svg path.pf-illo-spin {
  stroke-opacity: 0.95;
  stroke-linecap: round;
}

.pf-illo-svg circle {
  fill: currentColor;
  fill-opacity: 0.85;
  stroke: none;
}

.pf-illo-svg circle.pf-illo-trend {
  fill-opacity: 1;
}

.pf-illo-svg polygon {
  fill: currentColor;
  fill-opacity: 0.12;
  stroke: currentColor;
  stroke-opacity: 0.55;
  stroke-width: 1.5;
}

.pf-illo-svg rect {
  fill: currentColor;
  fill-opacity: 0.06;
  stroke: currentColor;
  stroke-opacity: 0.35;
  stroke-width: 1;
}

.pf-illo-svg rect.pf-illo-bar {
  fill-opacity: 0.4;
  stroke: none;
}

.pf-project-stat {
  position: absolute;
  top: 12px;
  right: 14px;
  text-align: right;
  z-index: 1;
}

.pf-project-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: currentColor;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.pf-project-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: currentColor;
  opacity: 0.8;
  margin-top: 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.pf-project-block {
  margin-bottom: 0.75rem;
}

.pf-project-block-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #7a9eb8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}

.pf-repo-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #4fc3f7;
  border: 0.5px solid #4fc3f7;
  border-radius: 6px;
  padding: 6px 14px;
  background: transparent;
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
}

.pf-repo-btn:hover {
  background: #4fc3f7;
  color: #0a0e14;
}

.pf-show-more {
  width: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #7a9eb8;
  background: transparent;
  border: 0.5px solid #1e2a3a;
  border-radius: 6px;
  padding: 10px;
  margin-top: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pf-show-more:hover {
  border-color: #4fc3f7;
  color: #4fc3f7;
}

/* === Stat well ===
   Single source of truth for the stat well. Previously this lived in three
   generations (literals here, token overrides in the zip-alignment block,
   type overrides in the v2 block); all three are merged below. */

.pf-roi-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 1rem;
}

.pf-roi-stat {
  background: var(--surface-well);
  border: var(--border-hairline) solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.pf-roi-stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.pf-roi-stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted-2);
  margin-top: 2px;
}

/* === Client problems ===
   Paired grid: every problem sits on the same row as what the client gets. */

.pf-cp-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0 var(--sp-5);
  margin-top: 1.5rem;
}

.pf-cp-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted-2);
  padding-bottom: 8px;
  border-bottom: var(--border-hairline) solid var(--border-default);
}

.pf-cp-problem,
.pf-cp-outcome {
  padding: 12px 0;
  border-bottom: var(--border-hairline) solid var(--border-default);
  font-size: 13px;
  line-height: 1.5;
}

.pf-cp-problem {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.pf-cp-outcome {
  position: relative;
  padding-left: 22px;
  color: var(--text-3);
}

.pf-cp-outcome::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--success);
  font-weight: 700;
}

@media (max-width: 720px) {
  .pf-cp-grid {
    grid-template-columns: 1fr;
  }

  .pf-cp-head {
    display: none;
  }

  .pf-cp-problem {
    padding-bottom: 4px;
    border-bottom: 0;
  }
}

/* === Portfolioz Design System zip alignment === */

body {
  background: var(--pf-bg);
  font-family: var(--font-body);
}

.pf {
  font-family: var(--font-body);
  background: var(--surface-page);
  color: var(--text-body);
}

.pf-nav {
  border-bottom: var(--border-hairline) solid var(--border-default);
  background: rgba(10, 14, 20, 0.92);
}

.pf-nav-brand,
.pf-nav-links a,
.pf-hero-role,
.pf-badge,
.pf-status,
.pf-btn,
.pf-section-label,
.pf-skill-cat,
.pf-skill-tag,
.pf-job-meta,
.pf-job-points,
.pf-project-impact,
.pf-project-block-label,
.pf-footer,
.pf-contact-link,
.pf-band-eyebrow,
.pf-band-sub,
.pf-band-chip {
  font-family: var(--font-mono);
}

.pf-nav-brand,
.pf-nav-links a:hover,
.pf-hero-role,
.pf-section-label,
.pf-job-meta {
  color: var(--accent);
}

.pf-nav-links a {
  color: var(--text-muted-2);
  transition: color var(--dur-fast) var(--ease);
}

.pf-grid-bg {
  background-image: linear-gradient(var(--pf-cyan-a04) 1px, transparent 1px),
    linear-gradient(90deg, var(--pf-cyan-a04) 1px, transparent 1px);
}

.pf-hero-name {
  font-size: var(--fs-hero);
  font-weight: var(--fw-light);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

.pf-hero-name strong,
.pf-job-title,
.pf-band-title {
  color: var(--text-strong);
  font-weight: var(--fw-medium);
}

.pf-badge {
  color: var(--accent);
  border: var(--border-hairline) solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pf-status {
  background: var(--surface-card);
  border: var(--border-hairline) solid var(--border-default);
  border-left: var(--border-accent) solid var(--success);
  border-radius: var(--radius-md);
  max-width: 800px;
  color: var(--text-muted);
  transition: max-width var(--dur) var(--ease);
}

.pf-status .hl {
  color: var(--success);
}

.pf-status .hl2 {
  color: var(--success);
}

.pf-btn {
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pf-btn-primary {
  background: var(--accent);
  color: var(--accent-on);
  border: var(--border-hairline) solid var(--accent);
}

.pf-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(var(--lift-sm));
}

.pf-btn-ghost,
.pf-contact-link,
.pf-repo-btn {
  background: transparent;
  color: var(--text-muted);
  border: var(--border-hairline) solid var(--border-strong);
}

.pf-btn-ghost:hover,
.pf-contact-link:hover,
.pf-repo-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
  transform: translateY(var(--lift-sm));
}

.pf-section-label {
  color: var(--accent);
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--sp-6);
}

.pf-section-label::after,
.pf-tools-category-label::after {
  background: var(--border-default);
}

.pf-project-card,
.pf-contact {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.pf-project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow-cyan);
  transform: translateY(var(--lift));
}

.pf-skill-tag,
.pf-roi-tag {
  display: inline-block;
  background: var(--surface-chip);
  color: var(--text-muted);
  border: 0;
  border-radius: var(--radius-xs);
  font-size: var(--fs-label);
  line-height: 1.5;
  padding: 3px 8px;
  white-space: nowrap;
}

.pf-timeline::before {
  background: var(--border-default);
}

.pf-job::before {
  background: var(--accent);
}

.pf-job-points {
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

.pf-job-points li::before {
  color: var(--accent);
}

.pf-projects {
  display: grid;
  gap: var(--sp-5);
}

.pf-project-card {
  border-left: var(--border-accent) solid var(--accent);
  padding: var(--sp-6);
}

.pf-project-impact {
  display: inline-flex;
  align-items: center;
  color: var(--success);
  border: var(--border-hairline) solid var(--success);
  border-radius: var(--radius-pill);
  font-size: var(--fs-label);
  line-height: 1.4;
  margin-bottom: var(--sp-3);
  padding: 3px 10px;
}

.pf-project-block-label {
  color: var(--text-muted);
  font-size: var(--fs-label);
}

.pf-project-block-content {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.pf-footer {
  color: var(--text-faint);
}

.pf-contact {
  border-radius: var(--radius-lg);
}

.pf-band {
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}

.pf-band-eyebrow,
.pf-band-chip-g {
  color: var(--success);
}

.pf-band-title {
  font-family: var(--font-display);
}

.pf-band-sub {
  color: var(--text-muted);
}

.pf-band-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  background: rgba(13, 21, 32, 0.7);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
}

@media (prefers-reduced-motion: reduce) {
  .pf-grid-bg,
  .pf-typed {
    animation: none;
  }

  html.js-reveal .pf-job,
  html.js-reveal .pf-project-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* === Wide feature cards === */

.pf-card-feature {
  padding: 1.75rem;
}

.pf-feature-cards {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.pf-feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  margin-top: 1.25rem;
}

.pf-feature-list span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #9db8cc;
}

.pf-steps {
  display: grid;
  gap: 16px;
}

.pf-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: #4fc3f7;
  margin-bottom: 0.5rem;
}

.pf-steps-4 {
  grid-template-columns: repeat(4, 1fr);
}

.pf-migration-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: #0d1520;
  border: 1px solid #2a3b52;
  border-radius: 8px;
}

.pf-migration-cta span {
  font-size: 14px;
  color: #9db8cc;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .pf-steps-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 684px) {
  .pf-feature-list {
    grid-template-columns: 1fr;
  }
  .pf-steps-4 {
    grid-template-columns: 1fr;
  }
  .pf-migration-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pf-hero-sub {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #7a9eb8;
  margin-bottom: 0.75rem;
}

/* ============================================================
   v2 OVERHAUL — typography, spatial rhythm, motion system
   Loaded last; same-specificity rules here win by source order.
   ============================================================ */

:root {
  /* Editorial serif for display, sans for prose, mono stays operational. */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --font-mono-custom: var(--font-mono);
  --font-heading: var(--font-display);

  /* Type scale — display sizes exist so the page has a peak. */
  --fs-display: clamp(2.4rem, 5.6vw, 4.25rem);
  --fs-section: clamp(1.75rem, 3.4vw, 2.75rem);
  --fs-hero: var(--fs-display);

  /* Motion. Expo-out is the house curve; back-out only for pops. */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-base: 420ms;
  --dur-slow: 900ms;

  /* Rhythm — one rail, one gutter. */
  --rail: 1120px;
  --gutter: 2rem;
  --section-gap: clamp(4rem, 8vw, 7rem);
}

/* ---------- 1. One rail, consistent rhythm ---------- */

.pf-section,
.pf-section-wide {
  max-width: var(--rail);
  padding: 0 var(--gutter);
  margin: 0 auto var(--section-gap);
  scroll-margin-top: 5rem;
}

/* Prose-only blocks keep a readable measure without moving the rail. */
.pf-measure,
#client-problems .pf-problem-list {
  max-width: 68ch;
}

/* ---------- 2. Display typography ---------- */

/* Specificity note: the Terminal theme ships `.headings--one-size h1` (0,1,1),
   so display headings need a matching-or-higher selector to win. */
.pf h1.pf-hero-name,
.pf h2.pf-hero-name {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}

.pf h1.pf-hero-name strong,
.pf h2.pf-hero-name strong {
  font-weight: 400;
  font-style: italic;
  color: var(--pf-cyan);
}

/* Section labels stay mono, but gain a drawn rule. */
.pf-section-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
}

.pf-section-label::after {
  transform-origin: left center;
  animation: pf-rule-draw var(--dur-slow) var(--ease-out-expo) both;
  animation-timeline: view();
  animation-range: entry 10% cover 28%;
}

@keyframes pf-rule-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Three voices, one rule:
     serif = the human voice (display headings, quotes, headline numbers)
     mono  = the machine voice (labels, data, terminals)
     sans  = the explaining voice (body prose)
   Serif never appears below ~24px, so it always reads as display. */
.pf-illo-stat-value {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ---------- 3. Hero load choreography ---------- */

.pf-hero > div > * {
  animation: pf-rise var(--dur-base) var(--ease-out-expo) both;
}

.pf-hero .pf-badge      { animation-delay: 60ms; }
.pf-hero .pf-hero-name  { animation-delay: 140ms; }
.pf-hero .pf-hero-role  { animation-delay: 260ms; }
.pf-hero .pf-status     { animation-delay: 360ms; }
.pf-hero .pf-cta        { animation-delay: 460ms; }
.pf-hero .pf-hero-tools { animation-delay: 560ms; }

@keyframes pf-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 4. Reveal stagger ---------- */
/* main.js adds .visible; --i is set per-card so siblings cascade. */

html.js-reveal .pf-project-card,
html.js-reveal .pf-job {
  transition:
    opacity var(--dur-base) var(--ease-out-expo),
    transform var(--dur-base) var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* ---------- 5. Sheen sweep on primary actions ---------- */

.pf-btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-back),
              box-shadow var(--dur-fast) var(--ease-smooth);
}

.pf-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.38) 50%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}

.pf-btn-primary:hover::after {
  animation: pf-sheen 720ms var(--ease-smooth);
}

@keyframes pf-sheen {
  to { transform: translateX(120%); }
}

.pf-btn-primary:hover {
  transform: translateY(-2px);
}

.pf-btn-primary:active {
  transform: translateY(0);
}

/* ---------- 6. Card hover: lift + accent trace ---------- */

.pf-project-card,
.pf-service-card {
  position: relative;
  transition: transform var(--dur-base) var(--ease-out-expo),
              border-color var(--dur-base) var(--ease-smooth);
}

.pf-project-card::after,
.pf-service-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out-expo);
}

.pf-project-card:hover::after,
.pf-service-card:hover::after {
  transform: scaleX(1);
}

.pf-project-card:hover,
.pf-service-card:hover {
  transform: translateY(-3px);
}

/* ---------- 7. Stat pop ---------- */

.pf-illo-stat-value,
.pf-roi-stat-value {
  animation: pf-pop var(--dur-base) var(--ease-back) both;
  animation-timeline: view();
  animation-range: entry 20% cover 34%;
}

@keyframes pf-pop {
  from { opacity: 0; transform: scale(0.86); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 8. SVG stroke draw-in ---------- */

.pf-draw path,
.pf-draw line,
.pf-draw polyline {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  animation: pf-draw 1.4s var(--ease-out-expo) both;
  animation-timeline: view();
  animation-range: entry 15% cover 40%;
}

@keyframes pf-draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- 9. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .pf-hero > div > *,
  .pf-ci-entry-inner > *,
  .pf-illo-stat-value,
  .pf-roi-stat-value,
  .pf-draw path,
  .pf-draw line,
  .pf-draw polyline,
  .pf-section-label::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }

  .pf-btn-primary::after {
    display: none;
  }
}

/* ============================================================
   Per-project demos (rendered inside case-study cards)
   ============================================================ */

.pf-pd {
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  background: var(--pf-bg-deep);
  border: 0.5px solid var(--pf-border-hair);
  border-radius: 4px;
  padding: 10px 12px 12px;
  margin: 1rem 0 0.5rem;
}

.pf-pd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pf-pd-title {
  color: var(--pf-cyan);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-pd-btn {
  font-family: inherit;
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pf-text-3);
  background: transparent;
  border: 0.5px solid var(--pf-border);
  border-radius: 3px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-smooth),
              border-color var(--dur-fast) var(--ease-smooth);
}

.pf-pd-btn:hover {
  color: var(--pf-cyan);
  border-color: var(--pf-cyan);
}

.pf-pd-note {
  margin-top: 9px;
  font-size: var(--fs-micro);
  color: var(--pf-text-muted);
  min-height: 1.3em;
  transition: color var(--dur-base) var(--ease-smooth);
}

.pf-pd-note.is-warn  { color: var(--pf-amber); }
.pf-pd-note.is-bad   { color: var(--pf-red); }
.pf-pd-note.is-good  { color: var(--pf-green); }

.pf-pd-label {
  display: block;
  font-size: var(--fs-micro);
  color: var(--pf-text-muted);
  margin-bottom: 6px;
}

/* --- shared bar --- */

.pf-pd-bar {
  display: block;
  flex: 1;
  height: 4px;
  background: var(--pf-surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.pf-pd-bar > i {
  display: block;
  height: 100%;
  width: 33%;
  background: var(--pf-cyan);
  border-radius: 2px;
  transition: width var(--dur-slow) var(--ease-out-expo),
              background var(--dur-base) var(--ease-smooth);
}

/* --- failover --- */

.pf-pd-regions {
  display: grid;
  gap: 7px;
}

.pf-pd-region {
  display: grid;
  grid-template-columns: 82px 38px 1fr;
  align-items: center;
  gap: 9px;
  font-family: inherit;
  font-size: var(--fs-micro);
  color: var(--pf-text-2);
  background: transparent;
  border: 0;
  border-left: 2px solid var(--pf-green);
  padding: 3px 0 3px 8px;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dur-base) var(--ease-smooth),
              opacity var(--dur-base) var(--ease-smooth);
}

.pf-pd-region:hover { color: var(--pf-text-strong); }

.pf-pd-region.is-down {
  border-left-color: var(--pf-red);
  opacity: 0.45;
}

.pf-pd-region.is-down .pf-pd-bar > i { background: var(--pf-red); }
.pf-pd-region.is-down .pf-pd-region-name { text-decoration: line-through; }

.pf-pd-region-share { color: var(--pf-text-muted); }

/* --- terraform plan stream --- */

.pf-pd-stream {
  min-height: 76px;
  max-height: 76px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  font-size: var(--fs-micro);
  line-height: 1.5;
}

.pf-pd-stream span {
  animation: pf-pd-line 260ms var(--ease-out-expo) both;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-pd-stream .add { color: var(--pf-green); }
.pf-pd-stream .chg { color: var(--pf-amber); }
.pf-pd-stream .del { color: var(--pf-red); }

@keyframes pf-pd-line {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* --- onboarding race --- */

.pf-pd-race { display: grid; gap: 9px; }

.pf-pd-lane {
  display: grid;
  grid-template-columns: 78px 1fr 52px;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-micro);
  color: var(--pf-text-2);
}

.pf-pd-lane[data-lane="manual"] .pf-pd-bar > i { background: var(--pf-text-faint); width: 0; }
.pf-pd-lane[data-lane="golden"] .pf-pd-bar > i { background: var(--pf-green); width: 0; }

.pf-pd-lane-time {
  text-align: right;
  color: var(--pf-text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- gauges --- */

.pf-pd-gauge {
  position: relative;
  height: 6px;
  background: var(--pf-surface-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 9px;
}

.pf-pd-gauge > i {
  display: block;
  height: 100%;
  width: 12%;
  background: var(--pf-green);
  transition: width var(--dur-base) var(--ease-out-expo),
              background var(--dur-base) var(--ease-smooth);
}

.pf-pd-gauge-gate { overflow: visible; }

.pf-pd-threshold {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 75%;
  width: 1px;
  background: var(--pf-text-3);
}

.pf-pd-readout,
.pf-pd-label [data-pd-readout] {
  color: var(--pf-cyan);
  font-variant-numeric: tabular-nums;
}

.pf-pd-stamp {
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 3px;
  border: 0.5px solid var(--pf-green);
  color: var(--pf-green);
  transition: color var(--dur-base) var(--ease-smooth),
              border-color var(--dur-base) var(--ease-smooth);
}

.pf-pd-stamp.is-fail {
  color: var(--pf-red);
  border-color: var(--pf-red);
  animation: pf-pd-shake 320ms var(--ease-smooth);
}

@keyframes pf-pd-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  75%      { transform: translateX(3px); }
}

/* --- sd-wan path --- */

.pf-pd-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--fs-micro);
}

.pf-pd-hop {
  color: var(--pf-text-2);
  border: 0.5px solid var(--pf-border);
  border-radius: 3px;
  padding: 3px 8px;
}

.pf-pd-link {
  font-family: inherit;
  font-size: var(--fs-micro);
  color: var(--pf-green);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pf-green);
  padding: 0 10px 2px;
  cursor: pointer;
  transition: color var(--dur-base) var(--ease-smooth),
              border-color var(--dur-base) var(--ease-smooth),
              opacity var(--dur-base) var(--ease-smooth);
}

.pf-pd-link:hover { color: var(--pf-text-strong); }

.pf-pd-link.is-cut {
  color: var(--pf-red);
  border-bottom-style: dashed;
  border-bottom-color: var(--pf-red);
  opacity: 0.5;
  text-decoration: line-through;
}

.pf-pd-link.is-active {
  color: var(--pf-cyan);
  border-bottom-color: var(--pf-cyan);
  border-bottom-width: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pf-pd-stream span,
  .pf-pd-stamp.is-fail {
    animation: none;
  }
}

/* ---------- Hero: sit on the same rail as everything else ---------- */

.pf-hero {
  max-width: var(--rail);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter) clamp(3rem, 7vh, 5rem);
  text-align: left;
}

/* The grid backdrop stays full-bleed behind the railed content. */
.pf-grid-bg {
  left: 50%;
  right: auto;
  width: 100vw;
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.pf-hero-name {
  max-width: 20ch;
}

.pf-hero .pf-status {
  max-width: 68ch;
  margin-left: 0;
  margin-right: auto;
}

.pf-hero .pf-cta {
  justify-content: flex-start;
}

/* Decorative tool-glyph cluster, upper-right of the hero. Unlabeled type
   glyphs (deduped from the old tools grid); dim steel so it reads as
   texture, not content. Hidden below 900px — it is ornament. */
.pf-hero-tools {
  position: absolute;
  top: 0.5rem;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 20px 24px;
  justify-items: center;
  color: #7a9eb8;
  opacity: 0.35;
  pointer-events: none;
}

.pf-hero-tools svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

/* Loose, non-grid feel: nudge alternating columns off the baseline. */
.pf-hero-tool:nth-child(3n + 2) { transform: translateY(10px); }
.pf-hero-tool:nth-child(3n)     { transform: translateY(-6px); }

@media (max-width: 900px) {
  .pf-hero-tools { display: none; }
}

@media (max-width: 684px) {
  .pf-hero-name { max-width: none; }
}

/* ============================================================
   /cicd — animated serverless CI/CD reference architecture
   Driven by static/js/cicd.js (anime.js). Every moving part has
   a resting state here, so the page still reads with JS off.
   ============================================================ */

.pf-nav-cwd {
  color: var(--pf-text-muted);
}

.pf-nav-brand a {
  color: inherit;
  text-decoration: none;
}

.pf-ci-body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--pf-text-3);
}

.pf-ci-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-cyan);
  margin-bottom: 6px;
}

.pf-ci-node-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--fs-title);
  color: var(--pf-text-strong);
  line-height: 1.3;
}

/* --- type glyphs (Lucide, ISC) ---
   Stroke-only and currentColor, so a node's icon takes the same signal colour
   its label does — cyan idle, amber waiting, green done — with no extra rules.
   Sized in em, so each context's font-size drives it. */

.pf-ci-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  overflow: visible;
  vertical-align: -0.12em;
  stroke-width: 1.75;
}

.pf-ci-card-label > .pf-ci-icon,
.pf-ci-group-label > .pf-ci-icon,
.pf-ci-foundation-name > .pf-ci-icon {
  width: 1.25em;
  height: 1.25em;
}

.pf-ci-stage-head > .pf-ci-icon {
  align-self: center;
  width: 17px;
  height: 17px;
  color: var(--pf-text-faint);
  transition: color var(--dur-base) var(--ease-smooth);
}

.pf-ci-stage.is-active .pf-ci-stage-head > .pf-ci-icon { color: var(--pf-cyan); }
.pf-ci-stage.is-wait .pf-ci-stage-head > .pf-ci-icon { color: var(--pf-amber); }
.pf-ci-stage.is-done .pf-ci-stage-head > .pf-ci-icon { color: var(--pf-green); }

.pf-ci-node-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: 1.6;
  color: var(--pf-text-muted);
  margin-top: 4px;
}

/* --- transport controls --- */

.pf-ci-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.pf-ci-status {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pf-text-muted);
}

/* --- source: developers push, the pipeline picks it up --- */

.pf-ci-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: var(--surface-card);
  border: 0.5px solid var(--border-default);
  border-left: 2px solid var(--pf-cyan);
  border-radius: var(--radius-md);
}

.pf-ci-source-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-ci-sha {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-green);
  background: var(--surface-well);
  border: 0.5px solid var(--pf-border-hair);
  border-radius: 3px;
  padding: 3px 8px;
}

.pf-ci-source-arrow {
  color: var(--pf-text-faint);
  font-size: 16px;
}

.pf-ci-source.is-firing .pf-ci-source-arrow {
  color: var(--pf-cyan);
}

/* --- the pipeline: two lanes of four, joined by a wrap elbow --- */

.pf-ci-pipe {
  position: relative;
}

.pf-ci-lane {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
}

/* The devsecops entry runs six stages, so its lanes are threes. */
.pf-ci-lane-3 {
  grid-template-columns: 1fr auto 1fr auto 1fr;
}

.pf-ci-stage {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 10px;
  background: var(--surface-card);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-base) var(--ease-smooth),
              box-shadow var(--dur-base) var(--ease-smooth),
              transform var(--dur-fast) var(--ease-back);
}

.pf-ci-stage.is-active {
  border-color: var(--pf-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.pf-ci-stage.is-wait {
  border-color: var(--pf-amber);
  box-shadow: 0 0 0 1px var(--pf-amber), 0 8px 28px rgba(240, 165, 0, 0.14);
}

.pf-ci-stage.is-done {
  border-color: var(--pf-green-a20);
}

.pf-ci-stage-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pf-ci-stage-num {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--pf-text-faint);
  transition: color var(--dur-base) var(--ease-smooth);
}

.pf-ci-stage.is-active .pf-ci-stage-num { color: var(--pf-cyan); }
.pf-ci-stage.is-wait .pf-ci-stage-num { color: var(--pf-amber); }
.pf-ci-stage.is-done .pf-ci-stage-num { color: var(--pf-green); }

.pf-ci-stage-name {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pf-text-2);
}

.pf-ci-steps {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  flex: 1;
}

.pf-ci-steps li {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: 1.85;
  color: var(--pf-text-muted);
}

.pf-ci-steps li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--pf-text-faint);
}

.pf-ci-stage.is-done .pf-ci-steps li::before {
  content: '\2713';
  color: var(--pf-green);
}

.pf-ci-stage-state {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-text-faint);
  border: 0.5px solid var(--pf-border-hair);
  border-radius: 3px;
  padding: 2px 7px;
}

.pf-ci-stage.is-active .pf-ci-stage-state {
  color: var(--pf-cyan);
  border-color: var(--pf-cyan-a20);
}

.pf-ci-stage.is-wait .pf-ci-stage-state {
  color: var(--pf-amber);
  border-color: rgba(240, 165, 0, 0.3);
}

.pf-ci-stage.is-done .pf-ci-stage-state {
  color: var(--pf-green);
  border-color: var(--pf-green-a20);
}

/* --- connectors ---
   Every edge is a marching-ants rail: idle edges march in steel, live edges
   march in their signal colour, and a packet rides on top. An edge that has
   nothing flowing through it is still wired up, so it still moves. */

@keyframes pf-ci-march-x {
  to { background-position-x: 16px; }
}

@keyframes pf-ci-march-y {
  to { background-position-y: 16px; }
}

.pf-ci-link {
  position: relative;
  align-self: center;
  width: 30px;
  height: 2px;
  margin: 0 6px;
  background-image: repeating-linear-gradient(
    to right,
    var(--pf-border) 0 9px,
    transparent 9px 16px
  );
  animation: pf-ci-march-x 1.1s linear infinite;
}

.pf-ci-link::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid var(--pf-border);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transform: translateY(-50%);
  transition: border-left-color var(--dur-fast) var(--ease-smooth);
}

/* The live overlay: same march, signal colour, revealed left-to-right. */
.pf-ci-link > i {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--edge, var(--pf-cyan)) 0 9px,
    transparent 9px 16px
  );
  animation: pf-ci-march-x 1.1s linear infinite;
  transform: scaleX(0);
  transform-origin: left center;
}

.pf-ci-link.is-live::after {
  border-left-color: var(--edge, var(--pf-cyan));
}

.pf-ci-link > b {
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--edge, var(--pf-cyan));
  box-shadow: 0 0 8px var(--edge, var(--pf-cyan));
  opacity: 0;
}

.pf-ci-vlink {
  position: relative;
  width: 2px;
  height: 34px;
  margin: 0 auto;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--pf-border) 0 9px,
    transparent 9px 16px
  );
  animation: pf-ci-march-y 1.1s linear infinite;
}

.pf-ci-vlink::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid var(--pf-border);
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  transform: translateX(-50%);
  transition: border-top-color var(--dur-fast) var(--ease-smooth);
}

.pf-ci-vlink.is-live::after {
  border-top-color: var(--edge, var(--pf-cyan));
}

.pf-ci-vlink > i {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--edge, var(--pf-cyan)) 0 9px,
    transparent 9px 16px
  );
  animation: pf-ci-march-y 1.1s linear infinite;
  transform: scaleY(0);
  transform-origin: center top;
}

.pf-ci-vlink > b {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--edge, var(--pf-cyan));
  box-shadow: 0 0 8px var(--edge, var(--pf-cyan));
  opacity: 0;
}

/* Semantic edge colours, same convention as the rest of the site:
   cyan carries CI, green carries a healthy prod path, amber carries an alarm. */
.pf-ci-runtime .pf-ci-link,
.pf-ci-runtime .pf-ci-vlink { --edge: var(--pf-green); }

.pf-ci-feedback { --edge: var(--pf-amber); }

/* The lane-1 to lane-2 elbow. JS sizes the viewBox to CSS pixels so the
   packet can ride the real path via anime.path(). */
.pf-ci-wrap {
  display: block;
  width: 100%;
  height: 54px;
  overflow: visible;
}

@keyframes pf-ci-march-path {
  to { stroke-dashoffset: -16; }
}

.pf-ci-wrap-track {
  fill: none;
  stroke: var(--pf-border);
  stroke-width: 2;
  stroke-dasharray: 9 7;
  animation: pf-ci-march-path 1.1s linear infinite;
}

.pf-ci-wrap-fill {
  fill: none;
  stroke: var(--pf-cyan);
  stroke-width: 2;
}

/* Once the elbow has drawn in, it joins the marching-ants convention rather
   than sitting there as the one solid edge on the page. */
.pf-ci-wrap-fill.is-marching {
  stroke-dasharray: 9 7;
  animation: pf-ci-march-path 1.1s linear infinite;
}

.pf-ci-wrap-dot {
  fill: var(--pf-cyan);
  opacity: 0;
}

/* --- side branches off the pipeline --- */

.pf-ci-aside {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.pf-ci-aside-card {
  padding: 14px 16px;
  background: var(--surface-well);
  border: 0.5px dashed var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-base) var(--ease-smooth);
}

.pf-ci-aside-card.is-active {
  border-color: var(--pf-cyan);
  border-style: solid;
}

/* --- runtime --- */

.pf-ci-runtime {
  padding: 20px;
  background: var(--surface-well);
  border: 0.5px solid var(--border-hair);
  border-radius: var(--radius-lg);
}

.pf-ci-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
}

.pf-ci-row-2 {
  grid-template-columns: 1fr auto 1fr;
}

.pf-ci-row-4 {
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
}

.pf-ci-node {
  padding: 12px 14px;
  background: var(--surface-card);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-smooth),
              box-shadow var(--dur-fast) var(--ease-smooth);
}

.pf-ci-node.is-hot {
  border-color: var(--pf-cyan);
  box-shadow: var(--glow-cyan);
}

.pf-ci-node-fn {
  border-left: 2px solid var(--pf-amber);
}

.pf-ci-node-tag {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-text-muted-2);
  border: 0.5px dashed var(--border-default);
  border-radius: 3px;
  padding: 2px 6px;
}

.pf-ci-group {
  position: relative;
  padding: 22px 14px 14px;
  border: 0.5px dashed rgba(240, 165, 0, 0.45);
  border-radius: var(--radius-md);
}

.pf-ci-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: -8px;
  left: 14px;
  padding: 0 8px;
  background: var(--surface-well);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-amber);
}

/* --- canary --- */

.pf-ci-canary {
  padding: 20px;
  background: var(--surface-card);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-lg);
}

.pf-ci-canary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pf-ci-canary-verdict {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-text-faint);
  border: 0.5px solid var(--pf-border-hair);
  border-radius: 3px;
  padding: 4px 10px;
  white-space: nowrap;
}

.pf-ci-canary-verdict.is-live { color: var(--pf-cyan); border-color: var(--pf-cyan-a20); }
.pf-ci-canary-verdict.is-ok { color: var(--pf-green); border-color: var(--pf-green-a20); }

.pf-ci-split {
  margin: 20px 0 14px;
}

.pf-ci-split-bar {
  position: relative;
  height: 14px;
  border-radius: 3px;
  background: var(--pf-surface-3);
  overflow: hidden;
}

.pf-ci-split-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pf-green);
}

.pf-ci-split-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-text-muted);
}

.pf-ci-split-legend em {
  font-style: normal;
  color: var(--pf-text-strong);
}

.pf-ci-split-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
}

.pf-ci-split-key.is-new { background: var(--pf-green); }
.pf-ci-split-key.is-cur { background: var(--pf-surface-3); border: 0.5px solid var(--border-default); }

.pf-ci-steps-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pf-ci-step-chip {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-text-faint);
  background: var(--surface-well);
  border: 0.5px solid var(--pf-border-hair);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  transition: color var(--dur-fast) var(--ease-smooth),
              border-color var(--dur-fast) var(--ease-smooth);
}

.pf-ci-step-chip.is-on {
  color: var(--pf-green);
  border-color: var(--pf-green-a20);
}

.pf-ci-canary-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 0.5px solid var(--pf-border-hair);
}

/* The alarm return path: observability is what makes the canary reversible,
   so it gets a real edge back into it rather than a sentence about one. */
.pf-ci-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pf-ci-feedback .pf-ci-link {
  flex: 1;
  width: auto;
  margin: 0;
}

.pf-ci-feedback-label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-amber);
  white-space: nowrap;
}

.pf-ci-alarm {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-text-muted);
}

.pf-ci-alarm::before {
  content: '\25CF';
  margin-right: 8px;
  color: var(--pf-green);
}

/* --- observability --- */

.pf-ci-obs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

.pf-ci-obs-card {
  padding: 14px 16px;
  background: var(--surface-card);
  border: 0.5px solid var(--border-default);
  border-radius: var(--radius-md);
}

.pf-ci-obs-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.pf-ci-obs-list li {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: 1.9;
  color: var(--pf-text-muted);
}

.pf-ci-obs-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--pf-cyan);
}

/* --- entry header: a second reference architecture opens like the first --- */
/* Badge, display line, lede box — the page hero's grammar, one notch quieter so
   the top of the page stays the loudest thing. The grid backdrop is full-bleed
   (see .pf-grid-bg), so the wrapper has to be the positioned ancestor. */

/* Page-level marker defs — carries no box of its own. */
.pf-ci-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pf-ci-cards {
  max-width: var(--rail);
  margin: 0 auto var(--section-gap);
  padding: 0 var(--gutter);
  display: grid;
  gap: 14px;
}

.pf-ci-arch {
  border: var(--border-hairline) solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  scroll-margin-top: 5rem;
  transition: border-color var(--dur-base) var(--ease-smooth);
}

.pf-ci-arch:hover,
.pf-ci-arch.is-open {
  border-color: var(--pf-cyan);
}

/* The <h2> is only there to keep the page outline; all the type lives on the
   button's spans, so the theme's heading rules have nothing to fight over. */
.pf .pf-ci-arch-h {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.pf-ci-arch-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: clamp(1.1rem, 2.6vw, 1.6rem) clamp(1.1rem, 3vw, 1.75rem);
  background: none;
  border: 0;
  border-radius: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pf-ci-arch-toggle:focus-visible {
  outline: var(--border-accent) solid var(--pf-cyan);
  outline-offset: -3px;
}

/* Closed points right, open points down. A rotated corner, not a glyph — the
   icon set names component types, and a disclosure arrow is not one. */
.pf-ci-arch-chev {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: 2px;
  border-right: 1.5px solid var(--pf-cyan);
  border-bottom: 1.5px solid var(--pf-cyan);
  transform: rotate(-45deg);
  transition: transform var(--dur-base) var(--ease-out-expo);
}

.pf-ci-arch.is-open .pf-ci-arch-chev {
  transform: rotate(45deg);
}

.pf-ci-arch-text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.pf-ci-arch-badge {
  margin-bottom: 10px;
}

.pf-ci-arch-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--pf-text-strong);
  text-wrap: balance;
}

.pf-ci-arch-title strong {
  font-weight: 400;
  font-style: italic;
  color: var(--pf-cyan);
}

.pf-ci-arch-meta {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--pf-text-muted);
}

.pf-ci-arch-cue {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-text-faint);
}

.pf-ci-arch-cue::after { content: "open"; }
.pf-ci-arch.is-open .pf-ci-arch-cue::after { content: "close"; }

/* display:none while collapsed is deliberate — see cicd.js, which will not
   build a card's timeline until it can measure one. */
.pf-ci-arch-body[hidden] {
  display: none;
}

/* An animation, not a transition: the body is unhidden and given .is-open in
   the same task, so there is no start frame for a transition to run from. */
.pf-ci-arch.is-open .pf-ci-arch-body {
  padding: 0 clamp(1.1rem, 3vw, 1.75rem) clamp(1.5rem, 4vw, 2.25rem);
  animation: pf-ci-reveal var(--dur-slow) var(--ease-out-expo) both;
}

@keyframes pf-ci-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.pf-ci-arch-lede.pf-status {
  max-width: 68ch;
  margin: 0 0 clamp(2rem, 5vw, 3rem);
}

/* Sections keep their ids and their rhythm, but the card already supplies the
   rail and the gutter, so they drop both. */
.pf-ci-arch-body .pf-section,
.pf-ci-arch-body .pf-section-wide {
  max-width: none;
  padding-inline: 0;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.pf-ci-arch-body .pf-section:last-child,
.pf-ci-arch-body .pf-section-wide:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pf-ci-arch.is-open .pf-ci-arch-body { animation: none; }
  .pf-ci-arch-chev { transition: none; }
}

/* --- devsecops entry: promotion, rollout, post-deploy chain --- */

.pf-ci-envs,
.pf-ci-ds-canary,
.pf-ci-chain,
.pf-ci-cross {
  margin-top: 22px;
}

/* Promotion is prod runtime traffic; the post-deploy chain is alarm-coloured,
   the same grammar the serverless entry uses. */
.pf-ci-envs .pf-ci-link { --edge: var(--pf-green); }

.pf-ci-chain .pf-ci-link { --edge: var(--pf-amber); }

/* --- security foundations --- */

.pf-ci-foundations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.pf-ci-foundation {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--surface-well);
  border: 0.5px solid var(--pf-border-hair);
  border-left: 2px solid var(--pf-green);
  border-radius: var(--radius-sm);
}

.pf-ci-foundation-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--pf-text-2);
}

.pf-ci-credit {
  margin-top: 6px;
  font-size: var(--fs-micro);
  color: var(--pf-text-faint);
}

.pf-ci-foundation-role {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-text-muted);
}

.pf-ci-row-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* --- narrow screens: drop the rails, stack the boxes --- */

@media (max-width: 900px) {
  .pf-ci-lane,
  .pf-ci-lane-3,
  .pf-ci-row,
  .pf-ci-row-2,
  .pf-ci-row-4 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pf-ci-lane { margin-bottom: 10px; }

  .pf-ci-link,
  .pf-ci-wrap {
    display: none;
  }

  .pf-ci-vlink { height: 20px; }

  .pf-ci-stage,
  .pf-ci-node {
    border-left: 2px solid var(--border-default);
  }

  .pf-ci-stage.is-active { transform: none; }
}

/* --- reduced motion: the page still tells the story, it just stops moving --- */

@media (prefers-reduced-motion: reduce) {
  .pf-ci-stage,
  .pf-ci-node,
  .pf-ci-stage-num,
  .pf-ci-step-chip,
  .pf-ci-aside-card {
    transition: none;
  }

  .pf-ci-link > b,
  .pf-ci-vlink > b,
  .pf-ci-wrap-dot {
    display: none;
  }

  .pf-ci-link,
  .pf-ci-vlink,
  .pf-ci-link > i,
  .pf-ci-vlink > i,
  .pf-ci-wrap-track,
  .pf-ci-wrap-fill.is-marching {
    animation: none;
  }
}

/* ---------- Range input: terminal-styled, used by the project demos ---------- */

/* The Terminal theme puts a border + padding on every input; strip it here. */
.pf .pf-pd-slider,
.pf-pd-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
  display: block;
}

.pf-pd-slider::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--pf-border);
  border-radius: 1px;
}

.pf-pd-slider::-moz-range-track {
  height: 2px;
  background: var(--pf-border);
  border-radius: 1px;
}

.pf-pd-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  background: var(--pf-cyan);
  border: 0;
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-back),
              box-shadow var(--dur-fast) var(--ease-smooth);
}

.pf-pd-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--pf-cyan);
  border: 0;
  border-radius: 2px;
}

.pf-pd-slider:hover::-webkit-slider-thumb,
.pf-pd-slider:focus-visible::-webkit-slider-thumb {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--pf-cyan-a20);
}

.pf-pd-slider:focus-visible {
  outline: none;
}

/* ---------- Nav: keep it on one rail, and usable on phones ---------- */

.pf-nav {
  max-width: var(--rail);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  gap: 1.5rem;
}

/* Full-bleed bar behind the railed nav content. */
.pf-nav::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  bottom: 0;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--pf-border-hair);
  z-index: -1;
}

.pf-nav {
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  position: sticky;
}

.pf-nav-brand,
.pf-nav-links {
  position: relative;
  z-index: 1;
}

.pf-nav-brand {
  white-space: nowrap;
  flex-shrink: 0;
}

.pf-nav-links {
  flex-wrap: nowrap;
}

@media (max-width: 900px) {
  .pf-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem var(--gutter) 0.7rem;
  }

  /* Links become a scrollable strip rather than wrapping into the brand. */
  .pf-nav-links {
    width: 100%;
    gap: 1.15rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }

  .pf-nav-links::-webkit-scrollbar { display: none; }

  .pf-nav-links a { white-space: nowrap; }
}

@media (max-width: 684px) {
  :root { --gutter: 1.25rem; }
}

/* ---------- Stack row: one chip shape for everything ---------- */
/* project-tag.html emits a stacked tool-icon for known tech and a text chip
   for the rest, which put two different box shapes in the same row. Inside a
   stack row the icon version collapses to an inline chip so the row reads as
   a single list. */

.pf-project-tags {
  align-items: center;
  gap: 6px;
}

.pf-project-tags .pf-tool-sm {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  background: var(--pf-surface-3);
  border: 0.5px solid var(--pf-border-hair);
  border-radius: 3px;
  padding: 3px 8px 3px 5px;
}

.pf-project-tags .pf-tool-sm .pf-tool-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border-width: 0;
  padding: 2px;
  flex-shrink: 0;
}

.pf-project-tags .pf-tool-sm .pf-tool-icon svg {
  width: 12px;
  height: 12px;
}

.pf-project-tags .pf-tool-sm .pf-tool-label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--pf-text-3);
  white-space: nowrap;
}

/* ---------- Page-transition curtains ---------- */
/* Panels are built by main.js; pf-curtains-enter is stamped on <html> by the
   inline script in extended_head.html before first paint, so the ::before
   cover hides the incoming page until the reveal animation takes over. */
.pf-curtains {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 999;
  pointer-events: none;
}

.pf-curtains i {
  flex: 1;
  background: var(--pf-bg-deep);
  border-bottom: 2px solid var(--pf-cyan);
  transform: translateY(-101%);
}

html.pf-curtains-enter::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--pf-bg-deep);
  z-index: 998;
  /* Failsafe: if main.js never runs, uncover the page anyway. */
  animation: pf-curtain-failsafe 300ms 1500ms forwards;
}

@keyframes pf-curtain-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
