/* JosephMoto.com
   Swiss / International style: Archivo (variable width + weight), one cobalt accent,
   a strict 12-column grid with hairline rules. Light and dark themes are token swaps. */

:root {
  color-scheme: light dark;

  --paper: #ffffff;
  --ink: #0b0b0f;
  --ink-2: #3f3f48;        /* body copy, 10.4:1 on paper */
  --ink-3: #5f5f69;        /* labels, 6.3:1 on paper */
  --rule: #0b0b0f;
  --rule-soft: #dcdce2;
  --chip-line: #c9c9d1;

  --accent: #1f3bff;       /* cobalt fill for the four accent blocks */
  --accent-ink: #1f3bff;   /* cobalt as text, bullets and focus on paper, 6.7:1 */
  --on-accent: #ffffff;    /* 6.7:1 on cobalt */
  --on-accent-2: #dde2ff;  /* 5.2:1 on cobalt */
  --on-accent-line: rgba(255, 255, 255, 0.45);

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --gutter: clamp(16px, 4.4vw, 64px);
  --col-gap: clamp(16px, 1.8vw, 28px);
  --max: 1440px;
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0e13;
    --ink: #f1f1f4;          /* 17:1 */
    --ink-2: #c5c6d0;        /* 11.3:1 */
    --ink-3: #9c9daa;        /* 7.2:1 */
    --rule: #f1f1f4;
    --rule-soft: #2a2b35;
    --chip-line: #3b3c48;
    --accent-ink: #8e9bff;   /* 7.6:1 on dark paper */
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
strong { font-weight: 650; color: var(--ink); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
}

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

.nowrap { white-space: nowrap; }

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: square;
  vertical-align: -0.12em;
  display: inline-block;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Labels (shared) ---------- */

.section-num,
.hero-kicker,
.facts dt,
.project-type,
.edu-sub,
.edu-label,
.status-label,
.nf-label {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 0.875rem; gap: 8px; }

.btn-tag {
  display: inline-block;
  padding: 2px 5px 1px;
  border: 1px solid currentColor;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
}
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--ink); color: var(--paper); }

