/* ==========================================================================
   Mathis Guichard — CV (v2)
   Deep navy · ivory · brass. Hand-written CSS, no framework, no build step.
   ========================================================================== */

/* Fonts — self-hosted (no third-party requests), Latin subset covers EN + FR */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

/* Metric-matched fallbacks: text set in Georgia/Arial before the web fonts load
   takes the same space, so the swap causes no layout shift (CLS). Widths were
   measured in Chrome on real page text. Newsreader's optical sizes run from 91%
   (20px) to 97% (52px) of Georgia's width, so it is tuned for the 24–34px text
   that wraps (lead, entry and card titles). */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 93%;
  ascent-override: 79.03%;
  descent-override: 28.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial");
  size-adjust: 102.3%;
  ascent-override: 94.82%;
  descent-override: 24.44%;
  line-gap-override: 0%;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0a1224;
  --bg-deep: #060c19;
  --surface: #0f1a31;
  --surface-2: #14223f;
  --portrait-tint: #2a3a57;

  /* Lines */
  --line: rgba(226, 219, 201, 0.12);
  --line-strong: rgba(226, 219, 201, 0.22);

  /* Text */
  --text: #ece6d8;
  --text-2: #bab6ab;
  --text-3: #8a90a0;

  /* Accent */
  --brass: #cfa865;
  --brass-strong: #e2c387;
  --brass-ink: #1a1408;
  --brass-tint: rgba(207, 168, 101, 0.12);

  /* Type */
  --font-serif: "Newsreader", "Newsreader Fallback", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(16px, 4.5vw, 48px);
  --header-h: 72px;
  --radius: 14px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Ambient light + film grain, purely decorative */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(1100px 720px at 82% -12%, rgba(54, 92, 162, 0.26), transparent 62%),
    radial-gradient(900px 640px at -12% 34%, rgba(28, 52, 102, 0.28), transparent 62%);
}
body::after {
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 400;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

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

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
}

code {
  font-family: var(--font-mono);
}

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

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

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  background: var(--brass);
  color: var(--brass-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}
.site-header.is-scrolled,
.site-header:has(.site-nav.is-open) {
  background: rgba(7, 12, 25, 0.82);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(207, 168, 101, 0.55);
  border-radius: 50%;
  color: var(--brass-strong);
  font: 500 0.95rem/1 var(--font-serif);
  letter-spacing: 0.03em;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}
.brand:hover .brand__mark {
  background: var(--brass);
  color: var(--brass-ink);
}
.brand__name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav ul {
  display: flex;
  gap: 0.15rem;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-2);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  bottom: 0.25rem;
  left: 0.75rem;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a[aria-current="true"] {
  color: var(--text);
}
.site-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.clock {
  display: none;
  color: var(--text-3);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock time {
  color: var(--text-2);
  font-weight: 500;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.lang a {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}
.lang a:hover {
  color: var(--text);
}
.lang a[aria-current="true"] {
  background: var(--text);
  color: var(--bg);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.menu-toggle .icon {
  width: 22px;
  height: 22px;
}
.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}
.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (min-width: 1240px) {
  .clock {
    display: block;
  }
}

@media (max-width: 1079px) {
  .menu-toggle {
    display: grid;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 0.25rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-deep);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }
  .site-nav.is-open {
    display: block;
    animation: menu-in 0.35s var(--ease-out);
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font: 400 1.35rem/1.2 var(--font-serif);
  }
  .site-nav a::after {
    display: none;
  }
  .site-nav a[aria-current="true"] {
    color: var(--brass-strong);
  }
}

/* Without JavaScript the menu button can't work, so keep the links visible */
@media (max-width: 1079px) and (scripting: none) {
  .menu-toggle {
    display: none;
  }
  .site-header__inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 0.85rem;
  }
  .site-nav {
    position: static;
    display: block;
    order: 3;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
  }
  .site-nav ul {
    flex-flow: row wrap;
    gap: 0 1rem;
  }
  .site-nav a {
    padding: 0.35rem 0;
    border: 0;
    font: 400 0.9rem/1.4 var(--font-sans);
  }
}

