/* ==========================================================================
   Réka Kereki — Portfolio
   Colours pulled from reka-kereki.framer.website
   ========================================================================== */

:root {
  /* Palette */
  --cream: #fff8f2;
  --cream-deep: #ffeadb;
  --white: #fffcfa;
  --yellow: #ffd55f;
  --yellow-soft: #ffe9a8;
  --teal: #307082;          /* 5.3:1 on cream, 5.6:1 with white text */
  --teal-dark: #245866;     /* hover / pressed */
  --teal-deep: #012731;     /* footer background */
  --ink: #1e1515;           /* body text, 17:1 on cream */
  --ink-muted: #4f4545;     /* secondary text, 8.9:1 on cream */
  --line: #eadccf;

  /* Pastel tints for image placeholders + tags */
  --tint-green: #dfefd7;
  --tint-blue: #d1eafa;
  --tint-peach: #fae5d1;
  --tint-lilac: #e7e0eb;
  --tint-rose: #fad1d1;

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--font-body);
  --nav-h: 72px;
  --fs-body: 1.125rem;      /* 18px */
  --fs-small: 1rem;
  --fs-h1: clamp(2.75rem, 6vw + 1rem, 4.75rem);
  --fs-h2: clamp(2rem, 3vw + 1rem, 3rem);
  --fs-h3: clamp(1.375rem, 1vw + 1rem, 1.625rem);

  /* Shape + space */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --pill: 999px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8rem);
  --max: 1200px;

  --shadow: 0 2px 6px rgba(30, 21, 21, 0.05), 0 12px 32px rgba(30, 21, 21, 0.06);
  --shadow-lift: 0 4px 10px rgba(30, 21, 21, 0.06), 0 22px 48px rgba(30, 21, 21, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--teal-deep);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }

a { color: var(--teal); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--teal-dark); }

/* Clear, high-visibility focus ring on every interactive element */
:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--yellow);
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--teal-deep);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--pill);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; color: #fff; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section { padding-block: var(--section); }
.section--tint { background: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head p { color: var(--ink-muted); }

/* Hand-drawn style yellow highlight behind a word */
.highlight {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding-inline: 0.1em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.8rem 1.75rem;
  border-radius: var(--pill);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }

.btn--secondary { background: transparent; color: var(--teal-deep); border-color: var(--teal-deep); }
.btn--secondary:hover { background: var(--teal-deep); color: var(--cream); }

.btn--yellow { background: var(--yellow); color: var(--teal-deep); }
.btn--yellow:hover { background: #f5c33a; color: var(--teal-deep); }

.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 242, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, transform 0.35s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
/* Hides while scrolling down, comes back on scroll up (see main.js) */
.site-header.is-hidden { transform: translateY(-100%); }
.site-header:focus-within { transform: none; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--teal-deep);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
}
.brand img {
  width: 36px; height: 36px;
  border-radius: 10px;
  mix-blend-mode: multiply; /* logo PNG has a white ground */
}
.brand:hover { color: var(--teal-deep); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: var(--pill);
  color: var(--teal-deep);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}
.nav-links a:hover { background: var(--cream-deep); }
.nav-links a[aria-current="page"] { background: var(--yellow); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 2px solid var(--teal-deep);
  border-radius: var(--pill);
  background: transparent;
  color: var(--teal-deep);
  font: 600 1rem var(--font-body);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after,
.nav-toggle__bars span {
  content: "";
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 5px; }
.nav-toggle__bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(30, 21, 21, 0.08);
  }
  .nav-links[data-open="false"] { display: none; }
  .nav-links a { min-height: 56px; font-size: 1.125rem; padding-inline: 1.25rem; }
}

