/*
Theme Name: NH66.ai
Theme URI: https://nh66.ai
Author: NH66.ai
Author URI: https://nh66.ai
Description: Custom theme for nh66.ai — an AI-powered software agency.
Version: 0.8.2
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nh66ai
*/

:root {
  --bg:       #F8F8FA;
  --surface:  #F2F2F4;
  --surface2: #E8E8F0;
  --border:   #D8D8E8;
  --amber:    #B45309;
  --amber-hi: #D97706;
  --amber-lo: rgba(180,83,9,0.08);
  --amber-bd: rgba(180,83,9,0.18);
  --txt:      #0C0C0F;
  --txt2:     #606078;
  --txt3:     #707088;
  --red:      #DC2626;

  --max:      1040px;
  --gut:      40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-hi); }
button { font-family: inherit; cursor: pointer; }

/* ── Layout helpers ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.section.surface { background: var(--surface); }
.section.sm { padding: 48px 0; }

/* ── Type ── */
.eyebrow { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt3); margin-bottom: 8px; }
h1 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: clamp(40px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; color: var(--txt); }
h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--txt); }
h3 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 24px; font-weight: 700; color: var(--txt); }
.accent { color: var(--amber); }
.body-lg { font-size: 16px; color: var(--txt2); line-height: 1.65; }
.body-sm { font-size: 14px; color: var(--txt2); line-height: 1.6; }
.empty-note { font-size: 14px; color: var(--txt3); font-style: italic; padding: 24px 0; }
.divider { height: 1px; background: var(--border); width: 100%; }
.tag { display: inline-flex; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--txt2); background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; }

/* ── Nav ── */
.site-nav { height: 64px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 var(--gut); position: sticky; top: 0; z-index: 50; }
body.admin-bar .site-nav { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-nav { top: 46px; }
}
.site-nav-inner { max-width: var(--max); width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 22px; }
.wm { line-height: 0; margin-right: auto; }
.wm a { display: inline-flex; align-items: center; }
.wm-logo { height: 28px; width: auto; flex-shrink: 0; display: block; }
.nav-links { display: flex; gap: 22px; margin-right: 24px; align-items: center; }
.nav-links .nav-link { font-family: 'Inter', system-ui, sans-serif; font-size: 13px; font-weight: 500; color: var(--txt2); }
.nav-links .nav-link:hover, .nav-links .nav-link.active { color: var(--txt); }

/* ── Buttons ── */
.btn-primary { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; background: var(--amber); color: #fff; border: none; border-radius: 7px; padding: 8px 18px; font-size: 12px; }
.btn-primary:hover { background: var(--amber-hi); color: #fff; }
.btn-ghost { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 500; background: transparent; color: var(--txt2); border: 1px solid var(--border); border-radius: 7px; padding: 7px 16px; font-size: 12px; }
.btn-ghost:hover { color: var(--txt); border-color: var(--txt3); }
.btn-primary.lg, .btn-ghost.lg { font-size: 13px; border-radius: 8px; padding: 12px 24px; }

/* ── Live badge ── */
.live-badge { display: inline-flex; align-items: center; gap: 7px; background: var(--amber-lo); border: 1px solid var(--amber-bd); border-radius: 100px; padding: 4px 13px 4px 9px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--amber); white-space: nowrap; flex-shrink: 0; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }

/* ── Code block ── */
.code-block { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; }
.code-line { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.65; }
.code-line .dim { color: var(--txt3); }
.code-line .hi { color: var(--amber); }
.code-line .def { color: var(--txt); }

/* Blinking cursor that lands at the end of the last code-block line
   after the type-in animation finishes. steps(2) gives a hard
   square blink — terminal style. */
@keyframes nh66-cursor-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.code-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--amber);
  font-weight: 700;
  animation: nh66-cursor-blink 1s steps(2) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .code-cursor { animation: none; opacity: 1; }
}

/* ── Hero ── */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Dot grid: three layers stacked. The static layer is the dim baseline.
   wave-fwd pops amber column-by-column from left to right; wave-rev
   immediately follows it from right to left. Each wave dot is invisible
   (opacity 0) except during its per-column flash window. */
