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

:root {
  --bg-white: #ffffff;
  --bg-warm: #f0ede8;
  --bg-warm-2: #e8e4de;
  --charcoal: #1a1a1a;
  --text: #4a4744;
  --grey-mid: #888480;
  --grey-light: #aaa8a4;
  --panel-bg: #ececec;
  --rule: rgba(26,26,26,0.1);
  --warm-white-dim: rgba(240,237,232,0.55);
  --warm-white-faint: rgba(240,237,232,0.3);
  --cg: "Cormorant Garamond", Georgia, serif;
}

html { font-size: 16px; }
body { font-family: var(--cg); color: var(--text); }

a { color: inherit; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 52px;
}
nav.nav-static { position: static; }

.nav-logo .nm {
  font-family: var(--cg); font-weight: 400; font-size: 38px;
  letter-spacing: .08em; text-transform: uppercase;
  line-height: 1; text-decoration: none;
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: var(--cg); font-size: 20px; letter-spacing: .22em;
  text-transform: uppercase; text-decoration: none;
  transition: color .2s, opacity .2s;
}

/* Light nav (over hero image / warm-white pages) */
nav.nav-light .nm { color: var(--bg-warm); }
nav.nav-light .nav-links a { color: rgba(240,237,232,1); }
nav.nav-light .nav-links a:hover,
nav.nav-light .nav-links a.active { color: var(--bg-warm); }

/* Charcoal nav (warm-white content pages: projects, about, contact) */
nav.nav-charcoal .nm { color: var(--charcoal); }
nav.nav-charcoal .nav-links a { color: var(--grey-light); }
nav.nav-charcoal .nav-links a:hover,
nav.nav-charcoal .nav-links a.active { color: var(--charcoal); }

/* Dark nav (individual project pages) */
nav.nav-dark .nm { color: var(--bg-warm); }
nav.nav-dark .nav-links a { color: var(--bg-warm); }
nav.nav-dark .nav-links a:hover,
nav.nav-dark .nav-links a.active { opacity: .6; }

/* ── HOMEPAGE HERO ── */
body.home { background: var(--bg-warm); overflow: hidden; }
.hero {
  position: relative; width: 100%; height: 100vh; min-height: 640px;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,12,.20) 0%,
    rgba(10,10,12,.0) 35%,
    rgba(10,10,12,.0) 55%,
    rgba(10,10,12,.30) 100%
  );
}
.hero-content {
  position: absolute; bottom: 72px; left: 52px; right: 52px;
  display: flex; justify-content: space-between; align-items: flex-end;
}
.hero-eyebrow {
  font-family: var(--cg); font-size: 18px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(240,237,232,.6);
  margin-bottom: 14px;
}
.hero-headline {
  font-family: var(--cg); font-weight: 300; font-size: clamp(44px, 5.5vw, 72px);
  letter-spacing: .02em; line-height: 1.05;
  color: var(--bg-warm);
}
.hero-caption {
  font-family: var(--cg); font-style: italic; font-size: 20px;
  color: rgba(240,237,232,.45); letter-spacing: .04em;
}

/* ── PROJECTS PAGE ── */
body.projects-page { background: #f5f5f4; font-family: var(--cg); height: 100vh; overflow: hidden; }

.page-title {
  font-family: var(--cg); font-weight: 400; font-size: 44px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text); text-align: center;
  padding: 14px 0 16px; flex-shrink: 0; width: 100%;
}

/* Nav brand centred over the left list column, title centred over the right panel */
body.projects-page nav { display: flex; align-items: center; }
body.projects-page .nav-brand-col { width: 25%; flex-shrink: 0; display: flex; justify-content: center; }
body.projects-page .nav-links-col { flex: 1; display: flex; justify-content: flex-end; }
body.projects-page .title-row { display: flex; width: 100%; flex-shrink: 0; position: relative; top: 8vh; }
body.projects-page .title-spacer { width: 25%; flex-shrink: 0; }
body.projects-page .title-col { flex: 1; }

.page-wrap { display: flex; flex-direction: column; height: 100vh; }
.columns { display: flex; flex: 1; overflow: hidden; }

