:root {
  --ink: #111111;
  --paper: #f5f5f2;
  --white: #ffffff;
  --accent: #2754ff;
  --line: #d6d6d1;
  --muted: #65655f;
  --pad: clamp(1.25rem, 4vw, 4.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "Helvetica Neue", Arial, sans-serif; font-size: 1rem; line-height: 1.5; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 99; left: 1rem; top: -5rem; padding: .75rem 1rem; color: var(--white); background: var(--ink); }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: .8rem var(--pad); border-bottom: 1px solid var(--line); background: rgba(245,245,242,.94); backdrop-filter: blur(14px); }
.brand img { width: 145px; height: 44px; object-fit: contain; object-position: left center; }
nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.75rem); font-size: .88rem; font-weight: 700; letter-spacing: .02em; }
nav a { position: relative; }
nav a:not(.nav-contact)::after { position: absolute; right: 0; bottom: -.3rem; left: 0; height: 1px; background: var(--ink); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
nav a:hover::after { transform: scaleX(1); }
.nav-contact { padding: .7rem 1rem; color: var(--white); background: var(--ink); }
.nav-contact:hover { background: var(--accent); }

.hero { position: relative; display: flex; align-items: flex-end; min-height: calc(100vh - 78px); overflow: hidden; color: var(--white); background: #d9dadc; border-bottom: 1px solid var(--line); }
.hero::after { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0,0,0,.74) 0%, rgba(0,0,0,.35) 48%, rgba(0,0,0,.05) 75%); content: ""; }
.hero-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; width: min(950px, 78%); padding: clamp(4rem, 8vw, 8rem) var(--pad); }
.eyebrow { margin: 0 0 1.5rem; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin-bottom: 2rem; font-size: clamp(3.4rem, 7vw, 8.2rem); font-weight: 800; letter-spacing: -.075em; line-height: .84; }
h1 span { color: var(--accent); }
.hero-intro { max-width: 590px; margin-bottom: 2.5rem; color: rgba(255,255,255,.88); font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.45; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; min-width: 220px; padding: 1rem 1.2rem; border: 1px solid var(--ink); font-size: .84rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; transition: background .2s, color .2s; }
.button-primary { color: var(--ink); background: var(--white); border-color: var(--white); }
.button-primary:hover { color: var(--white); background: var(--accent); border-color: var(--accent); }
.text-link { border-bottom: 1px solid currentColor; font-size: .9rem; font-weight: 700; }
.hero-scroll { position: absolute; z-index: 2; right: var(--pad); bottom: 3rem; display: flex; align-items: center; gap: 1rem; padding-bottom: .4rem; border-bottom: 1px solid rgba(255,255,255,.65); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.selected-work, .archive { padding: clamp(5rem, 10vw, 10rem) var(--pad); }
.section-header { display: grid; grid-template-columns: 1fr minmax(240px, 390px); gap: 3rem; align-items: end; margin-bottom: clamp(3rem, 6vw, 6rem); }
.section-header h2, .about h2, .contact h2 { margin: 0; font-size: clamp(2.6rem, 5.2vw, 5.7rem); letter-spacing: -.06em; line-height: .95; }
.section-header > p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 6rem) clamp(1rem, 3vw, 3rem); }
.project-card-wide { grid-column: 1 / -1; }
.project-image { overflow: hidden; aspect-ratio: 4 / 3; background: #e6e6e0; }
.project-card-wide .project-image { aspect-ratio: 16 / 8; }
.project-image img { height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.project-card a:hover .project-image img { transform: scale(1.03); }
.project-info { display: grid; grid-template-columns: 35px 1fr auto; gap: 1rem; align-items: start; padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.project-info span { color: var(--muted); font-size: .75rem; }
.project-info h3 { margin-bottom: .15rem; font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.15; }
.project-info p { margin: 0; color: var(--muted); font-size: .9rem; }
.project-info b { font-size: 1.25rem; }

.archive { color: var(--white); background: var(--ink); }
.archive-header { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.archive h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 5rem); letter-spacing: -.06em; line-height: 1; }
.filters { display: flex; gap: .5rem; }
.filters button { padding: .55rem 1rem; border: 1px solid #545454; border-radius: 99px; color: var(--white); background: transparent; cursor: pointer; font-size: .8rem; font-weight: 700; }
.filters button:hover, .filters button.active { color: var(--ink); background: var(--white); border-color: var(--white); }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1rem; }
.archive-card { display: block; padding: 0; overflow: hidden; border: 0; color: var(--white); background: transparent; text-align: left; cursor: pointer; }
.archive-card[hidden] { display: none; }
.archive-card img { aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.92); transition: transform .45s, filter .45s; }
.archive-card:hover img { transform: scale(.985); filter: saturate(1.1); }
.archive-card span { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-top: 1px solid #545454; }
.archive-card b { font-size: .95rem; }
.archive-card small { color: #aaa; font-size: .75rem; text-align: right; }

.about { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: clamp(2rem, 7vw, 8rem); align-items: center; padding: clamp(5rem, 10vw, 10rem) var(--pad); }
.about-photo { overflow: hidden; aspect-ratio: 4 / 5; background: #ddd; }
.about-photo img { height: 100%; object-fit: cover; }
.about-copy > p:not(.eyebrow) { max-width: 680px; margin: 2rem 0; color: var(--muted); font-size: 1.1rem; }
.capabilities { display: flex; flex-wrap: wrap; gap: .55rem; max-width: 700px; margin-bottom: 2.5rem; }
.capabilities span { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 99px; font-size: .83rem; font-weight: 700; }
.button-outline:hover { color: var(--white); background: var(--ink); }

.contact { padding: clamp(5rem, 9vw, 9rem) var(--pad); color: var(--white); background: var(--accent); }
.contact h2 { max-width: 1000px; margin-bottom: 3rem; }
.contact > a { display: flex; align-items: center; justify-content: space-between; max-width: 850px; padding: 1rem 0; border-bottom: 2px solid rgba(255,255,255,.75); font-size: clamp(1rem, 2.2vw, 1.9rem); font-weight: 700; }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem var(--pad); color: #bbb; background: var(--ink); font-size: .78rem; }
footer div { display: flex; gap: 1.5rem; }
footer a:hover { color: var(--white); }

.lightbox { width: min(92vw, 1000px); max-height: 92vh; padding: 3.5rem 1rem 1rem; border: 0; background: var(--ink); color: var(--white); }
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox img { max-height: 76vh; object-fit: contain; }
.lightbox p { margin: .75rem 0 0; text-align: center; font-weight: 700; }
.lightbox-close { position: absolute; top: .75rem; right: 1rem; padding: .4rem; border: 0; color: var(--white); background: transparent; cursor: pointer; }

.project-page { background: var(--white); }
.project-header { background: rgba(255,255,255,.94); }
.project-intro { padding: clamp(3rem, 7vw, 7rem) var(--pad) clamp(3rem, 5vw, 5rem); background: var(--paper); }
.project-back { display: inline-flex; gap: .65rem; align-items: center; margin-bottom: clamp(4rem, 9vw, 8rem); padding-bottom: .35rem; border-bottom: 1px solid var(--ink); font-size: .82rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.project-title-row { display: grid; grid-template-columns: 1fr minmax(220px, 30%); gap: 3rem; align-items: end; }
.project-title-row h1 { margin: 0; color: var(--ink); font-size: clamp(4rem, 10vw, 10rem); }
.project-category { margin: 0 0 .75rem; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.35rem); }
.project-viewer-section { padding: clamp(4rem, 7vw, 7rem) var(--pad); color: var(--white); background: var(--ink); }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.viewer-toolbar .eyebrow { margin-bottom: .6rem; color: #aaa; }
.viewer-toolbar h2 { margin: 0; font-size: clamp(2rem, 4vw, 4.5rem); letter-spacing: -.055em; line-height: 1; }
.viewer-toolbar .button-outline { flex: 0 0 auto; border-color: var(--white); color: var(--white); }
.viewer-toolbar .button-outline:hover { color: var(--ink); background: var(--white); }
.pdf-frame { position: relative; min-height: 75vh; overflow: hidden; background: #2a2a2a; }
.pdf-frame iframe { position: relative; z-index: 2; display: block; width: 100%; height: 80vh; border: 0; background: var(--white); }
.pdf-fallback { position: absolute; inset: 0; display: grid; place-content: center; padding: 2rem; text-align: center; }
.pdf-fallback a { text-decoration: underline; font-weight: 800; }
.project-pagination { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); }
.project-pagination a { display: grid; min-height: 220px; padding: clamp(2rem, 5vw, 5rem) var(--pad); border-right: 1px solid var(--line); }
.project-pagination a:last-child { grid-template-columns: 1fr auto; text-align: right; border-right: 0; }
.project-pagination small { align-self: start; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-pagination b { align-self: end; font-size: clamp(1.4rem, 3vw, 3rem); letter-spacing: -.04em; }
.project-pagination a:last-child small, .project-pagination a:last-child b { grid-column: 1; }
.project-pagination a:last-child span { grid-column: 2; grid-row: 1 / 3; align-self: center; margin-left: 2rem; font-size: 1.5rem; }
.project-pagination a:hover { color: var(--white); background: var(--accent); }

@media (max-width: 900px) {
  .hero-copy { width: 85%; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr 1.25fr; }
}

@media (max-width: 680px) {
  .site-header { min-height: 68px; }
  .brand img { width: 104px; height: 36px; }
  nav { gap: .9rem; font-size: .78rem; }
  nav a:nth-child(2), nav a:nth-child(3) { display: none; }
  .nav-contact { padding: .55rem .7rem; }
  .hero { min-height: calc(100svh - 68px); }
  .hero::after { background: linear-gradient(0deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.38) 68%, rgba(0,0,0,.08) 100%); }
  .hero-cover { object-position: 55% center; }
  .hero-copy { width: 100%; min-height: calc(100svh - 68px); padding-top: 5rem; padding-bottom: 6rem; }
  h1 { font-size: clamp(3.2rem, 16vw, 5.5rem); }
  .hero-scroll { right: var(--pad); bottom: 1.5rem; }
  .section-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-wide { grid-column: auto; }
  .project-card-wide .project-image { aspect-ratio: 4 / 3; }
  .archive-header { align-items: start; flex-direction: column; }
  .archive-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 4 / 4.5; }
  footer { flex-direction: column; }
  .project-title-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-title-row h1 { font-size: clamp(3.7rem, 18vw, 6rem); }
  .viewer-toolbar { align-items: stretch; flex-direction: column; }
  .viewer-toolbar .button { width: 100%; }
  .pdf-frame, .pdf-frame iframe { min-height: 68vh; height: 68vh; }
  .project-pagination { grid-template-columns: 1fr; }
  .project-pagination a { min-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-pagination a:last-child { border-bottom: 0; }
}

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