.hero-bg .dot-grid .static circle { fill: var(--txt3); opacity: 0.28; }
.hero-bg .dot-grid .wave circle   { fill: var(--amber); opacity: 0; animation: nh66-dot-pop 8s linear infinite; }
@keyframes nh66-dot-pop {
  0%, 3%   { opacity: 0.95; }
  8%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg .dot-grid .wave circle { animation: none; opacity: 0; }
}

.hero-2col { display: flex; gap: 48px; align-items: flex-end; }
.hero-left { flex: 1; min-width: 0; }
.hero-left p.body-lg { max-width: 460px; margin-top: 20px; }
.hero-problem { max-width: 460px; margin-top: 22px; }
.hero-problem p { font-size: 16px; color: var(--txt2); line-height: 1.6; margin-bottom: 12px; }
.hero-problem .hero-problem-punch { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 18px; font-weight: 700; color: var(--amber); margin-top: 14px; margin-bottom: 0; line-height: 1.4; }
.hero-ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-trust { font-size: 12px; color: var(--txt3); line-height: 1.55; margin-top: 18px; max-width: 460px; }
.hero-aside { width: 320px; flex-shrink: 0; }

/* ── Proof strip ── */
.proof-strip { display: flex; border: 1px solid var(--border); }
.proof-item { flex: 1; padding: 28px 20px; border-right: 1px solid var(--border); text-align: left; }
.proof-item:last-child { border-right: none; }
.proof-num { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--txt); }
.proof-num .hi { color: var(--amber); }
.proof-lbl { font-size: 10.5px; color: var(--txt3); margin-top: 4px; }

/* ── Service cards ── */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 32px; }
.section-head-aside { max-width: 260px; text-align: right; font-size: 14px; color: var(--txt2); line-height: 1.55; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 24px 20px; display: flex; flex-direction: column; }
.card.featured { border-color: var(--amber); border-top: 3px solid var(--amber); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.card-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 17px; font-weight: 700; color: var(--txt); line-height: 1.3; margin-bottom: 8px; }
.card-tagline { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--txt); line-height: 1.5; margin-bottom: 12px; }
.card-body { font-size: 14px; color: var(--txt2); line-height: 1.6; margin-bottom: 14px; }
.audience-label { display: inline-flex; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--txt3); }
.service-card { color: inherit; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.service-card:hover { border-color: var(--amber); }
.service-card .tags-row { margin-top: auto; margin-bottom: 14px; }
.card-cta { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--amber); }
.tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pill { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt3); background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; }
.card-bottom { display: flex; align-items: baseline; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.card-price { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 15px; font-weight: 700; color: var(--txt); }
.card-price.amber { color: var(--amber); }
.card-period { font-size: 11px; color: var(--txt3); }
.card-track { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt3); }
.journey-arrow { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.journey-arrow .line { flex: 1; height: 1px; background: var(--amber-bd); }
.journey-arrow .label { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--amber); background: var(--amber-lo); border: 1px solid var(--amber-bd); border-radius: 4px; padding: 3px 8px; }

/* ── Steps ── */
.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.step { padding-right: 32px; border-right: 1px solid var(--border); }
.step:last-child { border-right: none; padding-left: 32px; padding-right: 0; }
.step:nth-child(2) { padding: 0 32px; }
.step-num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 28px; font-weight: 700; color: var(--amber); margin-bottom: 12px; }
.step-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 17px; font-weight: 700; color: var(--txt); line-height: 1.3; margin-bottom: 8px; }
.step-body { font-size: 14px; color: var(--txt2); line-height: 1.6; }

/* ── Quotes ── */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 24px 20px; }
.quote-text { font-size: 16px; color: var(--txt); line-height: 1.55; margin-bottom: 20px; }
.quote-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.quote-name { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--txt); }
.quote-role { font-size: 12px; color: var(--txt2); margin-top: 2px; }
.quote-note { font-size: 11px; color: var(--txt3); margin-top: 2px; }

