/* ═══════════════════════════════════════════════════════════════
   THEME V2 — CLINICAL OVERRIDE LAYER
   Loaded AFTER assets/style.css. Nothing here edits the original.
   Delete the <link> and the page reverts to the current design.

   THE ARGUMENT
   The old palette was decorative: one blue, used for everything.
   This one is semantic — each hue means something, so the page
   reads "clinician who codes" instead of "SaaS landing page":

     TEAL   clinical   → primary. Scrubs, drapes, the OR.
     AMBER  human      → warmth. Featured beats, the role line.
     BLUE   technical  → the tech skills ONLY. Now it's a signal,
                         not the whole identity.
     RED    emergency  → ICU / triage.
═══════════════════════════════════════════════════════════════ */

:root {
  /* Base — deep surgical petrol, replaces blue-navy */
  --navy-950:  #050f11;
  --navy-900:  #071417;
  --navy-800:  #0c2024;
  --navy-700:  #123037;
  --navy-600:  #17434c;
  --navy-500:  #1c5561;

  /* Clinical — primary accent */
  --accent:        #3ecfb2;
  --accent-bright: #6fe0c8;
  --accent-glow:   rgba(62, 207, 178, 0.22);
  --accent-subtle: rgba(62, 207, 178, 0.10);

  /* Warmth — the human beat */
  --warm:         #e0a45e;
  --warm-bright:  #f0bd82;
  --warm-subtle:  rgba(224, 164, 94, 0.12);
  --warm-border:  rgba(224, 164, 94, 0.30);

  /* Technical — Skills section only */
  --tech:         #4f8ef7;
  --tech-bright:  #6fa3ff;
  --tech-subtle:  rgba(79, 142, 247, 0.10);
  --tech-border:  rgba(79, 142, 247, 0.22);

  /* Emergency */
  --emergency:     #ff5f5a;
  --emergency-sub: rgba(255, 95, 90, 0.14);

  /* Text — warm-neutral greys, not blue-greys */
  --text-primary:   #eef5f3;
  --text-secondary: #a8bcb9;
  /* Was #64807f — 4.40:1 on the experience section, below the 4.5:1 AA floor.
     This token drives every date, stat label and footer line on the site. */
  --text-muted:     #7d9a98;

  /* Surfaces */
  --surface-card: rgba(12, 32, 36, 0.70);
  --border:       rgba(62, 207, 178, 0.14);
  --border-hover: rgba(62, 207, 178, 0.38);

  --scrim:      rgba(5, 15, 17, 0.92);
  --scrim-solid:rgba(5, 15, 17, 0.97);
}

/* Literals in style.css that bypass the tokens — re-pointed here */
.navbar.scrolled       { background: var(--scrim); }
.subpage-topbar        { background: var(--scrim); }
.timeline-item.featured .timeline-card {
  border-color: var(--warm-border);
  background: rgba(12, 32, 36, 0.85);
}
.article-content blockquote { background: var(--accent-subtle); }
@media (max-width: 860px) { .nav-links { background: var(--scrim-solid); } }

/* ═══════════════════════════════════════════
   NAV — brand mark resolves thexlvet vs "IA"
════════════════════════════════════════════ */
.nav-logo { display: flex; align-items: center; gap: 0.6rem; }

.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; stroke: var(--accent); }

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.logo-first { color: var(--text-primary); }
.logo-last  { color: var(--text-primary); }
.brand-domain {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 3px;
}

/* ═══════════════════════════════════════════
   HERO — ECG replaces the SaaS orbs + grid
   The waveform is the bridge motif: medical AND
   data at the same time. It does the work a photo
   would do, without a photo.
════════════════════════════════════════════ */
.hero-grid { opacity: 0.18; background-size: 44px 44px; }

.hero-orb-1 {
  background: radial-gradient(circle, rgba(28, 85, 97, 0.9) 0%, transparent 70%);
  opacity: 0.5;
}
.hero-orb-2 {
  background: radial-gradient(circle, rgba(126, 82, 32, 0.75) 0%, transparent 70%);
  opacity: 0.34;
}

