:root {
  --bg: #ffffff;
  --ink: #1f1f1f;
  --muted: #9b9b9b;
  --line: #e7e7e7;
  --accent: #c77373;
  --max-width: 1400px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-background-video {
  display: none;
}

/* ── Responsive overlay nav ────────────────────────────── */

.js-responsive-nav {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.js-responsive-nav.is-open {
  display: block;
}

.responsive-nav {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 24px;
}

.responsive-nav .nav-container {
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.responsive-nav .social {
  justify-self: auto;
}

.close-responsive-click-area {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1;
}

.close-responsive-button {
  position: relative;
  width: 24px;
  height: 24px;
  margin: 8px;
}

.close-responsive-button::before,
.close-responsive-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
}

.close-responsive-button::before {
  transform: rotate(45deg);
}

.close-responsive-button::after {
  transform: rotate(-45deg);
}

/* ── Site header ───────────────────────────────────────── */

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1rem;
  min-height: 78px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-self: start;
  min-width: 0;
}

.gallery-title,
.page-title {
  font-size: 16px;
  line-height: 1.3;
}

.nav-container a {
  color: var(--ink);
}

.nav-container a.active {
  color: var(--accent);
}

.logo-wrap {
  justify-self: center;
}

.logo-text a {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.social {
  justify-self: end;
}

.social ul {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 30px;
  height: 24px;
  fill: #4c4c4c;
}

.hamburger-click-area {
  display: none;
  cursor: pointer;
  padding: 8px;
  justify-self: end;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.hamburger i {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.header-placeholder {
  display: none;
}

/* ── Site wrap / content ───────────────────────────────── */

.site-wrap {
  width: 100%;
}

.site-container,
.site-content {
  width: 100%;
}

main {
  width: min(var(--max-width), calc(100vw - 96px));
  margin: 0 auto;
  padding: 0 0 64px;
}

/* ── Masthead ──────────────────────────────────────────── */

.masthead {
  padding: 34px 0 30px;
}

.masthead--compact {
  padding-bottom: 20px;
}

.masthead-contents {
  display: flex;
  justify-content: center;
}

.masthead-text {
  max-width: 820px;
  text-align: center;
}

.main-text {
  margin: 0;
  font-weight: 300;
  color: var(--ink);
}

.masthead-text h1.main-text {
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.1;
  font-weight: 300;
}

.masthead-text p.main-text,
.project-meta {
  margin-top: 18px;
  font-size: 21px;
  line-height: 1.45;
  color: #b0b0b0;
}

/* ── Project covers (card grid) ────────────────────────── */

.project-covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.project-cover {
  display: block;
}

.cover-content-container {
  display: flex;
  flex-direction: column;
}

.cover-image-wrap {
  width: 100%;
}

.cover-image,
.cover,
.cover__img {
  width: 100%;
}

.cover__img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.details-wrap {
  padding-top: 8px;
}

.details-inner {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.details-inner .title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
}

.details-inner .date {
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
}

/* ── Page container / standard modules ─────────────────── */

.page-container {
  padding-top: 20px;
}

/* ── Content stacks ────────────────────────────────────── */

.content-stack {
  display: grid;
  gap: 24px;
}

.content-stack--project {
  gap: 20px;
}

.media-block,
.embed-block {
  margin: 0;
}

.media-block img {
  width: 100%;
  height: auto;
}

.rich-block {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
}

.content-stack--project .rich-block {
  text-align: center;
  color: var(--muted);
}

.rich-block a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* ── Button module ─────────────────────────────────────── */

.button-container {
  margin: 0 auto;
  text-align: center;
}

.button-module {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 100px;
  color: #373737;
  font-size: 18px;
  font-weight: 400;
  line-height: 48px;
  text-transform: none;
  background-color: whitesmoke;
  border: none;
  text-decoration: none;
  padding: 0 30px;
  transition: background-color 0.15s, font-weight 0.15s;
}

.button-module:hover {
  color: #373737;
  font-weight: bold;
  text-decoration: none;
  background-color: rgba(209, 209, 209, 0.8);
}

.embed-block iframe {
  width: 100%;
  min-height: 480px;
  border: 0;
}

/* ── Tree (side-by-side) modules ───────────────────────── */

.tree-wrapper {
  display: flex;
  gap: 0;
  align-items: center;
}

.tree-child {
  min-width: 0;
  padding: 0 20px;
}

.tree-child:first-child {
  padding-left: 0;
}

.tree-child:last-child {
  padding-right: 0;
}

.tree-child img {
  width: 100%;
  height: auto;
}

.tree-child .media-block {
  margin: 0;
}

.tree-child .rich-block {
  max-width: 640px;
  margin: 0 auto;
}

/* ── Photo grid ────────────────────────────────────────── */

.grid-block {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.grid-item {
  flex: 1 1 180px;
  min-width: 0;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Related projects ──────────────────────────────────── */

.related-section {
  margin-top: 36px;
}

.related-section h3 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 400;
}

/* ── Back to Top ───────────────────────────────────────── */

.back-to-top {
  margin-top: 40px;
  text-align: center;
}

.back-to-top a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}

.back-to-top a:hover {
  color: var(--ink);
}

.back-to-top .arrow {
  font-size: 16px;
}

/* ── Footer ────────────────────────────────────────────── */

.site-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.footer-text {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ── Auth / password protect ───────────────────────────── */

.auth-page {
  margin: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-center {
  text-align: center;
}

.auth-inline-form {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d4d4d4;
  border-radius: 40px;
  background: #fff;
  overflow: hidden;
  padding: 4px 4px 4px 20px;
}

.auth-inline-form input {
  font: inherit;
  font-size: 16px;
  border: none;
  outline: none;
  padding: 10px 12px 10px 0;
  background: transparent;
  min-width: 220px;
  color: var(--ink);
}

.auth-inline-form input::placeholder {
  color: #b0b0b0;
}

.auth-inline-form button {
  font: inherit;
  font-size: 14px;
  padding: 10px 20px;
  border: none;
  border-radius: 30px;
  background: #d4d4d4;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.auth-inline-form button:hover {
  background: #bbb;
}

.auth-error {
  margin-top: 12px;
  font-size: 14px;
  color: #a74b4b;
}

/* ── Utility ───────────────────────────────────────────── */

.preserve-whitespace {
  white-space: pre-wrap;
}

.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;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 1024px) {
  main {
    width: min(var(--max-width), calc(100vw - 48px));
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    padding: 14px 20px;
  }

  .site-header .nav-container {
    display: none;
  }

  .site-header .social {
    display: none;
  }

  .logo-wrap {
    justify-self: start;
  }

  .hamburger-click-area {
    display: block;
  }
}

@media (max-width: 820px) {
  .project-covers {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .masthead {
    padding-top: 28px;
  }

  .masthead-text p.main-text,
  .project-meta {
    font-size: 18px;
  }

  .embed-block iframe {
    min-height: 300px;
  }

  .tree-wrapper {
    flex-direction: column;
  }

  .tree-child {
    flex: none !important;
    width: 100%;
  }

  .button-module {
    font-size: 14px;
    height: 46px;
    line-height: 46px;
    padding: 0 29px;
  }
}
