/*
  Base tokens for the evidence pages. porcelain-evidence.css overrides the
  surfaces, ink and accent for the live Porcelain theme.
  Status colors use the real tool colors (Jenkins, OpenShift, Jira, Docker,
  GitHub) so they match the diagrams on the page.
*/

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-subtle: #F4F4F5;
  --surface-raised: #FFFFFF;
  --surface-dark: #18181B;

  /* Legacy aliases for backward component compatibility */
  --bg-2: var(--surface);
  --bg-3: var(--surface-subtle);

  /* Hairline Borders */
  --line: #E4E4E7;
  --line-strong: #D4D4D8;
  --line-faint: #F4F4F5;

  /* High-Contrast Typography Ink */
  --ink: #18181B;
  --ink-dim: #52525B;
  --ink-faint: #71717A;

  /* Accent: Warm Rust / GitLab Orange */
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-strong: #9A3412;
  --accent-faint: #FFEDD5;
  --accent-bright: #FC6D26;
  --accent-ink: #FFFFFF;
  --accent-dim: rgba(194, 65, 12, 0.08);
  --accent-line: rgba(194, 65, 12, 0.35);

  /* Functional Status Tokens */
  --pass: #2E7D32;
  --pass-strong: #1B5E20;
  --pass-brand: #63a955;
  --pass-dim: rgba(46, 125, 50, 0.08);
  --danger: #B42318;
  --danger-strong: #991B1B;
  --danger-brand: #da291c;
  --danger-dim: rgba(180, 35, 24, 0.08);
  --warn: #A94E09;
  --warn-strong: #78350F;
  --warn-brand: #d97706;
  --warn-dim: rgba(169, 78, 9, 0.08);
  --info: #0052CC;
  --info-strong: #1E40AF;
  --info-brand: #2496ed;
  --info-dim: rgba(0, 82, 204, 0.08);
  --tool-ink: #18181B;
  --on-dark: #FAFAFA;

  /* System Typography Stacks (Zero CDNs, Zero External Fonts) */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout and Geometry */
  --wrap: 1140px;
  --pad: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 8vw, 120px);
  --radius: 4px;
  --radius-sm: 2px;
  --radius-pill: 9999px;
  --header-h: 65px;
  --subnav-h: 53px;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
}
@media (max-width: 760px) {
  :root { --subnav-h: 56px; }
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  width: 100%;
  max-width: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* skip link for accessible keyboard navigation */
.skip-link {
  position: absolute;
  top: -999px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  box-sizing: border-box;
}
.skip-link:focus {
  top: 16px;
}

/* subtle grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.2;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

/* layout */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
section { padding-block: var(--section); }
section + section { border-top: 1px solid var(--line); }

/* typography */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; font-weight: 750; }
h2 { font-size: clamp(30px, 4.6vw, 50px); margin-top: 18px; }
.lead {
  color: var(--ink-dim);
  font-size: clamp(15px, 1.5vw, 17.5px);
  max-width: 64ch;
  margin-top: 18px;
}
.mono { font-family: var(--font-mono); }
.dim { color: var(--ink-dim); }

.section-head { margin-bottom: clamp(40px, 6vw, 68px); }
/* the eyebrow is already gone in most sections: the title takes over its position
   so the distance from the section edge to the first text does not change */
.section-head > h2:first-child,
.hero-id > h1:first-child { margin-top: 0; }

/* header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand .mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.brand:hover .mark { background: var(--accent); color: var(--accent-ink); }
.brand .slash { color: var(--ink-faint); }
@media (max-width: 480px) {
  .brand { gap: 8px; }
  .brand .slash,
  .brand .dim { display: none; }
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);

  white-space: nowrap;}
.nav a:hover { color: var(--ink); background: var(--surface-subtle); }
.nav a.active { color: var(--accent); font-weight: 600; }

.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn,
.nav-toggle,
.studio-btn,
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.tool-btn:hover,
.nav-toggle:hover,
.studio-btn:hover,
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn[aria-pressed="true"],
.nav-toggle[aria-expanded="true"] { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent); }

/* C2: two reading depths.
   Default = deep: every section is in the DOM and readable by crawlers and by a Tech Lead.
   Skim only hides the case studies, it does not delete their content. */
