/* ==========================================================================
   Julie Hollund Tjernsmo — Portfolio styles
   --------------------------------------------------------------------------
   1. Colours & fonts (edit here to change the whole site)
   2. Base
   3. Layout helpers
   4. Navigation
   5. Buttons & links
   6. Hero
   7. Section headings
   8. About
   9. Selected work (project cards)
   10. Skills
   11. Freelance services
   12. Contact
   13. Footer
   14. Case study pages
   15. Animations
   16. Responsive
   ========================================================================== */

/* 1. Colours & fonts ------------------------------------------------------ */
:root {
  /* Palette */
  --bg: #FCF9F6;          /* warm ivory: main background */
  --bg-soft: #F8EBEF;     /* soft blush: alternate sections */
  --champagne: #E9DCD0;   /* champagne: details, frames, tags */
  --accent: #96284E;      /* deep raspberry: links, the italic name, small details */
  --accent-dark: #7A1F3F;
  --espresso: #392622;    /* espresso: accents and the contact section */
  --chocolate: #3E2723;   /* buttons */
  --text: #2A1F1C;        /* main text */
  --text-muted: #5E4C4A;  /* body text (darker for readability) */
  --muted: #9A817C;       /* small labels */
  --line: #E2D2C4;        /* thin lines (champagne, a shade deeper) */

  /* Pink satin tones (hero silk) */
  --petal: #FBE8EC;
  --soft-pink: #F6D3DC;
  --rose: #EBB2C0;
  --pearl: #FFF8F9;

  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-space: clamp(80px, 11vw, 150px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

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

a { color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 12px;
  background: var(--espresso); color: var(--bg);
  padding: 8px 16px; z-index: 100; text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* 3. Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-space) 0; }
.section--sand { background: var(--bg-soft); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* 4. Navigation ----------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(252, 249, 246, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex; gap: 40px;
  list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 0;
  position: relative;
}
.nav__toggle span {
  position: absolute; left: 10px; right: 10px; height: 1px;
  background: var(--espresso);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 17px; }
.nav__toggle span:nth-child(2) { top: 26px; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* 5. Buttons & links ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 32px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--chocolate);
  border-radius: 999px; /* pill shape */
  cursor: pointer;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease), border-color 0.6s var(--ease);
}
/* Main button: chocolate with petal-pink text; turns berry pink on hover */
.btn--solid { background: var(--chocolate); color: var(--petal); border-color: var(--chocolate); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--petal); }
/* Second button: chocolate outline; fills with soft pink on hover */
.btn--outline { background: transparent; color: var(--chocolate); border-color: var(--chocolate); }
.btn--outline:hover { background: var(--soft-pink); color: var(--chocolate); border-color: var(--chocolate); }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}
.text-link .arrow { transition: transform 0.35s var(--ease); }
.text-link:hover .arrow { transform: translateX(6px); }

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* 6. Hero ----------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 140px 0 96px;
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.hero__eyebrow { margin-bottom: 36px; }
.hero__title {
  font-size: clamp(3.2rem, 9vw, 7.6rem);
  line-height: 0.98;
  font-weight: 300;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__statement {
  max-width: 34ch;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.4;
  margin: 36px 0 0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 48px; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 12px 40px;
  margin-top: 72px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.hero__meta strong { font-weight: 500; color: var(--espresso); }
.status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
}

/* 7. Section headings ----------------------------------------------------- */
.section-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: baseline;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section-head__number {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}
.section-head__number::after {
  content: ""; display: inline-block; width: 48px; height: 1px;
  background: var(--muted); vertical-align: middle; margin-left: 14px;
}
.section-head__title { font-size: clamp(2.4rem, 5vw, 4rem); }
.section-head__title em { font-style: italic; }
.section-head__intro {
  grid-column: 2;
  max-width: 56ch;
  margin-top: 20px;
  color: var(--text-muted);
}

/* 8. About ---------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.about__portrait {
  aspect-ratio: 4 / 5;
  background: var(--champagne);
  position: relative;
  overflow: hidden;
}
.about__portrait img { width: 100%; height: 100%; object-fit: cover; }
/* Placeholder shown until you add images/julie-portrait.jpg */
.portrait-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  margin: 18px;
  text-align: center;
  color: var(--muted);
}
.portrait-placeholder__mono {
  font-family: var(--font-serif); font-style: italic;
  font-size: 4.5rem; line-height: 1; color: var(--espresso); opacity: 0.85;
}
.about__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.3;
  margin-bottom: 32px;
}
.about__body { max-width: 58ch; }
.about__facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.about__facts dt { margin-bottom: 6px; }
.about__facts dd { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.3; }

/* 9. Selected work -------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(56px, 7vw, 96px) clamp(28px, 4vw, 56px);
}
.work-grid > :nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }

.card { display: block; text-decoration: none; }
.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}
.card__media img,
.card__media .cover {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.card:hover .card__media img,
.card:hover .card__media .cover { transform: scale(1.04); }
.card__media img.contain { object-fit: contain; padding: 6%; background: #fff; }

.card__body { padding-top: 24px; }
.card__meta {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.card__title {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  margin-bottom: 12px;
  transition: color 0.35s var(--ease);
}
.card:hover .card__title { color: var(--accent); }
.card__summary { color: var(--text-muted); margin-bottom: 20px; max-width: 46ch; }

.badge {
  display: inline-block;
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(156, 46, 85, 0.35);
  padding: 4px 10px;
  white-space: nowrap;
}

/* Typographic covers: elegant placeholders where there is no photo */
.cover {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(20px, 3vw, 36px);
  background: var(--bg-soft);
  color: var(--espresso);
  position: relative;
}
.cover::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.cover__top, .cover__bottom {
  position: relative;
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.cover__bottom { display: flex; justify-content: space-between; }
.cover__word {
  position: relative;
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 0.95;
}
.cover--dark { background: var(--chocolate); color: var(--petal); }
.cover--dark::before { border-color: rgba(251, 232, 236, 0.2); }
.cover--dark .cover__top, .cover--dark .cover__bottom { color: var(--rose); }
.cover--berry { background: var(--accent); color: var(--pearl); }
.cover--berry::before { border-color: rgba(255, 248, 249, 0.28); }
.cover--berry .cover__top, .cover--berry .cover__bottom { color: rgba(255, 248, 249, 0.75); }

/* 10. Skills -------------------------------------------------------------- */
.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
}
.skills__group h3 {
  font-size: 1.75rem;
  padding-bottom: 18px; margin-bottom: 8px;
  border-bottom: 1px solid var(--espresso);
}
.skills__group ul { list-style: none; margin: 0; padding: 0; }
.skills__group li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.skills__group li small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 11. Freelance services -------------------------------------------------- */
.services-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  margin-bottom: 56px;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--espresso);
}
.service {
  padding: 40px clamp(20px, 3vw, 40px) 44px 0;
  border-bottom: 1px solid var(--line);
}
.service + .service {
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--line);
}
.service__num {
  font-family: var(--font-serif); font-style: italic;
  color: var(--muted); font-size: 1.1rem;
}
.service__title { font-size: 1.85rem; margin: 18px 0 16px; }
.service p { color: var(--text-muted); }
.service ul {
  list-style: none; padding: 0; margin: 20px 0 0;
  font-size: 0.88rem;
}
.service li { padding: 6px 0 6px 22px; position: relative; }
.service li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 10px; height: 1px; background: var(--accent);
}
.discovery {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px;
  margin-top: 56px; padding: clamp(28px, 4vw, 48px);
  background: var(--bg-soft);
  border-radius: 28px;
}
.discovery h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.discovery p { margin: 8px 0 0; color: var(--text-muted); }

