/* ============================================================
   WHM Portfolio — William H Miles
   Bold geometric sans, cool palette, confident type.
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap');

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette — cool off-white, deep ink, electric accent */
  --paper:        #F4F3EF;
  --paper-warm:   #ECEAE4;
  --ink:          #0F1419;
  --ink-soft:     #1E232B;
  --muted:        #9AA0A8;
  --muted-strong: #5B6068;
  --rule:         #DCDAD3;
  --accent:       #2962FF;

  /* Type */
  --sans: 'General Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  /* Rhythm — tighter than v1 */
  --gutter: clamp(1.25rem, 3.5vw, 3rem);
  --section-y: clamp(2.5rem, 6vw, 5.5rem);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  /* 4. CSS-level drag and selection protection — applies site-wide */
  -webkit-user-drag: none;
  user-select: none;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.875rem var(--gutter) 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.brand {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 2rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.nav a {
  position: relative;
  padding-bottom: 2px;
  color: var(--muted-strong);
  transition: color 0.2s ease;
}

.nav a:hover { color: var(--ink); }

.nav a.is-active { color: var(--ink); }

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1.5px;
  background: var(--ink);
}

.contact-pill {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-strong);
  transition: color 0.2s ease;
}

.contact-pill:hover { color: var(--ink); }

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.875rem;
    padding: 1.25rem var(--gutter) 1rem;
  }
  .header-left {
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem 1.5rem;
  }
  .brand { font-size: 0.9375rem; }
  .nav { gap: 1.25rem; font-size: 0.8125rem; }
  .contact-pill { display: none; }
}

/* ---------- Main / Layout ---------- */
main { position: relative; }

.section {
  padding: var(--section-y) var(--gutter);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 1.5rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
}

.hero h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.5rem, 7.5vw, 6.75rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  display: flex;
  flex-direction: column;
}

.hero h1 .line {
  white-space: nowrap;
  align-self: flex-start;
}

.hero h1 .line--muted { color: var(--muted-strong); }

/* Lines 2 and 3 are smaller, flush left, sized so they end at the "e" of "Miles" */
.hero h1 .line:nth-child(2),
.hero h1 .line:nth-child(3) {
  font-size: 0.755em;
  letter-spacing: -0.02em;
}

/* Tighten gap between line 1 and line 2, open up gap between 2 and 3 */
.hero h1 .line:nth-child(2) { margin-top: 0.22em; }
.hero h1 .line:nth-child(3) { margin-top: 0.22em; }

@media (max-width: 720px) {
  .hero h1 .line { white-space: normal; }
  .hero h1 .line:nth-child(2),
  .hero h1 .line:nth-child(3) {
    font-size: 0.7em;
  }
}

/* ---------- Hero grid: title + variable-width image ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}

.hero-image {
  position: relative;
  overflow: hidden;
  background: var(--paper-warm);
  min-height: 100%;
}

/* Hatched placeholder shown when image is missing */
.hero-image::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
  background:
    repeating-linear-gradient(
      45deg,
      var(--paper-warm) 0 12px,
      #E0DDD5 12px 13px
    );
  z-index: 0;
}

.hero-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-warm);
  display: block;
}

@media (max-width: 800px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .hero-image {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}

/* Full-stop accent — a blue dot, sits like punctuation at the baseline */
.accent-square {
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  background: var(--accent);
  vertical-align: 0.06em;
  margin-left: 0.04em;
  border-radius: 50%;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.hero-lede {
  max-width: 38ch;
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
}

.hero-cta {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
  transition: padding-right 0.25s ease;
}

.hero-cta::after { content: ' →'; }
.hero-cta:hover  { padding-right: 6px; }

/* Hero entrance */
.hero h1 .line,
.hero-lede,
.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero h1 .line:nth-child(1) { animation-delay: 0.05s; }
.hero h1 .line:nth-child(2) { animation-delay: 0.18s; }
.hero h1 .line:nth-child(3) { animation-delay: 0.30s; }
.hero-lede                  { animation-delay: 0.45s; }
.hero-cta                   { animation-delay: 0.55s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .hero-foot { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-cta { justify-self: start; }
}

/* ---------- Categories block (home) ---------- */
.categories {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.category {
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.25s ease;
  position: relative;
}

.category:last-child { border-right: none; }
.category:hover { background: var(--paper-warm); }

.category-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.06em;
}

.category h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-top: 0.25rem;
}

.category-desc {
  color: var(--muted-strong);
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

.category-link {
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  align-self: flex-start;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: padding-right 0.25s ease;
}

.category-link::after { content: ' →'; }
.category:hover .category-link { padding-right: 4px; }

@media (max-width: 800px) {
  .categories { grid-template-columns: 1fr; }
  .category { border-right: none; border-bottom: 1px solid var(--rule); }
  .category:last-child { border-bottom: none; }
}

/* ---------- Works Grid ---------- */
.works-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--rule);
}

.works-header h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  letter-spacing: -0.025em;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.75rem);
}