@media (max-width: 380px) {
  .brand__name {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font: 600 0.95rem/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease-out);
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--brass);
  color: var(--brass-ink);
}
.btn--primary:hover {
  background: var(--brass-strong);
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(236, 230, 216, 0.5);
  background: rgba(236, 230, 216, 0.04);
}
.btn--sm {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}
.btn--sm .icon {
  width: 16px;
  height: 16px;
}
.btn.is-copied {
  border-color: var(--brass);
  color: var(--brass-strong);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brass);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.text-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease-out);
}
.text-link:hover {
  color: var(--brass-strong);
}
.text-link:hover .icon {
  transform: translate(2px, -2px);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}
.chip-link .icon {
  width: 15px;
  height: 15px;
  color: var(--brass);
}
a.chip-link:hover {
  border-color: var(--brass);
  background: var(--brass-tint);
}
.chip-link--doc {
  border-color: rgba(207, 168, 101, 0.4);
}
.chip-link.is-muted {
  border-style: dashed;
  color: var(--text-3);
}
.chip-link.is-muted .icon {
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6rem);
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

.hero__name {
  margin-top: 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 1.4rem + 8vw, 8rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.hero__name span {
  display: block;
}
.hero__name .surname {
  padding-left: 0.5em;
  font-style: italic;
  font-weight: 300;
}

.hero__lede {
  max-width: 36ch;
  margin-top: 2rem;
  color: var(--text-2);
  font-size: clamp(1.15rem, 1rem + 0.55vw, 1.375rem);
  line-height: 1.5;
}
.hero__lede strong {
  color: var(--text);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.hero .tags {
  margin-top: 1.75rem;
}
.tags li {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.3;
}
.tags--sm li {
  padding: 0.28rem 0.6rem;
  border-color: var(--line);
  background: rgba(236, 230, 216, 0.03);
  font-size: 0.72rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Portrait: B&W photo blended into navy (duotone) with an offset brass frame */
.portrait {
  position: relative;
  width: 100%;
  max-width: 420px;
  isolation: isolate;
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 4 / 5;
  z-index: -1;
  border: 1px solid rgba(207, 168, 101, 0.45);
  border-radius: 4px;
  transform: translate(14px, 14px);
}
.portrait__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  background: var(--portrait-tint);
}
.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
  filter: contrast(1.05) brightness(1.02);
}
.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 12, 25, 0.5), transparent 38%);
  pointer-events: none;
}
.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
  color: var(--text-3);
  font-size: 0.8rem;
}
.portrait figcaption span:last-child {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .portrait {
    justify-self: end;
  }
}
@media (max-width: 899px) {
  /* Leave room for the offset frame inside the gutter */
  .portrait {
    max-width: min(420px, calc(100% - 14px));
  }
}

/* Key figures */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.facts li {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 1.5rem 1rem 0 0;
}
.fact__value {
  font: 400 clamp(2.2rem, 1.7rem + 1.5vw, 3rem)/1 var(--font-serif);
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}
.fact__label {
  max-width: 24ch;
  color: var(--text-3);
  font-size: 0.875rem;
  line-height: 1.45;
}
@media (min-width: 900px) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .facts li + li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--line);
  }
}

/* Entrance — CSS only, so it never depends on JavaScript */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] {
    animation: enter 0.9s var(--ease-out) both;
  }
  [data-enter="2"] {
    animation-delay: 0.08s;
  }
  [data-enter="3"] {
    animation-delay: 0.18s;
  }
  [data-enter="4"] {
    animation-delay: 0.26s;
  }
  [data-enter="5"] {
    animation-delay: 0.34s;
  }
  [data-enter="6"] {
    animation-delay: 0.5s;
  }
  .portrait[data-enter] {
    animation: portrait-in 1.2s var(--ease-out) 0.1s both;
  }
  .portrait[data-enter]::before {
    animation: frame-in 1.2s var(--ease-out) 0.45s both;
  }
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes portrait-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes frame-in {
  from {
    opacity: 0;
    transform: translate(0, 0);
  }
  to {
    opacity: 1;
    transform: translate(14px, 14px);
  }
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(4rem, 7vw, 6.5rem);
  border-top: 1px solid var(--line);
}