/* ---------- Dot → arrow link (Explore Projects / Explore project) ---------- */
.dot-arrow {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.dot-arrow::before {              /* the yellow dot */
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.dot-arrow svg {                  /* the arrow it turns into */
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  color: var(--yellow);
  opacity: 0;
  transform: translateX(-8px);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
a:hover > .dot-arrow::before,
a:focus-visible > .dot-arrow::before { transform: translate(-50%, -50%) scale(0); opacity: 0; }
a:hover > .dot-arrow svg,
a:focus-visible > .dot-arrow svg { opacity: 1; transform: none; }

/* On light cards the dot/arrow sits in teal so it stays visible */
.dot-arrow--teal::before { background: var(--teal); }
.dot-arrow--teal svg { color: var(--teal); }

/* ---------- Greeting (home) ---------- */
.greeting {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.greeting .container { width: 100%; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero__title {
  margin-bottom: 1.5rem;
}
.hero__lead {
  font-size: clamp(1.25rem, 0.8vw + 1rem, 1.5rem);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 1rem;
}
.hero__support { color: var(--ink-muted); max-width: 34rem; margin-bottom: 2.25rem; }

.hero__art {
  justify-self: center;
  width: min(100%, 400px);
  aspect-ratio: 1;
}
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;             /* circle mask, no shadow */
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; width: min(70%, 280px); justify-self: start; }
}

/* ---------- Work page intro ---------- */
.work-intro { padding-block: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2rem); }
.work-intro p { font-size: 1.25rem; color: var(--ink-muted); max-width: 40rem; margin: 0; }

.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: none;
}
.section-head--row > div { max-width: 640px; }
.section-head h2 { margin-bottom: 0.4rem; }
.section-head p { margin: 0; }

/* ---------- UX/UI projects: sticky stacking cards ---------- */
.stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12vh;                      /* scroll distance between cards stacking */
}
.stack-card {
  position: sticky;
  top: calc(1.5rem + var(--i, 0) * 1.25rem);   /* each card peeks out a little lower */
  transform-origin: 50% 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), filter 0.4s;
}
.stack-card.is-under { transform: scale(0.96); filter: brightness(0.97); }
.stack-card.is-buried { opacity: 0; transform: scale(0.92); pointer-events: none; }
.stack-card:focus-within { opacity: 1; transform: none; pointer-events: auto; }

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(460px, 72vh);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stack-card:nth-child(even) .project__media { order: 2; }

.project__media {
  position: relative;
  margin: 0.75rem;
  border-radius: calc(var(--radius-lg) - 0.75rem);
  overflow: hidden;
  background: var(--cream-deep);
}
.project__media img,
.project__media .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.project:hover .project__media img { transform: scale(1.03); }
/* Whole screen visible (zoomed out) on a matching background colour */
.project__media--fit { background: var(--fit-bg, #fff); }
.project__media--fit img { object-fit: contain; padding: clamp(0.75rem, 2vw, 1.5rem); }

.project__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3.5vw, 3rem);
}
.project__client {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.project__title { font-size: clamp(1.5rem, 1.5vw + 1rem, 2.125rem); margin-bottom: 0.75rem; }
.project__desc { color: var(--ink-muted); margin-bottom: 1.5rem; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--pill);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--cream);
  border: 1.5px solid var(--line);
}
.meta svg { width: 16px; height: 16px; }
.meta .meta--applied { background: var(--yellow-soft); border-color: transparent; }
.meta .meta--concept { background: var(--yellow-soft); border-color: transparent; }

.project__btn { align-self: flex-start; }

@media (max-width: 760px) {
  .project { grid-template-columns: 1fr; min-height: 0; }
  .stack-card:nth-child(even) .project__media { order: 0; }
  .project__media { aspect-ratio: 16 / 10; }
  .project__body { padding: 1.25rem 1.5rem 1.5rem; }
  .project__desc { font-size: 1rem; margin-bottom: 1rem; }
  .meta { margin-bottom: 1rem; }
  .stack { gap: 8vh; }
  .stack-card { top: calc(0.75rem + var(--i, 0) * 0.75rem); }
}
/* Too short to stack comfortably (e.g. phones in landscape): plain list */
@media (max-height: 560px) {
  .stack-card { position: static; }
  .stack { gap: 2rem; }
}

