/*
  VOICE   Warm, confident, easy to skim. Fewer things on the page, each one clear.
  IDEA    A simple portfolio: the work's screenshots carry the visual interest.
  PICTURE Real screenshots of shipped work, one per project.
  COLOUR  The original palette: blush paper, deep burgundy accent, soft rose panels.
  TYPE    Fraunces for headings and numbers, Libre Franklin for reading.
*/
:root {
  --bg: #fbf6f3; --surface: #fffdfc; --ink: #2a1d20; --muted: #6f5b60;
  --line: #eadbd7; --line-strong: #d6bfb9; --accent: #7a2634; --accent-soft: #f5e3df; --brass: #9a5b63;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1416; --surface: #271c1f; --ink: #f3e8e6; --muted: #bda9ac;
    --line: #3b2a2e; --line-strong: #564045; --accent: #e8a3ac; --accent-soft: #33222a; --brass: #d99aa3; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1416; --surface: #271c1f; --ink: #f3e8e6; --muted: #bda9ac;
  --line: #3b2a2e; --line-strong: #564045; --accent: #e8a3ac; --accent-soft: #33222a; --brass: #d99aa3; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; color: var(--ink); }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; padding-top: 24px; padding-bottom: 8px; font-size: 15px; font-weight: 500; }
.top a { color: var(--ink); text-decoration: none; }
.top a:hover { color: var(--accent); text-decoration: underline; }
.top .name { font-family: var(--display); font-weight: 600; font-size: 18px; white-space: nowrap; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Home ---------- */
.hero { padding-top: 56px; padding-bottom: 8px; }
.hero h1 { font-size: clamp(42px, 7vw, 72px); line-height: 1.02; margin: 0 0 14px; }
.hero .title { font-family: var(--display); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; font-weight: 500; color: var(--accent); margin: 0 0 16px; max-width: 34em; }
.hero .pitch { font-size: 18px; line-height: 1.6; max-width: 38em; margin: 0 0 20px; }
.contact { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: 15px; font-weight: 500; }
.contact a { color: var(--ink); }
.contact span { color: var(--muted); font-weight: 400; }
.jobs { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--muted); }
.jobs b { color: var(--ink); font-weight: 600; }
.jobs a { color: var(--ink); font-weight: 600; text-decoration: none; }
.jobs a:hover { color: var(--accent); text-decoration: underline; }

.org { padding-top: 64px; }
.orghead { margin-bottom: 28px; }
.orghead h2 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.1; margin: 0 0 6px; }
.orghead p { margin: 0; color: var(--muted); font-size: 16px; max-width: 44em; }
.orghead p strong { color: var(--ink); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.proj { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.proj .pic { aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--accent-soft); margin-bottom: 14px; }
.proj .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.proj .pic.plain { display: flex; align-items: center; justify-content: center; }
.proj .pic.plain span { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--brass); text-align: center; padding: 0 24px; line-height: 1.25; }
.proj h3 { font-size: 20px; line-height: 1.22; margin: 0 0 8px; }
.proj:hover h3 { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.proj .result { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.proj .result b { color: var(--accent); font-weight: 600; }

/* Earlier roles */
.earlier { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
@media (max-width: 860px) { .earlier { grid-template-columns: 1fr; } }
.earlier h3 { font-size: 20px; margin: 0 0 2px; }
.earlier .sub { font-size: 14.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.45; }
.earlier ul { margin: 0; padding-left: 1.1em; font-size: 15px; line-height: 1.5; }
.earlier li { margin-bottom: 6px; }
.earlier li::marker { color: var(--brass); }

/* Receipts and about */
.said { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
@media (max-width: 640px) { .said { grid-template-columns: 1fr; } }
.said blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--line-strong); }
.said p { font-family: var(--display); font-size: 20px; line-height: 1.35; font-weight: 500; color: var(--accent); margin: 0 0 6px; }
.said cite { font-style: normal; font-size: 14px; color: var(--muted); }
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 56px; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.about p { margin: 0 0 14px; }
.about h3 { font-size: 20px; margin: 0 0 12px; }
.loves { display: flex; flex-wrap: wrap; gap: 8px 7px; margin: 0; padding: 0; list-style: none; }
.loves li { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 500; }
.foot { margin-top: 72px; padding-top: 24px; padding-bottom: 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot a { color: var(--muted); }

/* ---------- Case study pages ---------- */
.casehead { padding-top: 32px; padding-bottom: 8px; }
.casehead .kicker { font-size: 14px; color: var(--brass); font-weight: 600; margin: 0 0 10px; }
.casehead h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; margin: 0; max-width: 20ch; }
.case { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px 56px; padding-top: 32px; padding-bottom: 32px; }
.rail { min-width: 0; align-self: start; position: sticky; top: 24px; }
.results { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px 24px; display: grid; gap: 18px; }
.results .label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.stat b { display: block; font-family: var(--display); font-size: 34px; line-height: 1.05; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
.links { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.story { min-width: 0; max-width: 40em; }
.story p { margin: 0 0 1.15em; }
.story p.first { font-size: 20px; line-height: 1.5; font-weight: 500; }
.story h3 { font-size: 22px; line-height: 1.25; margin: 1.9em 0 .6em; }
.story h3:first-child { margin-top: 0; }
.story p.pull { border-left: 3px solid var(--brass); padding-left: 18px; font-family: var(--display); font-weight: 500; font-size: 20px; line-height: 1.45; }
.takeaway { margin: 0 0 1.8em; padding: 18px 22px; background: var(--accent-soft); border-radius: 4px; }
.takeaway .k { display: block; font-size: 13px; font-weight: 600; color: var(--brass); margin-bottom: 6px; }
.takeaway p { margin: 0 !important; font-size: 17.5px; line-height: 1.55; }
.quotes { display: grid; gap: 14px; margin-top: 1em; }
.quotes blockquote { margin: 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 3px; font-size: 16px; line-height: 1.55; }
.quotes cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .case { grid-template-columns: 1fr; } .rail { position: static; } .results { grid-template-columns: repeat(2, minmax(0, 1fr)); } .results .label { grid-column: 1 / -1; } }

/* Screenshots */
.shot { margin: 1.8em 0 2em; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.shot figcaption { font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: 8px; }
.shot.narrow img { max-width: 340px; }
.shot.missing { display: none; }
html.draft .shot.missing { display: block; }
html.draft .shot.missing img { display: none; }
html.draft .shot.missing::before { content: "Image to add: " attr(data-file) "\A" attr(data-need); white-space: pre-wrap; display: block; padding: 20px 22px; min-height: 100px; border: 2px dashed var(--line-strong); border-radius: 4px; background: var(--surface); font-size: 14px; line-height: 1.5; color: var(--muted); }
html.draft .shot.missing.flag::before { border-color: #c08a2d; }
.draftbar { display: none; }
html.draft .draftbar { display: block; position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--bg); font-size: 13px; padding: 8px 16px; text-align: center; }

.back { font-size: 15px; }
.related { margin: 2.4em 0 0; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Messaging doc excerpts ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 8px max(20px, env(safe-area-inset-left, 0px)) 80px; }
.doc .kicker { font-size: 14px; color: var(--brass); font-weight: 600; margin: 28px 0 10px; }
.doc h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.08; margin: 0 0 12px; }
.doc .sub { font-size: 20px; line-height: 1.45; color: var(--muted); margin: 0 0 12px; }
.doc .note { font-size: 14px; color: var(--muted); margin: 0 0 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc h2 { font-size: 26px; line-height: 1.2; margin: 48px 0 14px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.key { background: var(--accent-soft); border-radius: 4px; padding: 20px 24px; font-size: 18px; line-height: 1.5; margin: 0 0 24px; }
.key b { font-family: var(--display); font-size: 23px; display: block; margin-bottom: 6px; }
.doc blockquote { margin: 0 0 14px; padding: 4px 0 4px 18px; border-left: 3px solid var(--brass); font-size: 16px; line-height: 1.55; }
.tw { overflow-x: auto; margin: 0 0 24px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border: 1px solid var(--line); }
th { background: var(--accent-soft); font-weight: 600; }
td:first-child { font-weight: 600; width: 26%; }
.copy { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px; margin: 0 0 12px; font-size: 16px; }
@media (max-width: 640px) {
  table.stack { border: 0; }
  table.stack tr:first-child:has(th) { display: none; }
  table.stack tr { display: block; border: 1px solid var(--line); border-radius: 4px; margin: 0 0 12px; padding: 4px 0; background: var(--surface); }
  table.stack td { display: block; border: 0 !important; width: auto !important; padding: 6px 14px; }
  table.stack td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--brass); margin-bottom: 2px; }
  table.stack td:first-child { font-family: var(--display); font-size: 17px; padding-top: 10px; }
}

/* ---------- Tabs (all pages) ---------- */
.top { align-items: center; padding-top: 22px; padding-bottom: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { display: inline-block; padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.tabs a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--bg); }
@media (max-width: 480px) { .tabs a { padding: 7px 11px; font-size: 14px; } }

/* Page intro used on Work, Experience, About */
.intro { padding-top: 56px; padding-bottom: 8px; }
.intro h1 { font-size: clamp(40px, 6.5vw, 64px); line-height: 1.04; margin: 0 0 12px; }
.intro .title { font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; font-weight: 500; color: var(--accent); margin: 0; max-width: 36em; }
.intro .pitch { font-size: 18px; margin: 14px 0 0; max-width: 38em; }
.org:first-of-type { padding-top: 48px; }

/* Experience */
.exp { padding-top: 40px; }
.job { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 12px 56px; padding: 32px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 8px; }
.job h2 { font-size: 26px; line-height: 1.15; margin: 0 0 4px; }
.job .when { font-size: 14.5px; color: var(--muted); margin: 0 0 4px; }
.job .what { font-size: 14.5px; color: var(--muted); margin: 0 0 10px; }
.job .tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 10px; }
.job .role { font-weight: 600; margin: 0 0 8px; }
.job ul { margin: 0 0 12px; padding-left: 1.1em; }
.job li { margin-bottom: 6px; }
.job li::marker { color: var(--brass); }
.job .more { font-size: 15px; font-weight: 600; }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; } }
.cv-note { font-size: 15px; color: var(--muted); margin: 8px 0 0; }