.section__grid {
  display: grid;
  gap: 2.5rem 4rem;
}

.section__index {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.section__index::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section__title {
  margin-top: 1rem;
  font: 400 clamp(2.25rem, 1.7rem + 2vw, 3.25rem)/1.05 var(--font-serif);
  letter-spacing: -0.015em;
}

.section__intro {
  max-width: 34ch;
  margin-top: 1rem;
  color: var(--text-2);
  font-size: 0.975rem;
}

@media (min-width: 960px) {
  .section__grid {
    grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr);
  }
  .section__head {
    position: sticky;
    top: calc(var(--header-h) + 40px);
    align-self: start;
  }
  .section__grid--stack {
    grid-template-columns: minmax(0, 1fr);
  }
  .section__grid--stack .section__head {
    position: static;
    display: grid;
    grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr);
    gap: 0 4rem;
    align-items: end;
  }
  .section__grid--stack .section__intro {
    max-width: 52ch;
    margin: 0;
  }
}

.label {
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Profile
   -------------------------------------------------------------------------- */
.profile {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.lead {
  max-width: 34ch;
  font: 400 clamp(1.55rem, 1.2rem + 1.2vw, 2.15rem)/1.3 var(--font-serif);
  letter-spacing: -0.005em;
}
.lead em {
  color: var(--brass-strong);
}

.profile__cols {
  display: grid;
  gap: 2.5rem 3.5rem;
}
@media (min-width: 760px) {
  .profile__cols {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  }
}

.prose {
  display: grid;
  gap: 1.1rem;
  max-width: 68ch;
  color: var(--text-2);
}

.glance {
  align-self: start;
  border-top: 1px solid var(--line);
}
.glance div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.glance dt {
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.glance dd {
  color: var(--text);
}

/* Route: the places lived and studied in */
.route-block .label {
  margin-bottom: 1.5rem;
}
.route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}
.route::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(207, 168, 101, 0.35), var(--brass));
}
.route li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: 1.6rem 1rem 0 0;
}
.route li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  background: var(--bg);
}
.route li:last-child::before {
  background: var(--brass);
  box-shadow: 0 0 0 5px rgba(207, 168, 101, 0.16);
}
.route__year {
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.route__place {
  font: 400 1.3rem/1.2 var(--font-serif);
}
.route__what {
  color: var(--text-3);
  font-size: 0.85rem;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .route {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
    padding-left: 1.75rem;
  }
  .route::before {
    top: 6px;
    right: auto;
    bottom: 6px;
    left: 5px;
    width: 1px;
    height: auto;
    background: linear-gradient(to bottom, rgba(207, 168, 101, 0.35), var(--brass));
  }
  .route li {
    padding: 0;
  }
  .route li::before {
    top: 0.3rem;
    left: -1.75rem;
  }
}

/* --------------------------------------------------------------------------
   Entries (experience & education)
   -------------------------------------------------------------------------- */
.entries {
  padding: 0;
  list-style: none;
}

.entry {
  display: grid;
  gap: 0.6rem 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.entries > li:last-child .entry {
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .entry {
    grid-template-columns: 9.5rem minmax(0, 1fr);
  }
}

.entry__when {
  padding-top: 0.4rem;
  color: var(--text-3);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.entry--current .entry__when {
  color: var(--brass);
  font-weight: 600;
}

.entry__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.entry__titles {
  min-width: 0;
}
.entry__title {
  font: 400 clamp(1.35rem, 1.15rem + 0.6vw, 1.65rem)/1.2 var(--font-serif);
  letter-spacing: -0.005em;
}
.entry__org {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.4rem;
  color: var(--text-2);
  font-size: 0.95rem;
}
.entry__org .place {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-3);
}
.entry__org .place::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.entry__summary {
  max-width: 66ch;
  margin-top: 1rem;
  color: var(--text-2);
}
.entry__summary + .entry__summary {
  margin-top: 0.75rem;
}
.entry__teaser {
  margin-top: 0.75rem;
  color: var(--brass-strong);
  font: italic 300 1.15rem/1.4 var(--font-serif);
}

.logo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-strong);
}
/* Two institutions share the single-logo footprint so titles stay aligned */
.logo-pair {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}
.logo-pair .logo {
  position: absolute;
  width: 31px;
  height: 31px;
  border-radius: 8px;
}
.logo-pair .logo:first-child {
  top: 0;
  left: 0;
}
.logo-pair .logo + .logo {
  right: 0;
  bottom: 0;
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 3px var(--line-strong);
}
.logo--placeholder {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
}
.logo--placeholder .icon {
  width: 20px;
  height: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--current {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--brass-ink);
}
.badge--current::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge--exit {
  border-color: rgba(207, 168, 101, 0.55);
  color: var(--brass-strong);
}
.badge--progress {
  border-color: rgba(236, 230, 216, 0.45);
  color: var(--text);
}
@media (prefers-reduced-motion: no-preference) {
  .badge--current::before {
    animation: pulse 2.4s ease-in-out infinite;
  }
}