.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* Buttons on the cobalt band: always white on cobalt, in both themes. */
.btn-paper { background: var(--on-accent); color: var(--accent); }
.btn-paper:hover { background: #0b0b0f; color: #ffffff; }

.btn-line-paper { border-color: var(--on-accent); color: var(--on-accent); }
.btn-line-paper:hover { background: var(--on-accent); color: var(--accent); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header (sticky at every width) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-link {
  display: none;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}
.header-link:hover { color: var(--accent-ink); }

/* Desktop section nav, inside the header */
.site-nav { display: none; }
.site-nav a,
.section-strip a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--ink);
}
.site-nav a::after,
.section-strip a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 2px;
  background: var(--accent-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after,
.section-strip a:hover::after,
.section-strip a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a[aria-current="true"],
.section-strip a[aria-current="true"] { color: var(--accent-ink); }

/* Mobile section strip, under the sticky header: one row, scrolls sideways only if it must */
.section-strip {
  border-bottom: 1px solid var(--rule-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.section-strip::-webkit-scrollbar { display: none; }
.section-strip ul {
  display: flex;
  justify-content: space-between;
  gap: 4px;                                  /* + 2 x 5px link padding = 14px between labels */
  width: max-content;
  min-width: 100%;
  padding: 0 calc(var(--gutter) - 5px);      /* labels still start at the gutter */
}
.section-strip a {
  padding-inline: 5px;
  font-size: 0.8125rem;
  font-stretch: 94%;
}
.section-strip a::after { left: 5px; right: 5px; }
/* The strip clips (overflow-x) and its links fill its full height, so draw the ring
   inside the link box; the 5px side padding keeps it clear of the label. */
.section-strip a:focus-visible { outline-offset: -3px; }

/* Narrow phones: a 3 x 2 grid so every section (Contact included) stays visible */
@media (max-width: 389px) {
  .section-strip { overflow: visible; }
  .section-strip ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: auto;
  }
  .section-strip li:nth-child(n + 4) { border-top: 1px solid var(--rule-soft); }
  .section-strip li:nth-child(3n + 2),
  .section-strip li:nth-child(3n) { padding-left: 7px; border-left: 1px solid var(--rule-soft); }
  .header-actions .btn-tag { display: none; }
}

@media (min-width: 900px) {
  :root { --header-h: 64px; }
  .section-strip { display: none; }
  .site-nav { display: block; margin-left: auto; }
  .site-nav ul { display: flex; gap: clamp(16px, 2vw, 32px); }
  .site-nav + .header-actions { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--rule-soft); }
}

@media (min-width: 1100px) {
  .header-link { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(28px, 5vw, 64px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "kicker"
    "title"
    "status"
    "lead";
}

.hero-kicker {
  grid-area: kicker;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--ink);
}
.hero-kicker .amp { color: var(--accent-ink); font-weight: 800; font-size: 1.1em; }

.hero-title {
  grid-area: title;
  margin: clamp(14px, 2vw, 28px) 0 clamp(24px, 3.4vw, 48px);
  margin-left: -0.04em;
  font-size: clamp(3.5rem, 22.5vw, 14.75rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 0.86;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere; /* only breaks a word if it would overflow (e.g. user text-spacing overrides) */
}
.hero-title .line { display: block; }
.title-dot { color: var(--accent-ink); }

.hero-status {
  grid-area: status;
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--on-accent);
  padding: 18px 20px 20px;
  margin-bottom: 28px;
}
.status-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-accent);
}
.status-dot {
  width: 9px; height: 9px;
  background: var(--on-accent);
  border-radius: 50%;
  flex: none;
}
.status-text {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  max-width: 13em;
  font-size: clamp(1.25rem, 5.4vw, 2rem);
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.status-art {
  position: absolute;
  right: 0; bottom: 0;
  width: 132px; height: 132px;
  color: var(--on-accent);
  opacity: 0.32;
}

/* Portrait inside the status block: beside the text on phones, on top of it on desktop.
   The photo is never cropped; it keeps its own 3:4 shape. */
.hero-status--photo { display: flex; align-items: stretch; padding: 0; }
.hero-status--photo .status-art { display: none; }
.hero-photo { order: 2; flex: 0 0 38%; max-width: 150px; margin: 0; background: #dfe0e6; }
.hero-photo img { display: block; width: 100%; height: auto; }
.status-body { flex: 1; min-width: 0; padding: 18px 20px 20px; align-self: center; }

.hero-lead { grid-area: lead; }
.lead {
  font-size: clamp(1.1875rem, 1.7vw, 1.625rem);
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 32em;
}
.hero-lead .cta-row { margin-top: 28px; }
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-top: 10px;
  font-size: 0.9375rem;
}
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration-color: var(--chip-line);
}
.hero-links a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }

/* Phones: show the Email / Résumé buttons before the lead paragraph so they sit in the
   first screen even with browser bars showing. The lead is not focusable, so the focus
   order (buttons, then the email and LinkedIn links) still matches the visual order. */
@media (max-width: 559px) {
  .hero-lead { display: flex; flex-direction: column; }
  .hero-lead .cta-row { order: -1; flex-direction: column; margin: 0 0 20px; }
  .hero-lead .btn { width: 100%; justify-content: space-between; }
}
/* Narrow phones (iPhone SE and smaller): trim hero spacing so the full Email button clears the fold */
@media (max-width: 389px) {
  .hero { padding-top: 18px; }
  .hero-title { margin-bottom: 18px; }
  .hero-status { margin-bottom: 18px; }
  .lead { font-size: 1.0625rem; line-height: 1.42; }
  .hero-lead .cta-row { margin-bottom: 18px; }
}