/* 12. Contact ------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(48px, 8vw, 128px);
}
.contact__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.35;
  margin-bottom: 40px;
}
.contact__list { list-style: none; margin: 0; padding: 0; }
.contact__list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__list li:first-child { border-top: 1px solid var(--line); }
.contact__list .eyebrow { display: block; margin-bottom: 4px; }
.contact__list a {
  font-family: var(--font-serif); font-size: 1.35rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.3s var(--ease);
}
.contact__list a:hover { color: var(--accent); }

.form { display: grid; gap: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.field label { display: block; margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--espresso);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--muted);
  border-radius: 0;
  padding: 10px 0;
  transition: border-color 0.3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.form__note { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.form__status { font-size: 0.9rem; color: var(--accent); min-height: 1.5em; margin: 0; }

/* 13. Footer -------------------------------------------------------------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* 14. Case study pages ---------------------------------------------------- */
.cs-header { padding: 150px 0 64px; }
.cs-back { margin-bottom: 56px; }
.cs-back .arrow { display: inline-block; }
.cs-back:hover .arrow { transform: translateX(-6px); }
.cs-title {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  font-weight: 300;
  max-width: 16ch;
  margin: 20px 0 32px;
}
.cs-title em { font-style: italic; color: var(--accent); }
.cs-lede {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.4;
  max-width: 40ch;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.cs-meta dt { margin-bottom: 6px; }
.cs-meta dd { margin: 0; font-size: 0.95rem; }

.cs-hero { margin-bottom: clamp(72px, 10vw, 128px); }
.cs-hero__media { aspect-ratio: 16 / 8; overflow: hidden; background: var(--bg-soft); }
.cs-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.cs-hero__media img.contain { object-fit: contain; background: #fff; }
.cs-hero__media .cover { width: 100%; height: 100%; }
.cs-hero__media .cover__word { font-size: clamp(3rem, 10vw, 8rem); }
.cs-caption { font-size: 0.78rem; color: var(--text-muted); margin-top: 12px; }

.cs-section {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.cs-section__label h2 { font-size: 1.9rem; }
.cs-section__label .eyebrow { display: block; margin-bottom: 10px; }
.cs-section__body { max-width: 68ch; }
.cs-section__body h3 {
  font-size: 1.45rem; margin: 32px 0 10px;
}
.cs-section__body h3:first-child { margin-top: 0; }
.cs-section__body ul { padding-left: 0; list-style: none; margin: 0 0 1.2em; }
.cs-section__body li { padding: 8px 0 8px 26px; position: relative; }
.cs-section__body li::before {
  content: ""; position: absolute; left: 0; top: 1.25em;
  width: 12px; height: 1px; background: var(--accent);
}

.cs-quote {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.35;
  padding-left: 28px;
  border-left: 1px solid var(--accent);
  margin: 32px 0;
}

.cs-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.cs-point { padding: 22px 0; border-bottom: 1px solid var(--line); }
.cs-point__num { font-family: var(--font-serif); font-style: italic; color: var(--muted); }
.cs-point h3 { font-size: 1.35rem; margin: 6px 0 8px; }
.cs-point p { font-size: 0.95rem; color: var(--text-muted); }

.cs-result {
  background: var(--bg-soft);
  padding: clamp(28px, 4vw, 48px);
}
.cs-result__big {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
}

.cs-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cs-gallery figure { margin: 0; }
.cs-gallery img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.cs-gallery figcaption { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

/* Placeholder text you need to replace: visible on purpose */
.placeholder {
  background: rgba(156, 46, 85, 0.07);
  border: 1px dashed rgba(156, 46, 85, 0.45);
  padding: 2px 8px;
  color: var(--accent);
  font-style: normal;
}
div.placeholder, p.placeholder { display: block; padding: 18px 20px; }

.cs-next {
  display: block;
  text-decoration: none;
  padding: clamp(64px, 9vw, 112px) 0;
  margin-top: 56px;
  background: var(--bg-soft);
}
.cs-next__title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 300;
  margin-top: 16px;
  transition: color 0.35s var(--ease);
}
.cs-next:hover .cs-next__title { color: var(--accent); }
.cs-next .arrow { display: inline-block; transition: transform 0.35s var(--ease); }
.cs-next:hover .arrow { transform: translateX(10px); }

/* 15. Animations ---------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.12s; }
.js .reveal[data-delay="2"] { transition-delay: 0.24s; }
.js .reveal[data-delay="3"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* 16. Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
  .section-head { grid-template-columns: 1fr; gap: 14px; }
  .section-head__intro { grid-column: 1; }
  .about, .contact { grid-template-columns: 1fr; }
  .about__portrait { max-width: 420px; }
  .skills { grid-template-columns: 1fr 1fr; }
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 36px 0 40px; border-left: 0; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-section { grid-template-columns: 1fr; gap: 20px; padding: 44px 0; }
}

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  }
  .nav__links a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav.is-open { background: var(--bg); border-bottom-color: var(--line); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }

  .work-grid { grid-template-columns: 1fr; }
  .work-grid > :nth-child(even) { margin-top: 0; }
  .skills { grid-template-columns: 1fr; }
  .about__facts { grid-template-columns: 1fr; gap: 18px; }
  .form__row { grid-template-columns: 1fr; }
  .cs-points { grid-template-columns: 1fr; }
  .cs-gallery { grid-template-columns: 1fr; }
  .cs-hero__media { aspect-ratio: 4 / 3; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* 17. Animation effects (see js/animations.js) ----------------------------- */

/* Lenis smooth scrolling handles scrolling itself, so turn off CSS smooth scroll */
html.lenis { scroll-behavior: auto; }

/* Silk & 3D blob
   The still images are always set as backgrounds. On computers that can run the
   live version, the canvases fade in on top of them (see js/animations.js). */
.hero {
  overflow: hidden;
  background: var(--pearl) url("../images/hero-still-wide.jpg") right center / cover no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  .hero { background-image: url("../images/hero-still-tall.jpg"); background-position: right top; }
}

.hero__silk,
.hero__blob,
.section__silk {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 2.4s var(--ease);
  pointer-events: none;
}
.hero__silk.is-ready,
.hero__blob.is-ready,
.section__silk.is-ready { opacity: 1; }
/* The blob only needs the right side of the hero, which keeps it light to draw */
.hero__blob { left: auto; right: 0; width: 60%; }
.hero::after { /* soft fade at the bottom so the hero melts into the page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14%;
  background: linear-gradient(to bottom, rgba(248, 235, 239, 0), var(--bg-soft));
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; }

/* Hide hero text until it animates in (only when animations will run).
   A 3-second failsafe in each page's <head> shows it anyway. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.anim-ready) [data-blur-text],
  .js:not(.anim-ready) [data-blur-after] { visibility: hidden; }
}

/* Blur Text and Scroll Reveal word wrappers */
.blur-word, .reveal-word { will-change: transform, opacity, filter; }

/* Split Text: give each masked line a little room so letters like g, y and j aren't clipped */
.split-line { padding-bottom: 0.08em; margin-bottom: -0.08em; }
[data-split-lines] .split-line-mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* Tilted Card */
[data-tilt-inner] { will-change: transform; }

/* Quote attribution, e.g. marker's feedback */
.cs-quote__source {
  display: block;
  margin-top: 12px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Small note under findings (scope, limitations) */
.cs-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 24px;
}

/* About photo sits on top of the monogram placeholder once it's added */
.about__portrait img { position: absolute; inset: 0; z-index: 1; }

/* Count Up: digits keep the same width while counting, so nothing jumps */
[data-count] { font-variant-numeric: tabular-nums; }

/* 18. Layout polish (step 1) --------------------------------------------- */
.lede, .about__body p, .card__summary, .service p, .cs-section__body p { color: var(--text-muted); }
.about__body { color: var(--text-muted); }
@media (max-width: 760px) {
  .hero { padding: 120px 0 72px; }
  .hero__meta { margin-top: 48px; flex-direction: column; gap: 10px; }
  .hero__statement { margin-top: 24px; }
  .hero__actions { margin-top: 36px; }
  .about { gap: 40px; }
  .about__portrait { max-width: none; }
  .work-grid { gap: 64px; }
  .card__body { padding-top: 20px; }
  .services-note { margin-bottom: 36px; }
  .discovery { flex-direction: column; align-items: flex-start; }
  .contact { gap: 48px; }
  .cs-header { padding: 120px 0 48px; }
  .cs-meta { gap: 18px; margin-top: 40px; }
}

/* 19. Section headings & About (step 2) ---------------------------------- */

/* "01 ——  About" on one line, close together; the intro sits below */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 22px;
  row-gap: 0;
}
.section-head__number { flex: none; color: var(--accent); }
.section-head__number::after { background: var(--accent); opacity: 0.55; }
.section-head__intro { flex: 0 0 100%; max-width: none; padding-right: max(0px, calc(100% - 56ch)); grid-column: auto; margin-top: 22px; }

/* Portrait: thin offset outline frame behind the photo */
.about__portrait {
  overflow: visible;
  isolation: isolate;
  margin: 0 22px 22px 0;          /* room for the offset frame */
}
.about__portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(22px, 22px);
  border: 1px solid var(--accent);
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
}
/* A subtle warm, rosy colour grade so the photo matches the palette */
.about__portrait img {
  object-position: 54% 40%;
  filter: saturate(0.9) sepia(0.1) contrast(0.97) brightness(1.03);
}
.about__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(160deg, rgba(246, 211, 220, 0.30), rgba(233, 220, 208, 0.22));
  mix-blend-mode: soft-light;
  pointer-events: none;
}
@media (max-width: 760px) {
  .about__portrait::before { transform: translate(14px, 14px); }
  .about__portrait { margin: 0 14px 14px 0; }
}

/* 20. Project cards (step 3) --------------------------------------------- */
.card__meta { align-items: baseline; }
.card__index {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.card__year { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.08em; }
.card__summary { margin-bottom: 18px; }
.card__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 24px; padding: 0;
}
.card__tags li {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.35);
}