/* --------------------------------------------------------------------------
   Disclosure panels ("Read more")
   -------------------------------------------------------------------------- */
.more {
  margin-top: 1rem;
}
.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--brass);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.more > summary::-webkit-details-marker {
  display: none;
}
.more > summary:hover {
  color: var(--brass-strong);
}
.more > summary .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--ease-out);
}
.more[open] > summary .icon {
  transform: rotate(180deg);
}
.more__less,
.more[open] .more__more {
  display: none;
}
.more[open] .more__less {
  display: inline;
}
.more__body {
  display: grid;
  gap: 1rem;
  max-width: 66ch;
  padding-top: 0.5rem;
  color: var(--text-2);
}
.more__body .link-row {
  margin-top: 0.5rem;
}

/* Smooth height animation where the platform supports it */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
  @media (prefers-reduced-motion: no-preference) {
    .more::details-content,
    .faq details::details-content {
      block-size: 0;
      overflow-y: clip;
      transition:
        block-size 0.45s var(--ease-out),
        content-visibility 0.45s allow-discrete;
    }
    .more[open]::details-content,
    .faq details[open]::details-content {
      block-size: auto;
    }
  }
}

/* --------------------------------------------------------------------------
   Certifications
   -------------------------------------------------------------------------- */
.certs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.25rem;
  align-items: start;
  padding: 0;
  list-style: none;
}

