:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --sand: #ffffff;
  --ink: #11100e;
  --muted: #635d55;
  --accent: #b76d00;
  --accent-strong: #965900;
  --line: rgba(17, 16, 14, 0.18);
  --max-width: 1060px;
  --content-width: 760px;
  --radius: 2px;
  --space-1: 0.4rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 7rem;
  --heading-font: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --body-font: 'Albert Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  padding: 1.75rem 0 1.25rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  width: 68px;
  height: auto;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.45rem;
  align-items: center;
  justify-content: flex-end;
  font-size: 1.05rem;
  font-weight: 700;
}
.site-nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  text-transform: uppercase;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: currentColor;
}
.site-nav a[aria-current='page'] {
  border-bottom-color: transparent;
  font-weight: 900;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}
.menu-toggle-lines {
  position: relative;
  margin-inline: auto;
}
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: '';
  position: absolute;
  left: 0;
}
.menu-toggle-lines::before { top: -8px; }
.menu-toggle-lines::after { top: 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.8rem;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

h1, h2, h3, h4, h5, h6, p { margin-top: 0; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-optical-sizing: auto;
  line-height: 1.05;
  letter-spacing: -0.06em;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.7rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); }
.eyebrow {
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lede {
  max-width: 680px;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.hero {
  padding: 2.5rem 0 5rem;
}
.hero h1 { max-width: 820px; margin-bottom: 1rem; }
.hero-home h1 {
  font-size: clamp(2.65rem, 6vw, 4.35rem);
  margin-bottom: 1rem;
}
.hero-home .intro {
  max-width: 640px;
  font-size: 1.08rem;
}

.work-list {
  display: grid;
  gap: 2rem;
  padding-bottom: 6rem;
}
.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  /* Equal vertical padding keeps the card visually balanced once its height is content-driven. */
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  background: var(--sand);
  overflow: hidden;
}
.work-card-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.work-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.tag {
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(17,16,14,0.45);
  font-size: 0.72rem;
  line-height: 1.2;
}
.work-card h2 { margin-bottom: 0.8rem; }
.work-card p { max-width: 430px; }
.text-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 700;
  text-underline-offset: 0.22em;
}
.text-link:hover { color: var(--accent-strong); }

.case-hero {
  margin-top: 1rem;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  background: var(--sand);
}
.case-hero .container { max-width: var(--max-width); }
.case-hero h1 {
  max-width: 760px;
  margin-bottom: 1.25rem;
}
.case-hero .lede { max-width: 730px; }
.case-body {
  background: var(--bg);
  padding: 4.5rem 0 7rem;
}
.case-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(180px, 0.7fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
  margin-bottom: 5rem;
}
.case-intro p:last-child { margin-bottom: 0; }
.case-meta {
  display: grid;
  gap: 1.6rem;
}
.case-meta h3 { margin-bottom: 0.45rem; }
.case-meta p { margin: 0; }
.case-section {
  margin: 0 0 clamp(4rem, 8vw, 7rem);
}
.case-section.narrow { max-width: 780px; }
.case-section h2 { margin-bottom: 1rem; }
.case-section p { max-width: 760px; }
.case-section ul { max-width: 760px; padding-left: 1.25rem; }
.case-section li + li { margin-top: 0.45rem; }

.case-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: stretch;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}
.case-copy {
  min-width: 0;
  align-self: center;
}
.case-split.reverse .case-copy { order: 2; }
.case-split.reverse .case-media { order: 1; }

/*
  Case-study media defaults to "contain" so screenshots, slides, diagrams,
  writing, and artwork are never cropped. The media frame does not contribute
  intrinsic image height on desktop, so the paired text controls the row height
  and the image scales down to visually match it.

  For a photograph where cropping is acceptable, add `case-media--crop` to the
  <figure class="case-media"> element.
*/
.case-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
  margin: 0;
  align-self: stretch;
}
.case-media-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(17,16,14,.08);
}
.case-media-frame img,
.case-media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.case-media--crop .case-media-frame img,
.case-media--crop .case-media-frame video {
  object-fit: cover;
}
.case-media--top .case-media-frame img,
.case-media--top .case-media-frame video {
  object-position: center top;
}
.figure-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.findings-grid,
.metrics-grid,
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.finding,
.metric {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.finding .eyebrow { color: var(--muted); }
.finding h3 { font-size: 1.35rem; }
.metric strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--body-font);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}
.metric span { font-size: 0.88rem; font-weight: 700; }

.callout {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: #ffb30b;
}
.callout h3 { margin-bottom: 0.7rem; }
.callout p:last-child { margin-bottom: 0; }

.template-note {
  margin: 0 0 4rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: rgba(183, 109, 0, 0.08);
}

.about-hero {
  padding: 2.5rem 0 4rem;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}
/* Personal photography can crop a little; keep it landscape and visually
   balanced with the adjacent copy instead of stretching to the full row. */