/* Typographic covers in the site colours */
.cover--blush { background: var(--bg-soft); color: var(--text); }
.cover--ivory { background: #F4EDE6; color: var(--text); }
.cover--champagne { background: var(--champagne); color: var(--text); }
.cover--champagne::before { border-color: rgba(57, 38, 34, 0.18); }
.cover--espresso { background: var(--espresso); color: var(--petal); }
.cover--espresso::before { border-color: rgba(251, 232, 236, 0.2); }
.cover--espresso .cover__top, .cover--espresso .cover__bottom { color: var(--rose); }
.cover--blush .cover__word, .cover--ivory .cover__word, .cover--champagne .cover__word { color: var(--text); }

/* Hover: the arrow travels a little further */
.card:hover .text-link .arrow { transform: translateX(10px); }

/* Floating "View project" button that follows the mouse over a card */
.view-chip {
  position: fixed; top: 0; left: 0; z-index: 70;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--petal);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 0.62rem; font-weight: 500; line-height: 1.5;
  letter-spacing: 0.18em; text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.45s var(--ease), scale 0.45s var(--ease);
}
.view-chip.is-visible { opacity: 1; scale: 1; }
@media (hover: none), (prefers-reduced-motion: reduce) { .view-chip { display: none; } }

/* 21. Skills panels & tools strip (step 4) -------------------------------- */
.skill-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.skill-panel {
  border: 1px solid var(--line);
  background: rgba(252, 249, 246, 0.55);
  padding: clamp(28px, 3.5vw, 44px);
  transition: border-color 0.6s var(--ease), background-color 0.6s var(--ease);
}
.skill-panel:hover { border-color: rgba(150, 40, 78, 0.35); background: rgba(252, 249, 246, 0.85); }
.skill-panel__num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3.4rem, 6vw, 5rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 28px;
}
.skill-panel__title {
  font-size: 1.7rem;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.skill-panel ul { list-style: none; margin: 0; padding: 0; }
.skill-panel li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.skill-panel li:last-child { border-bottom: 0; }

.tools-strip {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px 40px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.tools-strip__label { flex: none; }
.tools-strip__list {
  display: flex; flex-wrap: wrap; gap: 10px 0;
  list-style: none; margin: 0; padding: 0;
}
.tools-strip__list li {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  color: var(--text);
  padding: 0 22px;
  position: relative;
}
.tools-strip__list li:first-child { padding-left: 0; }
.tools-strip__list li + li::before {
  content: ""; position: absolute; left: -2px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); opacity: 0.55;
}
@media (max-width: 960px) {
  .skill-panels { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tools-strip__list li { padding: 0 16px; }
}

/* 22. Espresso contact, footer, nav & progress bar (step 5) --------------- */
.section--dark { background: var(--espresso); color: var(--petal); }
.section--dark .section-head__number { color: var(--rose); }
.section--dark .section-head__number::after { background: var(--rose); }
.section-head__label { color: rgba(251, 232, 236, 0.7); }

.contact__statement {
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 13ch;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.contact__statement em { font-style: italic; color: var(--rose); }
.contact__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px;
  margin-bottom: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(48px, 6vw, 72px);
  border-bottom: 1px solid rgba(251, 232, 236, 0.16);
}

/* Light pill button for dark backgrounds */
.btn--light { background: var(--petal); color: var(--espresso); border-color: var(--petal); }
.btn--light:hover { background: var(--soft-pink); border-color: var(--soft-pink); color: var(--espresso); }
.text-link--light { color: var(--petal); }

.section--dark .contact__lead { color: rgba(251, 232, 236, 0.85); }
.section--dark .contact__list li { border-color: rgba(251, 232, 236, 0.16); }
.section--dark .contact__list .eyebrow { color: var(--rose); }
.section--dark .contact__list a, .section--dark .contact__list span { color: var(--petal); }
.section--dark .contact__list a:hover { color: var(--rose); }
.section--dark .field label { color: var(--rose); }
.section--dark .field input,
.section--dark .field select,
.section--dark .field textarea { color: var(--petal); border-bottom-color: rgba(251, 232, 236, 0.35); }
.section--dark .field select option { color: var(--text); }
.section--dark .field input:focus,
.section--dark .field select:focus,
.section--dark .field textarea:focus { border-bottom-color: var(--rose); }
.section--dark .form__note { color: rgba(251, 232, 236, 0.6); }
.section--dark .form__status { color: var(--rose); }
.section--dark ::selection { background: var(--rose); color: var(--espresso); }

/* Footer joins the espresso contact section */
.footer {
  background: var(--espresso);
  color: rgba(251, 232, 236, 0.65);
  border-top: 1px solid rgba(251, 232, 236, 0.12);
}
.footer a { color: var(--petal); }
.footer a:hover { color: var(--rose); }

/* Navigation: animated underline also marks the section you're in */
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__links a { transition: color 0.4s var(--ease); }
.nav__links a.is-active { color: var(--accent); }

/* Thin scroll progress bar at the very top */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
.cs-next__title { font-family: var(--font-serif); }

/* 23. Case study visuals ---------------------------------------------------
   Reusable figures for case study pages: number graphic (.stat-flow),
   three-number row (.stat-trio), VRIO table (.vrio), stakeholder map
   (.stake-map) and a three-market strip (.market-strip).                     */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.cs-figure { margin: 36px 0 40px; }
.cs-figure figcaption {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Photo cover with a warm grade and a small credit */
.cs-hero__media--photo { position: relative; }
.cs-hero__media--photo img {
  filter: saturate(0.88) sepia(0.12) contrast(0.97) brightness(1.03);
}
.cs-hero__media--photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(246, 211, 220, 0.28), rgba(233, 220, 208, 0.2));
  mix-blend-mode: soft-light;
}
.cs-credit { font-size: 0.74rem; color: var(--muted); margin-top: 10px; }

/* Number graphic: "300,000 → 6.2 million" */
.stat-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px;
  padding: clamp(24px, 3.5vw, 40px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; }
.stat__num {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1;
  color: var(--text);
}
.stat--accent .stat__num { color: var(--accent); }
.stat__label {
  margin-top: 10px;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.stat-flow__arrow {
  flex: 1 1 60px; max-width: 140px; min-width: 48px;
  height: 1px; background: var(--accent); position: relative;
}
.stat-flow__arrow::after {
  content: ""; position: absolute; right: 0; top: -4px;
  width: 9px; height: 9px;
  border-top: 1px solid var(--accent); border-right: 1px solid var(--accent);
  transform: rotate(45deg);
}

/* Three numbers in a row */
.stat-trio {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--accent);
}
.stat-trio .stat { padding: 22px 20px 4px 0; }
.stat-trio .stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat-trio .stat__num { font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--accent); }
.stat-trio .stat__label { text-transform: none; letter-spacing: 0; font-size: 0.85rem; font-weight: 400; color: var(--text-muted); line-height: 1.5; }