/* About */
.about-page { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px 64px; padding-top: 40px; }
@media (max-width: 800px) { .about-page { grid-template-columns: 1fr; } }
.about-page h2 { font-size: 24px; margin: 0 0 14px; }
.about-page section + section { margin-top: 44px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 16px; }
.contact-list span { color: var(--muted); display: inline-block; min-width: 5.5em; }
.about-page .said { grid-template-columns: 1fr; gap: 22px; }
.results .label + .stat:last-child { grid-column: 1 / -1; }

/* Company pages */
.co-intro { padding-top: 48px; }
.co-intro .kicker { font-size: 14px; color: var(--brass); font-weight: 600; margin: 0 0 8px; }
.co-intro h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.04; margin: 0 0 10px; }
.co-intro .title { font-family: var(--display); font-size: clamp(19px, 2.2vw, 23px); font-weight: 500; color: var(--accent); margin: 0 0 8px; }
.co-intro .about-co { color: var(--muted); max-width: 42em; margin: 0; }
.co-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; padding-top: 36px; }
@media (max-width: 860px) { .co-body { grid-template-columns: 1fr; } }
.co-body h2, .co-section h2 { font-size: 24px; margin: 0 0 14px; }
.co-body ul { margin: 0; padding-left: 1.1em; }
.co-body li { margin-bottom: 8px; }
.co-body li::marker { color: var(--brass); }
.co-section { padding-top: 56px; }
.more-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.more-list li { border-bottom: 1px solid var(--line); }
.more-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 18px 0; color: inherit; text-decoration: none; }
.more-list a:hover h3 { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.more-list h3 { font-size: 20px; margin: 0; grid-column: 1; }
.more-list p { margin: 0; color: var(--muted); font-size: 15px; grid-column: 1; }
.more-list .r { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--accent); white-space: nowrap; }
@media (max-width: 560px) { .more-list a { grid-template-columns: 1fr; } .more-list .r { grid-column: 1; grid-row: auto; font-size: 18px; } }
.proj .co-label { font-size: 13.5px; font-weight: 600; color: var(--brass); margin: 0 0 4px; }
.see-more { margin: 28px 0 0; font-size: 15.5px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.see-more a { font-weight: 600; }

/* Experience: smaller early roles */
.job.small h2 { font-size: 21px; }
.early { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.early li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; }
.early b { font-weight: 600; }
.early span { color: var(--muted); font-size: 15px; }
.job ul.early { padding-left: 0; }
.job h2 a { color: inherit; text-decoration: none; }
.job h2 a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.co-intro .kicker a { color: var(--brass); }

main.co-section { padding-top: 32px; }
.intro .contact { margin-top: 18px; }
.bio-text { max-width: 40em; font-size: 18px; }
.bio-text p { margin: 0 0 14px; }
.small-label { font-size: 14px; font-weight: 600; color: var(--brass); margin: 26px 0 10px !important; }
.home-top { justify-content: flex-end; }
/* Leave room for viewer toolbars that sit over the top of the page */
.top { padding-top: max(56px, calc(22px + env(safe-area-inset-top, 0px))); }
.intro .title .dot { color: var(--brass); }
.proj .result + .result { margin-top: 2px; }
.job .role + .role { margin-top: -4px; color: var(--muted); font-weight: 500; }