/* Facts strip */
.facts {
  margin-top: 36px;
  border-top: 1px solid var(--rule);
}
.fact {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 10px;
  padding: 13px 0 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.facts dt { color: var(--ink-3); padding-top: 3px; }
.facts dd { font-size: 0.9375rem; line-height: 1.35; }
.facts dd strong { display: block; font-weight: 700; }
.facts dd > span { display: block; color: var(--ink-3); margin-top: 1px; }

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    grid-template-areas:
      "kicker kicker kicker kicker kicker kicker kicker kicker kicker status status status"
      "title  title  title  title  title  title  title  title  title  status status status"
      "lead   lead   lead   lead   lead   lead   lead   lead   lead   lead   lead   lead";
    align-items: start;
  }
  .hero-title { font-size: min(16.4vw, 14.75rem); }
  .hero-status {
    align-self: stretch;
    margin: 0 0 clamp(24px, 3.4vw, 48px);
    padding: 24px 26px;
    min-height: 0;
  }
  .status-text { font-size: clamp(1.25rem, 2.2vw, 2.125rem); margin-top: 14px; max-width: none; }
  .status-art { width: 88%; height: auto; aspect-ratio: 1; max-width: 300px; }
  .hero-status--photo { flex-direction: column; padding: 0; }
  .hero-photo { order: 0; flex: none; width: 100%; max-width: none; }
  .status-body { align-self: stretch; padding: 20px 24px 24px; }
}

@media (min-width: 640px) and (max-width: 1099px) {
  .facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--col-gap);
    margin-top: 56px;
  }
}
@media (min-width: 1100px) {
  .facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(56px, 6vw, 88px);
  }
  .fact {
    display: block;
    padding: 18px var(--col-gap) 0 0;
    border-bottom: 0;
  }
  .fact + .fact { padding-left: 18px; border-left: 1px solid var(--rule-soft); }
  .facts dt { margin-bottom: 8px; padding-top: 0; }
  .facts dd { font-size: 1rem; }
}

/* ---------- Sections ---------- */

.section { padding-top: clamp(64px, 8vw, 120px); }
.section-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 28px;
  padding-top: 18px;
}
.section-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--rule);
}
.section-num { color: var(--accent-ink); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.section-head h2,
.contact-head h2 {
  font-size: clamp(2.25rem, 4vw, 3.625rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.h2-sub {
  display: block;
  margin-top: 10px;
  font-size: 0.42em;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: -0.01em;
  color: var(--ink-3);
}

@media (min-width: 900px) {
  .section-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    padding-top: 22px;
  }
  .section-head {
    grid-column: 1 / span 4;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 22px);
  }
  .section-body { grid-column: 5 / -1; }
}

/* About */
.statement {
  font-size: clamp(1.5rem, 2.5vw, 2.375rem);
  font-weight: 350;
  line-height: 1.2;
  letter-spacing: -0.022em;
  max-width: 24em;
}
.statement strong { font-weight: 700; }

.pillars {
  display: grid;
  margin-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--rule);
}
.pillar {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--rule-soft);
}
.pillar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pillar-title::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--accent-ink);
}
.pillar p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }

