/* ═══════════════════════════════════════════════════════════════════════
   Ivan Ilchenko — Mechanical Engineer
   Direction: precision manufacturing. Graphite + machined brass, technical
   drawing furniture (registration marks, spec tables, mono annotations).
   Type: Archivo (expanded display) / IBM Plex Sans / IBM Plex Mono.
   ═══════════════════════════════════════════════════════════════════════ */

/* === defensive base — injected by harden_css.py; do not hand-edit === */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: calc(var(--nav-h, 72px) + 1rem); }
img, svg, video, iframe, canvas, table { display: block; max-width: 100%; }
p, li, h1, h2, h3, h4, blockquote, td, dd, dt { overflow-wrap: anywhere; }
form[style*="min-height"] { align-content: center; }
/* === end defensive base === */

:root {
  /* surfaces — graphite, cool, workshop-dark */
  --ink:        #0e1114;
  --ink-2:      #12161b;
  --surface:    #171c22;
  --surface-2:  #1d232a;

  /* line + text */
  --line:       rgba(200, 210, 222, 0.10);
  --line-2:     rgba(200, 210, 222, 0.18);
  --paper:      #e9edf1;
  --steel:      #9aa5b1;
  --steel-dim:  #6b7683;

  /* accent — machined brass / Georgia Tech gold, muted */
  --brass:      #c9a961;
  --brass-lit:  #ddc084;
  --brass-dim:  #8a7440;

  --nav-h: 72px;
  --wrap: 1200px;

  --ff-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --ff-body:    "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --ff-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--brass); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Parked off the TOP, not the left — a -9999px offset is real horizontal
   overflow and the build verifier fails on it. */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 999;
  background: var(--brass);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  transform: translateY(-130%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn--accent {
  background: var(--brass);
  color: #10130f;
  border-color: var(--brass);
}
.btn--accent:hover { background: var(--brass-lit); border-color: var(--brass-lit); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--brass); color: var(--brass-lit); transform: translateY(-1px); }

.btn--sm { padding: 0.62rem 1.1rem; font-size: 0.72rem; }

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; }

.brand__mark {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass-dim);
  color: var(--brass);
  font-family: var(--ff-display);
  font-weight: 800;
  font-variation-settings: "wdth" 120;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-radius: 2px;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.18; }
.brand__name { font-family: var(--ff-display); font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand__role { font-family: var(--ff-mono); font-size: 0.65rem; color: var(--steel-dim); letter-spacing: 0.08em; text-transform: uppercase; }

.nav__links { display: flex; gap: 1.75rem; }
.nav__links a {
  font-family: var(--ff-mono);
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--brass-lit); }

.nav__actions { display: flex; align-items: center; gap: 0.75rem; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav__toggle span { display: block; width: 17px; height: 1.5px; background: var(--paper); transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* hidden by default — a class setting display would beat [hidden], so this
   rule must be the base state, not just the attribute. */
.mobile-menu { display: none; }
.mobile-menu.is-open {
  display: flex;
  flex-direction: column;
  padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}
.mobile-menu a {
  padding: 0.85rem 0;
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
  border-bottom: 1px solid var(--line);
}
.mobile-menu__cta {
  margin-top: 1rem;
  text-align: center;
  background: var(--brass);
  color: #10130f !important;
  border: none !important;
  border-radius: 2px;
  font-weight: 600;
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  container-type: inline-size;      /* children size in cqi — see .hero__title */
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding-block: clamp(2rem, 5cqi, 4rem);
  overflow-x: clip;                 /* scoped: contains the corner-mark bleed */
  border-bottom: 1px solid var(--line);
}

/* Blueprint grid — scoped to the hero and absolute, NOT fixed on body. A fixed
   layer shows through every transparent section below as a hard-edged band
   that slides against the page as you scroll, which reads as a render bug. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(200,210,222,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200,210,222,0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 110% 85% at 62% 38%, #000 12%, transparent 72%);
}

.hero__grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5cqi, 4.5rem);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.85rem, 1.7cqi, 1.6rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-mono);
  font-size: clamp(0.66rem, 1.05cqi, 0.76rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

.hero__title {
  font-size: clamp(1.9rem, 7.2cqi, 4.25rem);
  font-variation-settings: "wdth" 108;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: initial;
}
.hero__title em {
  font-style: normal;
  color: var(--brass);
  font-variation-settings: "wdth" 122;
}

.hero__sub {
  max-width: 46ch;
  font-size: clamp(0.94rem, 1.42cqi, 1.14rem);
  line-height: 1.62;
  color: var(--steel);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  font-family: var(--ff-mono);
  font-size: clamp(0.66rem, 0.98cqi, 0.76rem);
  letter-spacing: 0.05em;
  color: var(--steel-dim);
  text-transform: uppercase;
}
.hero__proof strong { color: var(--brass); font-weight: 600; }
.hero__proof-sep { width: 1px; height: 12px; background: var(--line-2); }

/* profile card — technical drawing furniture */
.hero__card {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 380px;
  padding: clamp(1.1rem, 1.7cqi, 1.6rem);
  background: linear-gradient(160deg, var(--surface) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line-2);
  border-radius: 3px;
}
/* registration marks at the corners */
.hero__card::before,
.hero__card::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--brass-dim);
  pointer-events: none;
}
.hero__card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero__card::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* The source is a square 400x400, so the box just takes the image's own
   aspect — no cover-crop, and nothing for max-height to fight. */
