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

/* ─────────────────────────────────────────
   Tokens
───────────────────────────────────────── */
:root {
  --plaster: #f5f0eb;
  --ember:   #d24f39;
  --pitch:   #302d2f;
  --flint:   #6a6869;
  --chalk:   #fffcf8;
  --linen:   rgba(237, 233, 220, 0.9);
  --shale:   #dcdcdc;
  --cloud:   #ffffff;
  --metal:   #b8b4b8;
  --grid-line: rgba(26, 24, 25, 0.05);
}

/* Dark mode — site-wide.
   Applies for OS dark preference (unless forced light), or when forced dark. */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --plaster: #252220;
    --ember:   #e5674e;
    --pitch:   #f4eee7;
    --flint:   #928c87;
    --chalk:   #1c1917;
    --linen:   rgba(48, 44, 42, 0.4);
    --shale:   #3a3532;
    --cloud:   #2e2a28;
    --metal:   #ffffff;
    --grid-line: rgba(244, 238, 231, 0.05);
    color-scheme: dark;
  }
}
:root.theme-dark {
  --plaster: #252220;
  --ember:   #e5674e;
  --pitch:   #f4eee7;
  --flint:   #928c87;
  --chalk:   #1c1917;
  --linen:   rgba(48, 44, 42, 0.4);
  --shale:   #3a3532;
  --cloud:   #2e2a28;
  --metal:   #ffffff;
  --grid-line: rgba(244, 238, 231, 0.05);
  color-scheme: dark;
}

/* Extra dark — one of the two user-facing themes (the other is light).
   The nav circle toggles light <-> extra-dark. Standard .theme-dark above is
   retained but no longer reachable through the UI. Placed after .theme-dark so
   it wins on equal-specificity ties. */
:root.theme-extra-dark {
  --plaster: #181614;
  --ember:   #e0624a;
  --pitch:   #f4eee7;
  --flint:   #928c87;
  --chalk:   #0f0e0d;
  --linen:   rgba(146, 140, 135, 0.075);
  --shale:   #2d2a27;
  --cloud:   #211f1c;
  --metal:   #383738;
  --grid-line: rgba(244, 238, 231, 0.05);
  color-scheme: dark;
}

/* The transparent ink drawing: invert to light strokes in dark mode */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) .about-portrait { filter: invert(1); }
}
:root.theme-dark .about-portrait,
:root.theme-extra-dark .about-portrait { filter: invert(1); }

/* Dim bright screenshots in dark mode; homepage cards restore on hover */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) img:not(.about-portrait) {
    filter: brightness(1) contrast(0.96);
    opacity: 0.9;
    transition: filter 0.3s ease, opacity 0.3s ease;
  }
  :root:not(.theme-light) .project-card:hover .project-card-image img,
  :root:not(.theme-light) .article-card:hover .article-image img {
    filter: none;
    opacity: 1;
  }
}
:root.theme-dark img:not(.about-portrait),
:root.theme-extra-dark img:not(.about-portrait) {
  filter: brightness(1) contrast(0.96);
  opacity: 0.9;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
:root.theme-dark .project-card:hover .project-card-image img,
:root.theme-dark .article-card:hover .article-image img,
:root.theme-extra-dark .project-card:hover .project-card-image img,
:root.theme-extra-dark .article-card:hover .article-image img {
  filter: none;
  opacity: 1;
}

/* ─────────────────────────────────────────
   Base
───────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Libre Franklin', sans-serif;
  background: var(--plaster);
  color: var(--pitch);
  /* clip (not hidden) so full-bleed elements don't cause horizontal scroll
     while still allowing position: sticky to pin against the viewport */
  overflow-x: clip;
}

/* Condensed / semi-condensed display type (Instrument Sans wdth axis) */
.font-condensed {
  font-stretch: condensed;
}
.font-semicondensed {
  font-stretch: semi-condensed;
}

/* Heading (H) type scale — Instrument Sans Condensed.
   H1 = 96/64px, H2 = 48px, H3 = 40px (new), H4 = 24px (was H3). */