.left { width: 25%; flex-shrink: 0; display: flex; flex-direction: column; padding: 0 52px 40px 52px; position: relative; }
.left::after { content: ''; position: absolute; right: 0; top: calc(10vh + 20px); bottom: calc(10vh + 20px); width: 2px; background: var(--grey-mid); }
.projects-list { flex: 0 1 80%; margin: auto 0; display: flex; flex-direction: column; justify-content: space-between; }
.project-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-bottom: .75px solid var(--rule); text-decoration: none; flex: 1;
}
.project-row:last-child { border-bottom: none; }
.project-row:hover .project-name, .project-row.active .project-name { color: var(--charcoal); }
.project-num { font-family: var(--cg); font-size: 27px; letter-spacing: .15em; color: var(--grey-light); flex-shrink: 0; width: 38px; align-self: center; margin-left: 10%; }
.project-name { font-family: var(--cg); font-weight: 400; font-size: clamp(22px, 2.2vw, 36px); letter-spacing: .02em; color: var(--text); line-height: 1; transition: color .25s; text-align: right; flex: 1; }

.footer { text-align: center; padding: 20px 0 24px; flex-shrink: 0; }
.footer-contact { font-family: var(--cg); font-style: italic; font-size: 20px; color: var(--grey-light); text-decoration: none; letter-spacing: .02em; transition: color .2s; }
.footer-contact:hover { color: var(--text); }
.footer-divider { color: var(--grey-light); font-size: 18px; margin: 0 14px; }