.hero-ecg {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(52px, 7vh, 72px);
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ecg-base {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.16;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ecg-pulse {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--accent-glow));
  stroke-dasharray: 210 2600;
  animation: ecgSweep 7s linear infinite;
}
@keyframes ecgSweep {
  from { stroke-dashoffset: 2810; }
  to   { stroke-dashoffset: 0; }
}

/* Hero hierarchy: the role now reads before the name finishes parsing */
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.hero-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: var(--warm);
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
}

.hero-tagline {
  color: var(--accent);
  font-size: clamp(0.78rem, 1.6vw, 0.92rem);
  letter-spacing: 0.16em;
  margin-bottom: 1.6rem;
  opacity: 0.95;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2rem;
  letter-spacing: 0.02em;
}
.hero-status .badge-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }


.btn-primary { color: #04211c; }
.btn-primary:hover { color: #04211c; }

/* ═══════════════════════════════════════════
   PHOTO SLOT — deliberate while empty
   PHOTO: drop your file into assets/ and uncomment the line marked
   below. No inline style, so it stays within the strict CSP.
   No image = the monogram + vitals ring below, which reads as
   a designed mark rather than a broken <img>.
════════════════════════════════════════════ */
/* PHOTO: uncomment the next line once the file exists (path is relative to this stylesheet) */
/* .portrait { --portrait: url('itai.jpg'); } */

.portrait {
  position: relative;
  width: clamp(128px, 17vw, 168px);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0 auto 1.75rem;
  display: grid;
  place-items: center;
  background:
    var(--portrait, none) center/cover no-repeat,
    radial-gradient(circle at 50% 35%, rgba(62,207,178,0.14), transparent 70%),
    var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 6px rgba(62, 207, 178, 0.05), 0 18px 50px rgba(0,0,0,0.45);
  overflow: hidden;
}
/* Rotating vitals ring — reads as a monitor bezel */
.portrait::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--warm);
  opacity: 0.55;
  animation: ringSpin 14s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.portrait-mono {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}
.portrait-mono span { color: var(--accent); }
.portrait-cap {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
/* When a photo IS set, hide the placeholder contents.
   This used to be `.portrait[style*="--portrait"]`, which could never match:
   the CSP forbids inline styles, so --portrait is set by the class rule above,
   not by a style="" attribute. The monogram would have rendered on top of the
   photograph. Add `has-photo` to the .portrait div in index.html at the same
   time as you uncomment the PHOTO line. */
.portrait.has-photo .portrait-mono,
.portrait.has-photo .portrait-cap { display: none; }

/* ═══════════════════════════════════════════
   SECTION LABELS — small vitals tick
════════════════════════════════════════════ */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before {
  content: '';
  width: 22px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   STATS — read like a monitor readout
════════════════════════════════════════════ */
/* Four stats now, so a clean 2x2 — style.css made the 3rd card span
   both columns to fill an orphan row; that rule has to go. */
.about-stats .stat-card:last-child { grid-column: auto; }

.stat-card {
  text-align: left;
  padding: 1.35rem 1.4rem;
  position: relative;
}
.stat-icon { width: 20px; height: 20px; stroke: var(--accent); opacity: 0.75; margin-bottom: 0.7rem; }
.stat-number { font-size: 2.3rem; letter-spacing: -0.02em; }
.stat-card.stat-featured .stat-number { color: var(--warm); }
.stat-card.stat-featured .stat-icon   { stroke: var(--warm); }
.stat-label { color: var(--text-muted); letter-spacing: 0.02em; }

/* ═══════════════════════════════════════════
   TIMELINE — markers carry clinical icons
════════════════════════════════════════════ */
.marker-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy-900);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}
.marker-dot svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; }
.timeline-item.featured .marker-dot {
  width: 38px; height: 38px;
  background: var(--navy-900);
  border-color: var(--warm-border);
  box-shadow: 0 0 16px rgba(224, 164, 94, 0.22);
}
.timeline-item.featured .marker-dot svg { stroke: var(--warm); width: 18px; height: 18px; }