.hero__portrait {
  position: relative;
  width: 100%;
  max-width: 292px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-2);
}
.hero__portrait img {
  width: 100%;
  height: auto;
  /* knocks the ID-photo white backdrop off pure #fff so it sits in the dark
     card instead of punching a hole in it */
  filter: grayscale(0.42) sepia(0.1) contrast(1.02) brightness(0.95);
}

.spec {
  margin-top: clamp(0.9rem, 1.5cqi, 1.35rem);
  border-top: 1px solid var(--line);
}
.spec__row {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 0.75rem;
  padding: 0.52rem 0;
  border-bottom: 1px solid var(--line);
}
.spec dt {
  font-family: var(--ff-mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-dim);
  align-self: center;
}
.spec dd {
  font-size: 0.79rem;
  line-height: 1.42;
  color: var(--paper);
}

/* ── Section scaffolding ─────────────────────────────────────────────── */

.section { padding-block: clamp(4rem, 9vw, 8rem); }

.section__head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section__kicker {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}

.section__title {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.section__title--sm { font-size: clamp(1.5rem, 3.2vw, 2.25rem); }

.section__lede {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--steel);
  max-width: 56ch;
}

/* ── Capabilities ────────────────────────────────────────────────────── */

.section--capabilities { background: var(--ink-2); border-bottom: 1px solid var(--line); }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.cap {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--ink-2);
  transition: background-color 0.3s var(--ease);
}
.cap:hover { background: var(--surface); }

.cap__num {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--brass-dim);
  margin-bottom: 1.1rem;
}

.cap h3 {
  font-size: 1.12rem;
  font-variation-settings: "wdth" 105;
  letter-spacing: -0.015em;
  margin-bottom: 0.65rem;
}

.cap p { font-size: 0.92rem; color: var(--steel); line-height: 1.6; }

.cap__tags {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-family: var(--ff-mono);
  font-size: 0.67rem !important;
  letter-spacing: 0.05em;
  color: var(--steel-dim) !important;
  text-transform: uppercase;
}

/* ── Stats ───────────────────────────────────────────────────────────── */

.section--stats { padding-block: clamp(3rem, 6vw, 5rem); border-bottom: 1px solid var(--line); }

/* Explicit steps rather than auto-fit: at tablet widths auto-fit resolved to
   3 columns and stranded "BSME" alone on a second row. */
.stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 3vw, 2.5rem);
}
@media (min-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.15rem;
  border-left: 1px solid var(--brass-dim);
}
.stats__fig {
  font-family: var(--ff-display);
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--paper);
}
.stats__unit {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brass);
  margin-left: 0.4rem;
  vertical-align: super;
}
.stats__lbl {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--steel-dim);
}

/* ── Experience ──────────────────────────────────────────────────────── */

.timeline { display: flex; flex-direction: column; }

.job {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.job:last-child { border-bottom: 1px solid var(--line); }

.job__meta { position: relative; padding-left: 1.15rem; }
.job__meta::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--brass);
  border-radius: 50%;
}
.job__dates {
  font-family: var(--ff-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--paper);
  text-transform: uppercase;
}
.job__dur, .job__loc {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--steel-dim);
  margin-top: 0.35rem;
}

.job__title {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.025em;
}
.job__co {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}
.job__body > p { color: var(--steel); font-size: 0.98rem; max-width: 62ch; }

.job__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.job__skills li {
  padding: 0.36rem 0.75rem;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--steel);
  text-transform: uppercase;
}

/* ── Education + skills ──────────────────────────────────────────────── */

.section--education { background: var(--ink-2); border-top: 1px solid var(--line); }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.edu__degree { margin-top: 1.5rem; font-size: 1.05rem; color: var(--paper); }
.edu__dates {
  font-family: var(--ff-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-dim);
  margin-top: 0.4rem;
}
.edu__skills, .skills__list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.edu__skills li, .skills__list li {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--steel);
  text-transform: uppercase;
}
.skills__list li { border-color: var(--line); }

.skills__kicker {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-dim);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

/* ── Final CTA ───────────────────────────────────────────────────────── */