.h3 {
  font-stretch: condensed;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.4;
  color: var(--pitch);
}
.h4 {
  font-stretch: condensed;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   Background grid
───────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-grid::before,
.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
}
.bg-grid::before {
  background-image: repeating-linear-gradient(
    to right,
    var(--grid-line) 0px,
    var(--grid-line) 1px,
    transparent 1px,
    transparent 33px
  );
}
.bg-grid::after {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--grid-line) 0px,
    var(--grid-line) 1px,
    transparent 1px,
    transparent 33px
  );
}

.bg-top-fade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 320px;
  background: linear-gradient(to bottom, var(--plaster) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* ─────────────────────────────────────────
   Page wrapper
───────────────────────────────────────── */
.page {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────
   Nav
───────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

nav.scrolled {
  background: var(--chalk);
  border-bottom-color: var(--shale);
}

.nav-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 80px;
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-square {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-square svg {
  display: block;
  width: 24px;
  height: 24px;
}

.nav-wordmark {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--pitch);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-mark:hover .nav-wordmark {
  color: var(--ember);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-jump-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--pitch);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

.nav-divider {
  display: block;
  width: 1px;
  height: 16px;
  background: var(--shale);
  flex-shrink: 0;
}

.nav-icon-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.nav-icon {
  display: block;
  width: 16px;
  height: 16px;
  background-color: var(--pitch);
  -webkit-mask-image: url('../assets/images/linkedin-icon.svg');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: url('../assets/images/linkedin-icon.svg');
  mask-size: contain;
  mask-repeat: no-repeat;
  transition: background-color 0.2s ease;
}

.nav-icon-link:hover .nav-icon {
  background-color: var(--ember);
}

.nav-mail {
  color: var(--pitch);
  transition: color 0.2s ease;
}

.nav-mail svg {
  display: block;
  width: 21px;
  height: 20px;
}

.nav-mail:hover {
  color: var(--ember);
}

/* ─────────────────────────────────────────
   Global tooltip
───────────────────────────────────────── */
.tooltip {
  background: var(--shale);
  color: var(--pitch);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

/* Nav icon tooltips: centered below the icon. Hidden until hover/focus, and
   force-shown via .is-visible for the email's "Copied!" confirmation. */
.nav-icon-link .tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
}

.nav-icon-link:hover .tooltip,
.nav-icon-link:focus-visible .tooltip,
.nav-icon-link .tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Dark-mode toggle — contrast circle that turns ember and spins on hover */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: none;
  color: var(--pitch);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.6s ease;
}

.theme-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
}

.theme-toggle:hover {
  color: var(--ember);
  transform: rotate(360deg);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--ember);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--ember);
}

.nav-link:hover::after {
  width: 100%;
  right: auto;
  left: 0;
}

/* ─────────────────────────────────────────
   Hero
───────────────────────────────────────── */
.hero {
  padding: 80px 192px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
  text-align: left;
}

h1,
.hero h1 {
  font-stretch: condensed;
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  color: var(--pitch);
}

.hero p {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   Jump link scroll offset
───────────────────────────────────────── */
.projects,
.thinking,
#about {
  scroll-margin-top: var(--nav-height, 80px);
}

/* ─────────────────────────────────────────
   Project cards
───────────────────────────────────────── */
.projects {
  padding: 64px 160px 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-card {
  border: 1px solid transparent;
  border-radius: 32px;
  background:
    linear-gradient(var(--chalk), var(--chalk)) padding-box,
    linear-gradient(122deg, var(--cloud) 0%, var(--metal) 100%) border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,24,25,0.08);
}

