:root {
  --bg: #f8f7f4;
  --surface: #eeeae4;
  --ink: #211f1d;
  --muted: #5f5a55;
  --line: #d8d1c8;
  --header: #211f1d;
  --header-ink: #faf9f7;
  --accent: #5b4637;
  --shell: 1240px;
  --wide: 1500px;
  --radius: 14px;
  --shadow: 0 18px 55px rgba(43, 34, 27, .13);
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.shell { width: min(calc(100% - 112px), var(--shell)); margin-inline: auto; }
.section-pad { padding-block: clamp(68px, 9vw, 130px); }
.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: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: #fff;
  color: #000;
}
.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 116px;
  padding: 24px clamp(28px, 3vw, 44px);
  background: var(--header);
  color: var(--header-ink);
}
.site-brand {
  position: relative;
  z-index: 31;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.3vw, 2.06rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}
.site-brand span { margin-left: .3em; }
.desktop-nav {
  display: flex;
  gap: 26px;
  margin-left: 28px;
}
.desktop-nav a {
  position: relative;
  font-size: 1.12rem;
  text-decoration: none;
}
.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity .18s ease, transform .18s ease;
}
.desktop-nav a:hover::after,
.desktop-nav a[aria-current="page"]::after { opacity: 1; transform: none; }
.social-links,
.footer-social-links,
.mobile-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-links a,
.footer-social-links a,
.mobile-social-links a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.social-links svg,
.footer-social-links svg,
.mobile-social-links svg { width: 20px; height: 20px; fill: currentColor; }
.social-links .stroke-icon,
.footer-social-links .stroke-icon,
.mobile-social-links .stroke-icon { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.social-links .icon-dot,
.footer-social-links .icon-dot,
.mobile-social-links .icon-dot { fill: currentColor; stroke: none; }
.social-links a:hover,
.footer-social-links a:hover,
.mobile-social-links a:hover { background: var(--header-ink); color: var(--header); transform: translateY(-2px); }
.menu-toggle,
.mobile-menu { display: none; }

.eyebrow {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 760;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.about-hero {
  display: grid;
  grid-template-columns: minmax(400px, 470px) minmax(0, 1fr);
  gap: clamp(48px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(48px, 6vw, 86px) clamp(76px, 9vw, 136px);
}
.portrait-wrap { position: relative; }
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 18%;
}
.about-copy h1 {
  margin: 0 0 clamp(44px, 5vw, 72px);
  font-size: clamp(2.25rem, 4vw, 3.4rem);
}
.about-copy > p { margin-bottom: 22px; }
.personal-copy {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 8px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.personal-copy h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -.01em;
}
.personal-copy ul { display: grid; gap: 11px; margin: 0; padding-left: 1.4em; }

.featured-work { overflow: hidden; background: var(--surface); }
.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-heading-row h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); }
.app-carousel-frame {
  display: grid;
  grid-template-columns: 48px minmax(0, var(--shell)) 48px;
  gap: 16px;
  align-items: center;
  width: min(calc(100% - 96px), calc(var(--shell) + 128px));
  margin-inline: auto;
}
.carousel-arrow {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.carousel-arrow:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.carousel-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-rail {
  display: grid;
  grid-auto-columns: calc((100% - 48px) / 5);
  grid-auto-flow: column;
  gap: 18px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.app-card[data-marquee-clone] { display: none; }
.app-card { scroll-snap-align: start; }
.app-card a { display: grid; justify-items: center; text-align: center; text-decoration: none; }
.app-card-image {
  width: 100%;
  aspect-ratio: 1;
  padding: 10px 16px 6px;
  border-radius: var(--radius);
  background: var(--surface);
  object-fit: contain;
  transition: transform .25s ease;
}
.app-card a:hover .app-card-image { transform: translateY(-4px); }
.app-card span { display: block; width: 100%; padding-top: 11px; font-size: 1rem; font-weight: 700; text-align: center; }
.more-row { display: flex; justify-content: flex-start; padding-top: 24px; }
.text-link { font-weight: 700; text-decoration: none; }
.text-link span { display: inline-block; margin-left: .3em; transition: transform .18s ease; }
.text-link:hover span { transform: translateX(4px); }

.page-intro {
  max-width: 900px;
  margin-inline: max(56px, calc((100% - var(--shell)) / 2));
  padding-block: clamp(68px, 9vw, 124px) clamp(52px, 7vw, 96px);
}
.page-intro h1 { margin-bottom: 24px; }
.page-intro > p:last-child { max-width: 690px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); }
.project-list { padding-bottom: clamp(80px, 10vw, 150px); }
.project-card {
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: center;
  min-height: 580px;
  padding-block: clamp(60px, 8vw, 118px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.project-card.reverse .project-visual { order: 2; }
.project-visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  background: transparent;
}
.project-gallery-track {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--surface);
}
.project-gallery-track::-webkit-scrollbar { display: none; }
.project-slide {
  display: grid;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  place-items: center;
  scroll-snap-align: start;
  border: 0;
  background: var(--surface);
  cursor: zoom-in;
}
.project-gallery-image { width: 100%; height: 100%; padding: clamp(8px, 1.6vw, 20px); object-fit: contain; }
.project-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  color: var(--ink);
}
.project-gallery-controls span {
  min-width: 42px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
  text-align: center;
}
.project-gallery-controls button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.project-gallery-controls button:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.project-gallery-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.project-number { display: block; margin-bottom: 24px; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .14em; }
.project-copy h2 { margin-bottom: 28px; font-size: clamp(2.1rem, 4vw, 3.6rem); }
.project-copy p { margin-bottom: 20px; }
.technology { color: var(--muted); font-size: .92rem; }
.technology strong { color: var(--ink); }
.button-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.button-link:hover { background: var(--ink); color: var(--bg); }