.depth-row {
  display: none;
  align-items: baseline;
  gap: 10px 14px;
  margin-top: 22px;
}
/* without it the control is just a dead button, so it is not shown */
html[data-js] .depth-row { display: flex; flex-wrap: wrap; }
.depth-hint {
  font-size: 12px;
  color: var(--ink-faint);
  max-width: 46ch;
}
@media (pointer: coarse) {
  .depth-btn { min-height: 44px; display: inline-flex; align-items: center; }
}
html[data-depth="skim"] [data-deep] { display: none; }
/* Marker where the six case studies used to sit. Without it the "hide" button
   only removes content and leaves the user guessing. The author style above
   beats the UA default [hidden], so without JS it stays hidden. */
.skim-note {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-3);
  font-size: 13px;
  color: var(--ink-dim);
}
html[data-depth="skim"] .skim-note { display: flex; }
/* print = the complete document, whatever the mode on screen */
@media print {
  html[data-depth="skim"] [data-deep] { display: block; }
  .skim-note { display: none; }
}

.menu-btn { display: none; }

@media (max-width: 1080px) {
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 20px;
    gap: 2px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 10px; font-size: 14px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; justify-content: center; align-items: center; padding: 7px 0; }
  /* The "≡" glyph (U+2261) is already box-aligned (offX 0, offY -0.4px inside 44x44),
     but it is only 8.5px wide and it sits on the math axis, not on the visual center.
     That is what makes the button look crooked. The 18px SVG icon takes the
     text color, so its center is a true center. */
  .menu-btn .mi { display: block; }
}

/* hero */
.hero {
  padding-top: clamp(120px, 16vh, 180px);
  padding-bottom: clamp(56px, 8vw, 96px);
  border-top: none;
}
/* On a phone 16vh means 135px: 65px header, then 70px empty before the name.
   That space buys nothing on an 844px screen; what it pays for is the rail
   dropping out of the fold. Leave one short breath under the chrome. */
@media (max-width: 860px) {
  .hero { padding-top: calc(var(--header-h) + 30px); }
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
  grid-template-areas:
    "id     visual"
    "flow   flow"
    "proof  proof";
  column-gap: clamp(32px, 5vw, 64px);
  row-gap: clamp(28px, 4vw, 44px);
  align-items: start;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "id"
      "visual"
      "flow"
      "proof";
    row-gap: 28px;
  }
}
.hero-id { grid-area: id; }
/* terminal and include card side by side; on narrow screens they stack */
.hero-after { display: flex; flex-wrap: wrap; gap: 22px; align-items: stretch; }

/* include card: the real shape of a service repo pipeline file.
   Deliberately light: the hero is allowed one dark block only, the terminal. */
