/* ==========================================================================
   Ítalo Ferreira — site stylesheet

   Two palettes, one set of components: the home runs on .theme-dark, every
   inner page on .theme-light. Both themes redefine the same custom properties,
   so no component ever hard-codes a colour.
   ========================================================================== */

/* --------------------------------------------------------------- tokens --- */

:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --accent: oklch(0.55 0.24 263);
  --accent-fg: oklch(0.98 0.005 250);
  --ok: oklch(0.6 0.16 155);

  --shell: 84rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --radius: 0.25rem;
}

.theme-dark {
  --bg: oklch(0.145 0.012 265);
  --surface: oklch(0.145 0.012 265);
  --fg: oklch(0.95 0.005 250);
  --fg-body: oklch(0.78 0.015 265);
  --fg-muted: oklch(0.7 0.015 265);
  --fg-dim: oklch(0.62 0.015 265);
  --fg-faint: oklch(0.58 0.015 265);
  --accent-text: oklch(0.72 0.16 262);
  --ok: oklch(0.78 0.17 155);

  --line: oklch(1 0 0 / 10%);
  --line-soft: oklch(1 0 0 / 8%);
  --line-strong: oklch(1 0 0 / 18%);
  --header-bg: oklch(0.145 0.012 265 / 92%);

  --field-bg: oklch(1 0 0 / 4%);
  --field-line: oklch(1 0 0 / 18%);
  --tag-line: oklch(1 0 0 / 12%);
  --ghost-line: oklch(1 0 0 / 25%);
}

.theme-light {
  --bg: oklch(0.975 0.003 265);
  --surface: oklch(0.975 0.003 265);
  --fg: oklch(0.23 0.015 265);
  --fg-body: oklch(0.36 0.012 265);
  --fg-muted: oklch(0.44 0.012 265);
  --fg-dim: oklch(0.48 0.012 265);
  --fg-faint: oklch(0.52 0.012 265);
  --accent-text: oklch(0.52 0.23 263);

  --line: oklch(0.23 0.015 265 / 14%);
  --line-soft: oklch(0.23 0.015 265 / 10%);
  --line-strong: oklch(0.23 0.015 265 / 28%);
  --header-bg: oklch(0.975 0.003 265 / 92%);

  --field-bg: oklch(1 0 0);
  --field-line: oklch(0.23 0.015 265 / 20%);
  --tag-line: oklch(0.23 0.015 265 / 18%);
  --ghost-line: oklch(0.23 0.015 265 / 28%);
}

/* ------------------------------------------------------------- elements --- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--accent-text); }

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

main { flex: 1 1 auto; }

input, textarea, button, select { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-fg);
  /* Moved out vertically, never horizontally — a negative left can widen the
     page on some browsers. */
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; color: var(--accent-fg); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------- layout --- */

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

.section { padding-block: var(--section-y); }
.section--rule { border-bottom: 1px solid var(--line); }

/* A full-bleed rule that still keeps the content inside the shell. */
.bleed-rule { border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------- typography --- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.eyebrow--accent { color: var(--accent-text); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 2.5rem;
}

.section-head__number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-text);
}

.section-head__title { font-size: 1.375rem; }
.section-head--tight { margin-bottom: 0; }
.section-foot { margin-top: 1.5rem; }
.section-foot--lg { margin-top: 2.5rem; }

/* An eyebrow always introduces the block that follows it. */
.eyebrow + .cards,
.eyebrow + .rows,
.eyebrow + .steps,
.eyebrow + .checklist { margin-top: 1.75rem; }

.section-head__note {
  font-size: 0.8125rem;
  color: var(--fg-dim);
  max-width: 48ch;
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--fg-body);
}

/* -------------------------------------------------------------- buttons --- */