.cert {
  display: grid;
  gap: 1.1rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 34, 63, 0.7), rgba(15, 26, 49, 0.5));
  transition:
    border-color 0.25s ease,
    transform 0.35s var(--ease-out);
}
.cert:hover {
  border-color: var(--line-strong);
}
.cert__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.cert__issuer {
  font-size: 0.92rem;
  font-weight: 600;
}
.cert__date {
  color: var(--text-3);
  font-size: 0.8rem;
}
.cert__title {
  font: 400 1.45rem/1.2 var(--font-serif);
}
.cert__summary {
  color: var(--text-2);
  font-size: 0.95rem;
}
.cert__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.cert__id {
  color: var(--text-3);
  font-size: 0.75rem;
}
.cert__id code {
  color: var(--text-2);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.cert .more {
  margin-top: -0.4rem;
}
.cert .more__body {
  font-size: 0.95rem;
}

.section__cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* --------------------------------------------------------------------------
   Capabilities
   -------------------------------------------------------------------------- */
.skills {
  display: grid;
  gap: 3rem 3.5rem;
}
@media (min-width: 760px) {
  .skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skills__tools {
    grid-column: 1 / -1;
  }
}
.skills h3.label {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.ruled {
  padding: 0;
  list-style: none;
}
.ruled li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.ruled .level {
  color: var(--text-3);
  font-size: 0.85rem;
  text-align: right;
}
.ruled--marked li {
  justify-content: flex-start;
}
.ruled--marked li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--brass);
  transform: translateY(-0.15em) rotate(45deg);
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 1.75rem 2rem;
  margin-top: 1.5rem;
}
.tools h4 {
  margin-bottom: 0.75rem;
  font: 400 1.15rem/1.2 var(--font-serif);
}
.tools ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}
.tools li {
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(236, 230, 216, 0.04);
  color: var(--text-2);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.3rem 0;
  font: 400 clamp(1.1rem, 1rem + 0.4vw, 1.3rem)/1.35 var(--font-serif);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--brass-strong);
}
.plus {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.2s ease;
}
.plus::before,
.plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.35s var(--ease-out);
}
.faq details[open] .plus {
  border-color: var(--brass);
  color: var(--brass);
}
.faq details[open] .plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.faq__answer {
  max-width: 66ch;
  padding-bottom: 1.5rem;
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  background: linear-gradient(180deg, transparent, rgba(4, 8, 18, 0.55));
}
.contact__title {
  margin-top: 1rem;
  font: 400 clamp(3rem, 1.6rem + 5.5vw, 6rem)/0.98 var(--font-serif);
  letter-spacing: -0.025em;
}
.contact__title .accent {
  color: var(--brass-strong);
  font-style: italic;
  font-weight: 300;
}
.contact__intro {
  display: grid;
  gap: 0.5rem;
  max-width: 52ch;
  margin-top: 1.75rem;
  color: var(--text-2);
  font-size: 1.1rem;
}
.contact__time {
  color: var(--text-3);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.contact__time time {
  color: var(--text);
  font-weight: 600;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.card {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(15, 26, 49, 0.6);
}
.card__label {
  color: var(--brass);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.card__value {
  justify-self: start;
  font: 400 clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem)/1.3 var(--font-serif);
  overflow-wrap: anywhere;
  text-decoration-color: rgba(207, 168, 101, 0.5);
}
a.card__value:hover {
  color: var(--brass-strong);
}
.card__note {
  color: var(--text-3);
  font-size: 0.875rem;
}
.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin-top: 2.25rem;
  padding: 0;
  list-style: none;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.socials a:hover {
  color: var(--text);
}
.socials .icon {
  width: 18px;
  height: 18px;
  color: var(--brass);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  background: rgba(4, 8, 18, 0.55);
  color: var(--text-3);
  font-size: 0.85rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}
.site-footer a {
  color: var(--text-2);
}
.site-footer a:hover {
  color: var(--text);
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.footer-actions a,
.footer-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}
.footer-actions a:hover,
.footer-actions button:hover {
  color: var(--text);
}
.footer-actions .icon {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Scroll reveal (JS adds .reveal-pending only to content below the fold)
   -------------------------------------------------------------------------- */
.reveal-pending {
  opacity: 0;
  transform: translateY(22px);
}
.reveal-in {
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.notfound {
  display: grid;
  min-height: calc(100vh - var(--header-h));
  align-content: center;
  padding-block: 4rem;
}
.notfound__code {
  color: var(--brass);
  font: italic 300 clamp(5rem, 3rem + 10vw, 10rem)/1 var(--font-serif);
}
.notfound h1 {
  margin-top: 1rem;
  font: 400 clamp(2rem, 1.5rem + 2vw, 3rem)/1.1 var(--font-serif);
}
.notfound p {
  max-width: 48ch;
  margin-top: 1rem;
  color: var(--text-2);
}
.notfound .hero__actions {
  margin-top: 2rem;
}

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

/* --------------------------------------------------------------------------
   Print — a clean, light, concise CV on paper: summaries only, plus any
   "Read more" panel the reader opened before printing
   -------------------------------------------------------------------------- */
@media print {
  :root {
    --bg: #fff;
    --text: #0b1426;
    --text-2: #263150;
    --text-3: #55607a;
    --line: #d9dde5;
    --line-strong: #c6ccd8;
    --brass: #7d5e24;
    --brass-strong: #7d5e24;
  }
  @page {
    margin: 14mm 14mm 16mm;
  }
  body {
    background: #fff;
    font-size: 9.5pt;
    line-height: 1.45;
  }
  /* Animations would otherwise be captured at their first frame (invisible) */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  details.more:not([open]) {
    display: none;
  }
  .lead {
    max-width: none;
    font-size: 14pt;
  }
  .profile {
    gap: 1rem;
  }
  .profile__cols {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.5rem;
  }
  .glance div {
    padding: 0.35rem 0;
  }
  .route-block .label {
    margin-bottom: 0.75rem;
  }
  .route li {
    padding-top: 1.1rem;
  }
  .entry__summary {
    margin-top: 0.5rem;
  }
  .entry__teaser {
    margin-top: 0.35rem;
  }
  .cert {
    gap: 0.6rem;
    padding: 1rem;
  }
  .skills {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
  }
  .skills__tools {
    grid-column: 1 / -1;
  }
  .tools {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 0.75rem;
  }
  .ruled li {
    padding: 0.3rem 0;
  }
  .contact__grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 1rem;
  }
  .contact__intro {
    margin-top: 0.5rem;
    font-size: 10pt;
  }
  .socials {
    margin-top: 0.75rem;
  }
  .card {
    padding: 0.9rem;
  }
  .card__value {
    font-size: 9.5pt;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  .contact {
    break-inside: avoid;
  }
  /* Keep headings with what follows them */
  h2,
  h3,
  .section__head,
  .label {
    break-after: avoid;
  }
  .route-block,
  .glance,
  .skills > div {
    break-inside: avoid;
  }
  body::before,
  body::after,
  .skip-link,
  .site-header,
  .hero__actions,
  .portrait::before,
  .more > summary,
  .section__cta,
  .faq-section,
  .card__actions,
  .site-footer,
  .contact__time {
    display: none !important;
  }
  .container {
    width: 100%;
  }
  .hero {
    padding: 0 0 1rem;
  }
  .hero__grid {
    grid-template-columns: 1fr 120px;
    gap: 1.5rem;
  }
  .hero__name {
    margin-top: 0.5rem;
    font-size: 34pt;
  }
  .hero__lede {
    margin-top: 0.75rem;
    font-size: 12pt;
  }
  .portrait {
    max-width: 120px;
  }
  .portrait__frame {
    background: none;
  }
  .portrait__frame img {
    mix-blend-mode: normal;
  }
  .portrait__frame::after,
  .portrait figcaption {
    display: none;
  }
  .facts {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 1.25rem;
  }
  .facts li + li {
    padding-left: 0.75rem;
    border-left: 1px solid var(--line);
  }
  .fact__value {
    font-size: 20pt;
  }
  .section {
    padding-block: 1.25rem;
  }
  .section__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .section__head {
    position: static;
  }
  .section__title {
    margin-top: 0.25rem;
    font-size: 20pt;
  }
  .entry,
  .cert,
  .card,
  .route li {
    break-inside: avoid;
  }
  .entry {
    grid-template-columns: 7rem 1fr;
    padding-block: 0.9rem;
  }
  .more {
    margin-top: 0.5rem;
  }
  .cert {
    background: none;
  }
  .certs {
    grid-template-columns: 1fr 1fr;
  }
  .badge--current {
    background: none;
    color: var(--brass);
  }
  .logo {
    box-shadow: 0 0 0 1px var(--line);
  }
  .contact {
    background: none;
  }
  .contact__title {
    font-size: 26pt;
  }
  .card {
    background: none;
  }
  .site-footer {
    background: none;
  }
  .reveal-pending {
    opacity: 1 !important;
    transform: none !important;
  }
  a {
    text-decoration: none;
  }
}