/* ---------- Tile cards (Interesting projects + Graphic design) ---------- */
.tile-grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .tile-grid--3, .tile-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .tile-grid--2, .tile-grid--3, .tile-grid--4 { grid-template-columns: 1fr; } }

.tile {
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.tile__media {
  aspect-ratio: 16 / 10;
  margin: 0.6rem 0.6rem 0;
  border-radius: calc(var(--radius-lg) - 0.6rem);
  overflow: hidden;
  background: var(--cream-deep);
}
.tile-grid--4 .tile__media,
.tile-grid--graphic .tile__media { aspect-ratio: 1; }
/* Graphic design tiles show the whole piece instead of a close crop */
.tile-grid--4 .tile__media,
.tile-grid--graphic .tile__media { background: #fff; }
.tile-grid--4 .tile__media img,
.tile-grid--graphic .tile__media img { object-fit: contain; padding: 0.75rem; }
.tile__media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile__media img,
.tile__media .placeholder { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 1.25rem 1.5rem 1.5rem; }
.tile__title { font-size: 1.25rem; margin-bottom: 0.4rem; }
.tile-grid--2 .tile__title,
.tile-grid--3:not(.tile-grid--graphic) .tile__title { font-size: clamp(1.3rem, 1vw + 1rem, 1.625rem); }
.tile__desc { color: var(--ink-muted); margin: 0; font-size: 1rem; }

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.tag {
  padding: 0.3rem 0.85rem;
  border-radius: var(--pill);
  background: var(--tint-blue);
  color: var(--teal-deep);
  font-size: 0.9rem;
  font-weight: 600;
}
.tag:nth-child(2n) { background: var(--yellow-soft); color: var(--ink); }

/* Image placeholders (swap for real <img> when ready) */
.placeholder {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--tint-peach);
}
.placeholder--green { background: var(--tint-green); }
.placeholder--blue { background: var(--tint-blue); }
.placeholder--lilac { background: var(--tint-lilac); }
.placeholder--rose { background: var(--tint-rose); }
.placeholder--yellow { background: var(--yellow-soft); }

/* ---------- About ---------- */

.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3rem); }
.page-hero p { font-size: 1.25rem; color: var(--ink-muted); max-width: 40rem; }

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.info-card + .info-card { margin-top: 1.5rem; }
.info-card h3 { font-size: 1.25rem; margin-bottom: 1rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.chip-list li {
  padding: 0.45rem 1rem;
  border-radius: var(--pill);
  background: var(--cream);
  border: 1.5px solid var(--line);
  font-size: 1rem;
  font-weight: 500;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.skill {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.skill__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--yellow);
  color: var(--teal-deep);
}
.skill__icon svg { width: 26px; height: 26px; }
.skill h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.skill p { margin: 0; color: var(--ink-muted); font-size: 1rem; }

/* Same dot + line treatment as the work experience points */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.timeline > li { position: relative; padding-left: 1.4rem; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}
.timeline > li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.5em + 14px);
  bottom: 0.2em;
  width: 2px;
  border-radius: 2px;
  background: var(--yellow);
}
.timeline strong { display: block; font-size: 1.0625rem; color: var(--teal-deep); }
.timeline span { display: block; color: var(--ink-muted); font-size: 0.95rem; }
.timeline ul { margin: 0.6rem 0 0; padding-left: 1.1rem; font-size: 0.95rem; line-height: 1.5; }
.timeline ul li { margin-bottom: 0.3rem; }
.timeline ul li::marker { color: var(--teal); }

.lang-list { list-style: none; margin: 0; padding: 0; }
.lang-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.lang-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lang-list strong { color: var(--teal-deep); }
.lang-list span { color: var(--ink-muted); }