.badge-featured {
  background: var(--warm-subtle);
  color: var(--warm-bright);
  border: 1px solid var(--warm-border);
}
.badge-emergency { background: var(--emergency-sub); color: var(--emergency); border: 1px solid rgba(255,95,90,0.30); }
.badge-surgery   { background: var(--warm-subtle); color: var(--warm-bright); border: 1px solid var(--warm-border); }
.badge-internal  { background: var(--accent-subtle); color: var(--accent-bright); border: 1px solid var(--border-hover); }

/* CASE STRIP — the proof, promoted out of the paragraph.
   With no photos, the case names ARE the evidence. */
.case-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
}
.case-strip-label {
  width: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.case-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.case-chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--triage, var(--accent));
  box-shadow: 0 0 6px var(--triage, var(--accent));
  flex-shrink: 0;
}
.triage-red   { --triage: var(--emergency); }
.triage-amber { --triage: var(--warm); }
.triage-teal  { --triage: var(--accent); }

/* ═══════════════════════════════════════════
   SKILLS — the ONLY blue on the page.
   Blue stops meaning "this is a startup" and starts
   meaning "this is the engineering half".
════════════════════════════════════════════ */
.skills-section .skill-icon {
  background: var(--tech-subtle);
  border-color: var(--tech-border);
}
.skills-section .skill-icon svg { stroke: var(--tech); }
.skills-section .tag {
  background: var(--tech-subtle);
  color: var(--tech-bright);
  border-color: var(--tech-border);
}
.skills-section .bento-card:hover { border-color: rgba(79, 142, 247, 0.42); }
.skills-section .section-label { color: var(--tech); }
.skills-section .section-label::before { background: var(--tech); }

/* ═══════════════════════════════════════════
   CONTACT / CV — warm close
════════════════════════════════════════════ */
.contact-card { border-color: var(--warm-border); background: rgba(12, 32, 36, 0.80); }
.contact-section .section-label { color: var(--warm); }
.contact-section .section-label::before { background: var(--warm); }
.cv-icon svg { stroke: var(--accent); }

.footer-brand { display: flex; align-items: center; gap: 0.5rem; }

