:root {
  --bg: #111312;
  --bg-deep: #0B0C10;
  --tile: #1E211F;
  --text: #ECEAE3;
  --muted: #A3A69E;
  --accent: #C9A96A;
  --rule: rgba(236, 234, 227, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.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;
}
.label {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Home (travisgehret.net) ---------- */
.home {
  position: relative; min-height: 100vh; min-height: 100svh;
  background: var(--bg-deep); overflow: hidden;
  display: flex; flex-direction: column;
}
.home__bg { position: absolute; inset: 0; object-position: 50% 45%; opacity: 0.85; }
.home__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,12,16,0.15) 0%, rgba(11,12,16,0.35) 45%, rgba(11,12,16,0.92) 78%);
}
.home__header { position: relative; }
.home__header h1 { margin: 0; }
.home__main {
  position: relative; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 48px;
  padding: 96px 5% 64px;
}
.home__name {
  margin: 0; font-size: clamp(48px, 8vw, 96px); line-height: 0.95;
  font-weight: 300; letter-spacing: -0.02em;
}
.home__intro { margin: 16px 0 0; max-width: 560px; font-size: 18px; line-height: 1.5; color: #C8CAC1; }
.links { display: flex; flex-direction: column; max-width: 640px; font-size: 22px; font-weight: 300; }
.links a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; min-height: 44px; border-top: 1px solid var(--rule);
}
.links a:last-child { border-bottom: 1px solid var(--rule); }
.arrow { color: var(--accent); transition: transform 0.2s ease; }
.links a:hover .arrow { transform: translateX(6px); }