/* Work experience */
.xp-block { margin-top: clamp(3rem, 6vw, 4.5rem); }
.xp { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.xp__item {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.xp__head { margin-bottom: 1rem; }
.xp__date {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.6rem;
  border-radius: var(--pill);
  background: var(--yellow);
  color: var(--teal-deep);
  font-size: 0.875rem;
  font-weight: 700;
}
.xp__company { font-size: 1.3rem; margin-bottom: 0.15rem; }
.xp__role { margin: 0; color: var(--teal); font-weight: 600; font-size: 1rem; }
.xp__points { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.xp__points li { position: relative; padding-left: 1.4rem; }
.xp__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}
/* Line running down from the dot alongside the paragraph */
.xp__points li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.45em + 14px);
  bottom: 0.2em;
  width: 2px;
  border-radius: 2px;
  background: var(--yellow);
}
.xp__points li { font-size: 1rem; line-height: 1.55; color: var(--ink-muted); }
.xp__points strong { display: block; color: var(--teal-deep); }

/* ---------- Case study ---------- */
.cs-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 48px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}
.cs-hero h1 { font-size: var(--fs-h2); }   /* same size as section titles on the Projects page */
.cs-hero__lead { font-size: 1.25rem; color: var(--ink-muted); }
.cs-hero__img {
  margin-top: clamp(2rem, 5vw, 3rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-deep);
}
.cs-hero__img > * { width: 100%; height: auto; }
/* Portrait hero images sit centred in a wide frame instead of being cropped */
.cs-hero__img--contain { aspect-ratio: 16 / 8; }
.cs-hero__img--contain > * { height: 100%; object-fit: contain; }
.cs-hero__img > .placeholder { aspect-ratio: 16 / 8; }

.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.cs-meta dt {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.3rem;
}
.cs-meta dd { margin: 0; font-size: 1.0625rem; }
@media (max-width: 860px) { .cs-meta { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cs-meta { grid-template-columns: 1fr; } }

.cs-section { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.cs-section:first-of-type { border-top: 0; }
.cs-section h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); }
.cs-section__num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-heading);
  font-weight: 700;
}
.cs-section ul { padding-left: 1.25rem; }
.cs-section li { margin-bottom: 0.5rem; }

/* Same frame as the .card-list cards, plus the yellow accent bar */
.callout {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--yellow);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 0;
}
.gallery figure { margin: 0; }
.gallery .placeholder,
.gallery img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption, .compare figcaption { margin-top: 0.6rem; font-size: 1rem; color: var(--ink-muted); }
.gallery--wide { grid-template-columns: 1fr; }
.gallery--wide .placeholder { aspect-ratio: 16 / 9; }

/* Before / after slider */
.compare { margin: 2rem 0 0; }
.compare__frame {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare__frame > .compare__layer { position: absolute; inset: 0; }
.compare__layer > * { width: 100%; height: 100%; object-fit: cover; }
.compare__layer--after { clip-path: inset(0 0 0 var(--pos)); }
.compare__label {
  position: absolute;
  top: 1rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--pill);
  background: var(--teal-deep);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2;
  pointer-events: none;
}
.compare__label--before { left: 1rem; }
.compare__label--after { right: 1rem; background: var(--yellow); color: var(--ink); }
.compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 4px;
  transform: translateX(-50%);
  background: #fff;
  z-index: 2;
  pointer-events: none;
}
.compare__handle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 48px; height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23012731' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: var(--shadow);
}
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.compare__frame:has(.compare__range:focus-visible) { outline: 3px solid var(--teal-deep); outline-offset: 4px; }

.learnings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0 !important;
  margin: 2rem 0 0;
}
.learnings li {
  margin: 0;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.learnings strong { display: block; font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 0.3rem; }

.next-project {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--yellow);
  border-radius: var(--radius-lg);
}
.next-project h2 { margin: 0; font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); }
.next-project .eyebrow { color: var(--teal-deep); margin-bottom: 0.25rem; }