.right {
  flex: 1; margin: 10vh 80px 10vh 60px; background: var(--panel-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden; border-radius: 4px;
}
.content-row { display: flex; flex-direction: row; flex: 1; width: 100%; min-height: 0; align-items: stretch; }

.panel-caption { width: 28%; flex-shrink: 0; padding: 72px 32px 0 32px; text-align: left; opacity: 0; transition: opacity .4s; overflow-y: auto; }
.panel-caption.visible { opacity: 1; }
.caption-title { font-family: var(--cg); font-weight: 400; font-size: 18px; letter-spacing: .22em; text-transform: uppercase; color: var(--text); margin-bottom: 10px; line-height: 1.5; }
.caption-desc { font-family: var(--cg); font-style: italic; font-size: 20px; letter-spacing: .04em; color: var(--grey-mid); line-height: 1.5; }
.caption-body { font-family: var(--cg); font-size: 18px; line-height: 1.8; color: var(--text); margin-top: 28px; max-width: 92%; }

.main-image-wrap { display: flex; align-items: center; justify-content: center; flex: 1; height: 100%; min-height: 0; padding: 0 28px 0 0; }
.main-image-wrap img { width: auto; max-width: 100%; height: auto; max-height: 100%; border-radius: 10px; display: block; box-shadow: 0 16px 48px rgba(0,0,0,0.16); transition: opacity .35s ease; object-fit: contain; }

.thumb-strip { display: flex; width: 100%; gap: 8px; justify-content: flex-end; padding: 14px 28px 18px; flex-shrink: 0; min-height: 72px; align-items: center; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.thumb-strip::-webkit-scrollbar { display: none; }
.thumb-item { width: 64px; height: 52px; border-radius: 5px; overflow: hidden; cursor: pointer; opacity: 0.5; border: 1.5px solid transparent; transition: opacity .2s, border-color .2s; flex-shrink: 0; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-item:hover, .thumb-item.active { opacity: 1; border-color: var(--text); }

.hover-hint { position: absolute; bottom: 20px; right: 24px; font-family: var(--cg); font-style: italic; font-size: 13px; letter-spacing: .06em; color: rgba(74,71,68,0.35); transition: opacity .3s; pointer-events: none; }
.hover-hint.hidden { opacity: 0; }

.thumb-item.video-thumb { background: #2a2a2a; display: flex; align-items: center; justify-content: center; }
.main-image-wrap iframe {
  width: 100%; max-width: 82%; height: auto; min-height: 300px; border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.16); aspect-ratio: 16/9; display: none; border: none;
}
.video-placeholder {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  max-width: 82%; aspect-ratio: 16/9; min-height: 200px; background: #2a2a2a; border-radius: 10px;
  color: rgba(255,255,255,0.5); font-family: var(--cg); font-style: italic; font-size: 15px;
  letter-spacing: .06em; text-align: center; padding: 32px;
}
.video-placeholder svg { opacity: 0.6; }

/* ── INDIVIDUAL PROJECT PAGES (dark) ── */
body.project-page { background: #f5f5f4; color: var(--text); min-height: 100%; }

.pp-page {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  height: 100vh; padding: 110px 52px 40px;
}
.pp-header { display: flex; flex-direction: column; align-self: flex-start; }
.pp-back {
  font-family: var(--cg); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--grey-mid); text-decoration: none;
  margin-bottom: 18px; transition: opacity .2s;
}
.pp-back:hover { opacity: .6; }
.pp-title {
  font-family: var(--cg); font-weight: 400; font-size: 13px; letter-spacing: .32em;
  text-transform: uppercase; color: var(--grey-mid);
}
.pp-main-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 20px 0; cursor: zoom-in;
}
.pp-main-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; transition: opacity .3s ease; }
.pp-main-wrap iframe { max-width: 100%; max-height: 100%; width: 960px; aspect-ratio: 16/9; border: none; }

.pp-thumbs { display: flex; gap: 10px; justify-content: center; align-items: center; flex-shrink: 0; padding-bottom: 4px; flex-wrap: wrap; }
.pp-thumb { width: 72px; height: 48px; overflow: hidden; cursor: pointer; opacity: 0.45; border: .75px solid transparent; transition: opacity .2s, border-color .2s; flex-shrink: 0; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumb.active { opacity: 1; border-color: var(--text); }
.pp-thumb:hover { opacity: .8; }
.pp-thumb.pp-video-thumb {
  background: #2a2a2a; display: flex; align-items: center; justify-content: center;
}

.pp-story { background: #f5f5f4; padding: 60px 52px 100px; }
.pp-story-inner { max-width: 720px; margin: 0 auto; }
.pp-story-desc {
  font-family: var(--cg); font-style: italic; font-size: 20px;
  color: var(--grey-mid); margin-bottom: 28px;
}
.pp-story-body {
  font-family: var(--cg); font-size: 18px; line-height: 1.8;
  color: var(--text); margin-bottom: 20px;
}

.pp-lightbox {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center; cursor: zoom-out;
}
.pp-lightbox.open { display: flex; }
.pp-lightbox img { max-width: 94vw; max-height: 94vh; object-fit: contain; display: block; }

/* ── ABOUT / CONTACT (light content pages) ── */
body.content-page { background: #f5f5f4; min-height: 100vh; }
.content-wrap { max-width: 720px; margin: 0 auto; padding: 100px 52px 100px; }
.content-title {
  font-family: var(--cg); font-weight: 400; font-size: 44px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text); margin-bottom: 40px;
}
body.contact-page .content-title { margin-bottom: 45px; text-align: center; }
body.contact-page .contact-details { text-align: center; }
.content-body { font-size: 20px; line-height: 1.75; color: var(--text); margin-bottom: 24px; }
.content-body.placeholder { font-style: italic; color: var(--grey-mid); }
.portrait {
  width: 100%; max-width: 550px; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 4px; display: block; margin-bottom: 40px;
}

.contact-video {
  width: 100vw; max-width: 960px; aspect-ratio: 2048/858;
  margin: 0 0 24px; margin-left: 50%; transform: translateX(-50%);
  border-radius: 12px; overflow: hidden;
}
.contact-video iframe { width: 100%; height: 100%; border: none; display: block; border-radius: 12px; }

.contact-details { margin-bottom: 48px; }
.contact-line { font-family: var(--cg); font-style: italic; font-size: 28px; margin-bottom: 14px; }
.contact-line a { text-decoration: none; color: var(--text); }
.contact-line a:hover { color: var(--charcoal); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 18px 20px; flex-direction: column; align-items: center; gap: 10px; }
  .nav-logo { text-align: center; }
  .nav-logo .nm { font-size: 24px; }
  .nav-links { gap: 20px; justify-content: center; flex-wrap: wrap; }
  .nav-links a { font-size: 13px; }

  .hero-content { left: 28px; right: 28px; bottom: 40px; flex-direction: column; align-items: flex-start; gap: 20px; }

  /* Pages with scrollable content below nav shouldn't have a fixed/overlapping nav on mobile */
  body.projects-page nav,
  body.project-page nav { position: static; }

  body.projects-page { height: auto; overflow: visible; }
  .page-wrap { height: auto; }
  body.projects-page .nav-brand-col,
  body.projects-page .nav-links-col { width: 100%; justify-content: center; }
  body.projects-page .title-row { position: static; padding: 20px 0 10px; }
  body.projects-page .title-spacer { display: none; }
  .columns { flex-direction: column; overflow: visible; }
  .left { width: 100%; padding: 0 28px 40px; }
  .left::after { display: none; }
  .projects-list { gap: 4px; }
  .right { flex: none; margin: 0 28px 40px; height: auto; }
  .content-row { flex-direction: column; }
  .main-image-wrap { height: auto; padding: 20px; }
  .main-image-wrap img { max-height: 60vh; }
  .panel-caption { width: 100%; padding: 20px 0 0; text-align: center; }

  .pp-page { height: auto; padding: 40px 24px 30px; }
  .pp-story { padding: 20px 28px 60px; }

  .content-wrap { padding: 140px 28px 60px; }
}
