/* ==========================================================
   Anna's portfolio — one stylesheet for every page.
   Change the tokens below to restyle the whole site.
   ========================================================== */

:root {
  /* Colors (from Figma) */
  --bg: #e8f0f2;          /* page background */
  --accent: #10697d;      /* teal: nav, headings, links */
  --text: #111;           /* body text */
  --muted: #4a5a5e;       /* captions, dates */
  --panel: #f0eeec;       /* warm panel behind diagrams */
  --placeholder: #d4e1e4; /* shows where an image is missing */

  /* Matrix dots (AI landscape case study) */
  --dot-strong: #8a6a96;
  --dot-light: #c9b3d1;
  --dot-none: #dcdcdc;

  /* Type */
  --font: "Inria Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step-0: clamp(1.0625rem, 0.95rem + 0.45vw, 1.375rem);  /* body */
  --step--1: clamp(0.875rem, 0.82rem + 0.2vw, 1rem);       /* captions */
  --step-1: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);         /* nav, card text */
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);        /* h2 */
  --step-3: clamp(2.25rem, 1.6rem + 2.8vw, 4rem);          /* h1 */

  /* Layout */
  --page-max: 1120px;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --space: clamp(1.25rem, 1rem + 1vw, 2rem);
  --radius: 12px;          /* rounded corners on images and panels */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header / nav ---------- */
.site-header { padding-top: clamp(1.5rem, 4vw, 2.75rem); padding-bottom: var(--space); }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
  font-size: var(--step-1);
  color: var(--accent);
}
.site-nav li + li::before { content: "|"; padding: 0 0.45em; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { font-weight: 700; }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--accent); font-weight: 400; line-height: 1.15; margin: 0; }
h1 { font-size: var(--step-3); margin-bottom: var(--space); }
h2 { font-size: var(--step-2); margin: calc(var(--space) * 2) 0 0.6em; }
h3 { font-size: var(--step-1); color: var(--text); font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
article ul, article ol { max-width: 68ch; }

main { padding-bottom: calc(var(--space) * 3); }

/* ---------- Home ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 32%);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.intro .lead { font-size: var(--step-1); }
.portrait { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }

@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; order: -1; }
}

/* ---------- Project grid ---------- */
.project-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}
.project-card a { color: inherit; text-decoration: none; display: block; }
.project-card img {
  aspect-ratio: 3 / 2; object-fit: cover; width: 100%;
  transition: transform .25s ease;
}
.project-card a:hover img { transform: translateY(-4px); }
.project-card a:hover .project-title { text-decoration: underline; }
.project-card .meta { font-weight: 700; margin: 1rem 0 0; font-size: var(--step-1); }
.project-card .project-title { margin: 0; font-size: var(--step-1); }
.project-card ul { list-style: disc; margin: 0.25rem 0 0; padding-left: 1.25em; font-size: var(--step-1); }

/* ---------- Case study ---------- */
.at-a-glance { list-style: none; padding: 0; margin: 0; font-size: var(--step-1); }

figure { margin: var(--space) 0; }
figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.6rem; }
.figure-row {
  display: grid; gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: end;
}
.figure-row figure { margin: 0; min-width: 0; }
figure img { width: 100%; }
figure video { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.figure-row.before-after { grid-template-columns: 1fr 1.85fr; }
@media (max-width: 720px) { .figure-row.before-after { grid-template-columns: 1fr; } }

/* Role × task matrix */
.matrix-panel { background: var(--panel); padding: clamp(1rem, 4vw, 3rem); overflow-x: auto; }
.matrix { border-collapse: collapse; width: 100%; min-width: 520px; }
.matrix th { font-weight: 400; text-align: left; padding: 0.75rem; vertical-align: bottom; }
.matrix thead th { text-align: center; }
.matrix td { text-align: center; padding: 1.25rem 0.75rem; }
.dot { display: inline-block; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--dot-none); }
.dot.strong { background: var(--dot-strong); }
.dot.light  { background: var(--dot-light); }
.legend { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: var(--step--1); margin-top: 1rem; }
.legend .dot { width: 1rem; height: 1rem; vertical-align: -0.15em; margin-right: 0.4rem; }

