/* rachaelhunt.com: the classic (minimal) portfolio.
   One font (Inter), one accent (the blue from her CV), light and dark. */

@font-face {
  font-family: Inter;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2');
}

:root {
  --bg: #fbfbfd;
  --surface: #f1f2f7;
  --ink: #1b1e2b;
  --ink-2: #4a4f63;
  --muted: #6b7086;
  --line: #e1e3ec;
  --accent: #3d4f9f;
  --accent-ink: #fff;
  --mark: #fff1a8;
  --mark-line: #b38f00;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 8px 24px rgba(20, 24, 40, .06);
  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141b; --surface: #1b1e28; --ink: #e9ebf3; --ink-2: #b9bdd0; --muted: #8f94aa;
    --line: #2c303d; --accent: #a3b2f5; --accent-ink: #12141b; --mark: #4d4110; --mark-line: #c9a400;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12141b; --surface: #1b1e28; --ink: #e9ebf3; --ink-2: #b9bdd0; --muted: #8f94aa;
  --line: #2c303d; --accent: #a3b2f5; --accent-ink: #12141b; --mark: #4d4110; --mark-line: #c9a400;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { 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(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 Inter, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

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

/* Inferred wording, not yet confirmed by Rachael (see README).
   Highlighted so it can't be published unnoticed; npm run inferred lists it. */
mark[data-inferred] { background: var(--mark); color: inherit; border-bottom: 1px dotted var(--mark-line); padding: 0 1px; }
.inferred-block { border-left: 3px solid var(--mark-line); background: color-mix(in srgb, var(--mark) 45%, transparent); padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; }

/* ---------- Header and footer ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: .95rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); margin-top: 5rem; padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }

/* ---------- Home ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 600; letter-spacing: -.03em; max-width: 18ch; }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); margin: 1.25rem 0 0; max-width: 36rem; }
.hero .facts { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }

.section { padding: clamp(3rem, 7vw, 5rem) 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: 14px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.card .thumb { aspect-ratio: 16 / 10; padding: 18px 18px 0; display: flex; gap: 12px; align-items: flex-end; justify-content: center; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; box-shadow: var(--shadow); }
.card .thumb.two img { width: calc(50% - 6px); }
.card .thumb.type { align-items: center; padding: 18px; }
.card .thumb.type span { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 650; letter-spacing: -.04em; color: var(--accent); line-height: 1; }
.card .body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card h3 { font-size: 1.12rem; font-weight: 600; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ''; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.card .tag { font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: .5rem; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.about ul { padding-left: 1.1rem; margin: 0; }
.about li { margin-bottom: .45rem; }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 9rem 1fr; gap: .25rem 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.timeline .what b { font-weight: 600; }
.timeline .what span { color: var(--ink-2); }
.timeline .what p { margin: .35rem 0 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; } }

.contact { padding-top: clamp(3rem, 7vw, 5rem); }
.contact h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 600; max-width: 22ch; }
.contact .links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: .7rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; background: var(--bg); }
.button:hover { border-color: var(--accent); text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Case study ---------- */
.cs-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 2rem; }
.back { font-size: .95rem; color: var(--ink-2); text-decoration: none; display: inline-block; margin-bottom: 2rem; }
.back:hover { color: var(--ink); text-decoration: underline; }
.cs-head h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 600; letter-spacing: -.03em; max-width: 20ch; }
.cs-head .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); margin: 1.1rem 0 0; max-width: 40rem; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem 2rem; margin: 2rem 0 0; padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta dt { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: .25rem 0 0; font-size: .95rem; }

.cs { padding-bottom: 1rem; }
.cs section { margin-top: 3.25rem; }
.cs h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: .9rem; }
.cs h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.cs ul { padding-left: 1.2rem; }
.cs li { margin-bottom: .5rem; }
.cs .measure { margin-left: auto; margin-right: auto; }

figure { margin: 2rem auto; }
figure.wide { max-width: var(--wide); }
figure.mid { max-width: 52rem; }
figure .frame { background: var(--surface); border-radius: 14px; padding: clamp(14px, 3vw, 32px); display: flex; gap: clamp(12px, 2.5vw, 28px); justify-content: center; align-items: flex-start; flex-wrap: wrap; }
figure .frame img { border-radius: 6px; box-shadow: var(--shadow); }
figure .frame.phones > img, figure .frame.phones .col { width: min(100%, 260px); }
figure .frame.phones img { box-shadow: none; border-radius: 0; }
figure .frame.phones .col img { width: 100%; }
figure .frame.trio img { width: min(100%, 210px); }
figure .frame.flat img { box-shadow: none; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .75rem; text-align: center; padding: 0 1rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }
.label { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 0 0 .5rem; }
.col { display: flex; flex-direction: column; align-items: center; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat { background: var(--surface); border-radius: 12px; padding: 1rem 1.1rem; }
.stat b { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; color: var(--accent); }
.stat span { font-size: .92rem; color: var(--ink-2); }

blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--accent); font-size: 1.15rem; color: var(--ink); }
blockquote footer { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

.table-scroll { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--surface); }
tr:last-child td { border-bottom: 0; }

.try { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1rem; }

.next { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.next a { text-decoration: none; color: var(--ink); }
.next small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.next span { font-weight: 600; }
.next a:hover span { text-decoration: underline; }
