/* Vista — shared theme for Ethan Vink portfolio
   Cinematic dark. Black ground, ink type, photos do all the talking. */

:root {
  --bg:     #0c0c0d;
  --bg2:    #131316;
  --bg3:    #1a1a1f;
  --ink:    #f3f1ec;
  --mute:   #8a8a90;
  --line:   #2a2a30;
  --accent: #e3c08c;
  --maxw:   1680px;
  --pad:    48px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.mono {
  font-family: ui-monospace, "JetBrains Mono", Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

/* ─────────────────  NAV  ───────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 22px var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  background: rgba(12,12,13,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .mark {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav .mark a { text-decoration: none; }
.nav .mark span { color: var(--mute); }
.nav .center {
  text-align: center;
  color: var(--mute);
}
.nav .center .breadcrumb { color: var(--ink); }
.nav .right {
  text-align: right;
}
.nav .right a {
  margin-left: 22px;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 160ms ease;
}
.nav .right a:hover { opacity: 1; }
.nav .right a.cta {
  display: inline-block;
  margin-left: 22px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--bg2);
  opacity: 1;
  color: var(--accent);
  transition: background 160ms ease, border-color 160ms ease;
}
.nav .right a.cta:hover { background: var(--bg3); border-color: var(--accent); }

/* ─────────────────  HERO  ───────────────── */
.hero {
  position: relative;
  height: clamp(560px, 86vh, 820px);
  overflow: hidden;
  background: var(--bg2);
}
.hero .img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--bg2);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.62) 100%),
    linear-gradient(0deg, rgba(0,0,0,0) 65%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.hero .meta {
  position: absolute;
  inset: auto var(--pad) 44px var(--pad);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  z-index: 2;
}
.hero h1 {
  margin: 0;
  font-size: clamp(46px, 7.4vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 500;
  max-width: 18ch;
  text-shadow: 0 6px 60px rgba(0,0,0,0.55);
}
.hero h1 .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.hero .h-side {
  display: grid;
  gap: 8px;
  text-align: right;
  max-width: 36ch;
  justify-self: end;
}
.hero .h-side .tag {
  color: var(--accent);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero .h-side .label {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  line-height: 1.55;
}

/* compact landing-style hero variant (used on index) */
.hero.landing h1 { max-width: 22ch; }

/* ─────────────────  STRAP  ───────────────── */
.strap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.strap > div {
  background: var(--bg);
  padding: 22px 24px;
}
.strap .k {
  color: var(--mute);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.strap .v {
  font-size: 14px;
  line-height: 1.35;
}

/* ─────────────────  SECTIONS  ───────────────── */
.section {
  padding: 44px var(--pad) 0;
}
.section + .section { padding-top: 14px; }
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}
.section-head .num {
  color: var(--accent);
  font-weight: 500;
}
.section-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  gap: 14px;
  align-items: center;
}
.section-head .rule { height: 1px; background: var(--line); }
.section-head .count {
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* ─────────────────  GALLERY GRID  ─────────────────
   Each row drives the row height via its own aspect-ratio.
   Tiles stretch to fill the row, so widths can differ
   while heights stay aligned — no black voids. */
.stack { display: grid; gap: 6px; }
.row {
  display: grid;
  gap: 6px;
  align-items: stretch;
}
.row.r-2-1   { grid-template-columns: 2fr 1fr; aspect-ratio: 21/9; }
.row.r-1-2   { grid-template-columns: 1fr 2fr; aspect-ratio: 21/9; }
.row.r-1-1   { grid-template-columns: 1fr 1fr; aspect-ratio: 24/9; }
.row.r-1-1-1 { grid-template-columns: 1fr 1fr 1fr; aspect-ratio: 32/9; }
.row.r-3-2   { grid-template-columns: 3fr 2fr; aspect-ratio: 21/9; }
.row.r-2-3   { grid-template-columns: 2fr 3fr; aspect-ratio: 21/9; }
.row.r-1     { grid-template-columns: 1fr;       aspect-ratio: 21/9; }

.tile {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  cursor: zoom-in;
  height: 100%;
  width: 100%;
}
.tile .img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.0);
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.tile:hover .img { transform: scale(1.025); }

/* legacy per-tile aspect classes are now no-ops — row controls height */
.tile.wide, .tile.cinema, .tile.three2,
.tile.four3, .tile.sq, .tile.tall { aspect-ratio: auto; }

/* captions removed — the photos speak for themselves */
.tile .cap { display: none; }

/* ─────────────────  PROJECT PICKER (index)  ───────────────── */
.projects { padding: 0 var(--pad); }
.projects .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.proj-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--line);
}
.proj-card .img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
  filter: saturate(0.95) brightness(0.92);
}
.proj-card:hover .img { transform: scale(1.04); filter: saturate(1.05) brightness(1); }
.proj-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.85) 100%);
}
.proj-card .body {
  position: absolute;
  left: 28px; right: 28px; bottom: 28px;
  z-index: 2;
  display: grid;
  gap: 8px;
}
.proj-card .index {
  color: var(--accent);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.proj-card h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
}
.proj-card .sub {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  line-height: 1.5;
  max-width: 26ch;
}
.proj-card .open {
  margin-top: 4px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.proj-card .open::after {
  content: "→";
  transition: transform 220ms ease;
}
.proj-card:hover .open::after { transform: translateX(4px); }

/* ─────────────────  PROSE / APPROACH  ───────────────── */
.prose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 0 var(--pad);
  margin-top: 24px;
}
.prose .lead {
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 28ch;
}
.prose .lead em { font-style: italic; color: var(--accent); font-weight: 400; }
.prose .body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--mute);
  max-width: 56ch;
}
.prose .body p { margin: 0 0 14px 0; }
.prose .body p:last-child { margin-bottom: 0; }

