/* Georgia Needham, portfolio. Teal accent #00AEBD matches the TELUS Spark case study (InDesign, sRGB 0/174/189). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #eef1f5;
  --card: #ffffff;
  --ink: #2c3047;
  --ink-soft: #5a6078;
  --rule: #d3d8e2;
  --cyan: #00aebd;
  --yellow: #ffe158;
  --rose: #f5a8b7;
  --green: #84de78;
  --focus: #2f6bff;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --card-radius: 6px;
  --shadow-card: 0 1px 0 rgba(44, 48, 71, 0.08), 0 8px 24px -12px rgba(44, 48, 71, 0.25);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--card); padding: 0.6rem 1rem;
  border-radius: var(--card-radius); z-index: 20; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Header ---------- */
.site-header { padding: 1.25rem 0; }
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.wordmark {
  font-weight: 750; font-size: 1.15rem; letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark span { color: var(--ink-soft); font-weight: 450; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.9rem, 3vw, 2rem); }
.site-nav a { text-decoration: none; font-weight: 550; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 1rem/1 var(--sans);
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: var(--card); }
.btn-primary:hover { background: #1d2033; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--card); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2rem, 6vw, 5rem) 0 clamp(3rem, 8vw, 6rem); }
.hero .wrap {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 64rem) {
  .hero .wrap { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; }
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 760;
  margin: 0;
  max-width: 15ch;
}
.hero-role { font-size: 1.15rem; font-weight: 600; margin: 0 0 1.25rem; color: var(--ink-soft); }
.hero-intro { font-size: 1.2rem; line-height: 1.5; max-width: 34rem; margin: 1.5rem 0 0; }

/* The sorting table */
.sort-table {
  position: relative;
  background: #e3e8ef;
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 1.75rem);
  min-height: 23rem;
  box-shadow: inset 0 0 0 1px rgba(44,48,71,0.06);
}
.sort-cols {
  display: grid; gap: clamp(0.6rem, 2vw, 1rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.sort-col h2 {
  font-size: 0.95rem; font-weight: 700; margin: 0 0 0.75rem;
  display: flex; align-items: center; gap: 0.45rem;
  transition: opacity 0.5s 0.9s;
}
.sort-col h2::before {
  content: ""; width: 0.8rem; height: 0.8rem; border-radius: 2px; background: var(--tab);
  box-shadow: inset 0 0 0 1px rgba(44,48,71,0.25);
}
.sort-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sort-card {
  background: var(--card);
  border-radius: 3px;
  padding: 0.6rem 0.7rem;
  font-size: 0.92rem; line-height: 1.25; font-weight: 520;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--tab);
  transition: transform 0.9s cubic-bezier(.2,.75,.2,1);
  will-change: transform;
}
.sort-table.is-scattered .sort-col h2 { opacity: 0; transition-delay: 0s; }
.sort-table.is-scattered .sort-card { transition: none; }
.sort-replay {
  margin-top: 1.25rem;
  font: 600 0.92rem/1 var(--sans);
  background: none; border: 0; padding: 0.4rem 0; color: var(--ink);
  text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer;
}
.col-research { --tab: var(--cyan); }
.col-structure { --tab: var(--rose); }
.col-design { --tab: var(--yellow); }

@media (max-width: 34rem) {
  .sort-cols { grid-template-columns: minmax(0, 1fr); }
  .sort-table { min-height: 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.05; letter-spacing: -0.025em;
  font-weight: 740; margin: 0 0 0.75rem;
}
.section-lead { font-size: 1.15rem; max-width: 40rem; margin: 0 0 clamp(2rem, 5vw, 3rem); color: var(--ink-soft); }

/* ---------- Project index cards ---------- */
.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.project {
  display: grid; gap: clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 56rem) {
  .project { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .project:nth-child(even) .project-media { order: 2; }
}
.project-media {
  position: relative; display: block;
  background: var(--card);
  border-radius: var(--card-radius);
  padding: clamp(0.75rem, 2vw, 1.25rem);
  padding-top: clamp(1.4rem, 3vw, 1.9rem);
  box-shadow: var(--shadow-card);
  transform: rotate(-0.6deg);
  transition: transform 0.25s;
}
.project:nth-child(even) .project-media { transform: rotate(0.6deg); }
.project-media:hover, .project-media:focus-visible { transform: rotate(0deg) translateY(-3px); }
.project-media::before {
  /* index card tab */
  content: ""; position: absolute; top: 0; left: clamp(0.75rem, 2vw, 1.25rem);
  width: 5.5rem; height: 0.55rem; background: var(--tab);
  border-radius: 0 0 3px 3px;
}
.project-media img { border-radius: 2px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; background: #f6f7f9; }
.project-media.fit-contain img { object-fit: contain; object-position: center; background: transparent; }
.project-kind { font-weight: 600; color: var(--ink-soft); margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.project-kind::before { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 2px; background: var(--tab); box-shadow: inset 0 0 0 1px rgba(44,48,71,0.25); }
.project h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.9rem; font-weight: 730; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.project p { margin: 0 0 1rem; max-width: 34rem; }
.project-outcome {
  font-weight: 600;
  padding-left: 0.9rem; border-left: 4px solid var(--tab);
}
.text-link { font-weight: 650; text-underline-offset: 0.22em; text-decoration-thickness: 2px; }

.tab-cyan { --tab: var(--cyan); }
.tab-yellow { --tab: var(--yellow); }
.tab-rose { --tab: var(--rose); }

/* ---------- Principles ---------- */
.principles { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: minmax(0, 1fr); margin: 0; }
@media (min-width: 52rem) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.principles > div { border-top: 3px solid var(--ink); padding-top: 1rem; }
.principles dt { font-size: 1.3rem; font-weight: 720; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.principles dd { margin: 0; color: var(--ink-soft); }

/* ---------- How I built this site ---------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
@media (min-width: 44rem) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split-col h3 { font-size: 1.15rem; font-weight: 720; margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.split-col h3::before { content: ""; width: 0.85rem; height: 0.85rem; border-radius: 2px; background: var(--tab); box-shadow: inset 0 0 0 1px rgba(44,48,71,0.25); }
.split-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.split-col .sort-card { font-size: 1rem; padding: 0.75rem 0.9rem; }
.split-note { max-width: 44rem; margin: clamp(1.75rem, 4vw, 2.5rem) 0 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .about-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.about-copy p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.65; margin: 0 0 1.1rem; max-width: 36rem; }
.fact-card {
  background: var(--card); border-radius: var(--card-radius); box-shadow: var(--shadow-card);
  padding: 1.5rem; position: relative; padding-top: 2rem;
}
.fact-card::before { content: ""; position: absolute; top: 0; left: 1.5rem; width: 5.5rem; height: 0.55rem; background: var(--green); border-radius: 0 0 3px 3px; }
.fact-card dl { margin: 0; display: grid; gap: 1.1rem; }
.fact-card dt { font-weight: 700; font-size: 0.95rem; }
.fact-card dd { margin: 0.15rem 0 0; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--card); }
.contact .section-title { color: var(--card); }
.contact .section-lead { color: #c9cde0; }
.contact-email {
  display: inline-block;
  font-size: clamp(1.5rem, 4.5vw, 3rem); font-weight: 720; letter-spacing: -0.02em;
  text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 4px; text-underline-offset: 0.18em;
  word-break: break-word;
}
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
.contact-list a { font-weight: 600; text-underline-offset: 0.22em; }
.contact :focus-visible { outline-color: var(--cyan); }
.contact .btn-secondary { color: var(--card); border-color: var(--card); }
.contact .btn-secondary:hover { background: #3b405c; }

.site-footer { background: var(--ink); color: #aeb3c8; padding: 0 0 2.5rem; font-size: 0.92rem; }
.site-footer .wrap { border-top: 1px solid #454a66; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: #dfe2ee; }

/* ---------- Case study ---------- */
.cs-head { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 4vw, 3rem); }
.back-link { display: inline-block; font-weight: 600; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); text-underline-offset: 0.22em; }
.cs-head h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1; letter-spacing: -0.035em; font-weight: 760;
  margin: 0 0 1.25rem; max-width: 16ch;
}
.cs-summary { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.55; max-width: 44rem; margin: 0; }
.cs-meta {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0; display: grid; gap: 1.25rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-top: 3px solid var(--tab, var(--ink)); padding-top: 1.25rem;
}
.cs-meta dt { font-weight: 700; font-size: 0.92rem; }
.cs-meta dd { margin: 0.2rem 0 0; color: var(--ink-soft); }

.cs-hero { margin: 0 0 clamp(2.5rem, 6vw, 4.5rem); }
.cs-hero figure { margin: 0; }

/* Case study body lines up with the title. The "On this page" menu sits
   in the left page margin, and only appears when the margin is wide enough. */
.cs-layout { position: relative; padding-bottom: clamp(3rem, 8vw, 6rem); }
.cs-toc { display: none; font-size: 0.9rem; }
.cs-toc h2 { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.75rem; }
.cs-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.cs-toc a { text-decoration: none; color: var(--ink-soft); display: block; padding-left: 0.65rem; border-left: 3px solid transparent; line-height: 1.3; }
.cs-toc a:hover { color: var(--ink); }
.cs-toc a.is-active { color: var(--ink); border-left-color: var(--tab, var(--ink)); font-weight: 600; }
@media (min-width: 86.5rem) {
  .cs-toc {
    display: block;
    position: absolute; top: 0; bottom: 0;
    right: calc(100% + 1.5rem);
    /* margin width minus the gap and a little breathing room at the screen edge */
    width: clamp(7rem, calc((100vw - 72rem) / 2 + 2.5rem - 2.75rem), 12rem);
  }
  .cs-toc nav { position: sticky; top: 2rem; }
}

/* At a glance: the 30-second version of each case study */
.glance {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  display: grid; gap: 0; grid-template-columns: minmax(0, 1fr);
  background: var(--card); border-radius: var(--card-radius); box-shadow: var(--shadow-card);
  position: relative; padding-top: 0.55rem;
}
.glance::before { content: ""; position: absolute; top: 0; left: 1.5rem; width: 5.5rem; height: 0.55rem; background: var(--tab, var(--ink)); border-radius: 0 0 3px 3px; }
.glance > div { padding: 1.1rem 1.5rem 1.25rem; }
.glance > div + div { border-top: 1px solid var(--rule); }
@media (min-width: 52rem) {
  .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .glance > div + div { border-top: 0; border-left: 1px solid var(--rule); }
}
.glance dt { font-weight: 700; margin: 0 0 0.35rem; }
.glance dd { margin: 0; line-height: 1.45; }
.glance .glance-outcome dd { font-weight: 650; }
.full-study { margin: 1.25rem 0 0; }

.prose p.sources {
  font-family: var(--sans); font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft);
  border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2.5rem;
}
.prose p.sources a { color: var(--ink-soft); }

.prose { max-width: 42rem; }
.prose section { scroll-margin-top: 2rem; }
.prose section + section { margin-top: clamp(3rem, 6vw, 4.25rem); }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 730; margin: 0 0 1.1rem; }
/* Section headings underlined with the same 3px line as the project details */
.prose h2 { border-bottom: 3px solid var(--tab, var(--ink)); padding-bottom: 0.6rem; margin-bottom: 1.25rem; }
.prose h3 { font-family: var(--sans); font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.6rem; }
.prose p, .prose li { font-family: var(--serif); font-size: 1.15rem; line-height: 1.68; }
.prose p { margin: 0 0 1.1rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--ink-soft); }
.prose cite { font-style: normal; color: var(--ink-soft); }