/* VRIO table */
.vrio { width: 100%; border-collapse: collapse; }
.vrio th {
  text-align: left; padding: 0 0 12px;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--text);
}
.vrio td { padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-muted); font-size: 0.95rem; }
.vrio td:first-child { width: 34%; font-family: var(--font-serif); font-size: 1.35rem; color: var(--text); }
.vrio__mark { display: inline-block; width: 1.6em; font-family: var(--font-serif); font-size: 1.2rem; color: var(--text); }
.vrio__key td { background: rgba(150, 40, 78, 0.05); }
.vrio__key td:first-child { color: var(--accent); padding-left: 12px; }
.vrio__key .vrio__mark { color: var(--accent); }
.flag {
  display: inline-block; margin-left: 8px;
  font-size: 0.64rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pearl); background: var(--accent);
  border-radius: 999px; padding: 3px 10px; vertical-align: middle;
}

/* Stakeholder map: four groups around the festival */
.stake-map {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.stake-map::before, .stake-map::after {   /* thin cross through the middle */
  content: ""; position: absolute; background: var(--line); z-index: 0;
}
.stake-map::before { left: 50%; top: 8%; bottom: 8%; width: 1px; }
.stake-map::after { top: 50%; left: 8%; right: 8%; height: 1px; }
.stake {
  position: relative; z-index: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 22px 22px 24px;
  min-height: 132px;
}
.stake__name { display: block; font-family: var(--font-serif); font-size: 1.4rem; color: var(--text); margin-bottom: 6px; }
.stake__aim { display: block; font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }
.stake--key { border-color: var(--accent); }
.stake--key .stake__name { color: var(--accent); }
.stake .flag { margin: 12px 0 0; }
.stake-map__centre {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  width: 104px; height: 104px; margin: -52px 0 0 -52px;
  border-radius: 50%;
  background: var(--espresso); color: var(--petal);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 1.2;
}
.stake:nth-child(odd) { padding-right: 60px; }
.stake:nth-child(even) { padding-left: 60px; }

/* Three markets, three regulators */
.market-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.market {
  border-top: 1px solid var(--accent);
  padding-top: 16px;
}
.market__place { display: block; font-family: var(--font-serif); font-size: 1.45rem; color: var(--text); }
.market__body { display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 6px 0 10px; }
.market__what { display: block; font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }

@media (max-width: 760px) {
  .stat-trio, .market-strip { grid-template-columns: 1fr; }
  .stat-trio .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stake-map { grid-template-columns: 1fr; }
  .stake-map::before, .stake-map::after, .stake-map__centre { display: none; }
  .stake:nth-child(odd), .stake:nth-child(even) { padding: 20px; min-height: 0; }
  .vrio td:first-child { width: 40%; font-size: 1.15rem; }
}
/* Number graphic: keep "A → B" on one line in the text column; stack on phones */
.stat-flow { flex-wrap: nowrap; }
.stat-flow .stat__num { font-size: clamp(2.1rem, 3.6vw, 3rem); white-space: nowrap; }
@media (max-width: 760px) {
  .stat-flow { flex-direction: column; align-items: flex-start; }
  .stat-flow__arrow { width: 1px; height: 36px; flex: none; min-width: 0; margin-left: 18px; }
  .stat-flow__arrow::after { right: -4px; top: auto; bottom: 0; transform: rotate(135deg); }
}

/* Printing or saving as PDF: show everything, with no animation states */
@media print {
  .js .reveal, [data-blur-text], [data-blur-after] { opacity: 1 !important; transform: none !important; visibility: visible !important; }
  .split-line, .blur-word, .reveal-word { opacity: 1 !important; transform: none !important; filter: none !important; }
  .nav, .scroll-progress, .view-chip, .hero__silk, .hero__blob { display: none !important; }
}

/* 24. "Prove It" campaign cover (HiSmile) -----------------------------------
   A phone with a TikTok-style screen, drawn in HTML/CSS so it uses the site
   fonts and scales to its frame (case study header and home page card).     */
.campaign-cover {
  container-type: size;
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  gap: 7cqw;
}
.campaign-cover::before {            /* a thin ring behind the phone */
  content: ""; position: absolute;
  width: 96cqh; height: 96cqh; border-radius: 50%;
  right: 50%; margin-right: -62cqh; top: 2cqh;
  border: 1px solid rgba(150, 40, 78, 0.22);
}
.campaign-cover__side {
  position: relative;
  max-width: 32cqw;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2.4cqh;
}
.campaign-cover__label {
  font-size: max(9px, 2.1cqh); font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--pearl); background: var(--accent);
  border-radius: 999px; padding: 0.6em 1.2em;
}
.campaign-cover__line {
  font-size: max(10px, 2.6cqh); font-weight: 500; line-height: 1.6;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text);
}
.campaign-cover__note { font-size: max(9px, 2cqh); color: var(--muted); line-height: 1.5; }

