/* ============================================================================
   Oluwasanu Temitope Emmanuel — Project Finance & Energy Infrastructure
   main.css

   Design system
   -------------
   The page borrows the vernacular of the documents this audience reads every
   day: the information memorandum, the tombstone and the term sheet. Content is
   set as records with labelled fields and hairline rules rather than as
   decorated cards. One accent (brass) carries emphasis; everything else is
   navy, graphite and cool paper.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Fonts */

@font-face {
  font-family: 'Spectral';
  src: url('../assets/fonts/spectral-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Spectral';
  src: url('../assets/fonts/spectral-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-latin-wght.woff2') format('woff2-variations'),
       url('../assets/fonts/archivo-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- 2. Tokens */

:root {
  /* Palette */
  --ink: #0b1a26;
  --ink-2: #0f2a40;
  --ink-3: #16334b;
  --graphite: #22323d;
  --slate: #55636e;
  --slate-lt: #8a99a4;
  --paper: #f4f6f7;
  --surface: #ffffff;
  --rule: #dbe1e5;
  --rule-strong: #c3ccd2;
  --rule-dark: #24405a;
  --brass: #a97a3f;
  --brass-lt: #c9a263;
  --on-dark: #eef3f6;
  --on-dark-mute: #9fb3c1;

  /* Type */
  --serif: 'Spectral', 'Iowan Old Style', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-display: clamp(2.4rem, 5.4vw, 4.05rem);
  --fs-h2: clamp(1.7rem, 3.2vw, 2.55rem);
  --fs-h3: clamp(1.15rem, 1.5vw, 1.35rem);
  --fs-lead: clamp(1.08rem, 1.5vw, 1.3rem);
  --fs-body: 1.0325rem;
  --fs-small: 0.875rem;
  --fs-label: 0.6875rem;

  /* Layout */
  --shell: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --stack: clamp(2rem, 4vw, 3.25rem);

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

/* ---------------------------------------------------------------- 3. Reset */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.14;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

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

img, svg { display: block; max-width: 100%; }

ul, ol { margin: 0; padding: 0; list-style: none; }

table { border-collapse: collapse; width: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

.dark :focus-visible { outline-color: var(--brass-lt); }

::selection { background: var(--ink-2); color: #fff; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  padding: 0.8rem 1.2rem;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-small);
  font-weight: 600;
  transition: top 0.18s var(--ease);
}

.skip-link:focus { top: 0.75rem; }

/* ------------------------------------------------------ 4. Shared elements */

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

.section { padding-block: var(--section-y); }

.section + .section { border-top: 1px solid var(--rule); }

.label {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

.serif { font-family: var(--serif); }

/* Section heading: index number, title, standfirst — the contents structure
   of a document, carried through to the page. */
.section-head {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
  margin-bottom: var(--stack);
}

.section-head__index {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--brass);
  letter-spacing: 0.04em;
  padding-top: 0.35rem;
}

.section-head__title {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 20ch;
}

.section-head__note {
  font-size: var(--fs-small);
  color: var(--slate);
  line-height: 1.6;
  padding-top: 0.4rem;
}

.section-head__note strong {
  display: block;
  color: var(--graphite);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.5rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}

.btn--solid { background: var(--ink); color: var(--on-dark); }
.btn--solid:hover { background: var(--ink-3); }

.btn--outline { border-color: var(--rule-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: rgba(15, 42, 64, 0.04); }

.btn--light { background: var(--on-dark); color: var(--ink); }
.btn--light:hover { background: #fff; }

.btn--ghost {
  border-color: rgba(190, 213, 227, 0.4);
  color: var(--on-dark);
}
.btn--ghost:hover {
  border-color: var(--brass-lt);
  color: #fff;
}

.btn__meta {
  font-weight: 400;
  font-size: 0.75rem;
  color: currentColor;
  opacity: 0.62;
}

/* ------------------------------------------------------------ 5. Masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 246, 247, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.masthead.is-stuck {
  border-bottom-color: var(--rule);
  background: rgba(244, 246, 247, 0.97);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.identity {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding-block: 0.9rem;
}

.identity__name {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.identity__suffix {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--brass);
}

.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.9rem); }

.primary-nav__link {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--slate);
  padding-block: 1.6rem;
  transition: color 0.18s var(--ease);
}

.primary-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transition: transform 0.22s var(--ease);
}

.primary-nav__link:hover { color: var(--ink); }

.primary-nav__link[aria-current='true'] { color: var(--ink); }
.primary-nav__link[aria-current='true']::after { transform: scaleX(1); }

.nav-cv {
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--rule-strong);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-cv:hover { border-color: var(--ink); background: rgba(15, 42, 64, 0.05); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--rule-strong);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 9px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------------------------------------------------------------- 6. Cover */

.cover {
  position: relative;
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
}

/* Drawing-grid ground: the surface of an engineering sheet, at the threshold
   of visibility. */
.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(159, 179, 193, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 179, 193, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 25% 15%, #000 30%, transparent 78%);
  pointer-events: none;
}

.cover__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.cover__rule {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.cover__rule span {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.015em;
  color: var(--on-dark-mute);
  white-space: nowrap;
}

.cover__rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--brass) 0 72px, var(--rule-dark) 72px);
}

.cover h1 {
  font-family: var(--serif);
  font-size: var(--fs-display);
  letter-spacing: -0.022em;
  color: #fff;
  max-width: 14ch;
}

.cover__standfirst {
  margin-top: 1.4rem;
  max-width: 52ch;
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--on-dark-mute);
}

.cover__standfirst strong { color: var(--on-dark); font-weight: 500; }

.cover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Portrait — framed as a plate, not dropped on the page */
.portrait {
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(100%, 22rem);
}

.portrait__frame {
  position: relative;
  border: 1px solid var(--rule-dark);
  padding: 0.75rem;
  background: linear-gradient(160deg, rgba(22, 51, 75, 0.55), rgba(11, 26, 38, 0.2));
}

.portrait__frame img {
  width: 100%;
  height: auto;                 /* let the ratio govern, not the HTML height attribute */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
  filter: saturate(0.94) contrast(1.02);
}

.portrait__frame::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  width: 64px;
  height: 2px;
  background: var(--brass);
}

.portrait__caption {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-dark);
  font-size: var(--fs-small);
  color: var(--on-dark-mute);
}

.portrait__caption b {
  color: var(--on-dark);
  font-weight: 600;
  white-space: nowrap;
}

/* Figures band closing the cover */
.facts {
  position: relative;
  border-top: 1px solid var(--rule-dark);
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.facts__item {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 2rem) clamp(1.5rem, 3vw, 2.25rem) 0;
  border-right: 1px solid var(--rule-dark);
}

.facts__item:last-child { border-right: 0; }
.facts__item + .facts__item { padding-left: clamp(1rem, 2vw, 2rem); }

.facts__value {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.facts__value sup {
  font-family: var(--sans);
  font-size: 0.5em;
  font-weight: 500;
  color: var(--brass-lt);
  top: -0.9em;
  margin-left: 0.15em;
}

.facts__value sup a { color: inherit; }

.facts__label {
  margin-top: 0.6rem;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--on-dark-mute);
  max-width: 26ch;
}

/* ------------------------------------------------------------- 7. Contents */

.contents {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.contents__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.25rem, 3vw, 2.75rem);
  padding-block: 1.05rem;
}

.contents__item a {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding-block: 0.35rem;
  font-size: var(--fs-small);
  color: var(--slate);
  transition: color 0.18s var(--ease);
}

.contents__item a:hover { color: var(--ink); }

.contents__item i {
  font-family: var(--serif);
  font-style: normal;
  font-size: 0.75rem;
  color: var(--brass);
}

/* -------------------------------------------------------------- 8. Profile */

.profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.profile__lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: 1.6rem;
  max-width: 34ch;
}