.hero-yml {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.hy-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.hy-file { color: var(--ink); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.hy-where { margin-left: 0; }
.hy-code {
  margin: 0;
  padding: 11px 14px 13px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  white-space: pre;
}
.hy-k { color: var(--accent); }
.hy-v { color: var(--ink); }
.hy-c { color: var(--ink-faint); }
@media (max-width: 620px) {
  /* the file name and the caption do not push each other in the card head */
  .hy-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hy-where { margin-left: 0; }
}
.hy-foot {
  margin-top: auto;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}
/* The card's only action. It sits below the caption rather than inside it
   because the caption is filled by i18n, which replaces its text content. */
.hy-run {
  display: block;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  transition: background 0.18s var(--ease);
}
.hy-run:hover { background: var(--accent-dim); text-decoration: underline; text-underline-offset: 2px; }

/* stack strip under the hero button: one row of mark + name, no container.
   At 390 the strip also sits above the rail, so the rail gets pushed down. */
.hero-stack {
  grid-area: stack;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  border-top: 1px solid var(--line);
  padding-top: clamp(16px, 2.4vw, 22px);
}
.hs-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex: none;
}
.hs-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
/* Compact hero on narrow screens (audit F1, P0). Measured at 390x844: the stack strip was
   172px because 16 chips wrapped into 5 rows, so the pipeline rail started at
   y=731 and ZERO of the 7 whole nodes were above the fold. The strip becomes one row that
   can be swiped (saves ~120px) so the rail, the image that sells this work,
   is actually visible. The right edge shadow is the hint that the row
   continues; the label stays on the left. */
@media (max-width: 860px) {
  /* min-width: 0 is mandatory: without it the automatic minimum size of a grid item equals
     the chip row content (measured 1315px) and the whole page gets wider too */
  .hero-stack { flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
  .hs-row { width: 100%; max-width: 100%; min-width: 0; }
  .hs-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    gap: 6px 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
    background: linear-gradient(to left, var(--bg) 0, rgba(255, 255, 255, 0) 34px) right center / 44px 100% no-repeat local;
  }
  .hs-row::-webkit-scrollbar { display: none; }
  .hs-row > .sc { flex: 0 0 auto; scroll-snap-align: start; }
}

/* Stack strip: a swipeable name board.
   Two identical sets side by side. What moves it is the row's own scrollLeft
   (not a transform), so one control serves two directions: the lane drifts
   slowly at 26px/s, and a finger pulling it still works like swiping an
   ordinary row. While touched/scrolled/focused the lane holds still; 1.4 seconds after
   the last interaction it continues from that position, not from the start.
   There is no pause button: what stops is the animation, not the user's right.
   Without JS or with reduced-motion: no cloning, the row stays
   swipeable like before. */
@media (max-width: 860px) {
  .hs-row.hs-marquee { scroll-snap-type: none; padding-bottom: 0; }
  .hs-track { display: flex; width: max-content; }
  .hs-set { display: flex; align-items: center; gap: 6px 12px; padding-right: 12px; }
}
.hero h1 {
  font-size: clamp(42px, 7.4vw, 84px);
  margin-top: 22px;
  letter-spacing: -0.035em;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.7vw, 17px);
  color: var(--ink);
  margin-top: 16px;
  letter-spacing: 0.01em;
}
.hero-tag {
  color: var(--ink-dim);
  font-size: clamp(15px, 1.6vw, 17.5px);
  max-width: 52ch;
  margin-top: 18px;
}
/* fact row for fast scanners (HR): total years, current role, location */
.hero-facts {
  font-size: 13px;
  color: var(--ink);
  margin-top: 12px;
  letter-spacing: 0.01em;
}
/* scale evidence row: the same numbers used across the whole site, no new claims */
.hero-proof {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  margin-top: 14px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 430px) {
  .hero h1 { margin-top: 14px; }
  .hero-role { margin-top: 10px; }
  .hero-tag { margin-top: 12px; }
  .hero-facts { margin-top: 8px; }
  .hero-cta { margin-top: 20px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

/* code viewer and evidence box: clean semantic styling replaces fake terminal */
.code-card,
.evidence-viewer,
.terminal {
  margin-top: 0;
  flex: 1 1 420px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
}
.code-card-head,
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.terminal-bar i { display: none; }
.terminal-bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}
.code-card-body,
.terminal-body {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
}
.terminal-body .ln { white-space: pre-wrap; min-height: 1.6em; }
.terminal-body .cmd { color: var(--ink); font-weight: 600; }
.terminal-body .out { color: var(--accent); }
.terminal-body .out.dim-out { color: var(--ink-dim); }

/* photo */
.hero-photo { position: relative; justify-self: end; width: min(100%, 240px); grid-area: photo; }
.photo-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.98);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
/* the photo color is its hover state. On devices without hover that state
   is never reached, so the photo shows as it actually is:
   not permanently black and white because of one rule that cannot fire. */