.about-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 3;
  justify-self: end;
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.about-highlight {
  color: var(--accent);
  font-weight: 750;
}
.about-section {
  display: grid;
  grid-template-columns: minmax(170px, 0.75fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 8vw, 7rem);
  padding: 3.25rem 0;
}
.about-section .section-label h2 { position: sticky; top: 2rem; }
.about-copy > div + div { margin-top: 2.1rem; }
.about-copy h3 { margin-bottom: 0.55rem; }
.books-grid,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
}
.books-grid { align-items: start; }
/* Book covers are content/artwork: always show the complete cover, never crop. */
.books-grid img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.photo-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
/* Personal gallery photos are decorative thumbnails, so a square crop is OK. */
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  background: var(--accent);
  color: #111;
  font-weight: 750;
  text-decoration: none;
}
.button:hover { background: #a86200; color: #fff; }

.art-hero {
  padding: 4.2rem 0 3.2rem;
}
.art-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.art-stage {
  background: white;
  padding: clamp(3rem, 8vw, 7rem) 0 2.5rem;
  min-height: 620px;
}
.carousel {
  width: min(calc(100% - 2.5rem), 980px);
  margin-inline: auto;
}
.carousel-window {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.art-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  min-height: 560px;
  margin: 0;
  padding: 1rem;
}
.art-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 820px);
  max-height: min(68vh, 680px);
  object-fit: contain;
}
.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #efefef;
  cursor: pointer;
}
.icon-button:hover { background: #dedede; }
.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d4d4d4;
  cursor: pointer;
}
.carousel-dot[aria-current='true'] { background: #8b8b8b; }

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .work-card,
  .case-intro,
  .case-split,
  .about-grid,
  .about-section {
    grid-template-columns: 1fr;
  }
  .work-card { padding: 1.6rem; }
  .work-card-media {
    position: relative;
    height: clamp(190px, 45vw, 285px);
  }
  .work-card-media img { position: absolute; }
  .case-split.reverse .case-copy,
  .case-split.reverse .case-media { order: initial; }
  .case-split { align-items: start; }
  .case-media { display: block; }
  .case-media-frame {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
  .case-media--portrait .case-media-frame { aspect-ratio: 4 / 5; }
  .figure-caption { margin-top: 0.65rem; }
  .about-photo {
    justify-self: start;
    width: min(100%, 520px);
    max-width: none;
  }
  .findings-grid,
  .metrics-grid,
  .two-col-grid { grid-template-columns: 1fr; }
  .about-section .section-label h2 { position: static; }
  .books-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .photo-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}


@media (max-width: 720px) {
  .site-header {
    position: relative;
    z-index: 1001;
    padding: 1.2rem 0 1rem;
  }
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .logo img { width: 88px; }
  .menu-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 1002;
  }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(2.4rem, 7vh, 4.25rem);
    padding: clamp(9.5rem, 19vh, 12rem) 1.5rem 3rem;
    overflow-y: auto;
    background: var(--sand);
    font-size: clamp(1.75rem, 6vw, 2.15rem);
    font-weight: 700;
    line-height: 1.15;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.75rem);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms step-end;
  }
  .site-nav a {
    border-bottom: 0;
    padding: 0.25rem 0.5rem;
    text-align: center;
  }
  .site-nav a:hover,
  .site-nav a:focus-visible {
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
  }
  .site-nav a[aria-current='page'] {
    border-bottom: 0;
    font-weight: 900;
  }
  body.nav-open {
    overflow: hidden;
  }
  body.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s;
  }
  body.nav-open .site-header .logo {
    position: fixed;
    top: 1.2rem;
    left: 1.25rem;
    z-index: 1002;
  }
  body.nav-open .site-header .menu-toggle {
    position: fixed;
    top: 1.15rem;
    right: 1rem;
  }
  body.nav-open .menu-toggle-lines {
    background: transparent;
  }
  body.nav-open .menu-toggle-lines::before {
    top: 0;
    transform: rotate(45deg);
  }
  body.nav-open .menu-toggle-lines::after {
    top: 0;
    transform: rotate(-45deg);
  }
}

@media (max-width: 620px) {
  :root { --space-8: 5rem; }
  .container { width: min(calc(100% - 1.5rem), var(--max-width)); }
  .site-header { padding-top: 1.2rem; }
  .header-inner { align-items: center; flex-direction: row; gap: 1rem; }
  .hero { padding: 2rem 0 3.5rem; }
  .work-card { padding: 1.35rem; gap: 1.5rem; }
  .work-card-media { height: clamp(180px, 52vw, 260px); }
  .case-hero { padding: 3.5rem 0; }
  .case-body { padding-top: 3.2rem; }
  .art-stage { min-height: 500px; }
  .art-slide { min-height: 360px; padding: 0; }
  .carousel { width: min(calc(100% - 1.25rem), 980px); }
  .books-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { scroll-behavior: auto; }
}

/* Footer social link */
.footer-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 140ms ease, transform 140ms ease;
}
.footer-linkedin svg {
  width: 100%;
  height: 100%;
  display: block;
}
.footer-linkedin:hover,
.footer-linkedin:focus-visible {
  color: var(--ink);
  transform: translateY(-1px);
}
.template-media-label {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 12rem;
  padding: 2rem;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}
