/* ============ Home — hero (DARK v2) ============ */
.home-hero {
  padding-block: clamp(var(--space-8), 14vw, var(--space-10)) var(--space-8);
  position: relative;
  overflow: hidden;
  background: var(--dark-bg);
  color: var(--dark-ink);
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.home-hero h1, .home-hero .hero-title {
  color: var(--dark-ink);
  /* Sized so the three authored lines survive SplitText without rewrapping */
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.08;
}
.home-hero p, .home-hero .hero-sub { color: var(--dark-ink-soft); }
.home-hero .eyebrow { color: var(--neon); }

/* Same subtle grid that .section-dark-deep gets */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(20, 28, 80, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 28, 80, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 30%, transparent 80%);
}

/* Three.js canvas — quiet ambience behind the content, never the show. */
.hero-3d-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
}
.hero-3d-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hero content lifts above the mesh + 3D layer */
.home-hero .hero-content { position: relative; z-index: 2; }

/* Mobile: shrink the 3D so it doesn't compete with the text */
@media (max-width: 880px) {
  .hero-3d-wrap { opacity: 0.4; }
}

/* === Two-column hero grid: text left, terminal right === */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}
.hero-text { min-width: 0; }

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* === Terminal panel — the "live preview" wow element === */
.hero-terminal {
  position: relative;
  z-index: 3;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.18),
    0 24px 60px rgba(2, 6, 23, 0.6),
    0 0 80px rgba(34, 211, 238, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.hero-terminal-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(10, 14, 28, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.hero-term-dot {
  width: 11px; height: 11px; border-radius: 999px;
  display: inline-block;
}
.hero-term-dot.dot-r { background: #EF4444; }
.hero-term-dot.dot-y { background: #F59E0B; }
.hero-term-dot.dot-g { background: #10B981; }
.hero-terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #97A0C3;
  letter-spacing: 0.06em;
}
.hero-terminal-status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #22D3EE;
  letter-spacing: 0.08em;
}

.hero-terminal-body {
  flex: 1;
  padding: var(--space-5) var(--space-5);
  font-size: 13px;
  line-height: 1.6;
  color: #E8ECF8;
  overflow: hidden;
  position: relative;
  min-height: 240px;
}
.hero-terminal-body .term-line { margin-bottom: 4px; white-space: pre-wrap; }
.hero-terminal-body .term-prompt   { color: #22D3EE; margin-right: 6px; }
.hero-terminal-body .term-user     { color: #E8ECF8; }
.hero-terminal-body .term-reply    { color: #97A0C3; display: block; padding-left: 16px; }
.hero-terminal-body .term-reply b  { color: #E8ECF8; font-weight: 600; }
.hero-terminal-body .term-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: #22D3EE;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: term-blink 1.1s steps(2, end) infinite;
}
@keyframes term-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.hero-terminal-foot {
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 14, 28, 0.6);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #97A0C3;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .hero-terminal-body .term-cursor { animation: none; }
}

.section-headline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: end;
  margin-bottom: var(--space-7);
}

.section-headline h2 { margin: 0; max-width: 18ch; }
.section-headline p { margin: 0; max-width: 50ch; }

@media (max-width: 880px) {
  .section-headline { grid-template-columns: 1fr; }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

/* ============ Feature blocks (Live in production) ============ */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-7);
}

.feature-block.reverse > :first-child { order: 2; }

@media (max-width: 880px) {
  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
  }
  .feature-block.reverse > :first-child { order: 0; }
}

.feature-block h3 {
  font-size: clamp(28px, 3.4vw, 36px);
  margin-bottom: var(--space-3);
}

.feature-block .feature-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

.feature-block .feature-metric {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.feature-block .feature-metric strong {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}

.feature-block .feature-metric span {
  font-size: 14px;
  color: var(--ink-muted);
}

.feature-visual {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(34, 211, 238, 0.05) 100%);
  border-radius: var(--radius-xl);
  aspect-ratio: 4 / 3;
  padding: var(--space-7);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.feature-visual img,
.feature-visual svg {
  max-width: 88%;
  max-height: 88%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.feature-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* Dark-section variant — glassmorphic slate panel with neon glow */
.section-dark-deep .feature-block h3 { color: var(--dark-ink); }
.section-dark-deep .feature-block p { color: var(--dark-ink-soft); }
.section-dark-deep .feature-block .feature-eyebrow {
  color: var(--neon);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.section-dark-deep .feature-block .feature-metric {
  border-top-color: var(--dark-border);
}
.section-dark-deep .feature-block .feature-metric strong {
  font-family: var(--font-mono);
  color: var(--dark-ink);
  text-shadow: 0 0 24px var(--neon-glow);
}
.section-dark-deep .feature-block .feature-metric span {
  color: var(--dark-ink-soft);
}

.feature-visual.is-on-dark {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.10) 0%, rgba(168, 85, 247, 0.06) 100%),
    var(--dark-surface);
  border: 1px solid var(--dark-border);
  position: relative;
  overflow: hidden;
}
.feature-visual.is-on-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
}
.feature-visual.is-on-dark::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 30%, var(--neon-glow) 0%, transparent 50%);
  filter: blur(60px);
  pointer-events: none;
}
.feature-visual.is-on-dark .feature-visual-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--neon);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: var(--space-4) var(--space-5);
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid var(--dark-border-strong);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============ CTA section ============ */
.cta-section {
  text-align: center;
  padding-block: var(--space-9);
  background:
    radial-gradient(60% 90% at 50% 110%, rgba(99, 102, 241, 0.12) 0%, transparent 70%),
    var(--surface-dark);
  color: var(--ink);
}