/* ── CTA block ── */
.cta-block { display: flex; align-items: center; gap: 40px; }
.cta-block > div:first-child { flex: 1; }
.cta-block h2 { margin-bottom: 8px; }
.cta-block p { font-size: 16px; color: var(--txt2); line-height: 1.55; }
.cta-btns { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }
.cta-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cta-block-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px 32px 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta-block-card .cta-block-tag { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.cta-block-card h2 { font-size: 22px; line-height: 1.25; margin: 0; }
.cta-block-card p { font-size: 14px; color: var(--txt2); line-height: 1.6; margin: 0 0 8px; }
.cta-block-card .btn-primary { margin-top: auto; }
@media (max-width: 720px) { .cta-grid-2 { grid-template-columns: 1fr; } }

/* ── Contact page ── */
.contact-direct { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.contact-email { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 22px; font-weight: 700; color: var(--amber); }
.contact-email:hover { color: var(--amber-hi); }

/* ── Homepage problem block ── */
.problem-prose { max-width: 720px; }
.problem-prose p { font-size: 16px; line-height: 1.65; color: var(--txt2); margin-bottom: 16px; }
.problem-prose .problem-lead { color: var(--txt); font-weight: 600; font-size: 18px; line-height: 1.55; }
.problem-prose .problem-punch { color: var(--amber); font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.45; margin-bottom: 0; margin-top: 24px; }

/* ── Editorial 2-column prose (eyebrow + h2 left, body right) ── */
.about-teaser, .about-prose-2col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.about-teaser h2, .about-prose-2col h2 { margin-top: 0; margin-bottom: 0; }
.about-teaser p.body-lg + p.body-lg,
.about-prose-2col p.body-lg + p.body-lg { margin-top: 14px; }
@media (max-width: 720px) {
  .about-teaser, .about-prose-2col { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Footer ── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 220px 1fr 1fr 1fr; gap: 48px; margin-bottom: 28px; }
.footer-tagline { font-size: 14px; color: var(--txt2); line-height: 1.55; margin-top: 8px; }
.footer-loc { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt3); margin-top: 6px; }
.footer-col-head { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--txt); margin-bottom: 12px; }
.footer-link { display: block; font-size: 13px; color: var(--txt2); margin-bottom: 8px; }
.footer-link:hover { color: var(--amber); }
.footer-copy { font-size: 12px; color: var(--txt3); padding-top: 20px; border-top: 1px solid var(--border); }

/* ── Page header (shared by Work/About/Blog/etc.) ── */
.page-header { padding: 64px 0 32px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: clamp(36px, 4.5vw, 48px); }
.page-header .page-header-lede { max-width: 540px; margin-top: 16px; }

/* ── About: prose section ── */
.about-prose { max-width: 720px; }
.about-prose p.body-lg + p.body-lg { margin-top: 14px; }

/* ── Service detail pages ── */
.service-hero .hero-ctas { margin-top: 24px; }
.detail-prose { max-width: 720px; }
.detail-prose h2 { margin-bottom: 18px; }
.detail-prose p { font-size: 16px; color: var(--txt2); line-height: 1.65; margin-bottom: 14px; }
.detail-prose p strong { color: var(--txt); font-weight: 700; }
.detail-prose .problem-punch { color: var(--amber); font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.45; margin-top: 16px; margin-bottom: 0; }
.detail-bullets { padding-left: 20px; margin: 8px 0 16px; }
.detail-bullets li { font-size: 16px; color: var(--txt2); line-height: 1.65; margin-bottom: 6px; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
.detail-list-item { padding-left: 16px; border-left: 2px solid var(--amber); }
.detail-list-item h3 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 17px; font-weight: 700; color: var(--txt); line-height: 1.3; margin-bottom: 8px; }
.detail-list-item p { font-size: 14px; color: var(--txt2); line-height: 1.6; margin: 0; }
.detail-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
.detail-step { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; }
.detail-step-num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.detail-step h3 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 17px; font-weight: 700; color: var(--txt); line-height: 1.3; margin-bottom: 8px; }
.detail-step p { font-size: 14px; color: var(--txt2); line-height: 1.6; margin: 0; }
.faq-list { max-width: 760px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }
.faq-item[open] { border-color: var(--amber); }
.faq-item summary { cursor: pointer; font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 700; font-size: 15px; color: var(--txt); list-style: none; position: relative; padding-right: 24px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 0; top: -2px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 18px; color: var(--amber); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { font-size: 14px; color: var(--txt2); line-height: 1.6; margin: 12px 0 0; }
@media (max-width: 720px) {
  .detail-list, .detail-steps { grid-template-columns: 1fr; }
}

/* ── Strip row (eyebrow · vertical-divider · text) ── */
.strip { border-bottom: 1px solid var(--border); }
.strip-inner { display: flex; align-items: center; gap: 24px; padding: 18px 0; }
.strip-eyebrow { margin-bottom: 0; }
.strip-divider { width: 1px; height: 16px; background: var(--border); }
.strip-text { font-size: 12px; color: var(--txt3); }

/* ── About: team members ── */
.team { display: flex; flex-direction: column; }
.team-member { display: flex; gap: 24px; padding: 28px 0; }
.team-member + .team-member { border-top: 1px solid var(--border); }
.team-member:first-child { padding-top: 0; }
.team-avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--amber-lo); border: 1px solid var(--amber-bd); display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 32px; font-weight: 700; color: var(--amber); flex-shrink: 0; }
.team-avatar-img { object-fit: cover; padding: 0; border-color: var(--border); background: var(--surface2); }
.team-detail { min-width: 0; }
.team-name { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 20px; font-weight: 700; color: var(--txt); margin: 0; }
.team-role { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.06em; color: var(--amber); margin-top: 4px; margin-bottom: 12px; }
.team-bio { font-size: 14px; color: var(--txt2); line-height: 1.65; max-width: 600px; }
.team-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
@media (max-width: 600px) { .team-member { flex-direction: column; gap: 16px; } }