.phone {
  position: relative;
  height: 84cqh; aspect-ratio: 9 / 18.5;
  border-radius: 6cqh;
  background: var(--espresso);
  padding: 1.3cqh;
  transition: transform 1.2s var(--ease);
}
.phone__screen {
  position: relative; height: 100%;
  border-radius: 4.8cqh; overflow: hidden;
  background: linear-gradient(170deg, #4b3029 0%, #392622 55%, #2b1c19 100%);
  color: var(--petal);
}
.phone__episodes { position: absolute; top: 3cqh; left: 6%; right: 6%; display: flex; gap: 0.8cqh; }
.phone__episodes i { flex: 1; height: 2px; border-radius: 2px; background: rgba(251, 232, 236, 0.28); }
.phone__episodes i.is-on { background: var(--petal); }
.phone__tag {
  position: absolute; top: 6.5cqh; left: 6%;
  font-size: max(7px, 1.5cqh); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rose); border: 1px solid rgba(235, 178, 192, 0.6);
  border-radius: 999px; padding: 0.4em 0.9em;
}
.phone__title {
  position: absolute; left: 8%; right: 8%; top: 30%;
  margin: 0;
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: 9.5cqh; line-height: 1; color: var(--petal);
}
.phone__title::after {
  content: ""; display: block; width: 26%; height: 1px; margin-top: 2.4cqh;
  background: var(--rose);
}
.phone__rail {
  position: absolute; right: 5%; bottom: 23%;
  display: flex; flex-direction: column; gap: 2.6cqh;
}
.phone__rail svg {
  width: 4.2cqh; height: 4.2cqh;
  fill: none; stroke: var(--petal); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round;
}
.phone__caption {
  position: absolute; left: 7%; right: 22%; bottom: 8%;
  margin: 0;
  font-size: max(7px, 1.75cqh); line-height: 1.45;
  color: rgba(251, 232, 236, 0.9);
}
.phone__caption strong { color: var(--petal); font-weight: 500; }
.phone__caption span { display: block; margin-top: 0.4em; color: var(--rose); }
.phone__scrub { position: absolute; left: 0; right: 0; bottom: 3.4cqh; height: 2px; background: rgba(251, 232, 236, 0.22); }
.phone__scrub span { display: block; width: 36%; height: 100%; background: var(--rose); }

.card:hover .campaign-cover .phone { transform: scale(1.03); }
@container (max-width: 520px) {
  .campaign-cover { gap: 5cqw; }
  .campaign-cover__note { display: none; }
}

/* Screenshot tools: show everything in its finished state (see main.js, 3b) */
.reveal-all .reveal,
.reveal-all [data-blur-text], .reveal-all [data-blur-after] { opacity: 1 !important; transform: none !important; visibility: visible !important; transition: none !important; }
.reveal-all .split-line, .reveal-all .blur-word, .reveal-all .reveal-word { opacity: 1 !important; transform: none !important; filter: none !important; visibility: visible !important; }

/* Small cover labels: a touch larger so they read clearly */
.cover__top, .cover__bottom { font-size: 0.72rem; letter-spacing: 0.18em; }

/* 25. Selected work: editorial list (studio style) ------------------------- */
[hidden] { display: none !important; }

.section-head__count {
  font-family: var(--font-sans);
  font-size: 0.32em; font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  vertical-align: super;
  margin-left: 0.35em;
}

.work-list { border-top: 1px solid var(--line); }
.work-row {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);   /* text | image */
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
  padding: clamp(44px, 6vw, 88px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
/* Zig-zag: even rows put the image on the left */
.work-row:nth-child(even) { grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); }
.work-row:nth-child(even) .work-row__media { order: -1; }

.work-row__text { position: relative; }
/* Very large outline number, light, with the title aligned to it */
.work-row__num {
  display: block;
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(5rem, 9vw, 8.5rem); line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  opacity: 0.35;
  margin: 0 0 -0.12em -0.04em;
  pointer-events: none;
  user-select: none;
}
.work-row__title {
  position: relative;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.work-row__title span {           /* underline that draws from left to right on hover */
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 1px no-repeat;
  transition: background-size 0.9s var(--ease);
  padding-bottom: 2px;
}
.work-row:hover .work-row__title span { background-size: 100% 1px; }

.work-row__summary { color: var(--text-muted); margin-bottom: 22px; max-width: 34ch; }

/* Tags as small pills */
.work-row__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 30px; padding: 0;
}
.work-row__tags li {
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  line-height: 1.4;
}

.work-row__text .text-link .arrow { display: inline-block; transition: transform 0.6s var(--ease); }
.work-row:hover .work-row__text .text-link .arrow { transform: rotate(-45deg); }   /* → becomes ↗ */

/* Image frame */
.work-row__media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft);
  isolation: isolate;
}
.work-row__media > .cover,
.work-row__media > .campaign-cover {
  width: 100%; height: 100%;
  transition: transform 1.4s var(--ease);
}
.work-row__media > .cover::before { inset: 18px; }
/* Photos sit in a slightly taller frame so they can move (parallax) */
.work-row__parallax { position: absolute; left: 0; right: 0; top: -8%; height: 116%; }
.work-row__parallax img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.work-row:hover .work-row__parallax img,
.work-row:hover .work-row__media > .cover,
.work-row:hover .work-row__media > .campaign-cover { transform: scale(1.04); }

/* Frosted-glass category pill */
.work-row__pill {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text);
  background: rgba(252, 249, 246, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 7px 14px;
  pointer-events: none;
}
.work-row__credit {
  position: absolute; right: 14px; bottom: 12px; z-index: 3;
  font-size: 0.62rem; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* "View project" circle: appears over images only, and vanishes instantly */
.view-chip:not(.is-visible) { transition: none; }

@media (max-width: 760px) {
  .work-row,
  .work-row:nth-child(even) { grid-template-columns: 1fr; gap: 26px; padding: 44px 0; }
  .work-row .work-row__media,
  .work-row:nth-child(even) .work-row__media { order: -1; }     /* image above the text */
  .work-row__num { font-size: 4.6rem; }
  .work-row__media { border-radius: 12px; }
}
/* In the work rows the frosted pill replaces the cover's own top label */
.work-row__media .cover__top { visibility: hidden; }
.work-row__num { font-size: clamp(5.5rem, 10.5vw, 9.5rem); }
@media (max-width: 760px) { .work-row__media .cover__bottom { display: none; } }

/* Glass ribbon canvas: covers the whole hero (it draws the satin background too) */
.hero__ribbon {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 2.4s var(--ease);
  pointer-events: none;
}
.hero__ribbon.is-ready { opacity: 1; }

/* 26. Selected work: frosted glass cards ---------------------------------- */
.work-row { position: relative; gap: 0; }
/* Soft blush glow behind each card (on the card's side of the row) */
.work-row::before {
  content: ""; position: absolute; z-index: 0;
  top: 50%; left: -4%; width: 50%; height: 90%;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(244, 182, 200, 0.55), rgba(244, 182, 200, 0));
  filter: blur(24px);
  opacity: 0.8;
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}
.work-row:nth-child(even)::before { left: auto; right: -4%; }
.work-row:hover::before { opacity: 1; }