/* Tighter variant for the home "recent pieces" grid */
.works-grid--tight {
  gap: clamp(1rem, 1.5vw, 1.25rem) clamp(0.625rem, 1vw, 1rem);
}

.works-grid--tight .work { gap: 0.55rem; }

.work {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  /* When .work is used on an <a> tag, strip default link styling */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.work--wide   { grid-column: span 6; }
.work--full   { grid-column: span 8; }
.work--narrow { grid-column: span 3; }

.work-image {
  position: relative;
  overflow: hidden;
  background: var(--paper-warm);
  aspect-ratio: 4 / 5;
}

.work-image--tall    { aspect-ratio: 3 / 4; }
.work-image--square  { aspect-ratio: 1 / 1; }
.work-image--wide    { aspect-ratio: 4 / 3; }
.work-image--pano    { aspect-ratio: 16 / 10; }

.work-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper-warm);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  /* 4. CSS-level drag and selection protection */
  -webkit-user-drag: none;
  user-select: none;
}

.work:hover .work-image img { transform: scale(1.025); }

.work-image::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
  background:
    repeating-linear-gradient(
      45deg,
      var(--paper-warm) 0 12px,
      #E0DDD5 12px 13px
    );
  z-index: 0;
}

.work-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.work-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.work-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.02em;
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .works-grid { grid-template-columns: repeat(6, 1fr); gap: 2rem 1.25rem; }
  .work          { grid-column: span 3; }
  .work--wide    { grid-column: span 6; }
  .work--full    { grid-column: span 6; }
  .work--narrow  { grid-column: span 3; }
}

@media (max-width: 560px) {
  .works-grid { grid-template-columns: 1fr; gap: 2rem; }
  .work, .work--wide, .work--full, .work--narrow { grid-column: span 1; }
}

/* ---------- Archive header ---------- */
.archive-header {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.archive-header h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.archive-intro {
  max-width: 38ch;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 1rem;
}

@media (max-width: 800px) {
  .archive-header { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ---------- Archive: Projects List ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 2.5vw, 2rem);
}

.project-entry {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.project-entry:hover { opacity: 0.92; }

.project-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  background: transparent;
}

.cover-image {
  position: relative;
  overflow: hidden;
  background: var(--paper-warm);
}

/* First cover image spans full height on the left */
.cover-image:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}
.cover-image:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.cover-image:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.cover-image::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.5rem;
  background:
    repeating-linear-gradient(
      45deg,
      var(--paper-warm) 0 10px,
      #E0DDD5 10px 11px
    );
  z-index: 0;
}

.cover-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper-warm);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-entry:hover .cover-image img { transform: scale(1.03); }

.project-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-info h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.project-info p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 50ch;
}

.project-info .project-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.25rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.project-info .project-cat {
  color: var(--muted-strong);
}

.project-info .project-view {
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: padding-right 0.25s ease;
}

.project-info .project-view::after { content: ' →'; }

.project-entry:hover .project-view { padding-right: 4px; }

@media (max-width: 700px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* ---------- Project Page ---------- */
.project-page-header {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}

.project-back {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.project-back::before { content: '← '; }

.project-back:hover { color: var(--ink); }

.project-page-header h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.project-page-header h1 .accent-square {
  width: 0.16em;
  height: 0.16em;
  vertical-align: 0.06em;
  border-radius: 50%;
}

.project-intro-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 1.5rem;
}

.project-intro {
  font-size: clamp(1rem, 1.05vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
}

.project-meta-block {
  display: grid;
  gap: 0.875rem;
  font-size: 0.875rem;
}

.project-meta-block dt {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 0.25rem;
}

.project-meta-block dd {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 800px) {
  .project-intro-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Single hero image for a project */
.project-image {
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.project-image img {
  max-width: 780px;
  width: 100%;
  height: auto;
  display: block;
}

.project-image figcaption {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  text-align: center;
}

/* Series layout: multiple project-image blocks stacked, tighter spacing */
.project-series .project-image {
  padding: clamp(1rem, 2vw, 1.75rem) var(--gutter);
}
.project-series .project-image:first-child { padding-top: clamp(2rem, 5vw, 4rem); }
.project-series .project-image:last-child { padding-bottom: clamp(2rem, 5vw, 4rem); }

/* Gallery grid for projects with multiple images */
.project-gallery {
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.project-gallery .gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--paper-warm);
  aspect-ratio: 4 / 5;
}

.project-gallery .gallery-item--wide { grid-column: span 2; aspect-ratio: 16 / 10; }

/* Landscape-orientation gallery: 3:2 ratio slots, better for landscape photography */
.project-gallery--landscape .gallery-item { aspect-ratio: 3 / 2; }

.project-gallery .gallery-item::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem;
  text-align: center;
  background:
    repeating-linear-gradient(
      45deg,
      var(--paper-warm) 0 12px,
      #E0DDD5 12px 13px
    );
  z-index: 0;
}

.project-gallery .gallery-item img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-warm);
}

@media (max-width: 700px) {
  .project-gallery { grid-template-columns: 1fr; }
  .project-gallery .gallery-item--wide { grid-column: span 1; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.about-portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-warm);
  position: relative;
}

