/* Site styles for adammales.co.uk. Minimal brutalist, typographic.
   Everything that sets the look is in the :root tokens below. The rules are
   written up in STYLE-GUIDE.md. Used by every page. */
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #F4F4F0; --ink: #0F0F0F; --ink-2: #4A4A46; --line: #0F0F0F; --hair: #C6C6BE;
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --ph: min(436px, calc((100vw - 120px) / 2.4));
  --gut: max(24px, env(safe-area-inset-left, 0px));
  --gut-r: max(24px, env(safe-area-inset-right, 0px));
  --measure: 41rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0E0E0D; --ink: #F2F2EE; --ink-2: #A3A39C; --line: #F2F2EE; --hair: #3A3A36; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0E0E0D; --ink: #F2F2EE; --ink-2: #A3A39C; --line: #F2F2EE; --hair: #3A3A36; color-scheme: dark; }
@media (max-width: 900px) { :root { --ph: 380px; } }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { background: var(--ink); color: var(--bg); text-decoration-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
strong { font-weight: 700; }

/* page frame: every top level block sits in one 1168px column */
.wrap, .cs-nav, .cs-header, .cs-meta, .cs-body, .site-footer, .hero, .list-head, .work-list, .resume-header, .resume-body {
  max-width: 1168px; margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut-r);
}
.col { max-width: var(--measure); }

/* top line */
.top, .cs-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 28px; font-size: 16px; }

/* headline block */
.meta, .cs-eyebrow, .rh-eyebrow { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink-2); margin-top: 64px; }
.cs-eyebrow a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, .cs-title, .hero-name, .rh-name { font-size: clamp(46px, 11vw, 132px); line-height: 0.9; font-weight: 800; letter-spacing: -0.05em; margin: 20px 0 0; text-wrap: balance; }
.cs-title { font-size: clamp(42px, 8.5vw, 112px); }
h2, .cs-section-label, .section-label, .cs-tldr-label, .sec-name { font-size: clamp(28px, 4vw, 36px); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; margin: 88px 0 28px; text-wrap: balance; }
h2.first { margin-top: 72px; }
.lead p + p { margin-top: 20px; }
.label { font-weight: 700; font-size: 18px; margin-top: 40px; }
.label + p { color: var(--ink-2); }
hr, .cs-divider { border: 0; border-top: 2px solid var(--line); margin: 88px 0 0; }
hr.thin { border-top-width: 1px; border-color: var(--hair); margin: 40px 0; }
hr + h2 { margin-top: 56px; }