/* ── Work: case study cards ── */
.case-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 20px; padding: 28px 28px 24px; }
.case-card:last-child { margin-bottom: 0; }
.case-meta-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.case-meta { font-size: 12px; color: var(--txt3); }
.case-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 22px; font-weight: 700; color: var(--txt); line-height: 1.3; margin: 14px 0 20px; }
.case-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-section { }
.case-section-h { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--txt3); margin-bottom: 8px; }
.case-section p { font-size: 14px; color: var(--txt2); line-height: 1.6; margin: 0; }
.case-tech { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; }
.case-tech .case-section-h { margin-bottom: 0; margin-right: 4px; }
.case-metrics { display: flex; border-top: 1px solid var(--border); margin: 24px -28px -24px; padding-top: 0; }
.case-metric { flex: 1; padding: 16px 20px; border-right: 1px solid var(--border); }
.case-metric:last-child { border-right: none; }
.case-metric-num { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--amber); }
.case-metric-lbl { font-size: 11px; color: var(--txt3); margin-top: 3px; }
.case-quote { margin: 24px 0 0; padding: 18px 22px; background: var(--surface2); border-left: 3px solid var(--amber); border-radius: 6px; }
.case-quote p { font-size: 14px; line-height: 1.6; color: var(--txt); margin: 0 0 8px; font-style: italic; }
.case-quote cite { font-size: 12px; color: var(--txt3); font-style: normal; }
@media (max-width: 720px) {
  .case-body { grid-template-columns: 1fr; gap: 16px; }
  .case-metrics { flex-direction: column; } .case-metric { border-right: none; border-bottom: 1px solid var(--border); } .case-metric:last-child { border-bottom: none; }
}

/* ── Work listing: project cards ── */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.project-card:hover { border-color: var(--amber-bd); transform: translateY(-2px); }
.project-card-media { background: var(--surface2); border-bottom: 1px solid var(--border); height: 200px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.project-card-media img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.project-card-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface2), var(--amber-lo)); }
.project-card-noimg span { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--txt); }
.project-card-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 24px; flex: 1; }
.project-card-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--txt); margin: 6px 0 0; }
.project-card-meta { font-size: 12px; color: var(--txt3); margin: 0; }
.project-card-teaser { font-size: 14px; color: var(--txt2); line-height: 1.55; margin: 2px 0 0; }
.project-card-link { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--amber); margin-top: auto; padding-top: 10px; }