.about-portrait::before {
  content: 'PORTRAIT — REPLACE';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  background:
    repeating-linear-gradient(
      45deg,
      var(--paper-warm) 0 12px,
      #E0DDD5 12px 13px
    );
}

.about-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-warm);
}

.about-body h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
}

.about-body h1 .line {
  white-space: nowrap;
  align-self: flex-start;
}

.about-body h1 .line--muted { color: var(--muted); }

/* Lines 2 and 3 smaller, flush left, same scale as hero */
.about-body h1 .line:nth-child(2),
.about-body h1 .line:nth-child(3) {
  font-size: 0.755em;
  letter-spacing: -0.02em;
}

.about-body h1 .line:nth-child(2) { margin-top: 0.22em; }
.about-body h1 .line:nth-child(3) { margin-top: 0.22em; }

@media (max-width: 720px) {
  .about-body h1 .line { white-space: normal; }
}

.about-section {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.about-section h3 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 0.75rem;
}

.about-section p {
  max-width: 54ch;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}

.about-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.about-links a, .about-email {
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  font-weight: 500;
}

@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 480px; }
}

/* ---------- Closing ---------- */
.closing {
  padding: clamp(3.5rem, 8vw, 7rem) var(--gutter);
  border-top: 1px solid var(--rule);
}

.closing p {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

.closing p .line {
  white-space: nowrap;
  align-self: flex-start;
}

.closing p .line--muted { color: var(--muted); }

/* Lines 2 and 3 smaller, flush left, same scale as hero */
.closing p .line:nth-child(2),
.closing p .line:nth-child(3) {
  font-size: 0.755em;
  letter-spacing: -0.02em;
}

.closing p .line:nth-child(2) { margin-top: 0.22em; }
.closing p .line:nth-child(3) { margin-top: 0.22em; }

@media (max-width: 720px) {
  .closing p .line { white-space: normal; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: 2.5rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  font-size: 0.875rem;
  background: var(--paper);
}

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 0.875rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--muted-strong); }

.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted-strong);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .site-footer { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* Clickable recognition items on the about page */
.about-list a {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.about-list a:hover {
  text-decoration-color: var(--ink);
}

/* Single centred portrait image — used on standalone recognition pages */
.project-gallery--single {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin-inline: auto;
}
.project-gallery--single .gallery-item {
  aspect-ratio: 3 / 4;
}

/* Solid-black placeholders — used when a section is intentionally dark/studio in tone
   and you want black slabs rather than the striped "Image" placeholder */
.cover-image--black::before,
.project-gallery .gallery-item--black::before {
  background: #000;
  color: rgba(255, 255, 255, 0.35);
}

/* Suppress placeholder visuals on image slots that actually contain an image.
   Leaves the striped/black placeholders intact on intentionally empty slots
   (Windsor, Lucozade) but removes the grey letterbox boxes around real photos. */
.cover-image:has(img),
.cover-image:has(img) img,
.project-gallery .gallery-item:has(img),
.project-gallery .gallery-item:has(img) img {
  background: transparent;
}
.cover-image:has(img)::before,
.project-gallery .gallery-item:has(img)::before {
  display: none;
}

/* Extend the placeholder-suppression rule to the homepage image slots */
.hero-image:has(img),
.hero-image:has(img) img,
.work-image:has(img),
.work-image:has(img) img {
  background: transparent;
}
.hero-image:has(img)::before,
.work-image:has(img)::before {
  display: none;
}

/* Let the work-image containers size to the image's natural aspect ratio,
   so images are shown at their original proportions without cropping. */
.work-image:has(img) {
  aspect-ratio: auto;
}
.work-image:has(img) img {
  height: auto;
  object-fit: initial;
}
.works-grid {
  align-items: start;
}

/* Subsection cards on listing pages — a quiet border encloses each series,
   wrapping both the cover images and the typography below them. */
.project-entry {
  border: 1px solid var(--rule);
  padding: clamp(0.875rem, 1.5vw, 1.25rem);
}

/* Section divider used inside a project-series to group images
   under a heading (e.g., "Final pieces", "Design process") */
.project-section-title {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  text-align: center;
  margin: clamp(2.5rem, 5vw, 4rem) 0 clamp(0.5rem, 1vw, 1rem);
  padding: 0 var(--gutter);
}

/* Bounding border around the main content area of project detail pages */
main:has(.project-page-header) {
  border: 1px solid var(--rule);
  margin: 0 var(--gutter) clamp(2rem, 4vw, 3rem);
}

/* Stack of process images sitting flush together, larger than standard
   project-image width so small text and details are legible. */
.process-stack {
  padding: 0 var(--gutter);
  max-width: 1200px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}
.process-stack img {
  width: 100%;
  height: auto;
  display: block;
}

/* Full-bleed hero with the eyebrow, title, description, and CTA overlaid on
   the image. The image fills the hero section between the site-header's
   bottom border and the categories' top border, going edge-to-edge. */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}
.hero .eyebrow {
  color: var(--ink);
}