/* ---------- Case study content blocks ---------- */
.cs-section h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); margin: 2.25rem 0 0.75rem; }
.cs-section h2 + h3 { margin-top: 0.5rem; }

.cs-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.cs-summary > div {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.cs-summary h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.cs-summary p { font-size: 1.0625rem; color: var(--ink-muted); }
.cs-summary p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .cs-summary { grid-template-columns: 1fr; } }

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: var(--pill);
  background: var(--yellow-soft);
  color: var(--teal-deep);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Images + videos at their natural proportions */
.media {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  margin: 1.75rem 0 0;
}
.media--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.media--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .media--3, .media--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .media--2, .media--3, .media--4 { grid-template-columns: 1fr; } }
.media figure { margin: 0; }
.media img,
.media video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.media--narrow { max-width: 760px; }
.media figcaption,
.media__caption { margin-top: 0.6rem; font-size: 0.95rem; color: var(--ink-muted); grid-column: 1 / -1; }

/* Big numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0 !important;
  margin: 1.5rem 0 0;
  max-width: none !important;
}
.stats li {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--ink-muted);
}
.stats strong { display: block; font-size: 2.5rem; line-height: 1; color: var(--teal); margin-bottom: 0.4rem; }

/* Card lists (principles, features, barriers …) */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0 !important;
  margin: 1.5rem 0 0;
  max-width: none !important;
}
.card-list li {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--ink-muted);
}
.card-list strong { display: block; color: var(--teal-deep); font-size: 1.0625rem; margin-bottom: 0.25rem; }

/* Strong points vs issues (Netflix audit) */
.pros-cons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (max-width: 760px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-cons > div {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pros-cons h4 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; margin-bottom: 0.75rem; }
.pros-cons h4::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); }
.pros-cons .issues h4::before { background: var(--yellow); }
.pros-cons ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; font-size: 1rem; color: var(--ink-muted); }
.pros-cons li strong { display: block; color: var(--teal-deep); }

.eyebrow--muted { color: var(--ink-muted); }

/* Back-to-top button */
.to-top {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-deep);
  color: #fff;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease), background-color 0.2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--teal); color: #fff; }
.to-top svg { width: 24px; height: 24px; }