.about-close {
  margin-top: clamp(24px, 3vw, 36px);
  max-width: 40em;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

@media (min-width: 640px) {
  .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .pillar { padding: 18px 0 0; border-bottom: 0; }
  .pillar + .pillar { padding-left: 18px; border-left: 1px solid var(--rule-soft); }
  .pillar p { margin-top: 8px; }
}

/* Experience */
.job {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--rule-soft);
}
.job:first-child { border-top: 0; padding-top: 0; }
.job:last-child { padding-bottom: 0; }
.job-when {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.job-title {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 750;
  font-stretch: 104%;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.job-org,
.project-org {
  margin-top: 4px;
  color: var(--ink-2);
  font-weight: 400;
}
.job-org strong,
.project-org strong { color: var(--ink); font-weight: 700; }
.sep { color: var(--ink-3); margin: 0 2px; }
/* Employer and school logos: white tiles in every theme so dark marks stay visible */
.org-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.logo-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 7px;
  background: #ffffff;
  border: 1px solid var(--rule-soft);
}
.logo-tile--wide { width: 104px; }
.logo-tile--bleed { padding: 0; }
.logo-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.job-points {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  color: var(--ink-2);
  font-size: 1.03125rem;
}
.job-points li {
  position: relative;
  padding-left: 22px;
}
.job-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 7px;
  height: 7px;
  background: var(--accent-ink);
}
@media (min-width: 900px) {
  .job { grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .job-when { grid-column: 1 / span 2; }
  .job-main { grid-column: 3 / -1; }
}

/* Skills */
.skill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--rule-soft);
}
.skill-row:first-child { border-top: 0; padding-top: 0; }
.skill-row:last-child { padding-bottom: 0; }
.skill-row dt {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 7px 12px 8px;
  border: 1px solid var(--chip-line);
  background: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
}
.skill-row--accent .chips li {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
@media (min-width: 900px) {
  .skill-row { grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .skill-row dt { grid-column: 1 / span 2; padding-top: 7px; }
  .skill-row dd { grid-column: 3 / -1; }
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.project {
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}
.project-type { color: var(--ink-3); }
.project-title {
  margin-top: 10px;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 750;
  font-stretch: 106%;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.project-org { margin-top: 6px; }
.project-text { margin-top: 12px; color: var(--ink-2); font-size: 1.03125rem; max-width: 36em; }

.feature-list { margin-top: 18px; border-top: 1px solid var(--rule-soft); }
.feature-list li {
  position: relative;
  padding: 10px 0 10px 20px;
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 600;
  font-size: 0.9375rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(10px + 0.56em);
  width: 7px;
  height: 7px;
  background: var(--accent-ink);
}

.project--feature {
  position: relative;
  border-top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 24px 20px 26px;
}
.project--feature :focus-visible { outline-color: var(--on-accent); }
.project-icon {
  position: absolute;
  top: 22px;
  right: 20px;
  width: 36px;
  height: 36px;
  color: var(--on-accent);
  opacity: 0.85;
}
.project--feature .project-type { color: var(--on-accent-2); }
.project--feature .project-title {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  padding-right: 48px;
}
.project--feature .project-text {
  color: var(--on-accent);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.45;
  max-width: 32em;
}
.project-points {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  color: var(--on-accent);
  font-size: 0.96875rem;
}
.project-points li {
  padding-top: 12px;
  border-top: 1px solid var(--on-accent-line);
}
.chips--on-accent { margin-top: 24px; }
.chips--on-accent li {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--on-accent);
}

@media (min-width: 640px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--col-gap); }
  .project--feature { grid-column: 1 / -1; padding: clamp(28px, 3vw, 44px); }
  .project-icon { top: clamp(28px, 3vw, 44px); right: clamp(28px, 3vw, 44px); width: 48px; height: 48px; }
  .project-points { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); margin-top: 32px; }
  .chips--on-accent { margin-top: 28px; }
}

/* Education */
.edu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.edu-label { color: var(--ink-3); margin-bottom: 12px; }
.edu-year {
  font-size: clamp(4rem, 6.6vw, 6.25rem);
  font-weight: 300;
  font-stretch: 125%;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.edu-school {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 750;
  font-stretch: 104%;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.edu-place { margin-top: 6px; color: var(--ink-3); font-weight: 500; }
.edu-degree {
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule-soft);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 650;
  line-height: 1.3;
}
.edu-sub { margin-top: 28px; color: var(--ink-3); }
.edu-certs { margin-top: 10px; }
.edu-certs li {
  padding: 11px 0;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-2);
  font-weight: 500;
}
.edu-certs li:last-child { border-bottom: 1px solid var(--rule-soft); }

