/* samhughes.com.au — minimal monochrome layout (after the Formo Framer template).
   One container, a narrow label column and a wide content column per section,
   Geist throughout, black and grey on white, hairline dividers. */

:root {
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fg: #000;
  --ink-2: rgba(0, 0, 0, .8);
  --muted: rgba(0, 0, 0, .5);
  --muted-2: rgba(0, 0, 0, .45);
  --line: rgba(0, 0, 0, .08);
  --soft: rgba(0, 0, 0, .03);
  --bg: #fff;
  --max: 1072px;
  --pad: 24px;
  --label: 35.4%;      /* label column; content column takes the rest */
  --sec: 80px;         /* section padding */
  --hdr: 74px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ol, ul, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; font-size: inherit; }
.muted { color: var(--muted); }
.wrap { width: min(var(--max), calc(100% - var(--pad) * 2)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: 8px;
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

/* ---------- Type ---------- */
.display {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--muted-2);
}
.lead {
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.04em;
  color: var(--muted-2);
}
.ink { color: var(--fg); }
.prose { color: var(--muted); max-width: 624px; margin-top: 16px; }
.prose p + p { margin-top: 12px; }

/* Text link with a north-east arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  margin-top: 12px;
  line-height: 1;
  transition: opacity .2s;
}
.link-arrow::after {
  content: "";
  width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4 3h5v5' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4 3h5v5' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.link-arrow:hover::after { transform: translate(2px, -2px); }
.link-row { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 12px; }
.link-row .link-arrow { margin-top: 0; }

/* Soft button (header call to action) */
.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--fg);
  line-height: 1;
  transition: background .2s;
}
.btn-soft:hover { background: rgba(0, 0, 0, .06); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; height: var(--hdr); }
.site-title { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav > a:not(.btn-soft) { color: var(--muted); padding: 4px 0; transition: color .2s; }
.site-nav > a:not(.btn-soft):hover, .site-nav > a.active { color: var(--fg); }
.site-nav .btn-soft { margin-left: 0; }

.menu-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  margin-right: -8px;
  border: 0; background: none; color: inherit; cursor: pointer;
}
.menu-toggle i {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: currentColor; transition: transform .25s, top .25s;
}
.menu-toggle i:first-of-type { top: 15px; }
.menu-toggle i:last-of-type { top: 23px; }
.menu-open .menu-toggle i:first-of-type { top: 19px; transform: rotate(45deg); }
.menu-open .menu-toggle i:last-of-type { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--hdr) 0 0 0;
  z-index: 40;
  background: var(--bg);
  padding-top: 24px;
}
.mobile-menu nav { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mobile-menu nav > a:not(.btn-soft) { font-size: 36px; letter-spacing: -.04em; line-height: 1.2; color: var(--muted-2); }
.mobile-menu nav > a.active { color: var(--fg); }
.mobile-menu .btn-soft { margin-top: 24px; }
.menu-open { overflow: hidden; }

/* ---------- Sections ---------- */
.row {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  padding: var(--sec) 0;
  border-top: 1px solid var(--line);
}
main > .row:first-child { border-top: 0; }
.row.hero { padding-top: var(--hdr); }
.label { padding-right: 32px; }
.label h2, .label p { position: relative; padding-left: 20px; }
.label h2::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 9px; height: 9px; margin-top: -5px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}
.label p { color: var(--muted); }

.status { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); margin-bottom: 12px; }
.status::before {
  content: "";
  width: 14px; height: 14px; flex: none; margin-top: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--fg) 0 3px, transparent 3.5px), var(--soft);
}

/* Numbered list (capabilities) */
.numbered { list-style: none; padding: 0; }
.numbered li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.numbered .num { color: var(--muted); }
.numbered p { color: var(--muted); margin-top: 2px; max-width: 560px; }
.numbered + .link-arrow { margin-top: 4px; }

/* ---------- Writing (article cards) ---------- */
/* Each card spans three shared rows (headline, image, summary), so images
   line up across a row even when one headline wraps further than its neighbour. */