/* ── Case study detail page ── */
.single-case { padding: 40px 0 0; }
.case-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-top: 16px; }
.case-detail-hero { margin: 0; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; justify-content: center; padding: 20px; }
.case-detail-hero img { display: block; max-width: 100%; height: auto; max-height: 440px; object-fit: contain; border-radius: 8px; }
.case-detail-inner { padding: 28px; }
.case-detail-head { margin-bottom: 24px; }
.case-detail-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; color: var(--txt); margin: 14px 0 8px; }
.case-detail-meta { font-size: 13px; color: var(--txt3); margin: 0; }
/* Detail page reads as normal prose, not the 3-column card layout. */
.case-detail .case-body { display: block; }
.case-detail .case-section + .case-section { margin-top: 24px; }
.case-detail .case-section p { font-size: 15px; line-height: 1.7; }
@media (max-width: 720px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* ── Blog index / archive ── */
.blog-main { padding: 48px 0 80px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--gut); }

.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
@media (max-width: 880px) { .post-grid { grid-template-columns: 1fr; } }

.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.post-card-thumb { display: block; line-height: 0; }
.post-card-thumb img { width: 100%; height: auto; display: block; }
.post-card-body { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-meta { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--txt3); }
.post-meta-sep { color: var(--border); margin: 0 4px; }
.post-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.post-title a { color: var(--txt); }
.post-title a:hover { color: var(--amber); }
.post-excerpt { color: var(--txt2); font-size: 14px; line-height: 1.65; flex: 1; }
.post-excerpt p { margin: 0; }
.post-read-more { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; font-size: 13px; color: var(--amber); align-self: flex-start; }
.post-read-more:hover { color: var(--amber-hi); }

.empty-state { text-align: center; color: var(--txt2); padding: 80px 16px; border: 1px dashed var(--border); border-radius: 10px; }
.empty-state h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 24px; margin: 0 0 8px; color: var(--txt); }

/* ── Pagination ── */
.post-pagination { margin-top: 32px; }
.post-pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.post-pagination .page-numbers { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--txt2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; min-width: 36px; text-align: center; background: var(--surface); }
.post-pagination .page-numbers:hover, .post-pagination .page-numbers.current { color: var(--amber); border-color: var(--amber); }
.post-pagination .page-numbers.current { background: var(--amber-lo); }

/* ── Single post ── */
/* main.* keeps this from colliding with WP's `body.single-post` class. */
main.single-post { padding: 48px 0 80px; }
.back-link { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 32px; }
.back-link a { color: var(--txt2); }
.back-link a:hover { color: var(--amber); }

.post-article-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-article-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 16px; color: var(--txt); }
.post-article-thumb { margin: 32px -40px; line-height: 0; }
.post-article-thumb img { width: 100%; height: auto; border-radius: 8px; }
@media (max-width: 880px) { .post-article-thumb { margin: 24px 0; } }