.profile__body p {
  max-width: 62ch;
  color: var(--slate);
}

.profile__body strong { color: var(--graphite); font-weight: 600; }

/* Capability register — a labelled index, not a tag cloud */
.register { border-top: 1px solid var(--rule); }

.register__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.register__key {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--slate);
}

.register__value {
  font-size: var(--fs-small);
  color: var(--graphite);
  line-height: 1.55;
}

/* ----------------------------------------------------------- 9. Experience */

.roles { border-top: 1px solid var(--rule); }

.role {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.role__meta { position: relative; }

.role__period {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.role__place {
  margin-top: 0.35rem;
  font-size: var(--fs-small);
  color: var(--slate);
}

.role__status {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--brass);
  color: var(--brass);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.role__title {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  color: var(--ink);
  letter-spacing: -0.005em;
}

.role__org {
  margin-top: 0.4rem;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--brass);
  letter-spacing: 0.02em;
}

.role__summary {
  margin-top: 1rem;
  max-width: 68ch;
  color: var(--slate);
}

.role__detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0 clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
}

.role__detail h4 {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.7rem;
}

.role__detail li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--graphite);
}

.role__detail li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 1px;
  background: var(--brass);
}

.role__detail li:last-child { margin-bottom: 0; }

/* Earlier roles disclosure */
.earlier { margin-top: 2.25rem; }

