:root {
  --ink: #191b19;
  --concrete: #c2c0b7;
  --paper: #ebe8df;
  --chalk: #f1eee5;
  --muted-dark: rgba(25, 25, 23, 0.52);
  --muted-light: rgba(239, 237, 229, 0.52);
  --line-dark: rgba(25, 25, 23, 0.18);
  --line-light: rgba(239, 237, 229, 0.16);
  --signal: #e85834;
  --pad: clamp(1.25rem, 3.3vw, 3rem);
  --content: 90rem;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Basilar Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --fast: 180ms;
  --standard: 340ms;
  --reveal: 680ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { width: 100%; max-width: 100%; margin: 0; color: var(--chalk); background: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.5; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 100; padding: 0.7rem 1rem; color: var(--chalk); background: var(--ink); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: fixed; top: 0; left: 50%; z-index: 50; display: grid; width: 100%; min-height: 4.25rem; padding: 0.55rem var(--pad); grid-template-columns: 1fr auto 1fr; align-items: center; color: rgba(239,237,229,0.64); background: linear-gradient(to bottom, rgba(25,25,23,0.58), rgba(25,25,23,0.18) 72%, transparent); backdrop-filter: blur(12px) saturate(112%); -webkit-backdrop-filter: blur(12px) saturate(112%); opacity: 0; pointer-events: none; transform: translate(-50%, -120%); transition: opacity var(--standard) ease, transform var(--reveal) cubic-bezier(0.16,1,0.3,1); }
.site-header.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.site-header nav { display: flex; gap: clamp(1rem,2.2vw,2rem); }
.site-header nav a { position: relative; padding: 0.6rem 0; font-size: 0.78rem; text-transform: uppercase; }
.site-header nav a::after { position: absolute; right: 0; bottom: 0.25rem; left: 0; height: 1px; content: ""; background: var(--signal); opacity: 0; transform: scaleX(0.3); transition: opacity var(--fast) ease, transform var(--fast) ease; }
.site-header nav a:hover, .site-header nav a.is-active { color: var(--chalk); }
.site-header nav a.is-active::after { opacity: 1; transform: scaleX(1); }
.nav-tag { display: grid; width: clamp(4.5rem,7vw,6.25rem); height: 2.5rem; place-items: center; justify-self: center; opacity: 0.88; }
.nav-tag img { width: 100%; max-height: 2.2rem; object-fit: contain; }
.nav-context { min-width: 5rem; justify-self: end; font-family: var(--mono); font-size: 0.66rem; text-align: right; text-transform: uppercase; }
.mobile-progress { display: none; }

.hero { --hero-color: #191917; position: relative; display: grid; min-height: 100svh; overflow: hidden; background-color: var(--hero-color); transition: background-color 900ms cubic-bezier(0.16,1,0.3,1); }
.hero::before { position: absolute; inset: -20%; content: ""; background: radial-gradient(circle at 34% 48%, rgba(255,255,255,0.12), transparent 34%), radial-gradient(circle at 72% 66%, rgba(0,0,0,0.18), transparent 38%); opacity: 0.5; transform: translate3d(-2%,0,0) scale(1.08); animation: hero-drift 12s ease-in-out infinite alternate; pointer-events: none; }
.hero-nav { position: absolute; top: clamp(1.5rem,4vh,3rem); left: 50%; z-index: 4; display: flex; gap: clamp(1.4rem,4vw,3.5rem); transform: translateX(-50%); }
.hero-nav a { color: rgba(239,237,229,0.58); font-size: 0.82rem; text-transform: uppercase; transition: color var(--fast) ease, transform var(--fast) ease; }
.hero-nav a:hover, .hero-nav a:focus-visible { color: var(--chalk); transform: translateY(-2px); }
.hero-lockup { position: absolute; top: 23vh; left: 50%; z-index: 3; display: grid; width: min(42vw,33rem); place-items: center; transform: translateX(-50%); }
.hero-favicon { position: relative; z-index: 2; width: clamp(9rem,15vw,13rem); margin-bottom: -2rem; filter: drop-shadow(0 1.2rem 1.5rem rgba(0,0,0,0.18)); animation: favicon-float 4.6s ease-in-out infinite; }
.tag-mark { position: relative; z-index: 1; width: 100%; transform: rotate(-2deg); animation: tag-in 900ms cubic-bezier(0.16,1,0.3,1) both; }
.tag-mark img { width: 100%; max-height: 25svh; object-fit: contain; }
.scroll-cue { position: absolute; right: auto; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 3; display: grid; gap: 0.55rem; place-items: center; color: rgba(239,237,229,0.7); font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; }
.scroll-cue i { display: block; width: 1px; height: 2.4rem; background: currentColor; transform-origin: top; animation: cue 1.8s ease-in-out infinite; }

.works { height: 430vh; background: var(--concrete); }
.works-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; color: var(--ink); }
.section-label { position: absolute; top: clamp(5.5rem,10vh,7rem); right: var(--pad); left: var(--pad); z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 2rem; pointer-events: none; }
.section-label h1 { margin: 0; font-size: clamp(1rem,1.5vw,1.35rem); font-weight: 500; letter-spacing: -0.02em; text-transform: uppercase; }
.section-label h1 span { color: var(--muted-dark); font-family: var(--mono); font-size: 0.68em; font-weight: 400; letter-spacing: 0; }
.works-progress { position: absolute; top: clamp(8rem,15vh,10rem); left: 50%; display: block; width: clamp(12rem,24vw,22rem); height: 2px; overflow: hidden; background: rgba(25,25,23,0.16); transform: translateX(-50%); }
.works-progress > span { display: block; width: 100%; height: 100%; }
.works-progress i { display: block; width: 0; height: 100%; background: var(--ink); transition: width 180ms linear; }
.project-track { position: absolute; top: 54%; left: 0; display: flex; width: max-content; gap: clamp(3rem,8vw,8rem); padding: 6.5rem 12vw 2rem; align-items: center; will-change: transform; transform: translate3d(0,-50%,0); }
.project-card { width: clamp(20rem,34vw,33rem); flex: 0 0 auto; will-change: transform; transform-origin: center; }
.project-card--lead { width: clamp(30rem,62vw,62rem); }
.project-card--portrait { width: clamp(18rem,28vw,27rem); }
.project-card--wide { width: clamp(26rem,48vw,48rem); }
.project-card--square { width: clamp(21rem,35vw,34rem); }
.project-image { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: #2b2b27; }
.project-card--lead .project-image { aspect-ratio: 16/9; }
.project-card--portrait .project-image { aspect-ratio: 4/5; }
.project-card--wide .project-image { aspect-ratio: 16/10; }
.project-card--square .project-image { aspect-ratio: 1; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--reveal) cubic-bezier(0.16,1,0.3,1); }
.project-image > span { position: absolute; right: 0.75rem; bottom: 0.75rem; padding: 0.45rem 0.6rem; color: rgba(239,237,229,0.82); background: rgba(25,25,23,0.68); font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; opacity: 0; transform: translateY(0.25rem); transition: opacity var(--fast) ease, transform var(--fast) ease; }
.project-image:hover img { transform: scale(1.018); }
.project-image:hover > span, .project-image:focus-visible > span { opacity: 1; transform: translateY(0); }
.project-meta { display: flex; margin-top: 0.75rem; padding-top: 0.65rem; justify-content: flex-start; border-top: 1px solid var(--line-dark); color: var(--muted-dark); font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; }

.archive { color: var(--ink); background: var(--paper); }
.archive summary { display: grid; min-height: 9rem; padding: 2rem var(--pad); grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); cursor: pointer; list-style: none; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary > span { font-size: clamp(2rem,5vw,4.8rem); font-weight: 500; line-height: 0.92; letter-spacing: -0.05em; text-transform: uppercase; }
.archive summary i { color: var(--muted-dark); font-family: var(--mono); font-size: 0.34em; font-style: normal; font-weight: 400; letter-spacing: 0; }
.archive summary b { font-size: 2rem; font-weight: 300; transition: transform var(--standard) ease; }
.archive[open] summary b { transform: rotate(45deg); }
.archive-body { padding: clamp(4rem,8vw,8rem) var(--pad); }
.archive-grid { display: grid; max-width: var(--content); margin: 0 auto; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(2rem,4vw,4.5rem) clamp(1rem,2vw,2rem); }
.archive-item { display: grid; gap: 0.65rem; color: var(--muted-dark); font-family: var(--mono); font-size: 0.68rem; }
.archive-item img { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: #d0cfc7; transition: transform var(--standard) ease; }
.archive-item:nth-child(3n) img { aspect-ratio: 1; }
.archive-item:nth-child(5n) img { aspect-ratio: 3/4; }
.archive-item:hover img { transform: translateY(-0.2rem); }
.archive-item:hover span { color: var(--ink); }

.clients { min-height: 100svh; padding: clamp(5.5rem,10vh,7rem) var(--pad) clamp(4rem,8vh,6rem); color: var(--ink); background: #d5d7cf; }
.clients-heading { max-width: var(--content); margin: 0 auto clamp(2.5rem,5vh,4rem); }
.clients-heading h2 { margin: 0; font-size: clamp(1.15rem,2vw,1.6rem); font-weight: 500; text-transform: uppercase; }
.clients-heading span { color: var(--muted-dark); font-family: var(--mono); font-size: 0.68em; font-weight: 400; }
.clients-grid { display: grid; width: min(100%,var(--content)); min-height: calc(100svh - 14rem); margin: 0 auto; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(3,minmax(8rem,1fr)); align-items: stretch; }
.client-logo { display: grid; min-width: 0; padding: clamp(1.25rem,2.5vw,2.5rem); place-items: center; }
.client-logo img { width: auto; max-width: min(66%,12rem); height: auto; max-height: clamp(5.5rem,12vh,8.5rem); object-fit: contain; }
.client-logo--wide img { max-width: min(78%,15rem); max-height: clamp(3.5rem,8vh,5.2rem); }
.client-logo--dark img { filter: drop-shadow(0 0 0.35rem rgba(14,90,115,0.2)); }

.contact { display: grid; height: calc(100svh - 3.6rem); min-height: 0; padding: clamp(5rem,9vh,7rem) var(--pad) clamp(2rem,4vh,3rem); grid-template-columns: minmax(16rem,4fr) minmax(0,8fr); grid-template-rows: auto 1fr; column-gap: clamp(2rem,7vw,8rem); color: var(--chalk); background: #17201e; overflow: hidden; }
.contact h2 { grid-column: 1/-1; margin: 0; font-size: clamp(1.1rem,2vw,1.5rem); font-weight: 500; text-transform: uppercase; }
.contact h2 span { color: var(--muted-light); font-family: var(--mono); font-size: 0.68em; font-weight: 400; }
.contact-primary { display: grid; min-width: 0; align-self: end; gap: 0.85rem; padding: 0 1rem 0.9rem 0; }
.contact-primary > span { color: rgba(241,238,229,0.42); font-family: var(--mono); font-size: 0.64rem; }
.contact-email { display: block; min-width: 0; max-width: 100%; width: fit-content; font-size: clamp(1.45rem,2.35vw,3rem); font-weight: 400; line-height: 1.05; letter-spacing: -0.045em; white-space: nowrap; transition: color var(--fast) ease, transform var(--fast) ease; }
.contact-email:hover { color: #d5d9d2; transform: translateY(-2px); }
.contact-links { display: grid; min-width: 0; align-self: end; grid-template-columns: 1fr; border-top: 1px solid var(--line-light); }
.contact-link { display: grid; min-width: 0; min-height: 3.7rem; padding: 0.8rem 0.9rem; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line-light); color: inherit; transition: color var(--fast) ease, background var(--fast) ease, transform var(--fast) ease; }
.contact-link:hover { color: var(--chalk); background: rgba(241,238,229,0.055); transform: translateX(0.25rem); }
.contact-link--pending { color: rgba(241,238,229,0.48); cursor: default; }
.contact-link b { font-size: 0.78rem; font-weight: 400; }
.contact-link small { color: rgba(241,238,229,0.38); font-family: var(--mono); font-size: 0.62rem; }
.contact-link--active small { color: rgba(241,238,229,0.58); }

.lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; color: var(--chalk); background: rgba(10,10,9,0.94); overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; animation: fade-in 240ms ease both; }
.lightbox::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(7px); }
.lightbox figure { display: grid; max-width: 94vw; max-height: 90svh; margin: 0; gap: 0.75rem; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 82svh; object-fit: contain; }
.lightbox figcaption { color: var(--muted-light); font-family: var(--mono); font-size: 0.68rem; }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; z-index: 2; padding: 0.75rem; border: 0; color: var(--chalk); background: transparent; cursor: pointer; font-size: 0.76rem; text-transform: uppercase; }
.site-footer { display: grid; width: 100%; height: 3.6rem; padding: 0 var(--pad); grid-template-columns: repeat(3,1fr); align-items: center; border-top: 1px solid var(--line-light); color: rgba(239,237,229,0.38); background: #17201e; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; }
.site-footer span:nth-child(2) { justify-self: center; }
.site-footer a { justify-self: end; }

@keyframes cue { 0%,100% { transform: scaleY(0.25); opacity: 0.3; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes tag-in { from { opacity: 0; transform: translateY(1.2rem) rotate(-4deg) scale(0.97); } to { opacity: 1; transform: translateY(0) rotate(-2deg) scale(1); } }
@keyframes favicon-float { 0%,100% { transform: translateY(-0.35rem) rotate(-1deg); } 50% { transform: translateY(0.75rem) rotate(1deg); } }
@keyframes hero-drift { from { transform: translate3d(-2%,0,0) scale(1.08); } to { transform: translate3d(3%,2%,0) scale(1.14); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1023px) {
  .archive-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .clients-grid { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(8rem,1fr)); }
}

@media (max-width: 767px) {
  body { padding-bottom: 0; }
  .site-header { top: auto; bottom: 0; min-height: 4.6rem; padding: 0.55rem 1rem 0.65rem; grid-template-columns: 1fr; background: linear-gradient(to top,rgba(25,25,23,0.9),rgba(25,25,23,0.62) 72%,transparent); opacity: 1; pointer-events: auto; transform: translate(-50%,0); }
  .site-header nav { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; }
  .site-header nav a { padding: 0.75rem 0.25rem; font-size: 0.7rem; text-align: center; }
  .site-header nav a::after { right: 30%; left: 30%; }
  .nav-tag, .nav-context { display: none; }
  .mobile-progress { position: absolute; top: -1.7rem; right: 0; left: 0; display: block; height: 1.7rem; padding: 0 1rem; background: linear-gradient(to top,rgba(23,32,30,0.84),transparent); opacity: 0; pointer-events: none; transition: opacity var(--fast) ease; }
  .mobile-progress::before { position: absolute; right: 1rem; bottom: 0.35rem; left: 1rem; height: 2px; content: ""; background: rgba(241,238,229,0.16); }
  .mobile-progress i { position: absolute; right: 1rem; bottom: 0.35rem; left: 1rem; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left center; transition: transform 180ms linear; }
  .site-header.show-mobile-progress .mobile-progress { opacity: 1; }
  .hero-nav { display: none; }
  .hero-lockup { top: 23vh; width: min(76vw,28rem); }
  .hero-favicon { width: clamp(8.5rem,30vw,11.5rem); margin-bottom: -1.65rem; }
  .scroll-cue { right: auto; bottom: 5.8rem; left: 50%; transform: translateX(-50%); }
  .works { height: 100svh; }
  .works-sticky { position: relative; height: 100svh; }
  .section-label { top: 1.35rem; align-items: flex-start; }
  .section-label h1 { max-width: 9rem; font-size: 0.86rem; line-height: 1.25; }
  .section-label h1 span { display: block; margin-top: 0.2rem; }
  .works-progress { display: none; }
  .project-track { position: relative; top: auto; width: 100%; height: 100%; gap: 7vw; padding: 5.2rem 9vw 8.5rem; align-items: center; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; transform: none !important; }
  .project-track::-webkit-scrollbar { display: none; }
  .project-card, .project-card--lead, .project-card--portrait, .project-card--wide, .project-card--square { width: 82vw; flex: 0 0 82vw; scroll-snap-align: center; scroll-snap-stop: always; transform: none !important; }
  .project-image, .project-card--lead .project-image, .project-card--portrait .project-image, .project-card--wide .project-image, .project-card--square .project-image { max-height: 59svh; aspect-ratio: 4/5; }
  .archive summary { min-height: 7rem; padding: 1.5rem var(--pad); gap: 0.8rem; }
  .archive summary > span { font-size: clamp(1.8rem,10vw,3rem); }
  .archive-body { padding-top: 3.5rem; padding-bottom: 5rem; }
  .archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2rem 0.75rem; }
  .archive-item img, .archive-item:nth-child(3n) img, .archive-item:nth-child(5n) img { aspect-ratio: 4/5; }
  .clients { min-height: 100svh; padding-top: 5rem; padding-bottom: 6rem; }
  .clients-heading { margin-bottom: 2rem; }
  .clients-grid { min-height: auto; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: none; }
  .client-logo { min-height: 8.8rem; padding: 1rem; }
  .client-logo img { max-width: 68%; max-height: 5.8rem; }
  .client-logo--wide img { max-width: 82%; max-height: 3.6rem; }
  .contact { height: calc(100svh - 8.2rem); min-height: 0; padding: 3.5rem 1.25rem 1.4rem; grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr) auto; row-gap: 1rem; overflow: hidden; }
  .contact h2 { grid-column: 1; }
  .contact-primary { align-self: center; padding: 0 0.5rem 0 0; }
  .contact-email { max-width: 100%; font-size: clamp(1.2rem,5.9vw,2.2rem); letter-spacing: -0.035em; white-space: nowrap; }
  .contact-links { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-link { min-height: 4.5rem; padding: 0.75rem; grid-template-columns: 1fr; align-content: space-between; border-right: 1px solid var(--line-light); }
  .contact-link:nth-child(2n) { border-right: 0; }

  .site-footer { width: 100%; max-width: 100%; height: 3.6rem; margin-bottom: 4.6rem; padding: 0 1rem; grid-template-columns: minmax(0,1fr) auto auto; gap: 0.7rem; overflow: hidden; white-space: nowrap; }
  .site-footer span:nth-child(2) { justify-self: center; }
  .site-footer a { grid-column: auto; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