/* ---------- Resume ---------- */
.resume h2 { font-size: var(--step-1); letter-spacing: 0.08em; text-transform: uppercase; }
.role { margin-bottom: 1.75rem; }
.role-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 1rem;
  margin-bottom: 0.25rem;
}
.role-head h3 { font-size: inherit; }
.role-head .dates { color: var(--muted); white-space: nowrap; }
.role ul { margin: 0.25rem 0 0; padding-left: 1.25em; }
.org { font-weight: 700; margin: 1.5rem 0 0.75rem; }

/* ---------- Placeholder for images not yet exported ---------- */
img { background: var(--placeholder); }

/* ---------- Case study extras ---------- */
h1 .subtitle { display: block; font-size: 0.5em; margin-top: 0.15em; }
.at-a-glance.bulleted { list-style: disc; padding-left: 1.25em; }
.section-h { color: var(--accent); font-weight: 400; font-size: var(--step-1); margin: calc(var(--space) * 1.5) 0 0.5em; }
.figure-medium { max-width: 720px; }

/* CSR evolution panel (dark) */
.evolution {
  background: #053242; color: #edf5f7;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  max-width: 960px;
}
.evolution p { max-width: none; }
.evolution-title { font-size: var(--step-2); margin-bottom: 0.5em; }
.evolution table { border-collapse: collapse; width: 100%; margin: 0.5rem 0 1.25rem; }
.evolution th { text-align: left; font-weight: 700; padding: 0.5rem 0; border-bottom: 1px solid rgba(237,245,247,.6); }
.evolution td { padding: 0.6rem 0; vertical-align: top; width: 45%; }
.evolution td.arrow, .evolution th[aria-hidden] { width: 10%; text-align: center; font-size: 1.3em; line-height: 1.1; }
.evolution-foot { margin: 0; }