.work-row__media { z-index: 1; }

/* The glass card */
.work-row__text {
  z-index: 2;
  padding: clamp(28px, 3vw, 44px);
  margin-right: -110px;                       /* overlaps the image by about 110px */
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 24px 60px -28px rgba(120, 40, 70, 0.22);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
.work-row:nth-child(even) .work-row__text { margin-right: 0; margin-left: -110px; }
/* A light highlight along the top edge, like real glass */
.work-row__text::after {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.work-row:hover .work-row__text { transform: translateY(-4px); box-shadow: 0 30px 70px -28px rgba(120, 40, 70, 0.28); }
.work-row__num { margin-top: -0.06em; }

/* Keep the category pill clear of the card */
.work-row:nth-child(odd) .work-row__pill { left: auto; right: 16px; }

/* No backdrop blur in this browser: a solid ivory card instead */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .work-row__text { background: var(--bg); }
}

@media (max-width: 760px) {
  .work-row { gap: 0; }
  .work-row__text,
  .work-row:nth-child(even) .work-row__text {
    margin: 16px 0 0;                       /* stacked below the image, no overlap */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 26px 22px;
  }
  .work-row::before, .work-row:nth-child(even)::before { left: 0; right: 0; width: 100%; top: auto; bottom: 0; height: 60%; transform: none; }
  .work-row:nth-child(odd) .work-row__pill { right: auto; left: 12px; }
}

/* 27. Selected work: compact stacked rows (mockup) ------------------------ */
.work-list { border-top: 0; display: grid; gap: clamp(20px, 3vw, 40px); }
.work-row { padding: clamp(18px, 2.4vw, 32px) 0; border-bottom: 0; }
.work-row__media { border-radius: 20px; aspect-ratio: 16 / 9; }
.work-row__text { margin-right: -90px; }
.work-row:nth-child(even) .work-row__text { margin-right: 0; margin-left: -90px; }
.work-row__pill, .work-row__num { display: none; }

/* Inside the glass card */
.work-row__label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.work-row__title { font-style: italic; font-weight: 400; font-size: clamp(1.9rem, 2.8vw, 2.5rem); margin-bottom: 14px; }
.work-row__title span { background: none; padding: 0; }          /* no underline */
.work-row__summary {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;   /* two lines */
  overflow: hidden;
  margin-bottom: 18px;
}
.work-row__tags { margin-bottom: 22px; }
.work-row:hover .work-row__text .text-link .arrow { transform: translateX(8px); }   /* arrow moves right */

/* HiSmile: the phone mockup on a soft pink silk background */
.work-row__media > .campaign-cover {
  background:
    radial-gradient(120% 90% at 18% 12%, rgba(255, 248, 249, 0.95) 0%, rgba(255, 248, 249, 0) 55%),
    radial-gradient(90% 70% at 85% 90%, rgba(235, 178, 192, 0.55) 0%, rgba(235, 178, 192, 0) 60%),
    linear-gradient(128deg, #FBEEF1 0%, #F6D7DF 38%, #FBEAEE 55%, #F2CFD9 78%, #F8E4E9 100%);
}
.work-row__media > .campaign-cover::before { border-color: rgba(255, 255, 255, 0.55); }

/* Soft palm-leaf shadow across a cover */
.cover--leaves::after {
  content: ""; position: absolute; inset: -6%; z-index: 0;
  background: url("../images/leaf-shadow.svg") right top / cover no-repeat;
  opacity: 0.085;
  filter: blur(6px);
  pointer-events: none;
}
.cover--leaves > * { z-index: 1; }

@media (max-width: 760px) {
  .work-row { padding: 18px 0; }
}
/* Mockup proportions: glass card and image about half each */
.work-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.work-row:nth-child(even) { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.work-row__label { color: var(--text); }
.work-row__tags li { background: rgba(255, 255, 255, 0.55); border-color: rgba(255, 255, 255, 0.8); color: var(--text); }
@media (max-width: 760px) {
  .work-row, .work-row:nth-child(even) { grid-template-columns: 1fr; }
}
/* Summaries: room for both lines in full */
.work-row__summary { max-width: 44ch; }
/* Covers on the right (the card overlaps their left side): lettering sits to the right */
.work-row:nth-child(odd) .work-row__media > .cover { padding-left: calc(90px + clamp(20px, 3vw, 36px)); }
.work-row:nth-child(odd) .work-row__media > .cover::before { left: calc(90px + 14px); }
@media (max-width: 760px) {
  .work-row:nth-child(odd) .work-row__media > .cover { padding-left: clamp(20px, 3vw, 36px); }
  .work-row:nth-child(odd) .work-row__media > .cover::before { left: 14px; }
}
/* Phones: no side overlap; the glass card stacks below the image */
@media (max-width: 760px) {
  .work-row__text,
  .work-row:nth-child(even) .work-row__text { margin: 16px 0 0; }
  .work-row__summary { max-width: none; }
}
@media (max-width: 760px) { .work-row__summary { display: block; -webkit-line-clamp: unset; overflow: visible; } }
/* HiSmile row: keep the "Campaign concept" text clear of the overlapping card */
.work-row:nth-child(odd) .work-row__media > .campaign-cover { padding-left: 90px; }
@media (max-width: 760px) { .work-row:nth-child(odd) .work-row__media > .campaign-cover { padding-left: 0; } }

/* 28. Hero bubble: still image fallback ------------------------------------
   Shown on phones, slower computers and with reduced motion (and while the
   3D version loads). Hidden once the live 3D bubble is running. */
.hero__bubble-still {
  position: absolute;
  z-index: 0;
  left: calc(78.5% - 15vw);
  top: calc(47% - 15vw);
  width: 30vw; aspect-ratio: 1;
  pointer-events: none;
  transition: opacity 1.6s var(--ease);
  animation: bubble-float 8s ease-in-out infinite;
}
.hero__bubble-still img { position: relative; width: 100%; height: 100%; display: block; }
.hero__bubble-still::before {           /* soft blush halo, about 1.6× the bubble */
  content: ""; position: absolute; inset: -30%;
  background: radial-gradient(closest-side, rgba(244, 182, 200, 0.6), rgba(246, 196, 210, 0.32) 45%, rgba(248, 214, 224, 0) 100%);
  animation: halo-pulse 8s ease-in-out infinite;
}
.hero.has-live-bubble .hero__bubble-still { opacity: 0; }
@keyframes bubble-float { 0%, 100% { transform: translateY(-10px); } 50% { transform: translateY(10px); } }
@keyframes halo-pulse { 0%, 100% { transform: scale(0.97); opacity: 0.9; } 50% { transform: scale(1.03); opacity: 1; } }
@media (max-aspect-ratio: 145/100) {
  .hero__bubble-still { width: 25.5vw; left: calc(78.5% - 12.75vw); top: calc(47% - 12.75vw); }
}
@media (max-width: 760px) {
  .hero__bubble-still { width: 31vw; left: auto; right: -7vw; top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bubble-still, .hero__bubble-still::before { animation: none; }
}

/* 29. Detail fixes ----------------------------------------------------------- */
/* Covers: no thin inner frame lines; no circle behind the HiSmile phone */
.cover--berry::before, .cover--champagne::before, .cover--blush::before, .cover--ivory::before { display: none; }
.campaign-cover::before, .work-row__media > .campaign-cover::before { display: none; }
.work-row:nth-child(odd) .work-row__media > .cover::before { display: none; }

/* Glass cards: where they overlap an image, a soft blur with a light white tint and a clean edge */
.work-row__text {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  box-shadow: 0 18px 44px -26px rgba(57, 38, 34, 0.16);
}
@media (max-width: 760px) {
  .work-row__text, .work-row:nth-child(even) .work-row__text { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}

/* Tags: all identical (solid, so the image behind never changes them); change only on hover */
.work-row__tags li,
.card__tags li {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.work-row__tags li:hover,
.card__tags li:hover { border-color: rgba(150, 40, 78, 0.45); color: var(--accent); }

/* "Now open": a rounded pill, like the other labels */
.pill-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--pearl); background: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  line-height: 1.4;
  vertical-align: middle;
}

/* Spacing: tighter after the last project, after the tools strip, and above "Now open" */
#work { padding-bottom: clamp(48px, 6vw, 80px); }
#skills { padding-bottom: clamp(56px, 7vw, 96px); }
#services .section-head { margin-bottom: clamp(20px, 3vw, 32px); }
#services .services-note { margin-bottom: clamp(32px, 4vw, 48px); }
.contact__actions { margin-bottom: clamp(48px, 6vw, 80px); }

/* 30. Refinements --------------------------------------------------------- */
/* Download CV: small pill on the right of the navigation */
.nav__links { align-items: center; }
.nav__links a.nav__cv {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--accent);
  font-size: 0.68rem;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.nav__links a.nav__cv::after { display: none; }
.nav__links a.nav__cv:hover { background: var(--accent); color: var(--pearl); }
@media (max-width: 760px) {
  .nav__links a.nav__cv { display: inline-block; margin-top: 18px; padding: 10px 20px; border-bottom: 1px solid var(--accent); }
}

/* Selected work: less space under the heading; cards shorter than their image,
   centred on it, and a little more opaque */
#work .section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.work-row { align-items: center; }
.work-row__text {
  background: rgba(255, 255, 255, 0.64);
  padding: clamp(22px, 2.4vw, 34px) clamp(26px, 3vw, 40px);
}
.work-row__label { margin-bottom: 10px; }
.work-row__title { margin-bottom: 10px; }
.work-row__summary { margin-bottom: 14px; }
.work-row__tags { margin-bottom: 16px; }
@media (min-width: 761px) {
  .work-row__media { aspect-ratio: 16 / 10; }
}

/* Skills: very subtle frosted glass panels (lighter than the project cards) */
.skill-panel {
  background: rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 14px 36px -28px rgba(57, 38, 34, 0.14);
}
.skill-panel:hover { background: rgba(255, 255, 255, 0.45); border-color: rgba(255, 255, 255, 0.9); }

/* Tools strip: small icon before each name */
.tools-strip { align-items: center; }
.tools-strip__list { align-items: center; }
.tools-strip__list li { display: inline-flex; align-items: center; gap: 10px; }
.tool-icon {
  position: relative; flex: none;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tool-icon::before {                          /* shown until the official icon is added */
  content: attr(data-initial);
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--soft-pink); color: var(--accent);
  font-family: var(--font-sans); font-size: 0.6rem; font-weight: 500;
}
.tool-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-soft); }

/* Services: image space at the top of each card */
.service__media {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
  background:
    radial-gradient(90% 70% at 25% 20%, rgba(255, 248, 249, 0.9), rgba(255, 248, 249, 0) 60%),
    linear-gradient(140deg, #FBEEF1 0%, #F6D7DF 55%, #F8E4E9 100%);
}
.service__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero still: 10% smaller, with a soft pink shadow below that moves with the float */
.hero__bubble-still { width: 27vw; left: calc(78.5% - 13.5vw); top: calc(47% - 13.5vw); }
.hero__bubble-still::after {
  content: ""; position: absolute;
  left: 15%; right: 15%; top: 103%; height: 11%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(176, 92, 122, 0.34), rgba(196, 120, 148, 0.14) 55%, rgba(214, 150, 172, 0));
  filter: blur(8px);
  animation: bubble-shadow 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bubble-shadow {
  0%, 100% { transform: translateY(7px) scale(0.93); opacity: 0.75; }   /* bubble up */
  50%      { transform: translateY(-7px) scale(1.03); opacity: 1; }     /* bubble down */
}
@media (max-aspect-ratio: 145/100) {
  .hero__bubble-still { width: 23vw; left: calc(78.5% - 11.5vw); top: calc(47% - 11.5vw); }
}
@media (max-width: 760px) {
  .hero__bubble-still { width: 28vw; left: auto; right: -6vw; top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bubble-still::after { animation: none; }
}

/* Contact: a very subtle burgundy glow in the bottom-right corner */
#contact { position: relative; overflow: hidden; isolation: isolate; }
#contact::after {
  content: ""; position: absolute; z-index: -1;
  right: -18vw; bottom: -22vw; width: 60vw; height: 50vw;
  background: radial-gradient(closest-side, rgba(150, 40, 78, 0.28), rgba(150, 40, 78, 0));
  pointer-events: none;
}

/* About: "Behind the work." */
#about .section-head__title em { color: var(--accent); }
/* Ivory-blush background with a soft pink glow behind the portrait */
#about {
  background:
    radial-gradient(38vw 34vw at 24% 58%, rgba(244, 190, 206, 0.42), rgba(244, 190, 206, 0) 100%),
    #FBF3F2;
}
/* Portrait: glass frame, floating shadow and blush halo. The photo itself stays sharp. */
.about__side { position: relative; }
.about__portrait {
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.24) 45%, rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.95),       /* highlight along the top and left edges */
    0 46px 70px -38px rgba(57, 38, 34, 0.32),         /* soft floating shadow below */
    0 20px 40px -30px rgba(150, 40, 78, 0.18);
}
.about__portrait::before {                            /* diffused blush halo behind */
  content: ""; position: absolute; z-index: -1;
  inset: -16% -18%;
  transform: none;
  border: 0; opacity: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 182, 200, 0.55), rgba(244, 182, 200, 0));
  filter: blur(20px);
}
.about__portrait img,
.about__portrait::after,
.portrait-placeholder { inset: 10px; border-radius: 7px; }
.about__portrait img { width: calc(100% - 20px); height: calc(100% - 20px); filter: saturate(0.92) sepia(0.14) hue-rotate(-6deg) contrast(0.98) brightness(1.03); }
.portrait-placeholder { margin: 0; overflow: hidden; }
.about__portrait::after { background: linear-gradient(160deg, rgba(246, 205, 214, 0.34), rgba(236, 214, 196, 0.26)); }
.about__signature { display: block; width: 180px; max-width: 60%; height: auto; margin: 28px 0 0 6px; }
@media (max-width: 760px) {
  .about__portrait::before { transform: none; }
  .about__portrait { margin: 0; }
}
.tools-strip__list li + li::before { display: none; }   /* the icons now separate the names */
.tools-strip__list li { padding: 0 26px 0 0; }
/* Services: equal content widths, so the three images match exactly */
@media (min-width: 961px) {
  .services {
    --sx: clamp(20px, 3vw, 40px);
    grid-template-columns:
      minmax(0, calc((100% - 4 * var(--sx)) / 3 + var(--sx)))
      minmax(0, calc((100% - 4 * var(--sx)) / 3 + 2 * var(--sx)))
      minmax(0, calc((100% - 4 * var(--sx)) / 3 + var(--sx)));
  }
  .service:last-child { padding-right: 0; }
}