.cta-section h2 {
  color: var(--ink);
  max-width: 18ch;
  margin: 0 auto var(--space-5);
}

.cta-section p {
  color: var(--ink-muted);
  max-width: 50ch;
  margin: 0 auto var(--space-6);
}

/* ============ Case study cards ============ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-5);
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-base) var(--ease-out);
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.case-card-cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #151A2C 0%, var(--accent-dark) 100%);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.case-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

/* === Mockup-cover variant (replaces the flat gradient with a real SVG mockup,
   with a big metric overlay sitting on top). Applied on both case-studies index
   cards AND the home proof feature-block visual slot. === */
.mockup-cover {
  background: linear-gradient(135deg, #1E293B 0%, #020617 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
  display: block;        /* override grid centring */
  text-transform: none;
  letter-spacing: 0;
}
.mockup-cover .mockup-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.mockup-cover::after { display: none; }   /* drop the white inner glow */
.case-card:hover .mockup-cover .mockup-svg,
.feature-block:hover .mockup-cover .mockup-svg {
  transform: scale(1.04);
}

/* Big metric tile floating in bottom-left of every mockup-cover */
.case-card-metric {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 2;
  padding: var(--space-3) var(--space-4);
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid var(--neon);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}
.case-card-metric strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: #F1F5F9;
  letter-spacing: -0.01em;
  line-height: 1;
}
.case-card-metric span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* On the home feature-block, the mockup is taller — adjust metric size to suit */
.feature-block .mockup-cover {
  aspect-ratio: 8 / 5;
}
.feature-block .case-card-metric strong { font-size: 32px; }
.feature-block .case-card-metric span   { font-size: 12px; }

/* === Alethia-style data pins anchored on the proof mockups === */
/* Anchored by top/left %; negative margin lands the RING CENTRE on the point,
   leaving `transform` free for the GSAP pop-in + float. Visible & static by
   default so they survive reduced-motion (when the animation JS never runs). */
.data-pin {
  position: absolute;
  z-index: 4;
  margin: -13px 0 0 -13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform-origin: 13px center;
  pointer-events: none;
}
.data-pin-ring {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px dotted var(--accent);
  background: rgba(99, 102, 241, 0.08);
  animation: data-pin-spin 12s linear infinite;
}
.data-pin-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 0 3px var(--accent-glow);
}
.data-pin-label {
  white-space: nowrap;
  padding: 4px 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
@keyframes data-pin-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .data-pin-ring { animation: none; }
}