/* ═══════════════════════════════════════════
   HAMBURGER — close-icon artifact
   The middle bar is 22px wide, but the X it morphs into is only ~17px.
   It merely faded, so for the 250ms of the transition its two tips stuck
   out past the X and rendered as dots either side: · ✕ ·
   Collapsing it horizontally removes them, and opacity now leads the
   transform so it is gone before the X finishes forming.
════════════════════════════════════════════ */
.hamburger span {
  transition: transform 0.25s var(--ease), opacity 0.15s var(--ease);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

/* ═══════════════════════════════════════════
   MOTION SAFETY
════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ecg-pulse   { animation: none; stroke-dasharray: none; opacity: 0.5; }
  .portrait::before { animation: none; }
  .hero-orb    { animation: none; }
  .badge-dot   { animation: none; }
}

@media (max-width: 860px) {
  .stat-card { padding: 1.1rem; }
  .stat-number { font-size: 1.9rem; }
  .brand-domain { display: none; }
  /* style.css narrows the timeline gutter here; keep markers on the rail */
  .timeline-marker { left: -1rem; }
  [dir="rtl"] .timeline-marker { left: unset; right: -1rem; }
  /* style.css goes 3-across here, which strands the 4th card */
  .about-stats { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   404 PAGE (was an inline <style> block, which a strict CSP forbids)
════════════════════════════════════════════ */
.notfound-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1.25rem;
}
.notfound-code {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.notfound-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.notfound-sub { color: var(--text-secondary); max-width: 420px; }

/* ═══════════════════════════════════════════
   UTILITIES — replace former inline style="" attributes so that
   style-src can stay 'self' with no 'unsafe-inline'.
════════════════════════════════════════════ */
.link-accent { color: var(--accent-bright); }
.mt-sm       { margin-top: 0.75rem; }
.mt-md       { margin-top: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   ═══ V3 — ACCESSIBILITY & CONTRAST FIXES ═══
═══════════════════════════════════════════════════════════════ */

/* The print button was a white glyph on teal — 1.95:1, where non-text
   needs 3:1. Dark ink on the same teal is 8.7:1. */
.print-btn,
.print-btn:hover { color: #04211c; }

/* Hovering the LinkedIn button used to drop the label to #0a66c2 on
   near-black: 3.41:1, i.e. hover made it HARDER to read than at rest.
   Keep the brand colour on the border and background instead. */
.linkedin-btn:hover {
  color: var(--text-primary);
  border-color: #2a7fd4;
  background: rgba(10, 102, 194, 0.14);
}
.footer-linkedin:hover { color: var(--accent); }

/* No focus styles were defined anywhere; on this palette the UA default
   is close to invisible. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link — visible only when focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #04211c;
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* Reduced motion: also stop smooth scrolling and neutralise the fade-in,
   which previously still ran its 0.55s transition. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .stat-card:hover, .timeline-card:hover, .bento-card:hover,
  .contact-method:hover { transform: none; }
}

/* RTL: the arrow glyphs pointed right in a right-to-left layout. */
[dir="rtl"] .btn svg,
[dir="rtl"] .back-link svg { transform: scaleX(-1); }

/* Nav at 375px. The homepage LinkedIn label is now wrapped in a <span> so
   `.linkedin-btn span { display:none }` finally applies; this adds margin. */
@media (max-width: 560px) {
  .nav-logo { font-size: 1.05rem; }
  .linkedin-btn { padding: 0.4rem 0.55rem; }
  .nav-actions { gap: 0.45rem; }
}

/* Mobile timeline markers were sitting ~3px from the screen edge. */
@media (max-width: 540px) {
  .timeline { padding-left: 1.35rem; }
  [dir="rtl"] .timeline { padding-left: 0; padding-right: 1.35rem; }
  .timeline-marker { left: -0.55rem; }
  [dir="rtl"] .timeline-marker { left: unset; right: -0.55rem; }
  .card-header { align-items: flex-start; }
  .card-date { margin-left: 0; width: 100%; }
  [dir="rtl"] .card-date { margin-right: 0; }
}

/* 404 actions */
.notfound-links { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 0.5rem; }

/* ═══════════════════════════════════════════════════════════════
   ═══ V3 — CASE LOG (externship.html) ═══
   3,400 words with no entry point became a scannable log. The index,
   the split between cases / protocols / reference, and the fixed case
   header are what turn a diary into a portfolio piece.
═══════════════════════════════════════════════════════════════ */

/* An <hr> immediately followed by an h2 that carries its own border-top
   rendered a DOUBLE rule, twelve times down the old page. */
.article-content hr + h2 { padding-top: 0; border-top: none; margin-top: 1rem; }

/* Headings must clear the fixed topbar when jumped to by anchor. */
.article-content h2[id],
.article-content h3[id] { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

.section-intro { color: var(--text-muted); font-size: 0.92rem; margin-top: -0.35rem !important; }

/* ── Lead stats ── */
.lead-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0;
}
.lead-stat { background: var(--navy-900); padding: 1.1rem 1.25rem; }
.lead-stat b {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--warm);
  line-height: 1;
}
.lead-stat span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
@media (max-width: 700px) { .lead-stats { grid-template-columns: repeat(2, 1fr); } }

/* ── Case index + filter ── */
.case-index { margin: 2.5rem 0 3rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; align-items: center; }
.filter-bar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.35rem;
}
[dir="rtl"] .filter-bar-label { margin-right: 0; margin-left: 0.35rem; }

.filter-chip {
  padding: 0.32rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.18s var(--ease);
}
.filter-chip:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-chip[aria-pressed="true"] {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.case-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.case-table thead th {
  text-align: left;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 0.9rem 0.6rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
}
.case-table tbody tr {
  border-bottom: 1px solid rgba(62, 207, 178, 0.07);
  transition: background 0.15s;
}
.case-table tbody tr:hover { background: var(--accent-subtle); }
.case-table td { padding: 0.7rem 0.9rem; vertical-align: top; border: none; }
.case-table td:first-child { width: 2.4rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.case-table a { color: var(--text-primary); font-weight: 600; text-decoration: none; }
.case-table tr:hover a { color: var(--accent-bright); }
.case-table .col-sig { color: var(--text-muted); white-space: nowrap; }

.sys-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  white-space: nowrap;
}
.sys-tag[data-acuity="emergency"] { color: var(--emergency); border-color: rgba(255,95,90,0.30); background: var(--emergency-sub); }
.sys-tag[data-acuity="urgent"]    { color: var(--warm-bright); border-color: var(--warm-border); background: var(--warm-subtle); }

.case-row.is-hidden { display: none; }
.index-count { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.9rem; }

@media (max-width: 700px) {
  .case-table .col-sig, .case-table thead th:nth-child(3) { display: none; }
}

/* ── Sticky contents rail (wide screens only) ── */
.article-layout { display: block; }
.toc { display: none; }

@media (min-width: 1100px) {
  .article-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 760px);
    gap: 3.5rem;
    justify-content: center;
    align-items: start;
  }
  .article-layout .article-content { max-width: none; margin: 0; }
  .toc {
    display: block;
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
    font-size: 0.82rem;
    line-height: 1.5;
    max-height: calc(100vh - var(--nav-h) - 4rem);
    overflow-y: auto;
  }
}
.toc-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}
.toc a:hover { color: var(--text-primary); }
.toc a.is-current { color: var(--accent-bright); border-left-color: var(--accent); }
.toc .toc-sub { padding-left: 1.6rem; font-size: 0.78rem; }