/* Figures can be wider than the reading column */
.fig { margin: 2rem 0; }
.fig-wide { margin-right: 0; }
@media (min-width: 80rem) { .fig-wide { margin-right: -10rem; } table.fig-wide { width: calc(100% + 10rem); } }
.fig-frame {
  background: var(--card); border-radius: var(--card-radius); box-shadow: var(--shadow-card);
  padding: clamp(0.5rem, 1.5vw, 1rem); overflow: hidden;
}
.fig-frame.on-ink { background: #1f1f1f; }
.fig-frame img { margin: 0 auto; }
.fig figcaption { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.75rem; max-width: 40rem; }
.fig-pair { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .fig-pair { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.fig-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .fig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.zoom { display: block; cursor: zoom-in; }

/* Iterations are a real sequence, so they are numbered */
.steps { list-style: none; margin: 3.25rem 0 0; padding: 0; counter-reset: step; }
/* Number in a tall teal bar running beside each iteration's text and image,
   matching the heuristics graphic */
.steps > li { counter-increment: step; position: relative; padding-left: 3.75rem; margin: 0 0 2.75rem; }
.steps > li::before {
  content: counter(step);
  /* the bar starts above the item so its notch nests under the previous bar's point */
  position: absolute; left: 0; top: -1.85rem; bottom: -1.3rem;
  width: 2.6rem; padding-top: 2.15rem;
  background: var(--ink); color: #fff;
  font: 500 2.4rem/1 var(--sans); text-align: center;
  /* arrow-shaped cutout at the top, arrow point at the bottom: each bar flows into the next */
  clip-path: polygon(0 0, 50% 1.3rem, 100% 0, 100% calc(100% - 1.3rem), 50% 100%, 0 calc(100% - 1.3rem));
}
.step-text p:last-child { margin-bottom: 0; }
.steps h3 { margin-top: 0; }
.steps .fig { margin-bottom: 0; }

/* Before / after numbers */
.result {
  display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.5rem 0 2rem; max-width: 34rem;
}
.result > div { background: var(--card); border-radius: var(--card-radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-card); }
.result > div { border-top: 6px solid var(--rule); }
.result > div:last-child { border-top-color: var(--tab, var(--ink)); }
.result dt { font-weight: 700; margin-bottom: 0.4rem; }
.result dd { margin: 0; font-size: 1.05rem; color: var(--ink-soft); }
.result strong { display: block; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }

/* Theory table (Informing my design) */
.theory { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.theory th, .theory td { text-align: left; vertical-align: top; padding: 1rem 1rem 1rem 0; border-top: 1px solid var(--rule); }
.theory thead th { font-size: 0.92rem; color: var(--ink-soft); border-top: 0; padding-top: 0; }
.theory tbody th { font-weight: 720; width: 22%; }
.theory td { font-family: var(--serif); line-height: 1.55; }
@media (max-width: 40rem) {
  .theory thead { display: none; }
  .theory tr, .theory th, .theory td { display: block; width: auto; }
  .theory tbody th { padding-bottom: 0.25rem; width: auto; }
  .theory td { border-top: 0; padding-top: 0.4rem; }
  .theory td::before { content: attr(data-label); display: block; font-family: var(--sans); font-weight: 600; font-size: 0.88rem; color: var(--ink-soft); }
}

.callout { background: var(--card); border-left: 5px solid var(--tab, var(--ink)); padding: 1.1rem 1.25rem; border-radius: 0 var(--card-radius) var(--card-radius) 0; margin: 1.5rem 0; box-shadow: var(--shadow-card); }
.callout p { margin: 0; }

.two-up { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two-up h3 { margin-top: 0; }

/* Testing columns: heading, intro, image and findings line up across both columns */
.test-fig { margin: 0.25rem 0 1.25rem; }
/* Same white frames as the other images; both images shown whole and at the same height */
.test-fig .fig-frame { display: inline-block; max-width: 100%; }
.test-fig .fig-frame img { height: 22rem; width: auto; max-width: 100%; object-fit: contain; }
.test-fig figcaption { max-width: 25rem; }
/* Wider testing columns on large screens, extending right like the wide images */
@media (min-width: 80rem) { .tests { width: calc(100% + 10rem); column-gap: 2.5rem; } }
.tests p, .tests li { text-wrap: pretty; }
@media (min-width: 44rem) {
  .tests { grid-template-rows: repeat(4, auto); row-gap: 0; }
  .tests > div { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
}

.embed {
  position: relative; aspect-ratio: 1200 / 439; width: 100%;
  background: #3c3c3c; border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--shadow-card);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-note { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.75rem; }
/* Prototype as the hero, right under the summary. On wide screens it shows at
   its designed size (1200 px), extending past the text column to the right. */
.cs-head .cs-hero { margin: clamp(1.75rem, 4vw, 2.5rem) 0 0; }
@media (min-width: 84rem) { .cs-head .cs-hero .embed { width: 75rem; max-width: none; } }

/* Next project */
.next {
  display: block; text-decoration: none;
  background: var(--card); border-radius: var(--card-radius); box-shadow: var(--shadow-card);
  padding: 2rem 1.5rem 1.75rem; position: relative; margin-top: 1rem;
}
.next::before { content: ""; position: absolute; top: 0; left: 1.5rem; width: 5.5rem; height: 0.55rem; background: var(--tab); border-radius: 0 0 3px 3px; }
.next span { color: var(--ink-soft); font-weight: 600; }
.next strong { display: block; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; margin-top: 0.3rem; }
.next:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }

/* Lightbox (dialog) */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(28, 31, 46, 0.86); }
.lightbox img { max-width: 96vw; max-height: 86vh; width: auto; border-radius: 4px; background: var(--card); }
.lightbox button {
  margin: 0.75rem auto 0; display: block; font: 600 1rem/1 var(--sans);
  background: var(--card); color: var(--ink); border: 0; border-radius: 999px; padding: 0.75rem 1.25rem; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .sort-card, .project-media, .sort-col h2 { transition: none !important; }
}

/* Problem section: the heuristics graphic and annotated dropdown as the focal pair,
   sized so both images sit at the same height */
.pair-focus { margin-top: 2rem; gap: 1.25rem; }
@media (min-width: 40rem) { .pair-focus { grid-template-columns: 1.92fr 1fr; align-items: start; } }

/* Problem section: text on the left, the heuristics pair beside it on the right */
.problem-text > :last-child { margin-bottom: 0; }
@media (min-width: 72rem) {
  .problem-grid {
    display: grid; grid-template-columns: minmax(0, 29rem) minmax(0, 1fr);
    gap: 2.75rem; align-items: start;
    width: min(67rem, calc(100% + 25rem));
  }
  .problem-grid .pair-focus {
    margin: 0.35rem 0 0;
    /* image widths in proportion to their aspect ratios (1050x900 and 600x1050),
       allowing for the 1rem frame padding, so both frames are exactly the same height */
    grid-template-columns: calc((100% - 1.25rem - 4rem) * 0.6712 + 2rem) minmax(0, 1fr);
  }
}

/* Results: before and after in one panel, as on page 5 of the PDF */
.combo { background: var(--card); box-shadow: var(--shadow-card); border-radius: var(--card-radius); padding: clamp(0.5rem, 1.5vw, 1rem); }
.combo a.zoom { display: block; }
.combo img { display: block; width: 100%; height: auto; }
.combo a.zoom + a.zoom { margin-top: clamp(0.75rem, 2vw, 1.5rem); }
.combo figcaption { color: var(--ink-soft); margin-top: 0.75rem; font-size: 0.92rem; padding: 0 0.15rem 0.1rem; }

/* Captions sit inside the image panel: the figure becomes the panel */
.fig:has(> .fig-frame + figcaption) {
  background: var(--card); border-radius: var(--card-radius); box-shadow: var(--shadow-card);
  padding: clamp(0.5rem, 1.5vw, 1rem);
}
.fig:has(> .fig-frame + figcaption) > .fig-frame { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.fig:has(> .fig-frame + figcaption) > figcaption { margin-top: 0.75rem; padding: 0 0.15rem 0.1rem; }
/* Testing images: the panel hugs the image, and the caption wraps to the image width */
.test-fig { width: fit-content; max-width: 100%; }
.test-fig figcaption { contain: inline-size; max-width: none; }
/* Paired panels end at the same line even when one caption wraps more */
.pair-focus { align-items: stretch !important; }

/* Splash: About Me and How I Built This Site open the home page */
.splash { padding-top: clamp(2.5rem, 6vw, 5rem); }
.splash .hero-role { margin-bottom: 0.75rem; }
.splash h1.section-title { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 1.25rem; }
.splash .about-copy .actions { margin-top: 1.5rem; }
.splash-built { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--rule); }
.splash-built .section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.splash .fact-card { align-self: start; }

/* Circular portrait in the splash */
.portrait { margin: 0; justify-self: center; align-self: center; width: min(100%, 22rem); aspect-ratio: 1; border-radius: 50%; border: 10px solid var(--cyan); background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-placeholder { font: 700 clamp(3rem, 7vw, 4.5rem)/1 var(--sans); color: var(--rule); letter-spacing: -0.02em; }
@media (max-width: 55.99rem) { .portrait { width: min(70%, 16rem); order: -1; } }
/* Photo on the left, bio on the right */
.splash .portrait { order: -1; }
@media (min-width: 56rem) { .splash .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
/* One-line AI note under the splash */
.built-line { margin: clamp(2rem, 4vw, 2.75rem) 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 1rem; }
.built-line .text-link { margin-left: 0.35rem; }
.built-page { padding-top: clamp(2rem, 5vw, 4rem); }
.built-page .back-link { margin-bottom: 1rem; }
/* Keep the whole splash on one screen */
.splash { padding-top: clamp(1.5rem, 3.5vw, 2.75rem); padding-bottom: clamp(1.5rem, 3.5vw, 2.5rem); }
.splash h1.section-title { margin-bottom: 1rem; }
.splash .about-copy p { margin-bottom: 0.9rem; }
.built-line { margin-top: clamp(1.25rem, 2.5vw, 1.75rem); padding-top: 1rem; }

/* ---- Splash photo layouts ---- */
.splash .about-copy { max-width: 50rem; }
.splash .about-copy p { max-width: none; }
.splash .portrait { order: 0; justify-self: auto; align-self: auto; }

/* Option 1: text wraps around the circle */
.layout-wrap .about-head { display: contents; }
.layout-wrap .portrait { float: left; width: clamp(11rem, 26vw, 17rem); margin: 0.25rem 2.25rem 1rem 0; shape-outside: circle(50%); shape-margin: 1.25rem; }
.layout-wrap .actions { clear: both; padding-top: 0.25rem; }
@media (max-width: 40rem) { .layout-wrap .portrait { float: none; width: min(65%, 15rem); margin: 0 auto 1.5rem; } }

/* Option 2: small photo beside the heading */
.layout-badge .about-head { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 1.25rem; }
.layout-badge .portrait { width: clamp(7rem, 12vw, 9.5rem); flex: none; border-width: 6px; }
.layout-badge h1.section-title { margin: 0; }

/* Final splash layout: title above the photo on the left, bio on the right */
.about-split { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 56rem) { .about-split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); } }
.layout-split .about-head { text-align: center; }
.layout-split .about-head h1.section-title { margin: 0 0 1.25rem; }
.layout-split .portrait { width: clamp(12rem, 22vw, 18rem); margin: 0 auto; }
.layout-split .about-copy p:first-child { margin-top: 0; }
@media (max-width: 55.99rem) { .layout-split .portrait { width: min(60%, 14rem); } }
/* Title spans above both the photo and the bio */
.about-split .about-title { grid-column: 1 / -1; margin: 0 0 calc(-1 * clamp(0.5rem, 2vw, 1.5rem)); text-align: left; }
.layout-split .about-head { text-align: left; }
@media (min-width: 56rem) { .about-split { align-items: start; } .layout-split .portrait { margin: 0.25rem 0 0; } }
.about-split { row-gap: clamp(1rem, 2.5vw, 1.5rem); }
.about-split .about-title { margin: 0; }
@media (min-width: 56rem) { .layout-split .portrait { width: min(100%, 23rem); } }
/* Title centred over the photo */
.about-split .about-title { grid-column: 1; text-align: center; }
@media (min-width: 56rem) { .about-split .about-title { width: min(100%, 23rem); } }
@media (max-width: 55.99rem) { .about-split .about-title { grid-column: 1 / -1; } }
@media (min-width: 56rem) { .about-split .about-head { grid-column: 1; grid-row: 2; } .about-split .about-copy { grid-column: 2; grid-row: 2; } }
.splash .about-copy p { font-size: 1.12rem; line-height: 1.6; margin-bottom: 0.8rem; }
/* System Mapping hero: Figma walkthrough of the maps (1311 x 910 frames, plus room for Figma's controls) */
.embed.embed-map { aspect-ratio: 1311 / 958; }
@media (min-width: 84rem) { .cs-head .cs-hero .embed.embed-map { width: 100%; max-width: 100%; } }

/* GN logo in the header */
.site-header .wrap { align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 0.65rem; }
.wordmark .logo { height: 2.9rem; width: auto; flex: none; }
.wordmark-text { line-height: 1.25; }
@media (max-width: 30rem) { .wordmark-text span { display: block; font-size: 0.95rem; } }
.wordmark .wordmark-text { color: var(--ink); font-weight: 750; margin: 0; }
.wordmark .wordmark-text span { color: var(--ink-soft); font-weight: 450; }
.split-note, .section-lead, .prose p { text-wrap: pretty; }
.built-page .split-note { max-width: 52rem; }
