/* ============================================================
   Richard J. Doherty — personal site
   Design system / stylesheet
   Teal-navy editorial · serif display + clean sans + mono labels
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (teal / navy editorial) — tunable via Tweaks */
  --ink:          #16211e;   /* warm near-black text */
  --ink-soft:     #3b4744;   /* secondary text on light */
  --ink-faint:    #6b7672;   /* tertiary / captions */
  --ground:       #f6f3ec;   /* warm off-white */
  --ground-2:     #efe9dd;   /* deeper warm panel */
  --line:         #ddd6c7;   /* hairline on light */

  --teal-900:     #0c3433;   /* deepest teal ground */
  --teal-800:     #0d3b3b;   /* dark teal ground */
  --teal-700:     #0f5a57;
  --teal-600:     #0f6e6e;   /* mid teal */
  --teal-on-dark: #cfe7e2;   /* body text on teal */
  --teal-faint:   #7fa39e;   /* muted text on teal */

  --accent:       #6fd0c5;   /* bright accent (default) — Tweakable */
  --accent-deep:  #0a5a52;   /* accent for text on light (AA) */
  --accent-ink:   #08302c;   /* text that sits on bright accent */

  /* Type */
  --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-body:    'Public Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* Fluid type scale */
  --t-eyebrow: 0.78rem;
  --t-body:    1.0625rem;
  --t-lead:    clamp(1.18rem, 0.9rem + 1.1vw, 1.45rem);
  --t-h4:      clamp(1.1rem, 0.95rem + 0.7vw, 1.3rem);
  --t-h3:      clamp(1.35rem, 1.05rem + 1.3vw, 1.85rem);
  --t-h2:      clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  --t-h1:      clamp(2.6rem, 1.4rem + 5vw, 5.2rem);
  --t-stat:    clamp(2.4rem, 1.6rem + 3.4vw, 3.9rem);

  /* Spacing / layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius: 14px;
  --radius-sm: 9px;

  --shadow-card: 0 1px 2px rgba(16,33,30,.04), 0 12px 30px -16px rgba(16,33,30,.18);
  --shadow-float: 0 30px 70px -30px rgba(8,48,44,.45);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.62;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Shared layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }

/* Eyebrow / mono label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 1px;
  background: currentColor;
  opacity: .55;
}
.eyebrow--plain::before { display: none; }
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--accent); }

/* Section heading block */
.sec-head { max-width: 56ch; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.5rem); }
.sec-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-top: .8rem;
  text-wrap: balance;
}
.sec-head p {
  margin-top: 1.1rem;
  font-size: var(--t-lead);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 50ch;
  text-wrap: pretty;
}