.project-card-image {
  background: var(--plaster);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.project-card--primer:hover .project-card-image {
  background-color: #367ef0;
}
.project-card--butcherbox:hover .project-card-image {
  background-color: #c93835;
}
.project-card--nara:hover .project-card-image {
  background-color: #31537C;
}
.project-card--grapevine:hover .project-card-image {
  background-color: #ffea33;
}

.project-card-image--contain {
  padding: 24px;
}
.project-card-image--contain img {
  width: 100%;
  height: auto;
  max-height: 567px;
  object-fit: contain;
}

.project-card-image--cover {
  padding: 24px 104px 0;
}
.project-card-image--cover img {
  width: 100%;
  aspect-ratio: 277 / 392;
  object-fit: cover;
  object-position: top;
}

/* Wide card, top-aligned and cropped at the bottom (no bottom padding) */
.project-card-image--crop-bottom {
  padding: 24px 24px 0;
}
.project-card-image--crop-bottom img {
  width: 100%;
  aspect-ratio: 1054 / 498;
  object-fit: cover;
  object-position: top;
}
.project-card--grapevine .project-card-image--crop-bottom img {
  aspect-ratio: 936 / 478;
}

.projects-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* View project history CTA — sits 64px below the last card
   (.projects gap is 32px, so 32px margin gives 64px total) */
.projects-cta {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.projects-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: 1px solid var(--shale);
  border-radius: 4px;
  background: var(--chalk);
  color: var(--pitch);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.projects-cta-btn:hover {
  border-color: var(--flint);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title {
  font-size: 24px;
  font-weight: 600;
  font-variation-settings: 'wdth' 87.5;
  line-height: 1.3;
  color: var(--pitch);
}

.project-desc {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   Linen backdrop — sized dynamically via JS to stop
   at the bottom of the first paragraph in the about body
───────────────────────────────────────── */
/* Full-bleed container spanning the Thinking section (80px of breathing room
   above the headline and below the last card). Out of flow, so no footprint. */
.linen-sticky {
  position: absolute;
  top: -80px;
  bottom: -140px; /* extends 60px further below the last card; absolute, so About isn't pushed down */
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  z-index: 0;
  pointer-events: none;
}

/* The linen is a contained band that pins in the viewport while the Thinking
   content scrolls over it, then releases as the section exits (parallax lock).
   Softly faded top/bottom edges make the held position readable without a hard
   line, so the lock is perceptible even with a subtle fill. */
.linen-backdrop {
  position: sticky;
  top: 12vh;
  height: 76vh;
  background-color: var(--linen);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
}

/* One-off: the Thinking band runs a hair lighter (0.05) than the global
   extra-dark linen token (0.075), which still drives the footer and elsewhere. */
:root.theme-extra-dark .linen-backdrop {
  background-color: rgba(146, 140, 135, 0.05);
}

/* ─────────────────────────────────────────
   Thinking + About layout wrapper (no background of its own)
───────────────────────────────────────── */
.thinking-about-wrap {
  position: relative;
  z-index: 1;
  padding-top: 120px;
  padding-bottom: 0;
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
}

.thinking-about-wrap > .thinking,
.thinking-about-wrap > .about-approach {
  width: 100%;
  max-width: 1440px;
}

/* ─────────────────────────────────────────
   Thinking / Articles
───────────────────────────────────────── */
.thinking {
  position: relative;
  padding: 0 160px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Keep the Thinking content above the pinned linen backdrop */
.thinking-header,
.thinking .articles-grid {
  position: relative;
  z-index: 1;
}

.thinking-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 741px;
  text-align: left;
}

.thinking-headline {
  font-stretch: condensed;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--pitch);
  text-align: left;
}

.thinking-body {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--pitch);
  text-align: left;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.article-card {
  position: relative;
  border: 1px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(var(--chalk), var(--chalk)) padding-box,
    linear-gradient(122deg, var(--cloud) 0%, var(--metal) 100%) border-box;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Hover: a flint border fades in slowly over the shale (and back out on leave).
   Done on a pseudo-element so its transition isn't overridden by .fade-in. */
.article-card::after {
  content: "";
  position: absolute;
  inset: -1px; /* sit over the card's 1px shale border */
  border: 1px solid var(--flint);
  border-radius: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,24,25,0.08);
}

.article-card:hover::after {
  opacity: 1;
}

.article-image {
  height: 243px;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article thumbnails: desaturated at rest, full colour on hover (in sync with
   the ember stroke). Grayscale on the container composes cleanly with the
   dark-mode img filters, so no per-theme overrides are needed. */
.article-image {
  opacity: 0.88;
  transition: opacity 0.5s ease;
}

.article-card:hover .article-image {
  opacity: 1;
}

.article-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-title {
  font-size: 24px;
  font-weight: 600;
  font-variation-settings: 'wdth' 87.5;
  line-height: 1.3;
  color: var(--pitch);
}

h1.article-title {
  font-size: 64px;
  font-weight: 900;
  font-stretch: condensed;
  font-variation-settings: 'wdth' 75;
  line-height: 1.1;
}

.article-desc {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   About + principles
───────────────────────────────────────── */
.about-approach {
  position: relative;
  padding: 80px 160px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-height: 2029px;
}

.about-headline {
  font-stretch: condensed;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   Principles list
───────────────────────────────────────── */
.about-principles-list {
  display: flex;
  flex-direction: column;
}

.about-principle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px 0;
  border-bottom: 1px solid var(--shale);
}

.about-principle--first {
  padding-top: 0;
}

.about-principle-title-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.about-principle-num {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--flint);
  min-width: 17px;
}

.about-principle-name {
  font-stretch: semi-condensed;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: var(--pitch);
}

.about-principle-desc {
  padding-left: 41px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

/* ─────────────────────────────────────────
   About bio — the postmodern portrait sits in a
   fixed spot relative to the section, not in flow
   with the bio text, so its position holds steady
   regardless of how the copy wraps.
───────────────────────────────────────── */
.about-bio {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 500px;
  margin-top: -50px;
  padding-top: 32px;
}

.about-bio-title {
  font-stretch: semi-condensed;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pitch);
}

.about-bio p:not(.about-bio-title) {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}

.about-portrait-wrap {
  position: absolute;
  z-index: 1;
  top: 119px;
  left: 592px;
  width: 525px;
  height: 816px;
  overflow: hidden;
  border-radius: 0 0 48px 48px;
  pointer-events: none;
}

.about-portrait-wrap--mobile {
  display: none;
}

.about-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────────────────────────────────────
   Connect (inside about)
───────────────────────────────────────── */
.about-connect {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}

.connect-header {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  color: var(--ember);
}

.connect-body {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
  max-width: 728px;
}

.connect-link {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Inline text link — pitch text with an ember underline; full ember on hover */
.text-link {
  color: var(--pitch);
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.text-link:hover {
  color: var(--ember);
}

/* ─────────────────────────────────────────
   Photos carousel
───────────────────────────────────────── */
.photos {
  padding: 120px 160px 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.photos-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.photos-caption {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--pitch);
  max-width: 784px;
}

.photos-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  opacity: 0.8;
  flex-shrink: 0;
}

.photos-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ember);
  transition: opacity 0.2s ease;
}

.photos-btn:hover {
  opacity: 0.6;
}

.photos-btn svg {
  width: 40px;
  height: 40px;
  display: block;
}

.photos-grid {
  display: flex;
  gap: 52px;
  align-items: center;
}

.photo-item {
  width: 331px;
  height: 331px;
  flex-shrink: 0;
  border: 12px solid var(--chalk);
  overflow: hidden;
  box-shadow:
    0px 2px 5px rgba(0,0,0,0.10),
    0px 9px 9px rgba(0,0,0,0.09),
    0px 21px 13px rgba(0,0,0,0.05),
    0px 38px 15px rgba(0,0,0,0.01),
    0px 59px 17px rgba(0,0,0,0);
  position: relative;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────────────────────────────────────
   Scroll fade-in
───────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────
   Type — Body XSmall
───────────────────────────────────────── */
.body-xsmall {
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--pitch);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
.footer {
  margin-top: 160px;
  background: var(--linen);
  border-top: 1px solid var(--shale);
}

.footer--linen {
  margin-top: 0;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 80px;
}

.footer-credits,
.footer-signature {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-signature::before {
  content: '';
  display: block;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--pitch);
  flex-shrink: 0;
}

.footer-dot {
  display: block;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--pitch);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   Ember dot click effect — launches up and
   bounces off the nav's ember bar (physics in JS)
───────────────────────────────────────── */
.ember-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--ember);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

/* ─────────────────────────────────────────
   Project history page (/work)
───────────────────────────────────────── */
.history {
  padding: 64px 160px 96px;
}
.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.history-card {
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(122deg, var(--cloud) 0%, var(--metal) 100%) border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.history-card-body {
  flex: 1 0 auto;
  background: var(--chalk);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px 48px 32px;
}
.history-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.history-title {
  font-stretch: condensed;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.29;
  color: var(--pitch);
}
.history-date {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.12px;
  text-transform: uppercase;
  color: var(--flint);
  white-space: nowrap;
}
.history-desc {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
}
.history-tags {
  background: var(--chalk);
  border-top: 1px solid var(--shale);
  padding: 24px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.history-tag {
  background: var(--plaster);
  border: 1px solid var(--shale);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pitch);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   Responsive — mobile (<= 768px)
───────────────────────────────────────── */
@media (max-width: 768px) {

  .nav-inner {
    padding: 16px;
  }
  /* Mobile nav: wordmark + theme toggle, contact, and LinkedIn; no jump links */
  .nav-jump-links {
    display: none;
  }
  .nav-divider {
    display: none;
  }
  .nav-mail {
    display: flex;
  }
  .nav-links {
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 16px;
  }
  .footer-credits {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer-credits .footer-dot {
    display: none;
  }
  .footer-signature::before {
    display: none;
  }

  .hero {
    padding: 40px 16px 0;
    gap: 20px;
    align-items: flex-start;
    text-align: left;
  }
  .hero h1 {
    font-size: 48px;
  }
  .hero p {
    font-size: 22px;
    max-width: none;
  }

  .projects {
    padding: 40px 16px 0;
    gap: 20px;
  }
  .project-card {
    border-radius: 24px;
    padding: 24px;
    gap: 24px;
  }
  .projects-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-card-image--contain {
    padding: 16px;
  }
  .project-card-image--cover {
    padding: 24px 104px 0;
  }
  .project-card-image--crop-bottom {
    padding: 16px 16px 0;
  }
  .project-title {
    font-size: 20px;
  }
  .project-desc {
    font-size: 18px;
  }

  .thinking-about-wrap {
    margin-top: 40px;
    padding-top: 64px;
    padding-bottom: 0;
    gap: 64px;
  }

  .thinking {
    padding: 0 16px;
    gap: 40px;
  }
  .thinking-header {
    max-width: none;
  }
  .thinking-headline {
    font-size: 40px;
  }
  .thinking-body {
    font-size: 20px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .article-card {
    padding: 24px;
  }
  .article-title {
    font-size: 20px;
  }
  h1.article-title {
    font-size: 48px;
    line-height: 1;
  }
  .article-desc {
    font-size: 18px;
  }

  .history {
    padding: 40px 16px 64px;
  }
  .history-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .history-card-body {
    padding: 24px 24px 20px;
    gap: 16px;
  }
  .history-card-head {
    gap: 12px;
  }
  .history-title {
    font-size: 28px;
  }
  .history-date {
    font-size: 12px;
    letter-spacing: 0.96px;
  }
  .history-desc {
    font-size: 18px;
  }
  .history-tags {
    padding: 20px 24px;
    gap: 8px;
  }
  .history-tag {
    font-size: 16px;
  }

  .about-approach {
    padding: 0 16px;
    gap: 32px;
    min-height: 0;
  }
  .about-headline {
    font-size: 40px;
  }
  .about-bio {
    width: 100%;
    min-height: 0;
  }
  .about-bio p {
    font-size: 18px;
  }
  .about-bio p.about-bio-title {
    font-size: 24px;
    line-height: 1.3;
  }
  .about-portrait-wrap--desktop {
    display: none;
  }
  .about-portrait-wrap--mobile {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 595 / 816;
    order: 1;
  }
  .about-principle-desc {
    font-size: 18px;
  }
}