.btn {
  display: inline-block;
  padding: 0.8125rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--solid {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn--solid:hover {
  background: oklch(0.49 0.24 263);
  color: var(--accent-fg);
}

.btn--outline {
  border: 1px solid var(--ghost-line);
  color: var(--fg);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.btn[disabled] { opacity: 0.55; cursor: progress; }

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.link-rule {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--tag-line);
  border-radius: var(--radius);
  color: var(--fg-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* --------------------------------------------------------- site header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.125rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--fg);
}

.brand:hover { color: var(--fg); }

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand__mark img {
  height: 1.5rem;
  width: auto;
  display: block;
}

/* The mark is white — on the light theme it needs its own dark chip. */
.theme-light .brand__mark {
  background: oklch(0.145 0.012 265);
  border-radius: var(--radius);
  padding: 0.4375rem 0.5rem;
}

.theme-light .brand__mark img { height: 1.25rem; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem clamp(0.75rem, 2vw, 1.75rem);
  color: var(--fg-muted);
}

.site-nav__link--accent { color: var(--accent-text); }

.site-nav__link.is-current {
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* Hamburger that morphs into an X. Only shown by the mobile menu query. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6875rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.375rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nav-toggle__icon {
  position: relative;
  transition: background-color 0s linear 0.1s;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  transition: transform 0.2s ease;
}

.nav-toggle__icon::before { transform: translateY(-7px); }
.nav-toggle__icon::after { transform: translateY(7px); }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  background-color: transparent;
  transition-delay: 0s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: rotate(-45deg); }

/* ----------------------------------------------------------- home: hero --- */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.hero__title {
  font-size: clamp(2.25rem, 1.2rem + 3.4vw, 3.25rem);
  max-width: 18ch;
}

.hero__lead {
  margin-top: 1.75rem;
  max-width: 54ch;
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.hero__facts {
  border-left: 2px solid var(--accent);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.fact-row:last-of-type { border-bottom: 0; }
.fact-row dt, .fact-row__label { color: var(--fg-dim); }
.fact-row dd, .fact-row__value { margin: 0; text-align: right; }
.fact-row__value--ok { color: var(--ok); }

.hero__portrait {
  margin-top: 2rem;
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(1);
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

/* ---------------------------------------------------------- data tables --- */

/* Shared three-column rhythm used by services, roles and the stack. */
.rows { display: block; }

.row-head,
.row {
  display: grid;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.row-head {
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.row {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9375rem;
}

.rows--services .row-head,
.rows--services .row { grid-template-columns: minmax(9rem, 14rem) minmax(0, 1.4fr) minmax(0, 1fr); }

.rows--roles .row-head,
.rows--roles .row {
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: baseline;
  padding-block: 1.125rem;
}

.rows--stack .row-head,
.rows--stack .row { grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); }

.rows--projects .row-head { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr) minmax(0, 1fr); }

.row__key { font-weight: 600; }
.row__value { color: var(--fg-body); line-height: 1.7; }
.row__meta { color: var(--fg-dim); line-height: 1.7; }
.row__period { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--fg-dim); }
.row__group { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent-text); }

/* A promotion inside the same company reads as one block: the row above drops
   its rule and the continuation row sits tight against it, with the repeated
   company name de-emphasised so the progression shows instead of two jobs. */
.rows--roles .row--joined { border-bottom: 0; padding-bottom: 0.375rem; }
.rows--roles .row--sub { padding-top: 0.375rem; }
.rows--roles .row--sub .row__key { font-weight: 400; color: var(--fg-dim); }

/* -------------------------------------------------------- home: projects --- */

.projects { display: block; }

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.project:last-child { border-bottom: 0; }
.project__name { font-size: 1.0625rem; font-weight: 600; }

.project__meta {
  margin-top: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
}

.project__description {
  color: var(--fg-body);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.metric + .metric { margin-top: 1rem; }

.metric__value {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--accent-text);
  line-height: 1.1;
}

.metric__label {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.project__aside-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}

.note {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--fg-dim);
  max-width: 60ch;
  line-height: 1.7;
}

/* ---------------------------------------------------------- testimonials --- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.quote {
  margin: 0;
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quote__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 0.9rem + 0.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--fg);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1.25rem;
}

.quote__by {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--fg-dim);
}

.quote__name { color: var(--fg); }

/* ------------------------------------------------------- home: contact cta --- */

.cta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.cta__title { font-size: clamp(1.625rem, 1rem + 2vw, 2rem); }

.cta__text {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg-muted);
  max-width: 48ch;
}

.cta__channels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.cta__email {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3vw, 1.25rem);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.375rem;
  word-break: break-all;
}

.cta__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

/* ------------------------------------------------------------ page hero --- */

.page-hero {
  padding-block: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.page-hero__title {
  margin-top: 1.25rem;
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3rem);
  max-width: 22ch;
}

.page-hero__lead {
  margin-top: 1.25rem;
  max-width: 56ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--fg-muted);
}

/* The rule under the hero spans the viewport, not just the shell. */
.page-hero-wrap { border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------- about --- */

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

.about__portrait {
  width: 100%;
  max-width: 20rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(1) contrast(1.03);
  border: 1px solid var(--line);
}

.about__facts {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 2;
  color: var(--fg-dim);
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--fg-body);
  max-width: 60ch;
}

.beliefs { margin-top: 1rem; padding-top: 2rem; border-top: 1px solid var(--line); }

.beliefs__list li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1rem;
}

.beliefs__list li:last-child { border-bottom: 0; }

.beliefs__number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-text);
}

/* ------------------------------------------------------------- services --- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--surface);
  padding: 1.5rem;
}

.card__number { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-text); }
.card__title { margin-top: 0.75rem; font-size: 1.0625rem; font-weight: 600; }

.card__text {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-muted);
}

/* -------------------------------------------------------------- process --- */

.step {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr) minmax(0, 0.7fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}

.step:last-child { border-bottom: 0; }
.step__number { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-text); }
.step__title { margin-top: 0.625rem; font-size: 1.25rem; }
.step__text { font-size: 1rem; line-height: 1.8; color: var(--fg-body); }