/* 31. Qingdao cover photo ------------------------------------------------- */
/* The photo is dark: a more opaque glass card keeps the text easy to read */
.work-row--dark-photo .work-row__text { background: rgba(255, 255, 255, 0.78); }
.cs-credit { color: var(--text-muted); }

/* 32. Contact form: spam trap (hidden from people) and sending state ------- */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.form button[disabled] { opacity: 0.6; cursor: wait; }
.section--dark .form__status a { color: var(--petal); }

/* Services photo credit */
.services-credit { margin-top: 14px; }

/* 33. Pre-publish fixes ------------------------------------------------------ */
/* Small grey labels: darker, so they pass the accessibility contrast check (4.5:1) */
:root { --muted: #725C58; }

/* Phones: the halo behind the portrait no longer makes the page scroll sideways */
#about { overflow-x: clip; }

/* Easier to tap: small text links at least 24px tall */
.text-link { min-height: 24px; }
.footer a { display: inline-block; padding: 4px 0; }
.cs-caption .inline-link, .cs-credit a { display: inline-block; padding: 4px 0; }

/* Keyboard: form fields show a clear outline when reached with Tab */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }
.section--dark .field input:focus-visible,
.section--dark .field select:focus-visible,
.section--dark .field textarea:focus-visible { outline-color: var(--rose); }