.earlier > summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.earlier > summary::-webkit-details-marker { display: none; }

.earlier > summary::after {
  content: '';
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 1.5px solid var(--brass);
  border-bottom: 1.5px solid var(--brass);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s var(--ease);
}

.earlier[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.earlier > summary:hover { color: var(--brass); }

.earlier__body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.earlier__item h4 {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.earlier__item .role__org { font-size: 0.8rem; }

.earlier__item p {
  margin-top: 0.6rem;
  font-size: var(--fs-small);
  color: var(--slate);
}

/* Career record photographs */
.record-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.record-images figure {
  position: relative;
  margin: 0;
  background: var(--ink);
}

.record-images img {
  width: 100%;
  height: clamp(15rem, 26vw, 20rem);
  object-fit: cover;
  opacity: 0.9;
}

.record-images figure:first-child img { object-position: center 18%; }
.record-images figure:last-child img { object-position: center 42%; }

.record-images figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3.5rem 1.35rem 1.2rem;
  background: linear-gradient(transparent, rgba(11, 26, 38, 0.92));
  color: var(--on-dark);
}

.record-images figcaption b {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.record-images figcaption span {
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-lt);
}

/* -------------------------------------------------------- 10. Transactions */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filters__legend {
  margin-right: 0.5rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--slate);
}

.filter {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--rule-strong);
  font-size: var(--fs-small);
  color: var(--slate);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background-color 0.18s var(--ease);
}

.filter:hover { color: var(--ink); border-color: var(--ink); }

.filter[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

.deals { border-top: 1px solid var(--rule); }

/* A transaction record: value, mandate, contribution, terms. */
.deal {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) minmax(0, 17rem);
  gap: clamp(1.25rem, 3.5vw, 3rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.2s var(--ease);
}

.deal:hover { background: var(--surface); }

.deal[hidden] { display: none; }

.deal__value {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.3vw, 1.85rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.012em;
}

.deal__value em {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 0.55rem;
}

.deal__client {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  color: var(--ink);
}

.deal__mandate {
  margin-top: 0.35rem;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--brass);
}

.deal__note {
  margin-top: 0.9rem;
  max-width: 56ch;
  font-size: var(--fs-small);
  color: var(--slate);
  line-height: 1.6;
}

.terms { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; }

.terms dt {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-lt);
  padding-top: 0.15rem;
}

.terms dd {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--graphite);
  text-align: right;
}

.footnotes {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.5rem;
  max-width: 78ch;
}

.footnotes li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--slate);
}

.footnotes b { color: var(--brass); font-weight: 600; }

/* ------------------------------------------------------------ 11. Modelling */

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

.model {
  background: var(--surface);
  padding: clamp(1.5rem, 2.6vw, 2rem);
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
  row-gap: 0;
}

.model__kind {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brass);
}

.model__name {
  margin-top: 0.7rem;
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--ink);
  line-height: 1.25;
}

.model__desc {
  margin-top: 0.8rem;
  font-size: var(--fs-small);
  color: var(--slate);
}

.model__spec {
  margin-top: 0;
  padding-top: 1.2rem;
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0.55rem;
}