.writing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 0; }
.wcard { display: flex; flex-direction: column; }
.writing .wcard { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.writing .wcard > p { padding-bottom: 48px; }
.wmeta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.wmeta h3 { min-width: 0; }
.wmeta .src { color: var(--muted); }
.wimg { overflow: hidden; background: var(--soft); }
.wimg img, .article-hero {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.wimg img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.wcard:hover .wimg img { transform: scale(1.03); }
.wcard > p { color: var(--muted); margin-top: 10px; }

/* ---------- Article page ---------- */
.article-side { display: flex; flex-direction: column; gap: 4px; padding-right: 32px; }
.article-side .back { margin-bottom: 12px; }
.article-side .back::before { content: "← "; }
.article-side p { color: var(--muted); }
.article-head .display { margin-bottom: 24px; }
.article-hero { margin-bottom: 40px; aspect-ratio: auto; height: auto; object-fit: initial; }
.article-body { color: var(--ink-2); font-size: 17px; line-height: 1.65; max-width: 640px; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; color: var(--fg); margin-top: 2em; }
.article-body h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.02em; color: var(--fg); margin-top: 1.8em; }
.article-body h4 { font-weight: 500; color: var(--fg); margin-top: 1.6em; }
.article-body a { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: .4em; }
.article-body strong { font-weight: 500; color: var(--fg); }
.article-body figure { margin: 2em 0; }
.article-body blockquote {
  margin: 2em 0;
  padding-left: 20px;
  border-left: 1px solid var(--fg);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: var(--fg);
}
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.article-source { margin-top: 48px; color: var(--muted); }
.article-source a { color: var(--fg); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); padding: var(--sec) 0 64px; }
.foot-brand .muted { margin-top: 12px; max-width: 280px; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 24px; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.foot-col h2 { margin-bottom: 8px; }
.foot-col a { color: var(--muted); transition: color .2s; }
.foot-col a:hover { color: var(--fg); }
.foot-base {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Mobile ---------- */
@media (max-width: 809px) {
  :root { --sec: 64px; --hdr: 72px; }
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .row, .foot { grid-template-columns: minmax(0, 1fr); }
  .label { padding-right: 0; margin-bottom: 32px; }
  .label-spacer { display: none; }
  .row.hero { padding-top: 56px; }
  .lead { font-size: 32px; }
  .writing { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .article-side { padding-right: 0; margin-bottom: 32px; }
  .foot-brand { margin-bottom: 40px; }
  .foot-base { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Work (portfolio cards) ---------- */
.works { display: flex; flex-direction: column; gap: 24px; }
.works .link-arrow { margin-top: 0; align-self: flex-start; }

/* ---------- Case study ---------- */
.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.cs-media { padding-bottom: 24px; }
.cs-cover { padding-bottom: var(--sec); }
.cs-split { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); }
.cs-figure img, .cs-figure video { width: 100%; height: auto; background: var(--soft); }
.cs-figure figcaption, .cs-media > figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.cs-grid { display: grid; gap: 24px; }
.cs-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-grid img { aspect-ratio: 4 / 5; object-fit: cover; }
.cs-grid.cols-2 img { aspect-ratio: 5 / 4; }
.cs-embed { position: relative; aspect-ratio: 16 / 9; background: var(--soft); }
.cs-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-text + .cs-media, .cs-quote + .cs-media, .cs-stats + .cs-media { padding-top: 0; }
.cs-media + .row { border-top: 0; }
.prose-lg { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 640px; }
.prose-lg > * + * { margin-top: 1em; }
.prose-lg h2, .prose-lg h3 { color: var(--fg); font-size: 22px; line-height: 1.2; letter-spacing: -.02em; margin-top: 1.6em; }
.prose-lg ul, .prose-lg ol { padding-left: 1.3em; }
.prose-lg a { text-decoration: underline; text-underline-offset: .15em; }
.prose-lg strong { font-weight: 500; color: var(--fg); }
.cs-quote blockquote { margin: 0; }
.cs-quote-by { margin-top: 16px; color: var(--muted); }
.cs-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px 24px; }
.cs-stat-value { font-size: 40px; line-height: 1; letter-spacing: -.04em; margin-bottom: 8px; }

/* Previous / next */
.pager-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--soft); border-radius: 8px; transition: background .2s; }
.pager-link:hover { background: rgba(0, 0, 0, .06); }
.pager-link.next { text-align: right; }
.pager .label a { text-decoration: underline; text-underline-offset: .15em; }

@media (max-width: 809px) {
  .cs-split { grid-template-columns: minmax(0, 1fr); }
  .cs-grid.cols-2, .cs-grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .cs-grid img, .cs-grid.cols-2 img { aspect-ratio: auto; }
  .pager-links { grid-template-columns: minmax(0, 1fr); }
}