/* ── Case header block ── */
.case-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 1.25rem 0 1.75rem;
  background: rgba(12, 32, 36, 0.5);
}
.case-card dl {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.88rem;
}
.case-card dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.2rem;
}
.case-card dd { margin: 0; color: var(--text-secondary); }
.case-card dd strong { color: var(--text-primary); }
@media (max-width: 620px) {
  .case-card { padding: 1.15rem 1.25rem; }
  .case-card dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .case-card dt { margin-top: 0.6rem; }
}

/* ── Takeaway pull-out ── */
.takeaway {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1px solid var(--warm-border);
  background: var(--warm-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.15rem;
  margin: 1.5rem 0;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.6;
}
.takeaway::before {
  content: 'TAKEAWAY';
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--warm);
  padding-top: 0.28rem;
}
.takeaway.is-warning { border-color: rgba(255, 95, 90, 0.30); background: var(--emergency-sub); }
.takeaway.is-warning::before { content: 'CAUTION'; color: var(--emergency); }

/* ═══════════════════════════════════════════════════════════════
   ═══ V3 — HOMEPAGE ═══
═══════════════════════════════════════════════════════════════ */

/* Four equal skill cards. The AI card was ~3× the area of the others,
   which made "I use NotebookLM" the largest claim on a veterinary site. */
.skills-bento.is-even {
  grid-template-columns: repeat(2, 1fr);
  grid-template-areas: "ai script" "network native";
}
.skills-bento.is-even .card-ai { padding: 1.4rem 1.6rem; }
.skills-bento.is-even .card-ai .skill-icon { width: 38px; height: 38px; margin-bottom: 0.85rem; }
.skills-bento.is-even .card-ai .skill-icon svg { width: 19px; height: 19px; }
.skills-bento.is-even .card-ai .skill-title { font-size: 0.98rem; margin-bottom: 0.4rem; }
.skills-bento.is-even .card-ai .skill-desc { font-size: 0.86rem; line-height: 1.65; margin-bottom: 0.9rem; }
.skills-bento.is-even .card-ai .tag { font-size: 0.75rem; padding: 0.2rem 0.6rem; }
@media (max-width: 860px) {
  .skills-bento.is-even { grid-template-columns: 1fr; grid-template-areas: "ai" "script" "network" "native"; }
}