/* ─────────────────  CTA  ───────────────── */
.cta {
  margin-top: 48px;
  padding: 56px var(--pad);
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
}
.cta h3 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 18ch;
}
.cta h3 em { font-style: italic; color: var(--accent); font-weight: 400; }
.cta .info { display: grid; gap: 18px; }
.cta .info .item .k {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cta .info .item .v { font-size: 18px; }
.cta .info .item .v a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.cta .info .item .v a:hover { border-color: var(--accent); }
.cta .info .btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: var(--accent);
  color: #1a1610;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  width: fit-content;
  transition: transform 160ms ease;
}
.cta .info .btn::after { content: "→"; font-size: 18px; }
.cta .info .btn:hover { transform: translateX(3px); }

/* ─────────────────  NEXT PROJECT  ───────────────── */
.nextp {
  position: relative;
  display: block;
  margin-top: 0;
  padding: 0;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  aspect-ratio: 21/9;
  background: var(--bg2);
}
.nextp .img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.9) brightness(0.6);
  transition: filter 600ms ease, transform 600ms ease;
}
.nextp:hover .img { filter: saturate(1) brightness(0.78); transform: scale(1.03); }
.nextp .label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 2;
}
.nextp .label .k {
  color: var(--accent);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.nextp .label h4 {
  margin: 0;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.nextp .label h4 .accent { color: var(--accent); font-style: italic; font-weight: 400; }

/* ─────────────────  FOOTER  ───────────────── */
.foot {
  padding: 32px var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--mute);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.foot .center { text-align: center; }
.foot .right  { text-align: right; }
.foot a { text-decoration: none; color: var(--mute); }
.foot a:hover { color: var(--ink); }

/* ─────────────────  LIGHTBOX  ───────────────── */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7,7,8,0.97);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
  cursor: zoom-out;
  animation: lb-fade 180ms ease-out;
}
.lb.open { display: flex; }
.lb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
  user-select: none;
  -webkit-user-drag: none;
}
.lb .lb-cap { display: none; }
.lb .lb-meta {
  position: absolute;
  top: 24px; right: 32px;
  color: rgba(255,255,255,0.55);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
}
.lb .lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease;
}
.lb .lb-nav:hover { background: rgba(255,255,255,0.12); }
.lb .lb-nav.prev { left: 24px; }
.lb .lb-nav.next { right: 24px; }

@keyframes lb-fade { from { opacity: 0 } to { opacity: 1 } }

/* ─────────────────  RESPONSIVE  ───────────────── */
@media (max-width: 1100px) {
  :root { --pad: 32px; }
  .strap { grid-template-columns: repeat(2, 1fr); }
  .projects .grid { grid-template-columns: 1fr 1fr; }
  .prose { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  :root { --pad: 22px; }
  .nav { grid-template-columns: 1fr auto; padding: 18px var(--pad); }
  .nav .center { display: none; }
  .nav .right a { margin-left: 14px; font-size: 10px; }
  .nav .right a.cta { display: none; }

  .hero { height: clamp(440px, 76vh, 620px); }
  .hero .meta { grid-template-columns: 1fr; gap: 18px; inset: auto var(--pad) 28px var(--pad); }
  .hero .h-side { text-align: left; justify-self: start; }

  .strap { grid-template-columns: 1fr 1fr; }
  .strap > div { padding: 18px 20px; }

  .section { padding: 64px var(--pad) 0; }
  .section-head { grid-template-columns: auto 1fr; }
  .section-head .count { display: none; }

  .row.r-2-1, .row.r-1-2, .row.r-1-1, .row.r-3-2, .row.r-2-3 { grid-template-columns: 1fr; }
  .row.r-1-1-1 { grid-template-columns: 1fr 1fr; }
  .tile.cinema { aspect-ratio: 16/10; }

  .projects .grid { grid-template-columns: 1fr; }
  .proj-card { aspect-ratio: 5/6; }
  .proj-card h3 { font-size: 26px; }

  .cta { grid-template-columns: 1fr; gap: 32px; padding: 56px var(--pad); }

  .foot { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .foot .right { text-align: center; }

  .lb { padding: 16px; }
  .lb .lb-nav { width: 44px; height: 44px; }
  .lb .lb-nav.prev { left: 8px; }
  .lb .lb-nav.next { right: 8px; }
}