.display { font-family: var(--font-display); }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-soft); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: 0.95rem var(--gutter);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .3s var(--ease);
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em;
  color: #fff; display: flex; align-items: center; gap: .55rem; white-space: nowrap;
  transition: color .4s var(--ease);
}
.nav__brand .mono {
  font-family: var(--font-mono); font-weight: 600; font-size: .72rem;
  letter-spacing: .12em; padding: .28em .5em; border-radius: 5px;
  background: var(--accent); color: var(--accent-ink);
}
.nav__links { display: flex; align-items: center; gap: clamp(1rem,2vw,2rem); }
.nav__links a {
  font-size: .92rem; font-weight: 500; color: rgba(255,255,255,.82);
  letter-spacing: .005em; transition: color .25s var(--ease); position: relative; white-space: nowrap;
}
.nav__links a:hover { color: #fff; }
.nav__links a::after {
  content:""; position:absolute; left:0; bottom:-5px; height:1.5px; width:0;
  background: var(--accent); transition: width .28s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  padding: .58em 1.05em; border-radius: 999px; font-size: .9rem; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; transition: transform .2s var(--ease), filter .2s var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.nav__toggle { display: none; }

/* scrolled state — solid light bar */
.nav.is-stuck {
  background: rgba(246,243,236,.86);
  backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(16,33,30,.4);
  padding-top: .7rem; padding-bottom: .7rem;
}
.nav.is-stuck .nav__brand { color: var(--ink); }
.nav.is-stuck .nav__links a { color: var(--ink-soft); }
.nav.is-stuck .nav__links a:hover { color: var(--ink); }
.nav.is-stuck .nav__cta { background: var(--teal-800); color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px;
  font-weight: 600; font-size: .98rem; letter-spacing: .005em;
  border: 1px solid transparent; transition: transform .2s var(--ease), filter .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 14px 30px -16px var(--accent); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.32); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--dark { background: var(--teal-800); color:#fff; }
.btn--dark:hover { filter: brightness(1.12); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; color: #fff;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(111,208,197,.18), transparent 55%),
    radial-gradient(90% 80% at 0% 110%, rgba(15,110,110,.45), transparent 60%),
    linear-gradient(160deg, var(--teal-900), var(--teal-800) 60%, #0a2d2c);
  overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem,4vw,4.5rem);
  align-items: center;
  padding-top: clamp(8rem, 6rem + 6vw, 11rem);
  padding-bottom: var(--section-y);
}
.hero__name {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.6rem;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero__lede {
  margin-top: clamp(2.5rem, 1.3rem + 2.4vw, 3.5rem); max-width: 46ch;
  font-size: var(--t-lead); line-height: 1.5; color: var(--teal-on-dark);
  text-wrap: pretty;
}
.hero__cta { margin-top: 2.3rem; display: flex; flex-wrap: wrap; gap: .85rem; }

/* work-rights badge */
.rights {
  margin-top: 2.4rem; display: inline-flex; align-items: center; gap: .9rem;
  padding: .7rem 1.05rem; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
}
.rights__label {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal-faint); line-height: 1.3; max-width: 9ch;
}
.rights__flags { display: flex; gap: 1.3rem; }
.rights__flags .r {
  display: flex; flex-direction: column; line-height: 1.1;
}
.rights__flags .r b { font-size: 1.02rem; font-weight: 700; }
.rights__flags .r span { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-faint); margin-top: 2px; }
.rights__flags .r b { color: #fff; }

/* portrait slot */
.portrait {
  position: relative; aspect-ratio: 3/4; border-radius: 18px;
  overflow: hidden; background: var(--ground-2);
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(255,255,255,.1);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 28%; }
.portrait__ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  background:
    repeating-linear-gradient(135deg, #e7e0d2 0 14px, #efe9dd 14px 28px);
  color: var(--ink-faint); text-align: center; padding: 1.5rem;
}
.portrait__ph .mono { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.portrait__ph .big { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-soft); }
.portrait__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.2rem .9rem;
  background: linear-gradient(transparent, rgba(8,40,38,.82));
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.portrait__cap b { color:#fff; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.portrait__cap span { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.hero__marquee {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.1rem 0; overflow: hidden;
}
.hero__marquee .row {
  display: flex; gap: 2.6rem; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal-faint);
}
.hero__marquee .row b { color: var(--accent); font-weight: 500; }

/* ---- Light-hero variant (Tweak) ---- */
body.hero-light .hero {
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 88% -10%, color-mix(in oklch, var(--accent) 30%, transparent), transparent 55%),
    linear-gradient(165deg, var(--ground), var(--ground-2));
}
body.hero-light .hero__name { color: var(--accent-deep); }
body.hero-light .hero h1 em { color: var(--accent-deep); }
body.hero-light .hero__lede { color: var(--ink-soft); }
body.hero-light .rights { background: rgba(16,33,30,.04); border-color: var(--line); }
body.hero-light .rights__label, body.hero-light .rights__flags .r span { color: var(--ink-faint); }
body.hero-light .rights__flags .r b { color: var(--ink); }
body.hero-light .btn--ghost { color: var(--ink); border-color: var(--line); }
body.hero-light .btn--ghost:hover { color: var(--accent-deep); border-color: var(--accent-deep); }
body.hero-light .nav__brand { color: var(--ink); }
body.hero-light .nav__links a { color: var(--ink-soft); }
body.hero-light .nav__links a:hover { color: var(--ink); }
body.hero-light .nav__cta { background: var(--teal-800); color: #fff; }
body.hero-light .hero__marquee { border-color: var(--line); }
body.hero-light .hero__marquee .row { color: var(--ink-faint); }
body.hero-light .hero__marquee .row b { color: var(--accent-deep); }
body.hero-light .portrait { border-color: var(--line); }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem,5vw,5rem); align-items: start; }
.about__story p { margin-top: 1.15rem; color: var(--ink-soft); max-width: 62ch; text-wrap: pretty; }
.about__story p:first-child { margin-top: 0; }
.about__story strong { color: var(--ink); font-weight: 600; }
.pullquote {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.8vw, 2.1rem); line-height: 1.22; letter-spacing: -.01em;
  color: var(--ink); text-wrap: balance;
}
.pullquote .accent { color: var(--accent-deep); }
.about__aside { position: sticky; top: 6rem; }
.about__aside .tag {
  display: inline-block; font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 999px; padding: .4em .85em; margin: 0 .4rem .5rem 0;
}