.model__spec > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
}

.model__spec dt {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate-lt);
}

.model__spec dd { margin: 0; color: var(--graphite); line-height: 1.5; }

/* Schematics */
.schematics {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.schematic {
  margin: 0;
  padding: clamp(1.25rem, 2.5vw, 1.85rem);
  background: var(--ink);
  color: var(--on-dark);
}

.schematic__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-dark);
}

.schematic__head h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: #fff;
}

.schematic__head span {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brass-lt);
  white-space: nowrap;
}

.schematic svg { width: 100%; height: auto; }

.schematic figcaption {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--on-dark-mute);
}

/* SVG theming */
.svg-box { fill: none; stroke: #3d5f7d; stroke-width: 1; }
.svg-box--key { fill: rgba(169, 122, 63, 0.1); stroke: var(--brass-lt); }
.svg-line { stroke: #3d5f7d; stroke-width: 1; fill: none; }
.svg-line--accent { stroke: var(--brass-lt); stroke-width: 1.5; }
.svg-line--dash { stroke-dasharray: 3 3; }
.svg-fill { fill: rgba(159, 179, 193, 0.16); }
.svg-fill--accent { fill: rgba(201, 162, 99, 0.22); }
.svg-text {
  fill: #cfdde6;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
}
.svg-text--sm { font-size: 9.5px; fill: #8fa7b8; letter-spacing: 0.06em; }
.svg-text--accent { fill: var(--brass-lt); }

/* ------------------------------------------------------------ 12. Coverage */

.coverage-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.coverage-hint {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--slate);
}

.coverage { min-width: 40rem; font-size: var(--fs-small); }

.coverage caption {
  text-align: left;
  font-size: var(--fs-small);
  color: var(--slate);
  padding-bottom: 1rem;
}

.coverage th,
.coverage td {
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  vertical-align: middle;
}

.coverage thead th {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.coverage tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  padding-left: 0;
  white-space: nowrap;
}

.coverage tbody th small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 0.15rem;
}

.mark {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--rule-strong);
}

.mark--full { background: var(--ink); border-color: var(--ink); }
.mark--part { background: var(--brass); border-color: var(--brass); opacity: 0.55; }

.coverage-key {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--slate);
}

.coverage-key span { display: inline-flex; align-items: center; gap: 0.45rem; }

/* --------------------------------------------------------- 13. Credentials */

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

.cred-block h3 {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 0.4rem;
}

.cred {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.cred__key {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brass);
}

.cred__title { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }

.cred__body {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--slate);
  line-height: 1.5;
}

.certs { columns: 2; column-gap: 2rem; }

.certs li {
  break-inside: avoid;
  padding-block: 0.5rem;
  font-size: 0.83rem;
  color: var(--graphite);
  line-height: 1.45;
}

.certs li span { display: block; color: var(--slate); font-size: 0.78rem; }

/* ----------------------------------------------------------- 14. Viewpoint */

.viewpoint {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.viewpoint__item { border-top: 2px solid var(--ink); padding-top: 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; align-items: start; }

.viewpoint__item h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.7rem;
  max-width: 22ch;
}

.viewpoint__item p { font-size: var(--fs-small); color: var(--slate); max-width: 72ch; }

/* ------------------------------------------------------------- 15. Contact */

.contact {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  color: #fff;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.contact p {
  margin-top: 1.25rem;
  max-width: 52ch;
  color: var(--on-dark-mute);
}

.contact__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.contact__list { border-top: 1px solid var(--rule-dark); }

.contact__list > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule-dark);
  align-items: baseline;
}

.contact__list dt {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
}

.contact__list dd { margin: 0; font-size: var(--fs-small); color: var(--on-dark); }

.contact__list a { border-bottom: 1px solid var(--rule-dark); transition: border-color 0.2s var(--ease); }
.contact__list a:hover { border-color: var(--brass-lt); }

/* -------------------------------------------------------------- 16. Footer */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-mute);
  border-top: 1px solid var(--rule-dark);
  padding-block: 2rem;
  font-size: 0.8rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer a:hover { color: var(--on-dark); }