/* Says the boundary out loud, which turns "I use AI" from a question mark
   into a trust signal for a clinical reader. */
.scope-note {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ── Contact ── */
.contact-lead { color: var(--text-secondary); max-width: 620px; }

.contact-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 800px) { .contact-methods { grid-template-columns: 1fr; } }

.contact-method {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1.5rem 1.5rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  transition: border-color 0.2s, transform 0.2s;
}

/* Icon tile — same language as .skill-icon and .cv-icon, so the contact
   cards belong to the same family as the rest of the page. The LinkedIn
   mark used to be a bare 20px white glyph sitting inline with the value,
   which made it the brightest object in the card. */
.cm-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  margin-bottom: 0.9rem;
  transition: background 0.2s, border-color 0.2s;
}
.cm-icon svg { width: 18px; height: 18px; }
.cm-icon .ic-fill   { fill: var(--accent); stroke: none; }
.cm-icon .ic-stroke { fill: none; stroke: var(--accent); }

/* Hover affordance — these are links, so say so. */
.contact-method::after {
  content: '→';
  position: absolute;
  top: 1.35rem; right: 1.4rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-method:hover::after,
.contact-method:focus-visible::after { opacity: 1; transform: none; }
[dir="rtl"] .contact-method::after {
  content: '←';
  right: auto; left: 1.4rem;
  transform: translateX(4px);
}
[dir="rtl"] .contact-method:hover::after { transform: none; }
.contact-method:hover { border-color: var(--border-hover); transform: translateY(-2px); }

/* LinkedIn is the only contact route, so it reads as the primary one. */
.contact-method.is-primary {
  border-color: var(--warm-border);
  background: linear-gradient(180deg, var(--warm-subtle), rgba(12, 32, 36, 0.80));
}
.contact-method.is-primary .cm-label { color: var(--warm); }
.contact-method.is-primary:hover { border-color: var(--warm); }
.contact-method.is-primary .cm-icon {
  background: var(--warm-subtle);
  border-color: var(--warm-border);
}
.contact-method.is-primary .cm-icon .ic-fill { fill: var(--warm-bright); }
.contact-method.is-primary:hover .cm-value { color: var(--warm-bright); }
.contact-method.is-primary::after { color: var(--warm); }
.contact-method .cm-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-method .cm-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}
.contact-method:hover .cm-value { color: var(--accent-bright); }
.contact-method .cm-note { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

.availability {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
  font-size: 0.86rem;
  color: var(--text-secondary);
}
.availability b { color: var(--text-primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   ═══ V3 — PRINT ═══
   Cmd/Ctrl+P → "Save as PDF" now produces a document worth attaching
   to an application. Turn OFF headers & footers in the print dialog.
═══════════════════════════════════════════════════════════════ */
@media print {
  .skip-link, .toc, .filter-bar, .lead-stats { display: none !important; }

  .article-layout { display: block !important; }
  .article-layout .article-content { max-width: none !important; }

  .case-card {
    border: 1px solid #ccc !important;
    background: #fafafa !important;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .case-card dt { color: #555 !important; }
  .case-card dd { color: #222 !important; }
  .case-card dd strong { color: #000 !important; }

  .takeaway {
    border: 1px solid #999 !important;
    background: #f4f4f4 !important;
    color: #000 !important;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .takeaway::before { color: #666 !important; }

  .case-table { font-size: 10pt; }
  .case-table thead th { color: #555 !important; border-bottom: 1px solid #999 !important; }
  .case-table td { border-bottom: 1px solid #e2e2e2 !important; }
  .case-table a { color: #000 !important; text-decoration: none !important; }
  .sys-tag { border-color: #bbb !important; color: #444 !important; background: none !important; }

  .article-content h2, .article-content h3 { break-after: avoid; }
  .article-content h2 { border-top-color: #ccc !important; }
  .cv-doc-entry, .cv-doc-section { break-inside: avoid; }

  /* Print the URL after external links so a paper copy is still usable. */
  .cv-doc-contact a::after,
  .cv-doc-entry a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