/* build pages: steps and figures */
h3 { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.step { min-width: 0; }
.step p { color: var(--ink-2); font-size: 16px; line-height: 1.5; margin-top: 6px; }
.shot { margin-bottom: 16px; }
.shot img { border: 2px solid var(--line); background: #fff; }
.group { margin-top: 56px; }
.group h3 { font-size: 26px; letter-spacing: -0.025em; }
.group > p { color: var(--ink-2); font-size: 16px; margin: 6px 0 24px; max-width: 36rem; }
h2 + .group { margin-top: 0; }
.phones { display: flex; gap: 24px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; --ar: 0.6; }
.phones .step { flex: 0 0 max(calc(var(--ph) * var(--ar)), 232px); scroll-snap-align: start; }
.phones .shot img { height: var(--ph); width: auto; max-width: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 32px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

/* ─── HOME ─────────────────────────────────────────────── */
.hero { padding-top: 72px; }
.hero-name { margin-top: 0; }
.hero-intro { max-width: var(--measure); margin-top: 72px; }
.hero-statement + .hero-statement { margin-top: 20px; }
.hero-statement a { text-decoration-thickness: 2px; }
.sec-name { display: block; }
.list-head { padding-top: 0; }
.list-head .sec-name { margin: 88px 0 28px; }

/* index list: heavy rule above, hairlines between, row inverts on hover */
.work-list { list-style: none; padding-top: 0; padding-bottom: 0; }
.work-list > li { border-bottom: 1px solid var(--hair); }
.work-list > li:first-child { border-top: 2px solid var(--line); }
.work-row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; text-decoration: none; }
a.work-row:hover { background: var(--ink); color: var(--bg); padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
.work-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.work-title { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.work-company { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
a.work-row:hover .work-company { color: var(--bg); }
.work-year { font-family: var(--mono); font-size: 13px; color: var(--ink-2); flex-shrink: 0; }
a.work-row:hover .work-year { color: var(--bg); }
.work-row--soon .work-title { color: var(--ink-2); }
.work-row--soon .work-company::after { content: " · coming soon"; }

/* ─── CASE STUDIES ─────────────────────────────────────── */
.cs-header > .cs-tldr, .cs-header > .cs-section-label, .cs-header > .cs-overview { max-width: var(--measure); }
.cs-tldr { margin-top: 72px; }
.cs-tldr-label { margin-top: 0; }
.cs-tldr-item, .cs-overview, .cs-p { font-size: 18px; line-height: 1.6; color: var(--ink); }
.cs-tldr-item + .cs-tldr-item, .cs-overview + br + .cs-overview { margin-top: 20px; }
.cs-header br, .cs-body > br, .cs-section > br { display: none; }
.cs-header .cs-section-label { margin-top: 88px; }
.cs-header { padding-bottom: 0; }
.cs-overview a, .cs-p a, .cs-tldr-item a { text-decoration-thickness: 2px; }

.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 88px; padding-top: 28px; background: linear-gradient(var(--line), var(--line)) var(--gut) 0 / calc(100% - var(--gut) - var(--gut-r)) 2px no-repeat; }
@media (max-width: 900px) { .cs-meta { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cs-meta { grid-template-columns: 1fr; gap: 24px; } }
.meta-label { font-weight: 700; font-size: 18px; line-height: 1.3; }
.meta-value { color: var(--ink-2); font-size: 16px; line-height: 1.5; margin-top: 4px; }

.cs-body { padding-bottom: 0; }
.cs-body::before { content: ""; display: block; margin-top: 88px; border-top: 2px solid var(--line); }
.cs-section { margin: 0; }
.cs-body > .cs-section:first-child, .cs-divider + .cs-section { padding-top: 56px; }
.cs-body .cs-divider { max-width: none; }
.cs-section-label { margin-top: 0; }
.cs-p { max-width: var(--measure); margin-bottom: 20px; }
.cs-p:last-child { margin-bottom: 0; }
.cs-h2 { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; max-width: var(--measure); }
.cs-h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.cs-list { list-style: none; max-width: var(--measure); margin-bottom: 20px; }
.cs-list li { position: relative; padding: 2px 0 2px 20px; font-size: 18px; line-height: 1.6; }
.cs-list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 7px; height: 2px; background: var(--ink); }

.cs-decision + .cs-decision { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--hair); }

.cs-note { max-width: var(--measure); margin: 28px 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--line); }
.cs-note p { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.cs-note p em { font-style: normal; font-weight: 700; color: var(--ink); }
.cs-outcomes-grid + br + .cs-note { margin-top: 40px; }

.cs-outcome { max-width: var(--measure); margin: 28px 0 0; padding: 16px 0 0; border-top: 1px solid var(--hair); }
.cs-outcome-label { font-weight: 700; font-size: 18px; line-height: 1.5; }
.cs-outcome p:not(.cs-outcome-label) { color: var(--ink-2); font-size: 18px; line-height: 1.6; }

.cs-outcomes-grid { display: flex; flex-direction: column; margin-top: 40px; }
.outcome-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 20px 0; border-top: 1px solid var(--hair); max-width: 56rem; }
.outcome-row:first-child { border-top-width: 2px; border-color: var(--line); }
@media (max-width: 600px) { .outcome-row { grid-template-columns: 1fr; gap: 4px; } }
.outcome-type { font-weight: 700; font-size: 18px; }
.outcome-text { color: var(--ink-2); font-size: 18px; line-height: 1.6; }

/* figures run wider than the text column, up to the page column */
.cs-figure { margin: 40px 0 56px; }
.cs-figure svg, .cs-figure img { display: block; width: 100%; height: auto; border: 2px solid var(--line); border-radius: 0; background: #fff; }
.cs-figure figcaption { max-width: var(--measure); font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 12px 0 0; }
.cs-decision .cs-figure { margin-bottom: 40px; }
.cs-fig-narrow { display: none; }
@media (max-width: 480px) { .cs-fig-wide { display: none; } .cs-fig-narrow { display: block; max-width: 300px; margin: 0 auto; } }
.cs-figure-zoom { position: relative; display: block; text-decoration: none; }
.cs-figure-zoom:hover { background: none; }
.cs-figure-zoom-hint { position: absolute; right: 12px; bottom: 12px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 13px; padding: 4px 10px; }
.cs-figure-zoom:hover .cs-figure-zoom-hint, .cs-figure-zoom:focus-visible .cs-figure-zoom-hint { background: var(--ink-2); }

/* ─── RESUME ───────────────────────────────────────────── */
.resume-header { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: end; }
@media (max-width: 900px) { .resume-header { grid-template-columns: 1fr; gap: 40px; } .rh-contact-block { align-items: flex-start !important; } }
.rh-statement { max-width: var(--measure); margin-top: 48px; font-size: 18px; line-height: 1.6; }
.rh-contact-block { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 16px; }
.rh-contact { display: inline-block; }
.resume-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; margin-top: 88px; position: relative; }
.resume-body::before { content: ""; position: absolute; top: 0; left: var(--gut); right: var(--gut-r); border-top: 2px solid var(--line); }
.resume-body > div { padding-top: 56px; }
@media (max-width: 900px) { .resume-body { grid-template-columns: 1fr; gap: 0; } .resume-body > div + div { padding-top: 24px; } }
.section-label { margin-top: 0; }
.exp-entry + .exp-entry { border-top: 1px solid var(--hair); padding-top: 40px; margin-top: 40px; }
.exp-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; }
.exp-company { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.exp-dates { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.exp-role { font-weight: 700; font-size: 18px; margin-top: 8px; }
.exp-context { font-size: 16px; color: var(--ink-2); margin: 2px 0 16px; }
.exp-bullets { list-style: none; }
.exp-bullets li { position: relative; padding: 3px 0 3px 20px; font-size: 18px; line-height: 1.6; }
.exp-bullets li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 7px; height: 2px; background: var(--ink); }
.aside-block { margin-bottom: 40px; }
.aside-block:last-child { margin-bottom: 0; }
.aside-label { font-weight: 700; font-size: 18px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); }
.aside-list { list-style: none; }
.aside-list li { font-size: 16px; line-height: 1.5; padding: 5px 0; }
.aside-list li em { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.edu-item { padding: 6px 0; }
.edu-school { font-weight: 700; font-size: 16px; }
.edu-degree { font-size: 16px; color: var(--ink-2); }

/* ─── FOOTER ───────────────────────────────────────────── */
.site-footer, footer.wrap { margin-top: 120px; padding-bottom: 72px; }
.site-footer::before { content: ""; display: block; border-top: 1px solid var(--hair); margin-bottom: 40px; }
.footer-name, footer .name { font-weight: 800; font-size: 28px; line-height: 1.2; letter-spacing: -0.03em; }
.footer-links, footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px; font-size: 16px; }