/* ------------------------------------------------------- 17. Cover entrance
   One orchestrated sequence on load. Nothing else on the page animates on
   scroll. */

@media (prefers-reduced-motion: no-preference) {
  .cover__inner > * > .anim,
  .cover__inner > .anim {
    opacity: 0;
    transform: translateY(14px);
    animation: settle 0.75s var(--ease) forwards;
  }

  .anim--1 { animation-delay: 0.05s; }
  .anim--2 { animation-delay: 0.16s; }
  .anim--3 { animation-delay: 0.27s; }
  .anim--4 { animation-delay: 0.38s; }
  .anim--5 { animation-delay: 0.46s; }
}

@keyframes settle {
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- 18. Responsive */

@media (max-width: 1080px) {
  .cover__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr); }
  .deal { grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 14rem); }
  .section-head { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 18rem); }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 78px; }

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

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }

  .primary-nav.is-open { display: flex; }

  .primary-nav__link {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--rule);
    font-size: 1rem;
  }

  .primary-nav__link::after { display: none; }
  .primary-nav__link[aria-current='true'] { color: var(--brass); }

  .nav-cv { margin-top: 1.1rem; text-align: center; }

  .cover__inner { grid-template-columns: 1fr; gap: 3rem; }
  /* Phone: the positioning statement leads; the portrait follows it. */
  .portrait { justify-self: start; width: min(100%, 19rem); }
  .cover h1 { max-width: 18ch; }

  .facts__grid { grid-template-columns: 1fr 1fr; }
  .facts__item:nth-child(2n) { border-right: 0; }
  .facts__item:nth-child(-n + 2) { border-bottom: 1px solid var(--rule-dark); }
  .facts__item:nth-child(2n + 1) { padding-left: 0; }

  .section-head {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 1rem 1.5rem;
  }
  .section-head__note { grid-column: 2; }

  .profile__grid { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 1rem; }
  .role__meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
  .role__place::before { content: '/ '; color: var(--rule-strong); }
  .role__status { margin-top: 0; }

  .deal { grid-template-columns: 1fr; gap: 1.25rem; }
  .deal__value { display: flex; align-items: baseline; gap: 0.75rem; }
  .deal__value em { margin-top: 0; }
  .terms { max-width: 24rem; }

  .schematics { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --fs-body: 1rem; }

  .identity__name { font-size: 0.95rem; }
  .contents__list { gap: 0 1.25rem; }
  .facts__grid { grid-template-columns: 1fr; }
  .facts__item { border-right: 0; padding-left: 0 !important; }
  .facts__item + .facts__item { border-top: 1px solid var(--rule-dark); }
  .facts__item:nth-child(-n + 2) { border-bottom: 0; }
  .certs { columns: 1; }
  .coverage-hint { display: block; }
  .cover__actions .btn { flex: 1 1 auto; justify-content: center; }
  .terms { grid-template-columns: auto 1fr; }
}

/* ------------------------------------------------------------ 19. Motion & print */

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

@media print {
  .masthead,
  .contents,
  .filters,
  .cover__actions,
  .contact__actions,
  .record-images { display: none; }

  body { background: #fff; color: #000; font-size: 10.5pt; }
  .cover, .contact, .schematic { background: #fff !important; color: #000 !important; }
  .cover h1, .contact h2, .facts__value { color: #000; }
  .section { padding-block: 1.5rem; break-inside: avoid; }
  .deal, .role { break-inside: avoid; }
  a { text-decoration: underline; }
}

/* Consistent paragraph edges and aligned portfolio specifications. */
.cover__standfirst, .profile__body p, .section-head__note,
.role__summary, .model__desc, .viewpoint__body p, .contact__grid > div > p {
  text-align: justify;
  text-align-last: start;
  hyphens: auto;
}
.viewpoint__body p + p { margin-top: 1rem; }
.model__spec > div { align-items: baseline; }
@media (max-width: 640px) {
  .viewpoint__item { grid-template-columns: 1fr; gap: 0.5rem; }
  .model__spec > div { grid-template-columns: 5.5rem minmax(0, 1fr); }
}