.case-card-body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }

.case-card-client {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}

.case-card-nda {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  opacity: 0.75;
}
.section-dark-deep .case-card-nda { color: var(--dark-ink-soft); }

.case-card-headline {
  font-size: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-4);
  color: var(--ink);
}

.case-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-soft);
}

/* ============ Case study detail ============ */
.case-hero {
  padding-block: var(--space-8) var(--space-7);
  background: var(--surface-soft);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.case-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.case-metric-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.case-metric-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.case-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-7);
  padding-block: var(--space-7);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .case-section { grid-template-columns: 1fr; gap: var(--space-3); }
}

.case-section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.case-section-body p { font-size: 17px; line-height: 1.7; }

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.stack-pills .tag { background: var(--surface-soft); color: var(--ink-soft); border: 1px solid var(--border); }

/* ============ About — team grid ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-soft));
  margin: 0 auto var(--space-4);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.team-name { font-size: 18px; margin-bottom: var(--space-1); }
.team-role { font-size: 13px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-3); }
.team-bio { font-size: 14px; color: var(--ink-soft); margin-bottom: var(--space-3); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-5);
}

.value-item {
  padding: var(--space-5);
}

.value-item h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: var(--space-2);
  color: var(--ink);
}

.value-item p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-channels {
  display: grid;
  gap: var(--space-4);
}

.channel {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: all var(--duration-base) var(--ease-out);
}

.channel:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }

.channel-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-soft);
  display: grid; place-items: center;
}

.channel-icon svg { width: 20px; height: 20px; }

.channel h4 { font-size: 14px; margin-bottom: 2px; color: var(--ink); }
.channel p { font-size: 14px; margin: 0; color: var(--ink-soft); }

/* ============ Audit landing ============ */
.audit-hero {
  padding-block: var(--space-9);
  text-align: center;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(37, 99, 235, 0.10) 0%, transparent 60%), var(--surface);
}

.audit-hero h1 { max-width: 22ch; margin: 0 auto var(--space-5); }
.audit-hero p { max-width: 56ch; margin: 0 auto var(--space-6); }

.audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}

.audit-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.audit-item-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.audit-item h4 { font-size: 17px; margin-bottom: var(--space-2); }
.audit-item p { font-size: 14px; margin: 0; }

/* ============ Insights / Blog ============ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-base) var(--ease-out);
}

.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.post-cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-soft));
  position: relative;
  overflow: hidden;
}
.post-cover.has-cover-svg {
  background: transparent;
}
.post-cover .post-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.post-card:hover .post-cover-img {
  transform: scale(1.03);
}

.post-body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }

.post-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
  display: flex;
  gap: var(--space-3);
}

.post-title {
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: var(--space-3);
}

.post-excerpt { font-size: 14px; color: var(--ink-soft); margin: 0; flex: 1; }

.newsletter {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-5);
  align-items: center;
}

@media (max-width: 768px) {
  .newsletter { grid-template-columns: 1fr; }
}

.newsletter h3 { margin-bottom: var(--space-2); }
.newsletter p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.newsletter-form { display: flex; gap: var(--space-2); }
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 15px;
  min-width: 240px;
}

/* ============ Post page ============ */
.post-hero { padding-block: var(--space-8); }

.post-hero h1 { max-width: 22ch; margin-bottom: var(--space-4); }

.post-author {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: var(--space-5);
}

.post-author-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-soft);
  display: grid; place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
}

.post-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.post-content p, .post-content li {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.post-content h2 { margin-top: var(--space-7); }
.post-content h3 { margin-top: var(--space-6); }

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  font-style: italic;
}

/* Deliberate dark code block — a code component on the light page. */
.post-content pre {
  background: #0E1230;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.post-content code {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.9em;
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-soft);
}

.post-content pre code { background: transparent; padding: 0; color: inherit; }