/* Phones: small labels and tags no smaller than about 11.5px */
@media (max-width: 760px) {
  .eyebrow,
  .work-row__label,
  .work-row__tags li,
  .card__tags li,
  .nav__links a.nav__cv,
  .pill-label { font-size: 0.72rem; }
}

/* Hero still: a light JPG instead of a heavy PNG; a soft round mask gives the same feathered edge */
.hero__bubble-still img {
  -webkit-mask-image: radial-gradient(closest-side, #000 90%, rgba(0, 0, 0, 0.6) 95%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 90%, rgba(0, 0, 0, 0.6) 95%, transparent 100%);
}
@media (max-width: 760px) {
  .campaign-cover__label, .campaign-cover__line, .campaign-cover__note,
  .work-row__credit, .vrio th, .flag { font-size: 0.72rem; }
}

/* Tools & Platforms: names only, separated by raspberry dots; lines wrap evenly */
.tools-strip { align-items: baseline; }
.tools-strip__list {
  display: block;
  flex: 1 1 420px;
  text-wrap: balance;            /* even lines, so no tool sits alone on the last one */
  line-height: 1.9;
}
.tools-strip__list li,
.tools-strip__list li:first-child {
  display: inline;
  padding: 0;
  white-space: nowrap;           /* a name never breaks in the middle */
}
.tools-strip__list li + li::before { display: none; }
.tools-strip__list li:not(:last-child)::after {
  content: "·";                  /* the dot stays with the name before it, so no line starts with a dot */
  color: var(--accent);
  margin: 0 0.6em;
}
@media (max-width: 760px) {
  .tools-strip { flex-direction: column; align-items: center; text-align: center; }
  .tools-strip__list { flex-basis: auto; text-align: center; }
}

/* 34. Phone fixes ------------------------------------------------------------ */
/* Safety net: nothing can make the page scroll sideways */
html, body { overflow-x: clip; }

@media (max-width: 767px) {
  /* Hero: the bubble sits above the name (about 160px), never over the text,
     and the hero is only as tall as its content (no empty gap below) */
  .hero {
    flex-direction: column; align-items: stretch;
    min-height: 0;
    padding: 104px 0 56px;
  }
  .hero__bubble-still,
  .hero__bubble-still {
    position: relative;
    left: auto; right: auto; top: auto;
    width: 160px; height: 160px;
    margin: 0 0 28px var(--gutter);
    flex: none;
  }
  .hero__bubble-still::before { inset: -22%; }
}

/* Skills on phones: small wrapping tags instead of one line each */
@media (max-width: 760px) {
  .skill-panel { padding: 26px 22px 28px; }
  .skill-panel__num { font-size: 2.6rem; margin-bottom: 14px; }
  .skill-panel__title { font-size: 1.45rem; padding-bottom: 14px; margin-bottom: 16px; }
  .skill-panel ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .skill-panel li,
  .skill-panel li:last-child {
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    line-height: 1.4;
  }
}

/* 35. Signature under the portrait ------------------------------------------
   The SVG is drawn at 100px per em and is 1.415em tall, so the height below
   gives a letter size of about 56px (desktop) and 42px (phones). */
.about__signature {
  --sig-size: 56px;
  position: relative; z-index: 3;
  display: block;
  width: auto; max-width: none;
  height: calc(var(--sig-size) * 1.415);
  margin: calc(var(--sig-size) * -0.62) 0 0 calc(var(--sig-size) * 0.4);   /* overlaps the bottom edge of the frame */
  transform: rotate(-4deg);
  transform-origin: left center;
  pointer-events: none;
}
@media (max-width: 760px) {
  .about__signature { --sig-size: 42px; }
}

/* 36. Phone refinements ------------------------------------------------------- */
/* Tools strip: hide the dot after the last name on each line (set by main.js, 4d) */
.tools-strip__list li.is-line-end::after { visibility: hidden; }

@media (max-width: 767px) {
  /* Hero: less space above, a smaller bubble above the name,
     so the name is visible on the first screen */
  .hero { padding: 92px 0 32px; }
  .hero__bubble-still { width: 112px; height: 112px; margin-bottom: 16px; }
  .hero__title { margin-top: 10px; }
  .hero__meta { margin-top: 36px; }
  /* Less space between the hero and "Behind the work" */
  #about { padding-top: 56px; }
}

/* 37. Privacy Policy and Website Terms ------------------------------------------ */
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.form__note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.section--dark .form__note a:hover { color: var(--rose); }
.legal .cs-header { padding-bottom: clamp(32px, 5vw, 56px); }
.legal__updated { margin-top: 24px; font-size: 0.85rem; color: var(--text-muted); }
.legal .cs-section__body { max-width: 68ch; }
.legal .cs-section__body p + p { margin-top: 1em; }
.legal__list { margin: 1em 0 0; padding-left: 1.2em; color: var(--text-muted); }
.legal__list li { margin-bottom: 0.6em; }
.legal__list li::marker { color: var(--accent); }
.legal__list strong, .legal__table strong { color: var(--text); font-weight: 500; }
.legal__table-wrap { overflow-x: auto; margin: 0.5em 0 1.2em; }
.legal__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9rem; }
.legal__table th {
  text-align: left; vertical-align: bottom;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  padding: 0 14px 12px 0; border-bottom: 1px solid var(--espresso);
}
.legal__table td { vertical-align: top; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); color: var(--text-muted); }
.legal__table td:first-child { color: var(--text); }
.legal .cs-section > * { min-width: 0; }   /* the table scrolls inside its own box on phones */