.post-article-content { color: var(--txt); font-size: 17px; line-height: 1.7; }
.post-article-content > * + * { margin-top: 1.2em; }
.post-article-content p { color: var(--txt); }
.post-article-content h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2em; }
.post-article-content h3 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 22px; font-weight: 700; margin-top: 1.8em; }
.post-article-content h4 { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 18px; font-weight: 600; margin-top: 1.6em; }
.post-article-content a { color: var(--amber); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-article-content a:hover { color: var(--amber-hi); }
.post-article-content ul, .post-article-content ol { padding-left: 1.4em; }
.post-article-content li + li { margin-top: 0.4em; }
.post-article-content blockquote { border-left: 3px solid var(--amber); background: var(--surface); padding: 20px 24px; margin: 1.5em 0; font-size: 18px; color: var(--txt); border-radius: 0 8px 8px 0; }
.post-article-content blockquote p:last-child { margin-bottom: 0; }
.post-article-content code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.9em; background: var(--surface2); padding: 2px 6px; border-radius: 4px; color: var(--amber); }
.post-article-content pre { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; overflow-x: auto; line-height: 1.6; }
.post-article-content pre code { background: transparent; padding: 0; color: var(--txt); font-size: inherit; }
.post-article-content img { width: 100%; height: auto; border-radius: 8px; margin: 1.5em 0; }
.post-article-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.post-article-content figure.wp-block-table { margin: 1.8em 0; overflow-x: auto; }
.post-article-content table { width: 100%; border-collapse: collapse; font-size: 15px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.post-article-content th, .post-article-content td { padding: 10px 14px; text-align: left; border: 1px solid var(--border); }
.post-article-content thead th { background: var(--surface2); font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; color: var(--txt); }
.post-article-content tbody tr:nth-child(even) { background: var(--surface); }
.post-article-content figure.wp-block-table figcaption { margin-top: 0.7em; font-size: 13px; color: var(--txt2); text-align: center; }


.post-article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-article-tags .pill { color: var(--txt2); }
.post-article-tags .pill:hover { color: var(--amber); border-color: var(--amber); }

.post-nav { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-nav-link { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; }
.post-nav-link:hover { border-color: var(--amber); }
.post-nav-next { text-align: right; }
.post-nav-label { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--txt3); }
.post-nav-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; font-size: 14px; color: var(--txt); line-height: 1.3; }
.post-nav-link:hover .post-nav-title { color: var(--amber); }

/* ── Responsive ── */
@media (max-width: 880px) {
  :root { --gut: 24px; }
  .hero-2col { flex-direction: column; align-items: stretch; }
  .hero-aside { width: 100%; }
  .cards-3, .cards-2, .steps-3 { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); padding: 24px 0 !important; }
  .step:last-child { border-bottom: none; padding-bottom: 0 !important; }
  .step:first-child { padding-top: 0 !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-block { flex-direction: column; align-items: stretch; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head-aside { text-align: left; max-width: none; }
  .proof-strip { flex-wrap: wrap; }
  .proof-item { flex: 1 0 50%; border-bottom: 1px solid var(--border); }
}

/* -- Presentation decks ---------------------------------------------- */

/* "View as deck" CTA on the article + deck badge spacing on cards. */
.post-deck-cta { margin-top: 16px; }
.post-card .post-meta .pill { margin-right: 4px; }

/* Talks listing cards */
.talks-main { padding: 48px 0 80px; }
.page-header-intro { color: var(--txt2); font-size: 17px; margin-top: 12px; max-width: 640px; }
.deck-card-event { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--amber); margin: 4px 0 0; }
.deck-card-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Fullscreen deck view (single-deck.php) */
body.deck-mode { margin: 0; background: var(--bg); overflow: hidden; }
.deck { position: fixed; inset: 0; }
.deck-slide {
  position: absolute; inset: 0;
  display: none;
  padding: 6vh 8vw; box-sizing: border-box;
  overflow-y: auto;
  align-items: center; justify-content: center;
}
.deck-slide.is-active { display: flex; animation: deck-fade 0.25s ease; }
@keyframes deck-fade { from { opacity: 0; } to { opacity: 1; } }
.deck-slide-inner { width: 100%; max-width: 900px; margin: auto; }