/* ============ Hero visual: photo + terminal choreography (v3) ============ */
.hero-visual {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.hero-photo {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 80px rgba(23, 30, 74, 0.22), 0 0 60px var(--accent-glow), inset 0 1px 0 var(--border-highlight);
  aspect-ratio: 16 / 10;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
}
/* Indigo wash so the photo belongs to the theme */
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.18) 0%, transparent 45%, rgba(5, 6, 11, 0.35) 100%);
  pointer-events: none;
}
.home-hero .hero-terminal { min-height: 230px; }
.home-hero .hero-terminal-body { min-height: 140px; }

[data-hero-ready] [data-hero-item],
[data-hero-ready] [data-hero-photo],
[data-hero-ready] [data-hero-terminal] { will-change: transform, opacity; }

/* Fly-in caption — hidden until the camera dive hands the text off (GSAP
   autoAlpha). Centred over the whole hero via grid, so the flight can animate
   `y` without touching the centring transform. Stays hidden without JS. */
.hero-flight-caption {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0 var(--space-5);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.hero-flight-caption span {
  max-width: 22ch;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.5vw, 30px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 2px 34px rgba(247, 248, 252, 0.95), 0 0 8px rgba(247, 248, 252, 0.9);
}

/* ============ Photo marquee — pictures moving across the page ============ */
.photo-marquee {
  overflow: hidden;
  padding-block: var(--space-5);
  background: var(--surface-dark);
  border-block: 1px solid var(--border);
  position: relative;
}
.photo-marquee::before,
.photo-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.photo-marquee::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.photo-marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee-track {
  display: flex;
  gap: var(--space-4);
  width: max-content;
  animation: marquee-scroll 46s linear infinite;
}
.photo-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  margin: 0;
  position: relative;
  width: 300px;
  flex: 0 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--border-highlight);
}
.marquee-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
  transition: filter var(--duration-base) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}
.marquee-item:hover img { filter: saturate(1.1); transform: scale(1.04); }
.marquee-item figcaption {
  position: absolute;
  left: 12px; bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(5, 6, 11, 0.65);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(6px);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============ Live tiles — Windows-Phone start screen ============ */
.live-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  perspective: 700px;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--border-highlight);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.tile:hover { transform: translateY(-3px) scale(1.015); box-shadow: 0 14px 40px rgba(0,0,0,.45), inset 0 1px 0 var(--border-highlight); }
.t-wide { aspect-ratio: auto; grid-column: span 2; }