@media (hover: none) {
  .photo-frame img { filter: grayscale(0) contrast(1.02); }
}
.photo-caption {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  padding-left: 14px;
  border-left: 1px solid var(--accent-line);
}

/* On a portrait phone, 161px at the end of the hero leaves empty space wider
   than the photo itself. It is not dropped: main.js moves it into the contact card,
   a place where a face is expected. See .contact-meta in components.css for
   how it sits there. Without JS it stays in the hero, only hidden. */
@media (max-width: 860px) {
  .hero-photo { justify-self: start; width: min(46%, 190px); }
}
/* F7: after the hero was compacted, the 161px photo on the left left empty space
   wider than the photo itself. Enlarging it to 60% makes the portrait
   read as a portrait, not as leftover layout. */
@media (max-width: 620px) {
  .hero-photo { width: min(60%, 216px); }
}


/* stats */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-in {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: clamp(26px, 4vw, 40px) clamp(16px, 2.5vw, 32px);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat .v {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat .l {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  .stats-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}


/* accessibility: focus & reduced motion (audit D2/D3) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
/* this site has hover and focus rings, but never had a pressed state
   (0 :active rules before this), so touch/click gave no feedback at all.
   Real controls only; the hero rail (.hf-node) stays out by decision. */
.btn:active, .wsn:active, .tf-btn:active, .bd-btn:active, .bd-dot:active,
.tool-btn:active, .lc-node:active, .lc-chip:active, .copy-btn:active, [data-act]:active {
  transform: translateY(1px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }
}


/* print: all content & final widget state (audit v2 #10) */
@media print {
  .gate-check .box { background: #2e7d32 !important; border-color: #2e7d32 !important; color: #fff !important; }
  .gate-result { border-color: #2e7d32 !important; background: #e7f2e6 !important; }
  .gate-result .g-state { font-size: 0; color: #2e7d32 !important; }
  .gate-result .g-state::before { content: attr(data-ready); font-size: 22px; font-weight: 700; }
  .hf-packet, .lc-packet, .rp-sse i, .bd-live i { display: none !important; }
  .rp-view::before, .bd-narr::before { content: "Interactive demo. See the written description."; font-family: var(--font-mono); font-size: 12px; color: #555; }
  .dg-link { stroke-dashoffset: 0 !important; } /* animation off in print: diagram lines must stay visible */
  * { animation: none !important; transition: none !important; }
}


/* C4: one contact path on phones.
   Contact used to exist only at the very bottom, and the CV button only in the hero.
   One pill, not three buttons, so the bottom chrome does not pile up. */
.mcta { display: none; }
@media (max-width: 760px) {
  .mcta:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 45;
    min-height: 44px;
    padding: 0 18px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-radius: 999px;
    box-shadow: 0 10px 28px -12px var(--accent-line);
  }
}
@media print { .mcta { display: none; } }

/* B2: hover effects only for devices that have hover.
   On touch, :hover sticks until the next tap: the card stays lifted
   and the table row stays highlighted. Blocked here are the big position/color effects;
   link and button color changes are left alone, because on touch that is feedback,
   not decoration. */
@media (hover: hover) {
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -12px var(--accent-line); }
.hero-photo:hover .photo-frame img { filter: grayscale(0) contrast(1.02); transform: scale(1.025); }
}

/* Zero horizontal overflow and child grid constraints */
.hero-grid > *,
.work-grid > *,
.stats-in > *,
.gate-checks > *,
.diagram-shell,
.code-card {
  min-width: 0;
}

/* Long text and monospace wrapping */
p, h1, h2, h3, h4, span, a, code, pre {
  overflow-wrap: break-word;
}
.mono-break, .mail-link, code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Responsive tables and wide containers */
.table-responsive,
.console-scroll,
.diagram-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Screen-reader-only text. It was defined in showcase.css, which
   /diagrams/ does not load, so the label rendered visibly. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Small uppercase label above a heading. Five pages use it; only /diagrams/
   styled it, so everywhere else it fell back to body text. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 8px;
}