/* ---------- Contact / Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: #f3ece6;
  padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.site-footer :focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 6px var(--teal-deep); }

.contact { text-align: center; max-width: 620px; margin-inline: auto; }
.contact .eyebrow { margin-bottom: 0.5rem; }
.contact h2 { font-size: clamp(1.875rem, 2.5vw + 1rem, 2.75rem); color: #fff; margin-bottom: 0.5rem; }
.contact h2 .highlight { background: linear-gradient(transparent 58%, var(--teal) 58%, var(--teal) 92%, transparent 92%); }
.contact p { font-size: 1.0625rem; color: #d9e6e9; margin-bottom: 1.25rem; }

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration-color: var(--yellow);
  word-break: break-word;
}
.contact__email svg { width: 22px; height: 22px; }

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--pill);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.social a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--teal-deep); }
.social a:hover .dot-arrow svg,
.social a:focus-visible .dot-arrow svg { color: var(--teal-deep); }
.social .dot-arrow { width: 18px; height: 18px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.95rem;
  color: #c3d3d7;
}
.footer-bottom a { color: #c3d3d7; }

/* ---------- Contact page ---------- */
.contact-list {
  display: grid;
  justify-items: start;           /* pills hug their content */
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.4rem 1.25rem 0.4rem 0.4rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  color: var(--teal-deep);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 0.2s, background-color 0.2s;
}
.contact-list a:hover { border-color: var(--teal-deep); background: #fff; }

/* Icon circle: the logo swaps to an arrow on hover / focus */
.contact-list__icon {
  position: relative;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--yellow);
}
.contact-list__icon svg {
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.contact-list__icon .icon-arrow { opacity: 0; transform: translateX(-8px); }
.contact-list a:hover .icon-logo,
.contact-list a:focus-visible .icon-logo { opacity: 0; transform: scale(0.4); }
.contact-list a:hover .icon-arrow,
.contact-list a:focus-visible .icon-arrow { opacity: 1; transform: none; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .tile:hover { transform: none; }
  .project:hover .project__media img { transform: none; }
}

/* Tall, narrow images (logo sheets, colour swatches) shown side by side at one height */
.media--strip { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.media--strip img { width: auto; height: clamp(320px, 45vw, 520px); max-width: 100%; object-fit: contain; }
.media--strip .media__caption { flex-basis: 100%; margin-top: 0; }

/* Text beside an image */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: 2rem;
}
.split > .media { margin: 0; }
.split h3 { margin-top: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Tiles that open a project page: the whole card is clickable via the title link */
.tile--link { position: relative; }
.tile--link .tile__title a { color: var(--teal-deep); text-decoration: none; }
.tile--link .tile__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tile--link:hover .tile__title a { text-decoration: underline; }
.tile--link .tile__title a:focus-visible { outline: none; box-shadow: none; }
.tile--link:has(a:focus-visible) { outline: 3px solid var(--teal-deep); outline-offset: 4px; }

/* Several jobs inside one work experience card, separated by a divider */
.xp__entry + .xp__entry {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Case study 4-column grid
   Every section sits on 4 equal columns. Text always spans all 4;
   cards and pictures span 1, 2 or 4 columns. Tablet: 2 columns, phone: 1.
   ========================================================================== */
:root { --cs-gap: 1.25rem; }

.cs-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--cs-gap);
  align-items: start;
}
.cs-section > * { grid-column: 1 / -1; }

/* Shared 4-column grids inside a section */
.media,
.card-list,
.stats,
.split,
.cs-summary,
.pros-cons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--cs-gap);
  align-items: start;
}
.cs-summary, .pros-cons { align-items: stretch; }

/* Default spans */
.media > *            { grid-column: span 4; }
.media--2 > *,
.media--3 > *         { grid-column: span 2; }
.media--4 > *         { grid-column: span 1; }
.card-list > li       { grid-column: span 2; }
.card-list--short > li,
.stats > li           { grid-column: span 1; }
.split > *,
.cs-summary > *,
.pros-cons > *        { grid-column: span 2; }
.media > .media__caption,
.media > figcaption   { grid-column: 1 / -1; }

/* Manual overrides where a picture's shape needs a different width */
.media > .span-1, .card-list > .span-1 { grid-column: span 1; }
.media > .span-2, .card-list > .span-2 { grid-column: span 2; }
.media > .span-3, .card-list > .span-3 { grid-column: span 3; }

/* A card list stacked inside one grid cell */
.card-list.card-list--stack { grid-template-columns: minmax(0, 1fr); margin: 0; }
.card-list--stack > li { grid-column: auto; }

/* Pictures never taller than the screen: they shrink to fit instead */
.media img,
.media video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 85vh;
}
.media video { width: 100%; }
.cs-hero__img > img { max-height: 85vh; object-fit: contain; }

/* Tablet: 2 columns. 1-column items stay 1, everything wider fills the row */
@media (max-width: 860px) {
  .cs-section,
  .media, .card-list, .stats, .split, .cs-summary, .pros-cons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media > *, .media--2 > *, .media--3 > *, .card-list > li, .split > *, .cs-summary > *, .pros-cons > *,
  .media > .span-2, .media > .span-3, .card-list > .span-2, .card-list > .span-3 { grid-column: 1 / -1; }
  .media--4 > *, .card-list--short > li, .stats > li, .media > .span-1 { grid-column: span 1; }
}
/* Phone: 1 column */
@media (max-width: 520px) {
  .cs-section,
  .media, .card-list, .stats, .split, .cs-summary, .pros-cons { grid-template-columns: minmax(0, 1fr); }
  .cs-section *[class] > * { grid-column: 1 / -1 !important; }
}
.split { align-items: center; }