/* ---------- Photography ---------- */
.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; padding: 28px 5%;
}
.site-header__name { font-size: 15px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.site-nav { display: flex; gap: 36px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.site-nav [aria-current="page"] { color: var(--accent); }

.hero { padding: 0 5%; }
.hero__img { height: min(720px, 75vh); background: var(--tile); }
.hero__caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 16px; font-size: 13px; color: var(--muted);
}
.statement { padding: 140px 5% 0; }
.statement h1 {
  margin: 0; max-width: 940px; font-size: clamp(40px, 5vw, 64px); line-height: 1.08;
  font-weight: 300; letter-spacing: -0.01em;
}
.statement__rule { margin: 28px 0 0; width: 64px; height: 2px; background: var(--accent); }

.sets { padding: 120px 5% 0; }
.sets h2 { margin: 0 0 32px; font-weight: 400; }
.sets__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.sets__grid a { display: flex; flex-direction: column; gap: 16px; }
.sets__cover { aspect-ratio: 4 / 5; background: var(--tile); overflow: hidden; }
.sets__cover img { transition: transform 0.6s ease; }
.sets__grid a:hover .sets__cover img { transform: scale(1.03); }
.sets__title { font-size: 22px; font-weight: 300; }

.about {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px;
  padding: 160px 5% 0; align-items: start;
}
.about__img { aspect-ratio: 1 / 1; max-width: 480px; background: var(--tile); }
.about__text { display: flex; flex-direction: column; gap: 20px; }
.about__text h2 { margin: 0; font-weight: 400; }
.about__lead { margin: 0; font-size: 22px; line-height: 1.5; font-weight: 300; }
.about__meta { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: 24px; padding: 160px 5% 56px;
}
.site-footer__email { font-size: 28px; font-weight: 300; }
.site-footer__inquiry { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.site-footer__links { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }

.gallery-head { display: flex; flex-direction: column; gap: 16px; max-width: 640px; padding: 80px 5% 56px; }
.gallery-head h1 { margin: 0; font-size: clamp(48px, 6vw, 72px); line-height: 1; font-weight: 300; }
.gallery-head p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.gallery-head__sets {
  display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 8px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
.gallery { padding: 0 5%; scroll-margin-top: 32px; }
.gallery + .gallery { padding-top: 120px; }
.gallery h2 { margin: 0 0 24px; font-weight: 400; }
.gallery__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 180px; gap: 16px;
}
.gallery__grid figure { margin: 0; background: var(--tile); overflow: hidden; }
.w2 { grid-column: span 2; }
.w3 { grid-column: span 3; }
.h3 { grid-row: span 3; }
.h4 { grid-row: span 4; }

/* Work sets rendered from /admin: justified rows, nothing cropped */
.gallery__note { margin: -8px 0 24px; max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.work-row { display: flex; flex-wrap: wrap; gap: 16px; }
.work-row figure, .work-feature { margin: 0; }
.work-row img, .work-feature img { height: auto; background: var(--tile); }
.work-row + .work-feature, .work-feature + .work-row, .work-feature + .work-feature { margin-top: 16px; }
.work-row figcaption, .work-feature figcaption { padding-top: 8px; font-size: 14px; color: var(--muted); }
.work-row figure, .work-feature { scroll-margin-top: 24px; }
.work-row a, .work-feature a { display: block; cursor: zoom-in; }
.work-row a img, .work-feature a img { transition: opacity 0.2s ease; }
.work-row a:hover img, .work-feature a:hover img { opacity: 0.88; }

/* Full-screen photo viewer (/photography/photo/<id>) */
.viewer-page { background: #0A0B0A; }
.viewer { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100svh; }
.viewer__bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 5%;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
.viewer__set { color: var(--muted); }
.viewer__count { color: var(--muted); }
.viewer__close { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.viewer__close span { font-size: 22px; line-height: 1; }
.viewer__stage { position: relative; min-height: 0; }
.viewer__stage img { position: absolute; inset: 0; padding: 0 5%; object-fit: contain; background: none; }
.viewer__nav {
  position: absolute; top: 0; bottom: 0; width: 30%; display: flex; align-items: center; padding: 0 2%;
  color: var(--text); -webkit-tap-highlight-color: transparent;
}
.viewer__nav--prev { left: 0; justify-content: flex-start; }
.viewer__nav--next { right: 0; justify-content: flex-end; }
.viewer__nav span {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font-size: 34px; line-height: 1; background: rgba(10, 11, 10, 0.55); opacity: 0.6; transition: opacity 0.2s ease;
}
.viewer__nav:hover span, .viewer__nav:focus-visible span { opacity: 1; color: var(--accent); }
.viewer__caption { min-height: 20px; margin: 0; padding: 14px 5% 22px; text-align: center; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) {
  .viewer__stage img { padding: 0; }
  .viewer__nav span { width: 40px; height: 40px; font-size: 28px; }
}

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px;
  padding: 80px 5% 0; align-items: start;
}
.contact__intro h1 { margin: 0 0 20px; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; font-weight: 300; }
.contact__intro p { margin: 0 0 16px; max-width: 460px; font-size: 18px; line-height: 1.6; color: #C8CAC1; }
.contact__direct { font-size: 15px !important; color: var(--muted) !important; }
.contact__direct a, .contact__inline { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.contact__form { display: grid; gap: 22px; max-width: 560px; }
.contact__form .field { display: grid; gap: 8px; }
.contact__form .field > span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.contact__form em { font-style: normal; letter-spacing: 0.04em; text-transform: none; opacity: 0.8; }
.contact__form input, .contact__form select, .contact__form textarea {
  width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  font: inherit; font-size: 17px; color: var(--text); background: transparent;
}
.contact__form select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 6px center / 6px 6px no-repeat,
              linear-gradient(-45deg, transparent 50%, var(--muted) 50%) right 0 center / 6px 6px no-repeat; }
.contact__form select option { color: #111312; }
.contact__form textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.contact__form input:focus, .contact__form select:focus, .contact__form textarea:focus { outline: none; border-bottom-color: var(--accent); }
.contact__form input::placeholder { color: #6E716B; }
.contact__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__send {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px; margin-top: 8px;
  padding: 14px 26px; border: 1px solid var(--accent); border-radius: 0; background: var(--accent); color: #17150F;
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer;
}
.contact__send:hover { background: #D6B87C; }
.contact__send:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- Shared private galleries (/g/...) ---------- */
.share-grid { columns: 3 300px; column-gap: 16px; }
.share-grid figure { margin: 0 0 16px; break-inside: avoid; }
.share-grid img { height: auto; background: var(--tile); transition: opacity 0.2s ease; }
.share-grid a:hover img, .share-grid a:focus-visible img { opacity: 0.85; }
.share-grid figcaption { padding-top: 8px; font-size: 14px; color: var(--muted); }
.share-empty { color: var(--muted); }
.share-photo { padding: 0 5% 56px; }
.share-photo figure { margin: 0; }
.share-photo img { max-height: 82vh; height: auto; object-fit: contain; background: var(--bg); }
.share-photo figcaption { padding-top: 12px; font-size: 15px; color: var(--muted); text-align: center; }
.share-photo__nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 28px;
  padding-top: 28px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
.share-photo__count { color: var(--muted); }
.share-photo__step { display: flex; gap: 28px; }

@media (max-width: 1000px) {
  .sets__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-nav { gap: 20px; }
  .contact { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .sets__grid, .about { grid-template-columns: 1fr; }
  .gallery + .gallery { padding-top: 80px; }
  .statement { padding-top: 96px; }
  .about, .sets { padding-top: 96px; }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 280px; }
  .gallery__grid figure { grid-column: auto; grid-row: auto; }
}