.section--cta { padding-block: clamp(3.5rem, 7vw, 6rem); }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.cta__title { font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.06; letter-spacing: -0.03em; }
.cta__sub { margin-top: 1rem; color: var(--steel); max-width: 46ch; font-size: 0.98rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: var(--ink-2); padding-block: 2.75rem; }

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}
.footer__brand { display: flex; align-items: center; gap: 0.75rem; }
.footer__name { font-family: var(--ff-display); font-weight: 700; font-size: 0.95rem; }
.footer__role { font-family: var(--ff-mono); font-size: 0.68rem; color: var(--steel-dim); letter-spacing: 0.05em; margin-top: 0.15rem; }

.footer__links, .footer__contact { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__links a, .footer__contact a {
  font-family: var(--ff-mono);
  font-size: 0.73rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--steel-dim);
  transition: color 0.2s var(--ease);
}
.footer__links a:hover, .footer__contact a:hover { color: var(--brass-lit); }
.footer__contact a { color: var(--steel); }

/* ── Contact page ────────────────────────────────────────────────────── */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page-head { padding-bottom: 0; }
.page-head .section__title { margin-top: 0.35rem; }

.section--form { padding-top: clamp(2.5rem, 5vw, 4rem); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.form-card {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 3px;
}

.form-card__title {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.025em;
}
.form-card__note { margin-top: 0.55rem; margin-bottom: 1.75rem; color: var(--steel); font-size: 0.92rem; }

.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.1rem; }

.field label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--steel-dim);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--brass); background: #0b0e11; }
.field input::placeholder, .field textarea::placeholder { color: var(--steel-dim); }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0 1rem; }

.btn--block { width: 100%; margin-top: 0.5rem; }

.btn--sent {
  background: transparent !important;
  border-color: var(--brass) !important;
  color: var(--brass) !important;
  cursor: default;
  opacity: 1 !important;
  transform: none !important;
}

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 2px;
  font-size: 0.9rem;
  line-height: 1.55;
  border: 1px solid var(--line-2);
}
.form-status--ok  { border-color: var(--brass-dim); background: rgba(201, 169, 97, 0.09); color: var(--paper); }
.form-status--err { border-color: #8c4a44; background: rgba(180, 90, 80, 0.10); color: #f0d4d0; }

.contact-side { display: flex; flex-direction: column; gap: 1rem; }

.contact-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.contact-list { margin-top: 0.5rem; }
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-list__lbl {
  font-family: var(--ff-mono);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--steel-dim);
}
.contact-list__val { font-size: 0.98rem; color: var(--paper); transition: color 0.2s var(--ease); }
a.contact-list__val:hover { color: var(--brass-lit); }
.contact-list__val--open { color: var(--brass); }

.spec--flush { margin-top: 0.75rem; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Scroll reveal (below the fold only) ─────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.25rem, 3cqi, 2rem);
  }

  /* card collapses to a compact avatar strip above the copy — the spec table
     repeats content that lives in Capabilities/Skills, so it can drop here
     to keep headline + CTA + proof on the first screen. */
  .hero__card {
    order: -1;
    justify-self: start;
    max-width: none;
    padding: 0;
    background: none;
    border: 0;
  }
  .hero__card::before, .hero__card::after { display: none; }
  .hero__portrait {
    width: clamp(64px, 20cqi, 96px);
    max-width: none;
    margin-inline: 0;
    border-radius: 50%;
    border: 1px solid var(--brass-dim);
  }
  /* Scoped to the hero card ONLY — the contact page's "At a glance" table
     uses .spec too, and an unscoped hide left that card empty on mobile. */
  .hero__card .spec { display: none; }

  .job { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

@media (max-width: 620px) {
  :root { --nav-h: 62px; }
  .brand__role { display: none; }
  /* the name was squeezed into two lines by the nav CTA — hold it on one and
     buy the room back off the button */
  .nav__inner { gap: 0.75rem; }
  .brand__name { white-space: nowrap; font-size: 0.92rem; }
  .nav__actions .btn--sm { padding: 0.55rem 0.8rem; font-size: 0.66rem; letter-spacing: 0.06em; }
  .hero__cta .btn { flex: 1 1 auto; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Cloudflare Turnstile widget (injected by ensure_turnstile.py) */
.turnstile-box { margin-bottom: 1.25rem; min-height: 65px; }

/* === site credit (injected by credit_footer.py); do not hand-edit === */
.site-credit {
  margin: 2.25rem 0 0;
  padding-inline: 1.25rem;
  font-size: .73rem;
  line-height: 1.5;
  letter-spacing: .06em;
  text-align: center;
  opacity: .65;
}
.site-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(128, 128, 128, .5);
  border-bottom: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  transition: border-bottom-color .25s ease;
}
.site-credit a:hover,
.site-credit a:focus-visible { border-bottom-color: currentColor; }
@media (prefers-reduced-motion: reduce) {
  .site-credit a { transition: none; }
}
/* === end site credit === */