/* Vivid, customer-friendly gradients — no dark holes in the mosaic. */
.t-indigo  { background: linear-gradient(150deg, #6366F1 0%, #8B5CF6 100%); }
.t-cyan    { background: linear-gradient(150deg, #06B6D4 0%, #0EA5E9 100%); }
.t-violet  { background: linear-gradient(150deg, #A855F7 0%, #7C3AED 100%); }
.t-magenta { background: linear-gradient(150deg, #EC4899 0%, #D946EF 100%); }
.t-amber   { background: linear-gradient(150deg, #F59E0B 0%, #EA580C 100%); }
.t-emerald { background: linear-gradient(150deg, #10B981 0%, #059669 100%); }

/* Per-hue hover glow. */
.t-indigo:hover  { box-shadow: 0 14px 44px rgba(99,102,241,.45),  inset 0 1px 0 var(--border-highlight); }
.t-cyan:hover    { box-shadow: 0 14px 44px rgba(6,182,212,.45),   inset 0 1px 0 var(--border-highlight); }
.t-violet:hover  { box-shadow: 0 14px 44px rgba(168,85,247,.45),  inset 0 1px 0 var(--border-highlight); }
.t-magenta:hover { box-shadow: 0 14px 44px rgba(236,72,153,.45),  inset 0 1px 0 var(--border-highlight); }
.t-amber:hover   { box-shadow: 0 14px 44px rgba(245,158,11,.5),   inset 0 1px 0 var(--border-highlight); }
.t-emerald:hover { box-shadow: 0 14px 44px rgba(16,185,129,.5),   inset 0 1px 0 var(--border-highlight); }

.tile-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4);
  backface-visibility: hidden;
  transition: transform 600ms var(--ease-in-out);
}
/* Bottom-third darkening so labels always sit on stable contrast (both faces). */
.tile:not(.t-photo) .tile-face {
  background: linear-gradient(to bottom, transparent 52%, rgba(0, 0, 0, 0.25) 100%);
}
.tile-face b { font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.22; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28); }
.tile-front { transform: rotateX(0deg); justify-content: space-between; }

/* Front face fill: small icon top-left, big ghost icon clipped top-right, copy at the bottom. */
.tile-ghost {
  position: absolute;
  top: -22px;
  right: -22px;
  color: #fff;
  opacity: 0.14;
  line-height: 0;
  pointer-events: none;
}
.tile-ghost svg { display: block; }
.tile-ico { position: relative; opacity: 0.95; }
.tile-copy { position: relative; display: flex; flex-direction: column; gap: 4px; }
.tile-copy em {
  font-style: normal;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.3;
  opacity: 0.85;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tile-back  { transform: rotateX(-180deg); font-size: 12.5px; line-height: 1.45; opacity: 0.95; }
.tile-back b { font-size: 17px; display: block; }
.tile.is-flipped .tile-front { transform: rotateX(180deg); }
.tile.is-flipped .tile-back  { transform: rotateX(0deg); }

.t-photo { padding: 0; }
.t-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.t-photo:hover img { transform: scale(1.05); }
.t-photo .tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-6) var(--space-4) var(--space-4);
  background: linear-gradient(transparent, rgba(5, 6, 11, 0.85));
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.t-photo .tile-label em {
  display: block;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 2px;
}

@media (max-width: 960px) {
  .live-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .tile-face b { font-size: 13px; }
  .tile-copy em { font-size: 11.5px; }
  .tile-ghost { top: -16px; right: -16px; }
}

/* ============ Animated data pipeline — source → transform → dashboard ===== */
.pipeline {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 180px) 1fr minmax(120px, 180px) 1fr;
  align-items: center;
  gap: var(--space-3);
}
.pipe-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.pipe-node b { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.pipe-node .mono { font-size: 11px; color: var(--ink-muted); letter-spacing: 0.05em; }
.pipe-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent-soft);
}
.pipe-icon-spin svg { animation: pipe-spin 9s linear infinite; }
@keyframes pipe-spin { to { transform: rotate(360deg); } }
.pipe-link { width: 100%; height: 60px; overflow: visible; }

/* Dashboard node: living bar chart */
.pipe-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: rgba(34, 211, 238, 0.10);
}
.pipe-chart i {
  width: 9px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation: pipe-bar 2.6s ease-in-out infinite;
}
.pipe-chart i:nth-child(1) { height: 40%; animation-delay: 0s; }
.pipe-chart i:nth-child(2) { height: 65%; animation-delay: .3s; }
.pipe-chart i:nth-child(3) { height: 50%; animation-delay: .6s; }
.pipe-chart i:nth-child(4) { height: 82%; animation-delay: .9s; }
.pipe-chart i:nth-child(5) { height: 58%; animation-delay: 1.2s; }
@keyframes pipe-bar {
  0%, 100% { transform: scaleY(0.75); }
  50%      { transform: scaleY(1.12); }
}
.pipe-chart i { transform-origin: bottom; }

.pipeline-note {
  margin-top: var(--space-5);
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

@media (max-width: 880px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipe-link { height: 48px; transform: rotate(90deg); max-width: 120px; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pipe-icon-spin svg, .pipe-chart i { animation: none; }
}

/* ============ Photo bands for inner pages ============ */
.page-photo-band {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(23, 30, 74, 0.16), inset 0 1px 0 var(--border-highlight);
  margin-top: var(--space-6);
}
.page-photo-band img {
  width: 100%;
  height: clamp(220px, 32vw, 380px);
  object-fit: cover;
  display: block;
}
.page-photo-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.16) 0%, transparent 50%, rgba(5, 6, 11, 0.35) 100%);
  pointer-events: none;
}
.page-photo-band figcaption {
  position: absolute;
  left: 16px; bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(5, 6, 11, 0.65);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(6px);
}