/* User goals board */
.goals {
  --goal-ink: #3a3632;
  display: grid; grid-template-columns: 1.1fr repeat(3, 1fr);
  background: #fff; color: var(--goal-ink); font-size: var(--step--1); line-height: 1.4;
}
.goals p { margin: 0; max-width: none; }
.goal-title { background: #e4e1dd; padding: 1.5rem; }
.goal-role { font-family: Georgia, serif; font-size: 1.6rem; margin-bottom: 1rem !important; }
.goal-main { font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.goal-title hr { border: 0; border-top: 1px solid #a9a29a; margin: 1.25rem 0; }
.goal-metric { font-weight: 700; margin-bottom: 0.6rem !important; }
.goal-col { padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.goal-col:nth-of-type(2) { background: #f1efed; }
.goal-col:nth-of-type(3) { background: #f5f4f2; }
.goal-col-title { font-weight: 700; color: #5c5651; font-size: 1rem; line-height: 1.35; }
.goal-col-title::after { content: ""; display: block; width: 36px; height: 4px; background: #f0cc71; margin-top: 0.75rem; }
.goal-card { background: #fbf9f8; padding: 1rem 1.1rem; border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,.16); color: #47423e; }
@media (max-width: 860px) {
  .goals { grid-template-columns: 1fr 1fr; }
  .goal-title { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .goals { grid-template-columns: 1fr; } }

/* ---------- Rounded corners (change --radius at the top) ---------- */
.project-card img, figure img, .portrait,
.matrix-panel, .evolution, .goals { border-radius: var(--radius); }
.goals { overflow: hidden; }

/* ---------- Video with big play button ---------- */
.video { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.video video { display: block; width: 100%; height: auto; border-radius: 0; }
.video .play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; padding-left: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .15s ease, background .15s ease;
}
.video .play:hover { transform: scale(1.08); background: #0c5262; }
.video.is-playing .play { display: none; }

/* ---------- At a glance: labelled fact strip ---------- */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0; border-top: 1px solid #b9cdd2; border-bottom: 1px solid #b9cdd2;
}
.facts > div { padding: 1rem 1.25rem 1.1rem 0; }
.facts > div + div { padding-left: 1.25rem; border-left: 1px solid #b9cdd2; }
.facts dt { font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.facts dd { margin: 0; font-size: var(--step-1); line-height: 1.3; }
.facts dd small { display: block; font-size: var(--step--1); color: var(--muted); margin-top: .2rem; }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div { padding: .85rem .75rem .9rem 0; }
  .facts > div + div { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(even) { padding-left: .75rem; border-left: 1px solid #b9cdd2; }
  .facts > div:nth-child(n+3) { border-top: 1px solid #b9cdd2; }
}

/* ---------- Big numbers ---------- */
.stats-label { font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .25rem; }
.stats { display: flex; flex-wrap: wrap; gap: 1rem clamp(2rem, 6vw, 4.5rem); margin: 0 0 1.5rem; }
.stats > div { display: flex; align-items: baseline; gap: .75rem; }
.stats dt { font-size: clamp(3rem, 2.2rem + 3.5vw, 5rem); line-height: 1; color: var(--accent); font-weight: 400; }
.stats dd { margin: 0; font-size: var(--step-1); line-height: 1.25; }
@media (max-width: 600px) { .stats { column-gap: 2rem; } .stats > div { flex-direction: column; align-items: flex-start; gap: .2rem; } }
.stats dd span { font-size: var(--step--1); color: var(--muted); }

/* ---------- Chat phases: graphic + example lines aligned under each arrow ---------- */
.phases img { border-radius: var(--radius) var(--radius) 0 0; }
.phase-lines {
  list-style: none; margin: 0; padding: 1rem 0 0; max-width: none;
  display: grid; grid-template-columns: 372fr 462fr 360fr 361fr 365fr; gap: 0;
  background: #fff; border-radius: 0 0 var(--radius) var(--radius);
}
.phase-lines li { padding: 0 .9rem 1.1rem; font-size: var(--step--1); line-height: 1.4; }
.phase-lines li + li { border-left: 1px solid #e3e8ea; }
.phase-lines q { display: block; padding-top: .6rem; border-top: 3px solid var(--c); quotes: "“" "”"; }
.phase-lines .phase-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) {
  .phase-lines { grid-template-columns: 1fr; padding: .5rem 1rem 1rem; }
  .phase-lines li { padding: .6rem 0; }
  .phase-lines li + li { border-left: 0; }
  .phase-lines .phase-name { position: static; width: auto; height: auto; clip: auto; display: block; font-weight: 700; color: var(--c); font-size: var(--step--1); }
  .phase-lines q { border-top: 0; border-left: 3px solid var(--c); padding: 0 0 0 .6rem; margin-top: .2rem; }
}

/* ---------- Principles: illustration + title + one line ---------- */
.principles {
  list-style: none; padding: 0; margin: 1.5rem 0 2rem; max-width: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.principles img { width: min(100%, 240px); margin: 0 auto .75rem; background: none; border-radius: 0; }
.principles h3 { color: var(--text); font-size: var(--step-0); font-weight: 700; margin: 0 0 .3rem; }
.principles p { margin: 0 auto; font-size: var(--step--1); color: var(--muted); max-width: 26ch; }

/* ---------- Panels: project goals, user goals, story ---------- */
.panel { background: #f1efed; border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); margin: 1rem 0 2rem; }
.panel h3 { color: var(--text); font-weight: 700; font-size: var(--step-1); margin: 0 0 1rem; }
.panel h3::after { content: ""; display: block; width: 40px; height: 4px; margin-top: .5rem; background: #846a92; border-radius: 2px; }
.panel ul { margin: 0; padding-left: 1.2em; max-width: 70ch; }
.panel li + li { margin-top: .5rem; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .75rem 1.5rem; }
.persona { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: var(--step--1); line-height: 1.3; color: var(--muted); }
.persona b { color: var(--text); }
.persona-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #846a92; color: #fff; font-weight: 700; font-size: .9rem; flex: none; }

/* Persona + user goals side by side */
.panel-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.25rem; margin: 1rem 0 2rem; align-items: stretch; }
.panel-pair .panel { margin: 0; }
.persona-card { text-align: center; }
.persona-card img { width: min(62%, 200px); margin: 0 auto 1rem; background: none; }
.persona-card h3::after { margin-left: auto; margin-right: auto; }
.persona-name { margin: -.4rem auto .75rem; font-size: var(--step--1); color: var(--muted); }
.persona-need { margin: 0 auto; font-size: var(--step-0); line-height: 1.45; max-width: 34ch; }
img.persona-avatar { object-fit: cover; background: none; }
@media (max-width: 800px) { .panel-pair { grid-template-columns: 1fr; } }

/* Text beside an image */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; margin: 1rem 0 1.5rem; }
.split figure { margin: 0; }
.split p { margin: 0; font-size: var(--step-1); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

/* ---------- Scrollable app screen (fixed chrome, scrolling content) ---------- */
.app-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #1d3554; }
.app-screen img { background: none; border-radius: 0; }
.app-scroll {
  position: absolute; left: 2.7083%; top: 6.2963%; right: 0; bottom: 0;
  overflow-y: auto; overscroll-behavior: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent;
}
.app-scroll img { display: block; width: 100%; height: auto; }
.app-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.app-nav    { position: absolute; left: 0; top: 0; width: 2.7083%; height: 100%; pointer-events: none; }
.app-header { position: absolute; left: 2.7083%; top: 0; width: 97.2917%; height: 6.2963%; pointer-events: none; }
.app-bar    { position: absolute; left: 30.4688%; top: 90.7407%; width: 41.6667%; height: auto; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.35); border-radius: 10px; }

/* Image that fades into the page at the bottom */
.fade-bottom img { border-radius: var(--radius) var(--radius) 0 0; }

/* ---------- Question cards (decision framework) ---------- */
.q-cards { list-style: none; counter-reset: q; padding: 0; margin: 1rem 0 2rem; max-width: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.q-cards li { counter-increment: q; background: #f1efed; border-radius: var(--radius); padding: 1.1rem 1.2rem 1.25rem; font-size: var(--step-0); line-height: 1.4; }
.q-cards li::before { content: counter(q); display: block; font-size: 2rem; line-height: 1; color: #846a92; margin-bottom: .5rem; }
.q-label { display: block; font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }

/* Hidden visually, still read by screen readers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer { padding-top: var(--space); padding-bottom: calc(var(--space) * 2); font-size: var(--step--1); color: var(--muted); }

/* Story cover sheet (dark teal slide) */
.story-sheet {
  background: #06485f radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.06), transparent 55%);
  color: #fff; border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 4rem);
  margin: var(--space) 0;
}
.story-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.story-tag { display: inline-block; margin: 0; padding: .3em .75em; border-radius: 6px; background: rgba(0,0,0,.3); font-weight: 700; font-size: var(--step--1); }
.story-persona { display: flex; align-items: center; gap: .6rem; margin: 0; text-align: right; font-size: .75rem; line-height: 1.3; }
.story-name { opacity: .85; }
.story-persona img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: none; border: 2px solid rgba(255,255,255,.35); }
.story-sheet h3 { color: #fff; font-size: var(--step-2); font-weight: 700; margin: 1.1rem 0 1rem; }
.story-sheet ul { margin: 0; padding-left: 1.25em; max-width: 60ch; }
.story-sheet li + li { margin-top: .7em; }

/* ==========================================================
   Polish pass (Oct 2026)
   1. Signature: Inria Serif italic for "or …" subtitles and big numbers
   2. Calmer hierarchy: no nav pipes, grey secondary text, tighter headings
   3. Project thumbnails on tinted panels (+ hover video on Snippets)
   4. Interaction details: copy email, scroll fade-up, page transitions
   ========================================================== */
:root {
  --serif: "Inria Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Thumbnail panel tints (set per card with style="--tint: var(--tint-sand)") */
  --tint-teal: #cfe1e6;
  --tint-sand: #e7dfd2;
  --tint-lilac: #dcdbea;
  --tint-sage: #d6e3d6;
  --tint-rose: #e8d9d5;
}

/* 1. Signature serif */
h1 .subtitle {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 0.55em; letter-spacing: 0; margin-top: 0.3em;
}
.stats dt { font-family: var(--serif); letter-spacing: -0.01em; }

/* 2. Hierarchy */
h1 { letter-spacing: -0.02em; }
h2 { letter-spacing: -0.01em; }
.site-nav ul { gap: 0.35em 1.4em; }
.site-nav li + li::before { content: none; }
.site-nav a { padding: 0.15em 0; }
.site-nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.4em;
}
.project-card .project-title { color: var(--muted); }
.project-card .meta { margin-top: 1.1rem; }

/* 3. Thumbnails on tinted panels */
.card-media {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--tint, var(--tint-teal)); border-radius: var(--radius);
}
.card-media img, .card-media video {
  position: absolute; left: 8%; top: 11%; width: 96%; height: auto;
  aspect-ratio: 3 / 2; object-fit: cover; object-position: left top;
  border-radius: 8px 0 0 0;
  box-shadow: 0 2px 4px rgba(10, 50, 60, .08), 0 12px 32px rgba(10, 50, 60, .18);
  transition: transform .45s var(--ease), opacity .3s ease;
}
.card-media video { opacity: 0; background: transparent; }
.card-media.is-playing video { opacity: 1; }
.project-card a:hover .card-media img,
.project-card a:hover .card-media video,
.project-card a:focus-visible .card-media img,
.project-card a:focus-visible .card-media video { transform: translateY(-6px); }
.project-card a:hover img { transform: translateY(-6px); } /* overrides older rule */
.project-card a:focus-visible { outline-offset: 6px; border-radius: var(--radius); }

/* 4a. Copy email + footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 2rem;
  margin-top: var(--space);
  /* hairline that lines up with the content, not the page padding */
  background: linear-gradient(rgba(16, 105, 125, .18), rgba(16, 105, 125, .18)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.email-group { display: inline-flex; align-items: center; gap: 0.35em; }
.copy-email { display: none; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.js .copy-email { display: inline-flex; }  /* only shown when the copy script runs */
.copy-email svg { width: 1em; height: 1em; flex: none; }
.copy-email .copy-icon {
  display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 6px;
  color: var(--muted); transition: background .2s ease, color .2s ease;
}
.copy-email .copy-icon svg { width: 1em; height: 1em; grid-area: 1 / 1; transition: opacity .15s ease, transform .2s ease; }
.copy-email .i-check { opacity: 0; transform: scale(.6); }
.copy-email:hover .copy-icon { background: rgba(16, 105, 125, .1); color: var(--accent); }
.copy-email.is-copied .copy-icon { background: var(--accent); color: #fff; }
.copy-email.is-copied .i-copy { opacity: 0; transform: scale(.6); }
.copy-email.is-copied .i-check { opacity: 1; transform: none; }
.contact-links { font-size: var(--step-1); display: grid; gap: 0.6rem; margin: 1.5rem 0; }
.contact-links a { color: var(--accent); }

/* 4b. Fade up on scroll (only added by site.js, and never with reduced motion) */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

/* 4c. Smooth cross-fade between pages (supported browsers; others just navigate) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Slim sticky bar (shown by site.js when scrolling up) ---------- */
.scroll-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(16, 105, 125, .14);
  transform: translateY(-100%); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s ease;
}
.scroll-bar.is-visible { transform: none; opacity: 1; }
.scroll-bar-inner {
  display: flex; align-items: center; gap: 1rem 2rem; min-height: 52px;
  font-size: var(--step--1);
}
.scroll-bar a { color: var(--accent); text-decoration: none; }
.scroll-bar a:hover { text-decoration: underline; }
.crumbs { display: flex; align-items: center; gap: .55em; min-width: 0; flex: 1; white-space: nowrap; }
.crumbs span[aria-hidden] { color: var(--muted); opacity: .6; }
.crumb-current { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.bar-name { font-weight: 700; white-space: nowrap; }
.bar-nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar-nav::-webkit-scrollbar { display: none; }
.bar-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .3em 1.25em; white-space: nowrap; }
.bar-nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 2px; }
.to-top {
  margin-left: auto; flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(16, 105, 125, .1); font-size: 1rem; line-height: 1;
}
.scroll-bar .to-top:hover { background: var(--accent); color: #fff; text-decoration: none; }
@media (max-width: 600px) {
  .crumbs a:first-child, .crumbs a:first-child + span { display: none; }  /* phones: "Selected projects / Snippets" */
  .bar-name { display: none; }
}
html { scroll-padding-top: 64px; }

/* ---------- Page heading with an action (e.g. resume download) ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: var(--space); }
.page-head h1 { margin: 0; }
.button {
  display: inline-flex; align-items: center; gap: .5em; flex: none;
  padding: .55em 1.1em; border: 1.5px solid var(--accent); border-radius: 99px;
  color: var(--accent); text-decoration: none; font-size: var(--step--1); font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.button svg { width: 1.1em; height: 1.1em; }
.button:hover { background: var(--accent); color: #fff; text-decoration: none; }

.stats-note { font-size: var(--step--1); color: var(--muted); margin: -0.75rem 0 1.25rem; }

/* ---------- Point of view: my own voice (not an artifact) ---------- */
.pov {
  margin: calc(var(--space) * 1.25) 0; padding: 0.15em 0 0.15em clamp(1rem, 2.5vw, 1.5rem);
  border-left: 3px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: var(--step-1); line-height: 1.45; color: var(--accent);
}
.pov p { margin: 0; max-width: 58ch; }

/* ---------- Projects not posted yet ---------- */
.project-card.is-soon .card-link { display: block; cursor: default; }
.project-card.is-soon .card-media img { filter: grayscale(1); opacity: .5; transform: none; }
.project-card.is-soon .card-media { background: #dde3e5; }
.project-card.is-soon .meta, .project-card.is-soon .project-title { color: var(--muted); }
.soon {
  position: absolute; z-index: 1; top: 12px; right: 12px; padding: .2em .7em; border-radius: 99px;
  background: rgba(255, 255, 255, .92); color: var(--muted); box-shadow: 0 1px 3px rgba(0,0,0,.12);
  font-size: var(--step--1); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

/* ---------- Password page (login.php) ---------- */
.gate { max-width: 34rem; margin: 0 0 calc(var(--space) * 3); }
.gate-intro { color: var(--text); }
.gate label { display: block; font-weight: 700; margin: 1.5rem 0 .4rem; font-size: var(--step--1); }
.gate-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.gate input[type="password"] {
  flex: 1 1 14rem; min-width: 0; font: inherit; padding: .6em .9em;
  border: 1.5px solid rgba(16, 105, 125, .35); border-radius: 10px; background: #fff; color: var(--text);
}
.gate input[type="password"]:focus { outline: 3px solid rgba(16, 105, 125, .25); border-color: var(--accent); }
.gate input[aria-invalid="true"] { border-color: #b3261e; }
.button-solid { background: var(--accent); color: #fff; font-size: var(--step-0); cursor: pointer; font-family: inherit; }
.button-solid:hover { background: #0b5363; }
.gate-error { color: #b3261e; margin-top: .75rem; font-size: var(--step--1); }

.figure-note { font-size: var(--step--1); color: var(--muted); margin-top: -0.75rem; }
