:root {
  --bg: #f4f2ee;
  --ink: #0c0c0c;
  --muted: #8a8681;
  --line: rgba(12, 12, 12, 0.14);
  --pad: clamp(16px, 2.2vw, 32px);
  --name: clamp(44px, 9.2vw, 170px);
  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Display type: heavy, slightly condensed, uppercase — as on the reference site */
h1, h2, h3, .half-list, .menu ul, .toggle, .row, .proj-foot a, .card-title {
  font-stretch: 85%;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  margin: 0;
}

/* ---------------------------------------------------------------- menu */

.plus {
  position: fixed;
  top: 18px;
  left: 50%;
  translate: -50% 0;
  width: 34px;
  height: 34px;
  z-index: 50;
  mix-blend-mode: difference;
}
.plus span {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: #fff;
  transition: rotate 0.35s ease;
}
.plus span:last-child { rotate: 90deg; }
.menu-open .plus span:first-child { rotate: 45deg; }
.menu-open .plus span:last-child { rotate: 135deg; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.menu-open .menu { opacity: 1; visibility: visible; }
.menu ul { list-style: none; padding: 0; text-align: center; font-size: clamp(44px, 8vw, 120px); }
.menu li a { display: inline-block; padding: 0.04em 0; transition: opacity 0.2s; }
.menu ul:hover a { opacity: 0.25; }
.menu ul a:hover { opacity: 1; }
.menu-foot {
  position: absolute;
  bottom: var(--pad);
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------- home */

.home { overflow: hidden; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  height: 100svh;
}

.half {
  position: relative;
  padding: calc(var(--pad) + 52px) var(--pad) var(--pad);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.half-left { border-right: 1px solid var(--line); }
.half-right { text-align: right; align-items: flex-end; }

.half-title { font-size: clamp(52px, 8.6vw, 150px); position: relative; z-index: 2; }
.half-title a { display: inline-block; transition: opacity 0.2s; }
.half-title a:hover { opacity: 0.55; }

.half-list {
  list-style: none;
  padding: 0;
  margin-top: auto;
  font-size: clamp(17px, 1.55vw, 24px);
  line-height: 1.08;
  position: relative;
  z-index: 2;
}
.half-list a { display: inline-block; transition: opacity 0.2s; }
.half-list:hover a { opacity: 0.3; }
.half-list a:hover { opacity: 1; }
.half-list sup {
  font-size: 0.45em;
  font-weight: 500;
  margin-left: 0.25em;
  vertical-align: 0.9em;
  letter-spacing: 0.02em;
}

.half-media {
  position: absolute;
  /* start below the half title: top padding + title line height + gap */
  top: calc(var(--pad) + 52px + clamp(52px, 8.6vw, 150px) * 0.95 + 28px);
  /* the bottom edge of the photo sits at the vertical middle of the name */
  bottom: calc(var(--pad) + var(--name) * 0.45);
  left: var(--pad);
  right: var(--pad);
  pointer-events: none;
}
.half-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.half-media img.on { opacity: 1; }

.wordmark {
  position: fixed;
  left: 50%;
  bottom: var(--pad);
  translate: -50% 0;
  margin: 0;
  z-index: 30;
  font-size: var(--name);
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

/* ---------------------------------------------------------------- section index */

.sec-head, .proj-head {
  padding: 120px var(--pad) 0;
  text-align: center;
}
.sec-head h1, .proj-head h1 { font-size: clamp(56px, 11vw, 190px); }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-top: 96px;
  text-align: left;
}
.sec-head h1 { font-size: clamp(60px, 9vw, 130px); line-height: 0.88; }
.sec-head p {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.sec-body { padding: 40px var(--pad) 140px; animation: sec-fade 1.2s ease backwards; }
@keyframes sec-fade { from { opacity: 0; } to { opacity: 1; } }
.sec-body[data-view="grid"] .view-list,
.sec-body[data-view="list"] .view-grid { display: none; }

.group-head {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.grid + .group-head { margin-top: 44px; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
  align-items: start;
}
@media (min-width: 761px) and (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
.card { display: block; transition: opacity 0.7s ease; }
.card::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 8px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover::after, .card:focus-visible::after { transform: scaleX(1); }
.frame { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #e4e0d9; }
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 1s ease, transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover img, .card:focus-visible img { transform: scale(1.03); }
@media (hover: hover) {
  .card img { filter: grayscale(1) contrast(1.06) brightness(0.96); }
  .card:hover img, .card:focus-visible img { filter: none; }
  .grid:hover .card { opacity: 0.32; }
  .grid .card:hover, .grid .card:focus-visible { opacity: 1; }
}
.card-title { display: flex; gap: 12px; margin-top: 10px; font-size: 16px; }
.card-n { padding-top: 3px; font-size: 12px; font-weight: 500; font-stretch: 100%; letter-spacing: 0.05em; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .card, .card img, .card::after, .sec-body { transition: none; animation: none; }
}

.row {
  display: grid;
  grid-template-columns: 1fr auto 3ch;
  gap: 24px;
  align-items: baseline;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(26px, 4vw, 56px);
}
.row:first-child { border-top: 1px solid var(--line); }
.row-cat, .row-n { font-size: 12px; letter-spacing: 0.05em; font-weight: 500; }
.view-list:hover .row { opacity: 0.3; }
.view-list .row:hover { opacity: 1; }
.row { transition: opacity 0.2s; }

.row-peek {
  position: fixed;
  width: 220px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
  translate: 24px -50%;
}
.row-peek.on { opacity: 1; }

.toggle {
  position: fixed;
  bottom: var(--pad);
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: 18px;
  font-size: 22px;
  z-index: 20;
  background: var(--bg);
  padding: 6px 12px;
}
.toggle button { text-transform: uppercase; opacity: 0.35; }
.toggle button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- project */

.crumb {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  border-bottom: 1px solid currentColor;
}
.meta {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shots {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 11vh var(--pad);
  align-items: start;
  padding: 110px var(--pad) 120px;
}
.shot { margin: 0; }
.shot:nth-child(4n + 3) { margin-top: 9vh; }
.shot img { width: 100%; cursor: zoom-in; }
.shot figcaption {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.proj-foot {
  padding: 60px var(--pad) 120px;
  text-align: center;
  border-top: 1px solid var(--line);
  margin: 0 var(--pad);
}
.proj-foot span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.proj-foot a { font-size: clamp(36px, 6vw, 96px); transition: opacity 0.2s; }
.proj-foot a:hover { opacity: 0.55; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: grid;
  place-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: calc(100vw - 2 * var(--pad));
  max-height: calc(100vh - 140px);
  max-height: calc(100svh - 140px);
  width: auto;
  object-fit: contain;
}
.lightbox button, .lb-count {
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lb-close { top: 26px; right: var(--pad); }
.lb-prev { left: 0; top: 0; bottom: 0; width: 33%; text-align: left; padding-left: var(--pad); }
.lb-next { right: 0; top: 70px; bottom: 0; width: 33%; text-align: right; padding-right: var(--pad); }
.lb-count { bottom: 22px; left: 50%; translate: -50% 0; }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 760px) {
  /* Front page on a phone: two tall photo columns, titles above, the name across the bottom edge */
  :root { --name: 12vw; }
  .half { padding: 70px 16px 0; }
  .half-left { border-right: 0; }
  .half-title { font-size: 34px; }
  .half-media { top: 120px; bottom: calc(28px + var(--name) * 0.45); left: 16px; right: 16px; }
  .half-left .half-media { right: 4px; }
  .half-right .half-media { left: 4px; }
  .wordmark { bottom: 28px; }

  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 80px; }
  .sec-head h1 { font-size: 22vw; }
  .grid { grid-template-columns: 1fr 1fr; gap: 44px 14px; }
  .card-title { font-size: 15px; }
  .row { grid-template-columns: 1fr 3ch; }
  .row-cat, .row-peek { display: none; }

  .shots { grid-template-columns: 1fr; gap: 64px; padding-top: 70px; }
  .shot { grid-column: 1 / -1 !important; }
  .shot.port { width: 82%; }
  .shot.port:nth-child(even) { margin-left: auto; }
  .shot:nth-child(4n + 3) { margin-top: 0; }
  .lb-prev, .lb-next { width: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------------------------------------------------------------- about */

.about-lead {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px var(--pad);
  padding: 90px var(--pad) 0;
  align-items: start;
}
.about-photo { grid-column: 2 / span 4; margin: 0; }
.about-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.about-text {
  grid-column: 7 / span 5;
  min-width: 0;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.3;
  font-weight: 500;
}
.about-text p { margin: 0 0 1em; }

.about-cv { padding: 110px var(--pad) 140px; }
.about-cv > div { max-width: 980px; margin: 0 auto; }
.about-cv .group-head:not(:first-child) { margin-top: 80px; }
.cv-row {
  display: grid;
  grid-template-columns: minmax(9ch, 12ch) 1fr;
  gap: 24px;
  padding: 11px 0 9px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.cv-row > span { min-width: 0; overflow-wrap: anywhere; }
.cv-year {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.cv-row a { border-bottom: 1px solid currentColor; }
.cv-row a:hover { opacity: 0.55; }

@media (max-width: 760px) {
  .about-lead { padding-top: 60px; gap: 32px; }
  .about-photo, .about-text { grid-column: 1 / -1; }
  .cv-row { grid-template-columns: 10ch 1fr; gap: 14px; }
}

/* Documentary / Conceptual labels under Personal */
.half-list .list-group {
  font-stretch: 100%;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--muted);
  margin: 1.1em 0 0.5em;
}
.half-list .list-group:first-child { margin-top: 0; }
.view-list .row + .group-head { margin-top: 70px; }

/* Front page: the whole half opens its section */
.half-hit { position: absolute; inset: 0; z-index: 1; }
.half:hover .half-title a { opacity: 0.55; }

.lede{max-width:62ch;margin:24px auto 0;font-size:clamp(17px,1.6vw,21px);line-height:1.5;text-align:left}
.shot figcaption{display:flex;flex-wrap:wrap;gap:4px 12px;line-height:1.5}
.cap-n{font-size:11px;color:var(--muted)}
.cap-t{flex:1 1 0;min-width:0;font-size:13px;color:var(--ink);max-width:62ch}
.cap-long{flex-basis:100%;margin-left:0;font-size:13px;color:var(--muted);max-width:62ch;padding-left:23px}