.deck-slide-title { text-align: center; }
.deck-slide-title .deck-slide-inner { max-width: 820px; }
.deck-event { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; letter-spacing: 0.04em; color: var(--amber); margin: 0 0 24px; }
.deck-title { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: clamp(34px, 6vw, 68px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0; color: var(--txt); }
.deck-byline { color: var(--txt2); font-size: 16px; margin-top: 24px; }

/* Content slides reuse .post-article-content typography but scaled up
   for projection; the first heading anchors the slide. */
.deck-slide .post-article-content { font-size: clamp(17px, 2.4vw, 26px); }
.deck-slide .post-article-content h2 { margin-top: 0; font-size: clamp(30px, 4.5vw, 52px); line-height: 1.1; }
.deck-slide .post-article-content h3 { font-size: clamp(22px, 3vw, 34px); }
.deck-slide .post-article-content pre { font-size: clamp(13px, 1.6vw, 18px); }
.deck-slide .post-article-content ul, .deck-slide .post-article-content ol { padding-left: 1.1em; }
.deck-slide .post-article-content li + li { margin-top: 0.5em; }
.deck-slide .post-article-content > * + * { margin-top: 0.9em; }

/* Section-divider slides: a single heading, centered and oversized. */
.deck-slide-section { text-align: center; }
.deck-slide-section .post-article-content h2 { font-size: clamp(40px, 7vw, 84px); }
.deck-slide-section .post-article-content p { color: var(--txt2); font-size: clamp(18px, 2.6vw, 28px); margin-top: 0.6em; }

/* Progress bar + controls */
.deck-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--surface2); z-index: 10; }
.deck-progress-bar { display: block; height: 100%; width: 0; background: var(--amber); transition: width 0.25s ease; }
.deck-controls {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; z-index: 10;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px;
}
.deck-controls .deck-nav, .deck-controls .deck-fs, .deck-controls .deck-exit {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: transparent; border: none; color: var(--txt2);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 10px;
  border-radius: 999px; text-decoration: none;
}
.deck-controls .deck-nav:hover, .deck-controls .deck-fs:hover, .deck-controls .deck-exit:hover { color: var(--amber); background: var(--amber-lo); }
.deck-counter { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--txt2); min-width: 54px; text-align: center; }

/* Deck terminal — fenced code blocks rendered as a real terminal window. */
.deck-terminal {
  text-align: left; margin: 0.3em 0; border-radius: 11px; overflow: hidden;
  background: #0d1117; border: 1px solid #1f2530;
  box-shadow: 0 14px 40px rgba(12,12,15,0.22);
}
.deck-term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: #161b22; border-bottom: 1px solid #1f2530;
}
.deck-term-dot { width: 11px; height: 11px; border-radius: 50%; background: #30363d; }
.deck-term-dot:nth-child(1) { background: #ff5f56; }
.deck-term-dot:nth-child(2) { background: #ffbd2e; }
.deck-term-dot:nth-child(3) { background: #27c93f; }
.deck-term-title { margin-left: 6px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.04em; color: #6e7681; }
.deck-slide .post-article-content pre.deck-term-body,
.deck-term-body {
  margin: 0; padding: 16px 18px; border: 0; border-radius: 0; background: #0d1117;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(13px, 1.55vw, 18px); line-height: 1.65; color: #c9d1d9;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.deck-term-body code { font: inherit; color: inherit; background: none; padding: 0; }
.deck-term-line { display: block; }
.deck-term-prompt { color: #27c93f; font-weight: 700; user-select: none; margin-right: 4px; }
.deck-term-cmd { color: #e6edf3; }
.deck-term-comment { color: #6e7681; }
.deck-term-out .deck-term-comment { color: #8b949e; }

/* Deck diagrams — inline SVG, themed via these classes. */
.deck-diagram { margin: 0.3em auto; text-align: center; max-width: 760px; }
.deck-diagram svg { width: 100%; height: auto; display: block; margin: 0 auto; }
.deck-diagram figcaption {
  font-size: clamp(13px, 1.5vw, 16px); color: var(--txt2);
  line-height: 1.45; margin: 12px auto 0; max-width: 660px;
}
.deck-diagram .n  { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.deck-diagram .na { fill: var(--amber-lo); stroke: var(--amber); stroke-width: 1.5; }
.deck-diagram .ns { fill: none; stroke: var(--amber-bd); stroke-width: 1.5; stroke-dasharray: 6 5; }
.deck-diagram .w  { stroke: var(--txt2); stroke-width: 2; fill: none; }
.deck-diagram .wa { stroke: var(--amber); stroke-width: 2; fill: none; }
.deck-diagram .plug { fill: var(--amber); }
.deck-diagram text { font-family: 'JetBrains Mono', ui-monospace, monospace; fill: var(--txt); }
.deck-diagram .t  { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; }
.deck-diagram .td { fill: var(--txt2); }
.deck-diagram .ta { fill: var(--amber); }