.photography-intro { margin-bottom: 0; }
.photo-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 28px;
  width: min(calc(100% - 48px), var(--wide));
  padding-bottom: 120px;
}
.photo-collection { display: block; text-align: center; text-decoration: none; }
.photo-collection > div { overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.photo-collection img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.photo-collection:hover img { transform: scale(1.025); }
.photo-collection h2 { margin: 16px 0 0; font-size: 1.28rem; letter-spacing: -.02em; }
.photo-collection > span { display: none; }

.gallery-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-block: 50px 36px;
}
.gallery-intro h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.gallery-intro p { margin: 0; color: var(--muted); }
.back-link { align-self: center; font-size: .9rem; font-weight: 700; text-decoration: none; }
.image-mosaic {
  width: min(calc(100% - 96px), 1390px);
  margin-inline: auto;
  columns: 4 260px;
  column-gap: 8px;
}
.gallery-tile {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  break-inside: avoid;
  border: 0;
  background: var(--surface);
  cursor: zoom-in;
}
.gallery-tile img { width: 100%; height: auto; }
.app-gallery { width: min(calc(100% - 48px), 1320px); columns: 3 300px; column-gap: 22px; }
.app-gallery .gallery-tile { margin-bottom: 22px; }
.series-nav {
  display: flex;
  justify-content: space-between;
  padding-block: 48px 100px;
  font-weight: 700;
}
.series-nav a { text-decoration: none; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 30px;
  align-items: center;
  min-height: 190px;
  padding: 38px clamp(28px, 4vw, 60px);
  background: var(--header);
  color: var(--header-ink);
}
.site-footer p { margin: 0; font-weight: 750; }
.site-footer > div > span { color: #bcbcbc; font-size: .86rem; }
.footer-social-links a { width: 38px; height: 38px; font-size: .7rem; }
.copyright { font-size: .8rem; font-weight: 400 !important; }

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 18px 70px;
  border: 0;
  background: #0b0b0b;
  color: #fff;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox[open] { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.lightbox figure { display: grid; grid-column: 2; grid-row: 1; gap: 10px; margin: 0; place-items: center; }
.lightbox figure img { max-width: 100%; max-height: calc(100dvh - 80px); object-fit: contain; }
.lightbox figcaption { color: #aaa; font-size: .76rem; }
.lightbox button { border: 0; background: transparent; color: #fff; cursor: pointer; }
.lightbox-close { position: fixed; top: 14px; right: 20px; font-size: 2rem; }
.lightbox-prev, .lightbox-next { font-size: 2.6rem; }
.lightbox-prev { grid-column: 1; }
.lightbox-next { grid-column: 3; }

.not-found { min-height: 65vh; padding-block: 120px; }
.not-found h1 { max-width: 760px; }

/* Production design details. */
.site-header { min-height: 108px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-brand { font-weight: 680; letter-spacing: -.04em; }
.site-brand span { color: rgba(250, 249, 247, .72); font-weight: 520; }
.desktop-nav { gap: 30px; }
.desktop-nav a { font-size: 1rem; font-weight: 560; }
.social-links a { width: 42px; height: 42px; border-color: rgba(255, 255, 255, .42); border-radius: 50%; }
.about-hero { padding-block: clamp(56px, 7vw, 92px) clamp(84px, 9vw, 132px); }
.portrait { border-radius: 18px; box-shadow: 0 22px 60px rgba(43, 34, 27, .16); }
.about-copy h1 { margin-bottom: 34px; font-size: clamp(2.8rem, 5vw, 4.8rem); font-weight: 650; }
.about-copy > p { color: #4b4641; }
.personal-copy { border-top-color: #cec5bb; }
.personal-copy h2 { color: var(--accent); }
.featured-work { border-block: 1px solid var(--line); }
.featured-work.section-pad { padding-block: clamp(58px, 7vw, 92px); }
.section-heading-row { margin-bottom: 24px; }
.app-rail {
  grid-auto-columns: calc((100% - 48px) / 5);
  gap: 12px;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.app-rail::-webkit-scrollbar { display: none; }
.app-card[data-marquee-clone] { display: block; }
.app-card span { padding-top: 9px; font-size: .9rem; }
.app-card-image,
.project-gallery-track,
.photo-collection > div { border-radius: var(--radius); }
.app-card a > span { font-weight: 650; }
.button-link {
  border-color: var(--accent);
  border-radius: 999px;
  color: var(--accent);
}
.button-link:hover { background: var(--accent); color: #fff; }
.text-link { color: var(--accent); }
.project-card { gap: clamp(38px, 5vw, 70px); min-height: 520px; padding-block: clamp(54px, 6vw, 82px); border-color: var(--line); }
.project-gallery-track { border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(43, 34, 27, .08); }
.project-number { color: var(--accent); }
.photo-index { gap: clamp(22px, 3vw, 38px); }
.photo-collection h2 { margin-top: 14px; font-size: 1.45rem; }
.image-mosaic { column-gap: 12px; }
.gallery-tile { margin-bottom: 12px; overflow: hidden; border-radius: 8px; }
/* Dark mode: graphite surfaces with restrained warm-metal accents. */
html[data-theme="dark"] {
  --bg: #171513;
  --surface: #24211e;
  --ink: #f3eee8;
  --muted: #b9b0a7;
  --line: #3b3631;
  --header: #11100f;
  --header-ink: #faf7f2;
  --accent: #c5a078;
  --shadow: 0 22px 62px rgba(0, 0, 0, .38);
}
html[data-theme="dark"] .site-header { border-bottom-color: rgba(255, 255, 255, .09); }
html[data-theme="dark"] .about-copy > p { color: #d1c9c1; }
html[data-theme="dark"] .personal-copy { border-top-color: var(--line); }
html[data-theme="dark"] .portrait { box-shadow: 0 24px 68px rgba(0, 0, 0, .42); }
html[data-theme="dark"] .project-gallery-track { box-shadow: 0 20px 56px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .button-link:hover { color: #171513; }

@media (min-width: 721px) {
  .portfolio-page .page-intro h1 { white-space: nowrap; }
}

@media (max-width: 980px) {
  .site-header {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    min-height: 94px;
    padding: 20px 24px;
  }
  .desktop-nav, .site-header > .social-links { display: none; }
  .menu-toggle {
    position: relative;
    z-index: 31;
    display: grid;
    width: 48px;
    height: 48px;
    padding: 12px 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle i { display: block; width: 100%; height: 1px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] i:nth-of-type(3) { transform: translateY(-8px) rotate(-45deg); }
  .mobile-menu {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    padding: 136px 24px 34px;
    background: var(--bg);
    color: var(--ink);
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu nav { display: grid; align-content: center; gap: 16px; }
  .mobile-menu nav a { font-family: var(--display); font-size: clamp(2.6rem, 9vw, 4.8rem); font-weight: 700; line-height: 1.08; text-decoration: none; }
  .mobile-social-links { justify-content: center; }
  .mobile-social-links a { width: 48px; height: 48px; }
body.menu-open .site-header { background: var(--bg); color: var(--ink); }
  .about-hero { grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: 40px; }
  .personal-copy { grid-template-columns: 1fr; gap: 18px; }
  .portrait-wrap { position: relative; top: auto; }
  .portrait { aspect-ratio: 4 / 5; }
  .about-copy h1 { margin-bottom: 40px; }
  .project-card { grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); gap: 36px; }
  .app-rail { grid-auto-columns: calc((100% - 36px) / 4); }
  .photo-index { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr auto; }
  .copyright { justify-self: start; }
}

@media (max-width: 720px) {
  body { font-size: 16px; line-height: 1.62; }
  .shell { width: min(calc(100% - 40px), var(--shell)); }
  .site-header { min-height: 100px; }
  .site-brand { max-width: 255px; white-space: normal; }
  .site-brand span { display: block; margin-left: 0; }
  .about-hero {
    grid-template-columns: 1fr;
    width: min(calc(100% - 40px), 580px);
    gap: 34px;
    padding-top: 44px;
  }
  .portrait { height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius); }
  .about-copy h1 { margin-bottom: 42px; font-size: clamp(1.95rem, 9vw, 2.8rem); letter-spacing: -.045em; white-space: nowrap; }
  .personal-copy { grid-template-columns: 1fr; gap: 18px; margin-top: 8px; padding-top: 30px; }
  .section-heading-row { align-items: center; }
  .section-heading-row h2 { max-width: 230px; }
  .app-carousel-frame {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 4px;
    width: calc(100% - 8px);
  }
  .carousel-arrow { width: 40px; height: 40px; }
  .app-rail { width: 100%; grid-auto-columns: calc((100% - 12px) / 2); }
  .more-row { justify-content: flex-start; padding-left: 20px; }
  .page-intro { margin-inline: 20px; padding-block: 64px 54px; }
  .project-list { width: min(calc(100% - 40px), var(--shell)); }
  .project-card {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 0;
    padding: 58px 0;
    border-width: 1px 0 0;
    background: transparent;
  }
  .project-card.reverse .project-visual { order: 0; }
  .project-visual { min-height: 0; }
  .project-gallery-track { height: auto; }
  .project-copy h2 { margin-bottom: 20px; }
  .photo-index { grid-template-columns: 1fr; width: 100%; gap: 42px; padding-inline: 20px; }
  .photo-collection > div { aspect-ratio: 1; }
  .gallery-intro { display: grid; padding-block: 34px 24px; }
  .gallery-intro .back-link { grid-row: 1; }
  .gallery-intro h1 { grid-row: 2; }
  .gallery-intro p { grid-row: 3; }
  .image-mosaic,
  .app-gallery { width: calc(100% - 16px); columns: 2 150px; column-gap: 5px; }
  .gallery-tile,
  .app-gallery .gallery-tile { margin-bottom: 5px; }
  .series-nav { width: calc(100% - 40px); padding-block: 40px 80px; font-size: .86rem; }
  .site-footer { grid-template-columns: 1fr; gap: 24px; padding-bottom: 48px; }
  .site-footer > .footer-social-links { order: 2; }
  .copyright { order: 3; }
  .lightbox { padding: 48px 8px 20px; }
  .lightbox[open] { grid-template-columns: 36px 1fr 36px; }
  .lightbox figure img { max-height: calc(100dvh - 110px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
