/* =====================================================================
   Abubakar Adeshina — portfolio
   Light, editorial, image-first. One family (Inter), one accent (the
   navy of the AD monogram), white paper.
   ===================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #1b1b1a;
  --ink-2: #3f3e3a;
  --muted: #64625c;
  --line: #dcd9d0;
  --line-strong: #bdb9ad;
  --line-field: #8a877f; /* form field underline: 3.6:1 on white */
  --accent: #1e3a8c;
  --accent-soft: #e6e9f3;

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --wrap: 1440px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 68px;
  --section: clamp(72px, 10vw, 152px);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.75vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.2vw, 4.4rem);
  --step-5: clamp(3.1rem, 1.6rem + 7.2vw, 8.6rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p,
figure,
dl,
dd,
ol,
ul {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus {
  outline: none;
}
::selection {
  background: var(--accent);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.muted {
  color: var(--muted);
}
.muted-lg {
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 60ch;
}

/* ---------- shared type ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.page-title {
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  margin-top: 24px;
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 58ch;
}
.section-title {
  font-size: var(--step-3);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.block-heading {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}
.statement {
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.prose {
  max-width: 64ch;
}
.prose p + p,
.prose p + .bullets,
.prose .bullets + p {
  margin-top: 1em;
}
.prose-lg {
  font-size: var(--step-1);
  line-height: 1.65;
}
.bullets li {
  position: relative;
  padding-left: 22px;
}
.bullets li + li {
  margin-top: 0.55em;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 10px;
  height: 1px;
  background: var(--ink);
}

/* ---------- buttons & links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.button:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.button-ghost {
  background: transparent;
  color: var(--ink);
}
.button-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.link-arrow::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}
.link-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--wrap);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
}
.mark {
  width: 38px;
  height: auto;
  color: var(--accent);
  flex: none;
}
.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.site-nav ul {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink-2);
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 4px;
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 0.95rem;
  }
  .menu-icon {
    display: grid;
    gap: 6px;
    width: 22px;
  }
  .menu-icon span {
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.25s var(--ease);
  }
  .menu-toggle[aria-expanded="true"] .menu-icon span:first-child {
    transform: translateY(3.75px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] .menu-icon span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
  }
  .js .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    padding: 24px var(--gutter);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s var(--ease), visibility 0.2s;
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
  }
  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .js .site-nav li {
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav a {
    width: 100%;
    min-height: 64px;
    font-size: var(--step-3);
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--ink);
  }
  .js .site-nav a::after {
    display: none;
  }
  .js .site-nav a[aria-current="page"] {
    color: var(--accent);
  }
  html:not(.js) .site-nav ul {
    gap: 16px;
  }
  html:not(.js) .brand-name {
    display: none;
  }
  body.menu-open {
    overflow: hidden;
  }
}
@media (max-width: 380px) {
  .brand-name {
    font-size: 0.875rem;
  }
}

/* ---------- home: hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: var(--section);
}
.hero-name {
  font-size: var(--step-5);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin-left: -0.05em;
}
.hero-name span {
  display: block;
}
.hero-intro {
  margin-top: clamp(24px, 3vw, 40px);
  font-size: var(--step-2);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  max-width: 30ch;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 32px;
}
.values {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 8px 28px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.values span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
  font-size: 0.75rem;
}
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #e9e7e1;
}
.hero-media-link {
  display: block;
  overflow: hidden;
}
.hero-media figcaption {
  margin-top: 12px;
  font-size: var(--step--1);
  color: var(--muted);
}
.hero-media figcaption a {
  color: var(--ink);
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: end;
  }
  .hero-media img {
    aspect-ratio: auto;
    max-height: calc(100vh - var(--header-h) - 120px);
    min-height: 520px;
  }
}
@media (max-width: 520px) {
  .values {
    grid-template-columns: repeat(2, auto);
  }
}

/* ---------- sections ---------- */
.section {
  padding-bottom: var(--section);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* ---------- project cards ---------- */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-media {
  overflow: hidden;
  background: #e9e7e1;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.card-link:hover .card-media img {
  transform: scale(1.025);
}
.card-body {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  gap: 4px 12px;
  padding-top: 16px;
}
.card-body > :not(.card-number) {
  grid-column: 2;
}
.card-number {
  grid-row: 1 / span 4;
  font-size: var(--step--1);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35em;
}
.card-title {
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.card-sub {
  color: var(--ink-2);
}
.card-meta {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 6px;
}
.card-summary {
  margin-top: 10px;
  max-width: 52ch;
  color: var(--ink-2);
}
.card-cta {
  display: inline-flex;
  gap: 8px;
  margin-top: 12px;
  font-size: var(--step--1);
  font-weight: 500;
}
.card-cta .arrow {
  transition: transform 0.25s var(--ease);
}
.card-link:hover .card-cta {
  color: var(--accent);
}
.card-link:hover .card-cta .arrow {
  transform: translateX(4px);
}
.card-link:hover .card-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* home feature grid: alternating wide / tall */
.feature-grid {
  display: grid;
  gap: clamp(48px, 6vw, 96px) clamp(24px, 4vw, 64px);
}
.ratio-wide .card-media {
  aspect-ratio: 3 / 2;
}
.ratio-tall .card-media {
  aspect-ratio: 4 / 5;
}
@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }
  .feature-1 {
    grid-column: 1 / span 7;
  }
  .feature-2 {
    grid-column: 9 / span 4;
    margin-top: clamp(80px, 12vw, 200px);
  }
  .feature-3 {
    grid-column: 1 / span 5;
  }
  .feature-4 {
    grid-column: 7 / span 6;
    margin-top: clamp(120px, 16vw, 260px);
  }
}

/* ---------- about preview ---------- */
.about-preview {
  display: grid;
  gap: 40px;
}
.about-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
}
.about-preview-text .statement {
  max-width: 28ch;
  margin-bottom: 24px;
}
@media (min-width: 900px) {
  .about-preview {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
  }
  .about-portrait {
    grid-column: 1 / span 4;
  }
  .about-preview-text {
    grid-column: 6 / span 7;
  }
}

/* ---------- capabilities ---------- */
.capabilities {
  display: grid;
  gap: 40px 32px;
  counter-reset: cap;
}
.capabilities li {
  counter-increment: cap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.capabilities h3 {
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.capabilities h3::before {
  content: counter(cap, decimal-leading-zero);
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.capabilities p {
  color: var(--ink-2);
  font-size: 0.98rem;
}
.tools {
  margin-top: 48px;
  font-size: var(--step--1);
  color: var(--ink-2);
}
.tools-label {
  color: var(--muted);
  margin-right: 12px;
}
@media (min-width: 640px) {
  .capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .capabilities {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- call to action ---------- */
.cta {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: var(--section);
  border-top: 1px solid var(--line);
}
.cta-title {
  font-size: var(--step-4);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 18ch;
  text-wrap: balance;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 40px;
}
.cta-email {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  overflow-wrap: anywhere;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cta-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #e9e7e1;
  padding-top: 64px;
}
.site-footer .muted {
  color: #a9a69d;
}
.site-footer .mark {
  color: #e9e7e1;
}
.footer-grid {
  display: grid;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-id p {
  margin-top: 12px;
  font-size: var(--step--1);
}
.footer-nav ul {
  display: grid;
  gap: 2px;
}
.footer-nav a,
.footer-email {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  color: #e9e7e1;
}
.footer-nav a:hover,
.footer-email:hover,
.site-footer .social a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-email {
  font-size: var(--step-1);
  overflow-wrap: anywhere;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid #3a3936;
  font-size: var(--step--1);
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #e9e7e1;
  text-decoration: none;
}
.back-to-top:hover {
  color: #fff;
}
.site-footer :focus-visible {
  outline-color: #fff;
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.4fr;
  }
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 8px;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  font-size: var(--step--1);
}
.social svg {
  width: 18px;
  height: 18px;
}
.social-lg a {
  font-size: var(--step-0);
}

/* ---------- page intro ---------- */
.page-intro {
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

/* ---------- work index ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: var(--step--1);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.filter:hover {
  border-color: var(--ink);
}
.filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.filter .count {
  font-size: 0.75rem;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}
.index-grid {
  display: grid;
  gap: 56px clamp(24px, 3vw, 48px);
  padding-bottom: var(--section);
}
.card-index .card-media {
  aspect-ratio: 4 / 3;
}
.card[hidden] {
  display: none;
}
@media (min-width: 700px) {
  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- project page ---------- */
.project-head {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(32px, 4vw, 56px);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: none;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.back-link:hover {
  color: var(--ink);
}
.project-title-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 clamp(16px, 3vw, 40px);
  align-items: start;
}
.project-number {
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.project-subtitle {
  margin-top: 10px;
  font-size: var(--step-2);
  color: var(--ink-2);
  letter-spacing: -0.015em;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 20px 32px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}
.meta-grid dt {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.meta-grid dd {
  font-size: 0.98rem;
  line-height: 1.45;
}
.project-hero {
  max-width: 1760px;
  margin-inline: auto;
  padding-inline: clamp(0px, 2vw, 32px);
}
.project-hero .zoom {
  width: fit-content;
  margin-inline: auto;
}
.project-hero img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--header-h) - 32px);
  margin-inline: auto;
}
.project-body {
  padding-top: clamp(56px, 7vw, 112px);
}
.block {
  margin-bottom: clamp(56px, 7vw, 112px);
}
.block-text {
  display: grid;
  gap: 8px 32px;
}
@media (min-width: 900px) {
  .block-text {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .block-text .block-heading {
    grid-column: 1 / span 3;
    padding-top: 0.3em;
  }
  .block-text .prose {
    grid-column: 4 / span 8;
    font-size: var(--step-1);
    line-height: 1.6;
  }
}

/* figures */
.figure img {
  width: 100%;
  background: #fff;
}
.figure figcaption {
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--muted);
}
.zoom {
  display: block;
  cursor: zoom-in;
  position: relative;
}
.zoom::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(27, 27, 26, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.zoom:hover::after,
.zoom:focus-visible::after {
  opacity: 1;
}
@media (hover: none) {
  .zoom::after {
    opacity: 0.85;
  }
}

.block-image {
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.block-image-full {
  max-width: 1760px;
  padding-inline: clamp(0px, 2vw, 32px);
}
.block-image-full figcaption {
  padding-inline: var(--gutter);
}
.block-image-wide {
  max-width: 1240px;
}
.block-image-medium {
  max-width: 920px;
}
.block-image-narrow {
  max-width: 680px;
}
.block-gallery {
  display: grid;
  gap: 40px clamp(16px, 2vw, 32px);
  align-items: start;
}
@media (min-width: 600px) {
  .block-gallery.cols-2,
  .block-gallery.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .block-gallery.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.block-split {
  display: grid;
  gap: 32px;
}
@media (min-width: 900px) {
  .block-split {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: 32px;
  }
  .block-split .split-text {
    grid-column: 1 / span 4;
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
  .block-split .split-media {
    grid-column: 6 / span 7;
  }
  .block-split.is-reversed .split-text {
    grid-column: 9 / span 4;
    grid-row: 1;
  }
  .block-split.is-reversed .split-media {
    grid-column: 1 / span 7;
    grid-row: 1;
  }
}

.block-key {
  margin-top: calc(-1 * clamp(32px, 4vw, 72px));
}
.key-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}
.key-list {
  columns: 2 220px;
  column-gap: 32px;
  counter-reset: key;
  font-size: var(--step--1);
  color: var(--ink-2);
}
.key-list li {
  counter-increment: key;
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.key-list li::before {
  content: counter(key);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--ink-2);
  color: #fff;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .key-list {
    columns: 4 200px;
  }
}

.parts-list {
  display: grid;
  gap: 24px 32px;
  counter-reset: part;
}
.parts-list li {
  counter-increment: part;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.parts-list h3 {
  display: flex;
  gap: 10px;
  font-size: var(--step-0);
  font-weight: 500;
  margin-bottom: 6px;
}
.parts-list h3::before {
  content: counter(part);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.parts-list p {
  color: var(--ink-2);
  font-size: 0.95rem;
}
@media (min-width: 640px) {
  .parts-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .parts-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.block-materials {
  display: grid;
  gap: 32px;
  align-items: center;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.swatches li {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink-2);
}
.swatches img {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: multiply;
}
@media (min-width: 900px) {
  .block-materials {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .block-materials .split-text {
    grid-column: 1 / span 5;
  }
  .block-materials .swatches {
    grid-column: 7 / span 6;
  }
}
@media (max-width: 420px) {
  .swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: var(--section);
}
.pager-link {
  display: grid;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  text-decoration: none;
}
.pager-next {
  text-align: right;
}
.pager-label {
  font-size: var(--step--1);
  color: var(--muted);
}
.pager-title {
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.pager-link:hover .pager-title {
  color: var(--accent);
}

/* ---------- about ---------- */
.about-hero {
  display: grid;
  gap: 40px;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: var(--section);
}
.about-hero .statement {
  margin-top: 32px;
  max-width: 30ch;
  font-size: var(--step-3);
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.about-hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
}
.about-hero-portrait figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
@media (min-width: 900px) {
  .about-hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
  }
  .about-hero-text {
    grid-column: 1 / span 7;
  }
  .about-hero-portrait {
    grid-column: 8 / span 5;
  }
}
.about-body {
  display: grid;
  gap: 8px 32px;
}
@media (min-width: 900px) {
  .about-body {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .about-body .block-heading {
    grid-column: 1 / span 3;
    padding-top: 0.35em;
  }
  .about-body .prose {
    grid-column: 4 / span 8;
  }
}
.about-columns {
  display: grid;
  gap: 56px 32px;
}
@media (min-width: 900px) {
  .about-columns {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .about-columns > :first-child {
    grid-column: 1 / span 4;
  }
  .about-columns > :last-child {
    grid-column: 6 / span 7;
  }
}
.timeline li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.timeline-dates {
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline-title {
  font-weight: 500;
}
.timeline-org {
  color: var(--ink-2);
}
@media (min-width: 640px) {
  .timeline li {
    grid-template-columns: 11rem 1fr;
  }
  .timeline-dates {
    grid-row: span 2;
    padding-top: 0.15em;
  }
}

/* ---------- CV ---------- */
.cv-intro .button-row {
  margin-top: 32px;
}
.cv {
  padding-bottom: var(--section);
}
.cv-section {
  display: grid;
  gap: 16px 32px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--ink);
}
.cv-heading {
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.cv-profile {
  max-width: 68ch;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-2);
}
.cv-entry {
  display: grid;
  gap: 8px 32px;
  padding: 20px 0;
}
.cv-entry + .cv-entry {
  border-top: 1px solid var(--line);
}
.cv-entry:first-child {
  padding-top: 0;
}
.cv-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
}
.cv-what h3 {
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.cv-what h3 a {
  text-decoration: none;
}
.cv-what h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.cv-org {
  display: block;
  font-weight: 400;
  color: var(--ink-2);
  font-size: var(--step-0);
}
.cv-project {
  margin: 6px 0 12px;
  font-size: var(--step--1);
  color: var(--muted);
}
.cv-what .bullets {
  max-width: 72ch;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.skills > div {
  display: grid;
  gap: 4px 32px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.skills dt {
  font-weight: 500;
}
.skills dd {
  color: var(--ink-2);
}
@media (min-width: 900px) {
  .cv-section {
    grid-template-columns: 3fr 9fr;
  }
  .cv-entry {
    grid-template-columns: 2fr 7fr;
  }
  .cv-when {
    align-content: start;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.25em;
  }
  .skills > div {
    grid-template-columns: 2fr 7fr;
  }
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  gap: 64px 32px;
  padding-bottom: var(--section);
}
.contact-details .block-heading:not(:first-child) {
  margin-top: 40px;
}
.contact-email,
.contact-phone {
  font-size: var(--step-3);
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  overflow-wrap: anywhere;
}
.contact-phone {
  font-size: var(--step-2);
}
.contact-email:hover,
.contact-phone:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.contact-details > .muted {
  margin-top: 40px;
  max-width: 40ch;
}
/* Open form on the page: underlined fields, no card */
.contact-form {
  display: grid;
  gap: 28px;
}
.field {
  display: grid;
  gap: 4px;
}
.field label {
  font-size: var(--step--1);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-field);
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field select {
  appearance: none;
  padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2364625c' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 4px center / 12px 8px;
  cursor: pointer;
}
.field textarea {
  resize: vertical;
  min-height: 150px;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-2);
}
/* Focus: the underline thickens to 2px in the accent; the transparent outline shows in forced-colours mode */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid transparent;
  border-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}
/* Stop browser autofill from painting a filled box behind the underline */
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: inset 0 0 0 100px var(--bg);
}
.field input:-webkit-autofill:focus-visible {
  box-shadow: inset 0 0 0 100px var(--bg), 0 1px 0 0 var(--accent);
}
.field [aria-invalid="true"] {
  border-color: #a12a1f;
}
.field [aria-invalid="true"]:focus-visible {
  border-color: #a12a1f;
  box-shadow: 0 1px 0 0 #a12a1f;
}
.field-error {
  font-size: var(--step--1);
  color: #a12a1f;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .button {
  justify-self: start;
  margin-top: 8px;
}
.form-note {
  font-size: var(--step--1);
}
.form-status:empty {
  display: none;
}
.form-status {
  padding: 12px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--step--1);
}
.form-status.is-error {
  background: #f7e3e0;
  color: #8a2219;
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .contact-details {
    grid-column: 1 / span 5;
  }
  .contact-form {
    grid-column: 7 / span 6;
  }
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 60vh;
  padding-top: clamp(56px, 10vw, 140px);
  padding-bottom: var(--section);
}
.not-found-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 32px;
}

.img-missing {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #f1d9d5;
  color: #8a2219;
  font-size: var(--step--1);
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #141413;
  color: #eceae4;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
}
.lightbox[hidden] {
  display: none;
}
.lb-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px var(--gutter);
  font-size: var(--step--1);
}
.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 clamp(8px, 6vw, 88px);
  overflow: auto;
  touch-action: pan-y pinch-zoom;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
}
.lb-stage.is-zoomed {
  place-items: start;
}
.lb-stage.is-zoomed img {
  max-width: none;
  max-height: none;
}
.lb-caption {
  padding: 12px var(--gutter) 20px;
  font-size: var(--step--1);
  text-align: center;
  color: #c9c6bd;
  min-height: 1.6em;
}
.lb-btn {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #55534d;
  background: transparent;
  color: #eceae4;
  cursor: pointer;
  font-size: var(--step--1);
}
.lb-btn:hover {
  background: #eceae4;
  color: #141413;
}
.lb-btn:focus-visible {
  outline-color: #fff;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(20, 20, 19, 0.7);
  font-size: 1.1rem;
}
.lb-prev {
  left: 12px;
}
.lb-next {
  right: 12px;
}
.lb-actions {
  display: flex;
  gap: 8px;
}

/* ---------- reveal on scroll (only when JS is on and motion is OK) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- print (CV page prints cleanly) ---------- */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .button-row,
  .cta {
    display: none !important;
  }
  body {
    background: #fff;
    font-size: 10.5pt;
  }
  .wrap {
    padding-inline: 0;
  }
  .page-intro {
    padding: 0 0 12pt;
  }
  .page-title {
    font-size: 22pt;
  }
  .cv-section {
    padding: 12pt 0;
    break-inside: avoid-page;
  }
  .cv-entry {
    break-inside: avoid;
    padding: 8pt 0;
  }
  a {
    text-decoration: none;
  }
}