.step__aside {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--fg-dim);
}

.step__timeframe { color: var(--fg); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.checklist li {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-body);
}

.checklist li:last-child { border-bottom: 0; }

.callout {
  border-left: 2px solid var(--accent);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}

.callout__title { font-size: clamp(1.5rem, 1rem + 1.6vw, 1.875rem); max-width: 22ch; }
.callout__text { margin-top: 1rem; font-size: 1rem; line-height: 1.75; color: var(--fg-muted); max-width: 46ch; }
.callout__action { margin-top: 2rem; }

/* -------------------------------------------------------------- contact --- */

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

.form { display: flex; flex-direction: column; gap: 1.25rem; }

.form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: 1.25rem;
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--field-bg);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.field textarea { resize: vertical; min-height: 9rem; }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.field--invalid input,
.field--invalid textarea { border-color: oklch(0.55 0.2 25); }

.field__error {
  font-size: 0.8125rem;
  color: oklch(0.55 0.2 25);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.consent input { margin-top: 0.25rem; flex: 0 0 auto; }
.consent.field--invalid { color: oklch(0.55 0.2 25); }
.consent.field--invalid input { outline: 2px solid oklch(0.55 0.2 25); outline-offset: 2px; }

/* Honeypot: present in the DOM, invisible to people, no effect on layout. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.form__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
}

.form__status--ok { color: var(--ok); }
.form__status--error { color: oklch(0.55 0.2 25); }

.contact__aside { display: flex; flex-direction: column; gap: 2rem; }

.contact__email {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.25rem;
  word-break: break-all;
}

.contact__portrait {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(1);
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

/* -------------------------------------------------------------- privacy --- */

.prose { max-width: 56rem; margin-inline: auto; }

.prose__block {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.prose__block h2 { font-size: 1.125rem; }

.prose__block p {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--fg-body);
}

.prose__updated {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
}

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

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent-text);
}

.error-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------- footer --- */

.footer {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 2.5rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--line);
}

.footer--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-faint);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__intro { max-width: 26rem; }

.footer__logo {
  display: inline-flex;
  align-items: center;
  background: oklch(0.145 0.012 265);
  border-radius: 0.375rem;
  padding: 0.875rem 1.125rem;
}

.footer__logo img { height: 2.25rem; width: auto; display: block; }

.footer__intro p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--fg-muted);
}

.footer__nav,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}

.footer__contact a { word-break: break-word; }

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* ---------------------------------------------------------- responsive --- */

/* The multi-column data rows are a desktop rhythm. Below this width they
   collapse to a single stacked column, with the header row hidden since each
   value then carries its own label from the markup. */
@media (max-width: 60rem) {
  .rows--services .row-head,
  .rows--roles .row-head,
  .rows--stack .row-head,
  .rows--projects .row-head { display: none; }

  .rows--services .row,
  .rows--roles .row,
  .rows--stack .row,
  .project,
  .step {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.625rem;
  }

  .rows--roles .row { gap: 0.25rem; }
  .row__value, .row__meta { font-size: 0.9375rem; }
  .project { padding-block: 1.5rem; gap: 1rem; }
  .step { gap: 0.875rem; }
  .step__title { margin-top: 0.375rem; }
}

@media (max-width: 44rem) {
  .cards { grid-template-columns: minmax(0, 1fr); }

  .site-header {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
  }

  .footer__top { gap: 2rem; }
  .hero__facts { border-left-width: 2px; }
}

/* Below 64rem the inline nav no longer fits beside the brand, so it becomes a
   panel behind a menu button, filling the screen under the header. Gated on
   scripting: without JavaScript the button can't open anything, so the nav
   stays inline and simply wraps. Keep the width in sync with main.js.

   The panel is absolute, not fixed: the header's backdrop-filter makes it the
   containing block for fixed descendants anyway. Inside an absolute box,
   100% is the header's height, so the panel ends exactly at the viewport's
   bottom edge. */
@media (max-width: 64rem) and (scripting: enabled) {
  .site-header {
    flex-wrap: nowrap;
    padding-block: 0.625rem;
  }

  .site-header.is-open { background: var(--bg); }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 100%);
    height: calc(100dvh - 100%);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--line);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .site-nav__link,
  .site-nav__link.is-current {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1.125rem 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--fg);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-transform: none;
  }

  .site-nav__num {
    min-width: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--fg-faint);
  }

  .site-nav__link.is-current,
  .site-nav__link.is-current .site-nav__num { color: var(--accent-text); }

  /* Contact closes the list as the page's primary action. */
  .site-nav .site-nav__link--accent {
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-fg);
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0;
    transition: background-color 0.15s ease;
  }

  .site-nav .site-nav__link--accent:hover {
    background: oklch(0.49 0.24 263);
    color: var(--accent-fg);
  }

  .site-nav__link--accent .site-nav__num { display: none; }

  html.nav-open { overflow: hidden; }
}

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