/* Pictures always fill the columns they span (1, 2, 3 or 4) – never an in-between width.
   Pictures too tall for full width are given a smaller span in the HTML instead. */
.media img,
.media video { width: 100%; max-height: none; }
.cs-hero__img > img { max-height: none; }
.cs-hero__img--contain > img { height: 100%; }
/* Exception: very thin strips (e.g. colour swatches) keep a screen-height cap */
.media img.fit-screen { width: auto; max-width: 100%; max-height: 85vh; }

/* Videos get the same rounded corners as pictures (clip-path also works in Safari) */
.media video { clip-path: inset(0 round var(--radius)); }

/* Full-width hero cropped to a wide frame */
.cs-hero__img--wide { aspect-ratio: 16 / 9; }
.cs-hero__img--wide > img { height: 100%; object-fit: cover; }

/* Three equal columns (cards or pictures) */
.card-list--3,
.media--cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.card-list--3 > li,
.media--cols3 > * { grid-column: span 1; }
.media--cols3 { align-items: start; }
@media (max-width: 860px) {
  .card-list--3 { grid-template-columns: minmax(0, 1fr); }
  .media--cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .media--cols3 { grid-template-columns: minmax(0, 1fr); } }

/* Pictures of different shapes shown in identical frames, nothing cropped */
.media--equal img { aspect-ratio: 7 / 5; object-fit: contain; background: #fff; }

/* Round picture as tall as a 3:4 picture in the neighbouring single column */
.media figure.circle-fig { container-type: inline-size; text-align: center; }
.media img.circle-img {
  width: calc((100cqw - var(--cs-gap)) * 2 / 3);
  aspect-ratio: 1;
  margin-inline: auto;
  object-fit: cover;
  border-radius: 50%;
}
@media (max-width: 520px) { .media img.circle-img { width: 100%; } }

/* Competitor cards with a logo */
.card-list .logo { display: block; height: 56px; width: auto; max-width: 160px; object-fit: contain; margin-bottom: 1rem; }
.card-list h4 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.card-list li ul { margin: 0; padding-left: 1.1rem; }
.card-list li ul li { margin: 0 0 0.25rem; padding: 0; border: 0; background: none; list-style: disc; }


/* Side-by-side pictures share one height (widths set in main.js from each picture's shape) */
.media.media--justify { display: flex; flex-wrap: wrap; align-items: flex-start; }
.media--justify > * { flex: var(--r, 1) 1 0%; min-width: 0; }
.media--justify > .media__caption,
.media--justify > figcaption { flex: 0 0 100%; }
.media--justify > .media__break { flex: 0 0 100%; height: 0; margin-top: calc(-1 * var(--cs-gap)); }
.media--justify img.fit-screen { width: 100%; max-height: none; }

/* Cards and windows in the same row are always the same height */
.card-list, .stats { align-items: stretch; }

/* Plain list with yellow dots, laid out in a row */
.dot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  list-style: none;
  padding: 0 !important;
  margin: 1rem 0 0;
}
.dot-row li { position: relative; margin: 0; padding-left: 1.2rem; font-weight: 600; color: var(--teal-deep); }
.dot-row li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}

/* Hero frame on white, for pictures with a white background */
.cs-hero__img--white { background: #fff; }

/* Phone screens and recordings: round enough to hide the phone's black corners */
.media .phone-screen { clip-path: inset(1px round 12% / 5.5%); border: 0; }

/* Capped pictures (see main.js) stay centred in their space */
.media img, .media video { margin-inline: auto; }
.cs-hero__img { margin-inline: auto; }

/* Tool groups on the About page */
.info-card h4 { font-size: 0.95rem; color: var(--teal); margin: 1.25rem 0 0.6rem; letter-spacing: 0; }
.info-card h3 + h4 { margin-top: 0; }