/* ============================================================
   LANES (How I can help)
   ============================================================ */
.lanes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem,1.6vw,1.5rem); }
.lane {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 1.4vw, 2.3rem);
  display: flex; flex-direction: column; gap: 1rem;
  position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.lane::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease);
}
.lane:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: transparent; }
.lane:hover::before { transform: scaleY(1); }
.lane__no { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; color: var(--accent-deep); }
.lane h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--t-h4); line-height: 1.12; letter-spacing: -.01em; }
.lane__what { color: var(--ink-soft); }
.lane__proof {
  margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line);
  font-size: .9rem; color: var(--ink-faint);
}
.lane__proof b { color: var(--ink); font-weight: 600; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; }
.tl {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: clamp(1rem,3vw,3rem);
  padding: 1.6rem 0; border-top: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.tl:hover { background: linear-gradient(90deg, rgba(111,208,197,.06), transparent 60%); }
.tl__when {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em;
  color: var(--accent-deep); padding-top: .35rem;
}
.tl__when .where { display:block; color: var(--ink-faint); margin-top: .3rem; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.tl__body { }
.tl__role { font-family: var(--font-display); font-weight: 600; font-size: var(--t-h4); line-height: 1.15; letter-spacing: -.01em; }
.tl__org { color: var(--accent-deep); font-weight: 600; }
.tl__detail { margin-top: .55rem; color: var(--ink-soft); max-width: 70ch; text-wrap: pretty; }
.tl__chips { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em;
  color: var(--ink-faint); background: var(--ground-2); border-radius: 6px; padding: .35em .6em;
}
.earlier {
  margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 2rem;
}
.earlier h3 { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.4rem; }
.earlier__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.2rem 2.5rem; }
.early {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: start;
  padding-bottom: 1.2rem; border-bottom: 1px dashed var(--line);
}
.early .yr { font-family: var(--font-mono); font-size: .76rem; color: var(--accent-deep); padding-top: .15rem; }
.early b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.early span { display:block; color: var(--ink-soft); font-size: .9rem; margin-top: .25rem; }

/* ============================================================
   RECENT WORK (dark feature)
   ============================================================ */
.work { background: linear-gradient(170deg, var(--teal-900), #0a2c2b); color: #fff; }
.work .sec-head h2 { color: #fff; }
.work .sec-head p { color: var(--teal-on-dark); }
.work .eyebrow { color: var(--accent); }

.feature {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem,4vw,4rem);
  align-items: center; margin-top: clamp(2.5rem,4vw,4rem);
}
.feature--flip { grid-template-columns: 1.05fr 1fr; }
.feature__meta .kicker {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: .6rem;
}
.feature__meta h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--t-h3); line-height: 1.05; letter-spacing: -.015em; margin-top: 1rem; }
.feature__meta .sub { color: var(--teal-on-dark); margin-top: .4rem; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.feature__meta p { color: var(--teal-on-dark); margin-top: 1.1rem; max-width: 52ch; text-wrap: pretty; }
.feature__meta .links { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; }
.feature__meta .links a {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .03em; color: var(--accent);
  display: inline-flex; align-items: center; gap: .4rem; border-bottom: 1px solid rgba(111,208,197,.3); padding-bottom: 2px;
  transition: border-color .25s var(--ease);
}
.feature__meta .links a:hover { border-color: var(--accent); }
.feature__meta .stackline { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.feature__meta .stackline .chip { background: rgba(255,255,255,.07); color: var(--teal-on-dark); }

/* phone screenshots */
.phones { display: flex; gap: clamp(.6rem,1.4vw,1.3rem); justify-content: center; }
.phone {
  flex: 1 1 0; max-width: 220px; position: relative;
  border-radius: 26px; padding: 7px; background: #05201f;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow-float);
  transition: transform .4s var(--ease);
}
.phone:nth-child(2) { transform: translateY(-18px); z-index: 2; }
.phone:hover { transform: translateY(-26px); }
.phone:nth-child(2):hover { transform: translateY(-34px); }
.phone img { width: 100%; border-radius: 19px; display:block; }
.phone .cap {
  position:absolute; left:0; right:0; bottom: -1.8rem; text-align:center;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-faint);
}
.phones-wrap { padding-bottom: 2.4rem; }

/* method + diagram */
.method { margin-top: clamp(3rem,5vw,5.5rem); }
.method__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,4vw,4rem); align-items: center; }
.method__diagram {
  background: var(--ground); border-radius: var(--radius); padding: 1rem; border: 1px solid rgba(255,255,255,.1);
  box-shadow: var(--shadow-float);
}
.method__diagram img { width: 100%; border-radius: 8px; }
.method__diagram figcaption { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; color: var(--ink-faint); padding: .7rem .4rem .2rem; text-align: center; }
.method__steps { display: flex; flex-direction: column; gap: 1.3rem; counter-reset: m; }
.mstep { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; }
.mstep__n {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-mono); font-weight: 600; font-size: .95rem;
}
.mstep b { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: #fff; }
.mstep p { color: var(--teal-on-dark); margin-top: .25rem; font-size: .97rem; }

.method__honest {
  margin-top: clamp(2rem,3vw,3rem);
  padding: 1.3rem 1.5rem; border-left: 2px solid var(--accent);
  background: rgba(255,255,255,.04); border-radius: 0 10px 10px 0;
  font-size: 1rem; color: var(--teal-on-dark); max-width: 80ch;
}
.method__honest b { color: #fff; font-weight: 600; }

/* Kirevra typographic cover */
.kirevra-cover {
  aspect-ratio: 4/5; max-width: 380px; margin-inline: auto;
  display: flex; flex-direction: column; justify-content: center; gap: .5rem;
  padding: clamp(1.6rem,3vw,2.6rem); text-align: left;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(111,208,197,.16), transparent 55%),
    linear-gradient(160deg, #11403e, #0a2c2b);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius);
  box-shadow: var(--shadow-float); position: relative; overflow: hidden;
}
.kirevra-cover::after {
  content:""; position:absolute; left:0; right:0; bottom:0; height:6px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.kc__imprint { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.kc__rule { width: 2.4rem; height: 2px; background: var(--accent); margin: .3rem 0 .8rem; }
.kc__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem,1.2rem+2.2vw,2.6rem); line-height: 1.02; color: #fff; letter-spacing: -.02em; }
.kc__sub { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--teal-on-dark); margin-top: .2rem; }
.kc__series { margin-top: 1.2rem; font-size: .9rem; color: var(--teal-faint); }
.kc__foot { margin-top: auto; padding-top: 1.6rem; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: var(--teal-faint); }

/* ============================================================
   PROOF & CREDENTIALS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ground); padding: clamp(1.2rem,2vw,2rem) clamp(1rem,1.6vw,1.6rem); }
.stat__num { font-family: var(--font-display); font-weight: 600; font-size: var(--t-stat); line-height: 1; letter-spacing: -.02em; color: var(--teal-800); }
.stat__num small { font-size: .5em; color: var(--accent-deep); }
.stat__label { margin-top: .6rem; font-size: .88rem; color: var(--ink-soft); line-height: 1.35; }

.creds { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,4vw,4rem); margin-top: clamp(2.5rem,4vw,3.5rem); }
.cred-block h3 { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.2rem; }
.cred-list { display: flex; flex-direction: column; gap: .9rem; }
.cred {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: baseline;
  padding-bottom: .9rem; border-bottom: 1px solid var(--line);
}
.cred .mark { color: var(--accent-deep); font-family: var(--font-mono); font-size: .8rem; }
.cred b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.cred span { display:block; color: var(--ink-soft); font-size: .9rem; margin-top: .2rem; }
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.2rem; }
.cert { display: flex; gap: .6rem; align-items: baseline; font-size: .95rem; color: var(--ink-soft); }
.cert::before { content:"›"; color: var(--accent-deep); font-weight: 700; }

.skills { margin-top: clamp(2.5rem,4vw,3.5rem); }
.skills__cloud { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.2rem; }
.skill {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em;
  background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: .45em .75em; color: var(--ink-soft);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.skill:hover { border-color: var(--accent-deep); color: var(--ink); }
.skill--key { background: var(--teal-800); color: #fff; border-color: var(--teal-800); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: linear-gradient(165deg, var(--teal-800), var(--teal-900)); color: #fff; }
.contact .eyebrow { color: var(--accent); }
.contact__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,4vw,4.5rem); align-items: center; }
.contact h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -.02em; margin-top: 1rem; text-wrap: balance; }
.contact h2 em { font-style: italic; color: var(--accent); }
.contact__lede { margin-top: 1.3rem; color: var(--teal-on-dark); font-size: var(--t-lead); max-width: 44ch; text-wrap: pretty; }
.contact__cards { display: flex; flex-direction: column; gap: .8rem; }
.ccard {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 1.05rem 1.2rem; transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.ccard:hover { border-color: var(--accent); background: rgba(111,208,197,.08); transform: translateX(3px); }
.ccard__ic { width: 2.4rem; height: 2.4rem; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(111,208,197,.14); color: var(--accent); }
.ccard__ic svg { width: 1.2rem; height: 1.2rem; }
.ccard .k { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-faint); }
.ccard .v { font-weight: 600; font-size: 1rem; margin-top: 2px; }
.contact__cta { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: #0a2625; color: var(--teal-faint); padding-block: 3rem; }
.foot__grid { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.foot__brand { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 1.1rem; }
.foot small { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; }
.foot a { color: var(--teal-on-dark); }
.foot a:hover { color: var(--accent); }
.foot__links { display: flex; gap: 1.4rem; font-size: .85rem; flex-wrap: wrap; }
.foot__disclaimer { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .76rem; line-height: 1.5; max-width: 78ch; color: var(--teal-faint); }

/* ============================================================
   Scroll reveal — gated behind html.anim (progressive enhancement)
   Without JS, or if the observer never fires, content stays visible.
   ============================================================ */
.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .anim .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .portrait { max-width: 360px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__aside { position: static; }
  .lanes { grid-template-columns: 1fr; }
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: -1; }
  .method__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .creds { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .earlier__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(12,52,51,.97); backdrop-filter: blur(12px); padding: 1.4rem var(--gutter) 1.8rem;
    box-shadow: var(--shadow-float);
  }
  .nav__links.open a { color: #fff; font-size: 1.05rem; }
  .nav.is-stuck .nav__links.open a { color: #fff; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: .4rem;
  }
  .nav__toggle span { width: 22px; height: 2px; background: currentColor; color: #fff; transition: .3s var(--ease); }
  .nav.is-stuck .nav__toggle span { background: var(--ink); }
  .tl { grid-template-columns: 1fr; gap: .5rem; }
  .tl__when { padding-top: 0; }
  .stat { padding: 1.1rem; }
  .stat__num { font-size: 2.4rem; }
  .phones { gap: .5rem; }
  .phone:nth-child(2) { transform: none; }
  .phone:hover, .phone:nth-child(2):hover { transform: translateY(-6px); }
  .early { grid-template-columns: 4.5rem 1fr; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .rights__flags { gap: .9rem; }
  .phones { flex-wrap: wrap; }
  .phone { max-width: 46%; }
  /* Protect 320-460px viewports from h1/h2 overflow */
  .hero h1 { font-size: clamp(1.85rem, 1rem + 4.5vw, 2.5rem); text-wrap: pretty; }
  .sec-head h2, .contact h2 { font-size: clamp(1.6rem, 1rem + 3vw, 2.1rem); text-wrap: pretty; }
  .hero__intro, .hero__media, .feature__meta, .feature__media,
  .about__story, .about__aside, .wrap, .hero__grid, .about__grid,
  .contact__grid, .feature, .method__grid, .creds { min-width: 0; }
  .hero h1, .hero__lede, .sec-head h2, .about__story p,
  .pullquote, .stat__num, .tl__role { overflow-wrap: break-word; word-break: normal; }
}

/* ============================================================
   Focus-visible (WCAG 2.1 AA — spec §8)
   2px ring, 2px offset. Deep teal on light grounds, mint on dark.
   ============================================================ */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav__toggle:focus-visible,
.nav__cta:focus-visible,
.ccard:focus-visible,
.skill:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Dark contexts — bright mint reads against teal grounds */
.hero a:focus-visible,
.hero button:focus-visible,
.work a:focus-visible,
.work button:focus-visible,
.contact a:focus-visible,
.contact button:focus-visible,
.foot a:focus-visible,
.nav:not(.is-stuck) a:focus-visible,
.nav:not(.is-stuck) button:focus-visible {
  outline-color: var(--accent);
}

/* Pull in-page anchor targets clear of the fixed nav */
:target {
  scroll-margin-top: 5rem;
}