@media (min-width: 900px) {
  .edu { grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .edu-when { grid-column: 1 / span 3; }
  .edu-main { grid-column: 4 / -1; }
}

/* ---------- Contact ---------- */

.contact {
  margin-top: clamp(72px, 9vw, 136px);
  background: var(--accent);
  color: var(--on-accent);
  padding: clamp(28px, 3vw, 40px) 0 clamp(56px, 7vw, 104px);
}
.contact :focus-visible { outline-color: var(--on-accent); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 28px;
}
.contact .section-num { color: var(--on-accent-2); }
.contact-statement {
  font-size: clamp(1.875rem, 4.6vw, 4.25rem);
  font-weight: 350;
  font-stretch: 104%;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 13em;
}
.contact-statement strong {
  color: var(--on-accent);
  font-weight: 800;
  font-stretch: 112%;
  white-space: nowrap;
}
.contact-mail {
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  font-size: clamp(1.25rem, 6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.contact-mail a { text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.contact-mail a:hover { text-decoration-thickness: 4px; }
.contact .cta-row { margin-top: 28px; }
.contact-note { margin-top: 20px; color: var(--on-accent-2); font-size: 0.9375rem; }

@media (max-width: 559px) {
  .contact .cta-row { flex-direction: column; }
  .contact .btn { width: 100%; justify-content: space-between; }
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .contact-head { grid-column: 1 / span 4; }
  .contact-body { grid-column: 5 / -1; }
}

/* ---------- Footer ---------- */

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 14px 18px;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.footer-links a:hover { color: var(--accent-ink); text-decoration: underline; }
@media (max-width: 559px) {
  .footer-bar { flex-direction: column-reverse; align-items: flex-start; }
  .footer-copy { padding-bottom: 6px; }
}

/* ---------- 404 page ---------- */

.nf { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.nf main { flex: 1; }
.nf-grid { display: grid; gap: 28px; padding-block: clamp(40px, 8vw, 112px); align-content: start; }
.nf-label { color: var(--accent-ink); }
.nf-code {
  font-size: clamp(5rem, 38vw, 20rem);
  white-space: nowrap;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 0.8;
  letter-spacing: -0.06em;
  margin-left: -0.02em;
}
.nf-code span { color: var(--accent-ink); }
.nf-panel { background: var(--accent); color: var(--on-accent); padding: 24px 22px 26px; }
.nf-panel :focus-visible { outline-color: var(--on-accent); }
.nf-panel h1 {
  font-size: clamp(1.625rem, 3vw, 2.5rem);
  font-weight: 750;
  font-stretch: 106%;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.nf-panel p { margin-top: 12px; color: var(--on-accent-2); font-size: 1.0625rem; max-width: 30em; }
.nf-panel .cta-row { margin-top: 24px; }
@media (max-width: 559px) {
  .nf-panel .cta-row { flex-direction: column; }
  .nf-panel .btn { width: 100%; justify-content: space-between; }
}
@media (min-width: 900px) {
  .nf-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
  .nf-label { grid-column: 1 / -1; }
  /* "404." is about 2.19em wide; 23vw keeps it inside its 7-column cell from 900px up */
  .nf-code { grid-column: 1 / span 7; font-size: min(20rem, 23vw); }
  .nf-panel { grid-column: 8 / -1; padding: 28px 30px 32px; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-title .line,
  .hero-status,
  .hero-lead {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-title .line:nth-child(2) { animation-delay: 0.07s; }
  .hero-status { animation-delay: 0.14s; }
  .hero-lead { animation-delay: 0.18s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

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

/* ---------- Print ---------- */

@media print {
  :root {
    --paper: #ffffff; --ink: #000000; --ink-2: #222222; --ink-3: #444444;
    --rule: #000000; --rule-soft: #bbbbbb; --chip-line: #bbbbbb;
    --accent: #ffffff; --accent-ink: #000000; --on-accent: #000000; --on-accent-2: #222222;
    --on-accent-line: #bbbbbb;
  }
  .site-header, .section-strip, .skip-link, .cta-row, .hero-links, .status-art, .project-icon, .site-footer { display: none; }
  .site-header { position: static; }
  .hero-status, .project--feature, .contact { border: 1px solid #000000; }
  .section-head { position: static; }
  .hero-title .line, .hero-status, .hero-lead { animation: none; }
}
