@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@700;800&display=swap');

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

:root {
  --ink: #1a1a18;
  --warm: #f5f0e8;
  --mid: #8c7b6b;
  --accent: #c4693a;
  --line: #d8cfc3;
}

body {
  background-color: #2a2a28;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem;
}

.page-box {
  background: #ffffff;
  box-shadow: 0 16px 80px rgba(0, 0, 0, 0.35);
  max-width: 1300px;
  margin: 0 auto;
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
}

.page-box main { flex: 1; }

/* Text pages — no background image, clean cream layout */
body.page-simple {
  background: #ffffff;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.page-simple main { flex: 1; }

/* Dark pages — full-bleed background image, light text */
body.page-dark {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--warm);
  position: relative;
}

body.page-dark::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, 0.25);
  z-index: 0;
  pointer-events: none;
}

body.page-dark nav,
body.page-dark main,
body.page-dark footer {
  position: relative;
  z-index: 1;
}

body.page-dark main { flex: 1; }

body.page-dark nav {
  border-bottom-color: rgba(245, 240, 232, 0.2);
}

body.page-dark .nav-home,
body.page-dark .nav-links a {
  color: var(--warm);
}

body.page-dark .nav-home:hover { color: var(--warm); opacity: 0.7; }
body.page-dark .nav-links a:hover { color: var(--warm); opacity: 0.7; }
body.page-dark .nav-links a.active { color: var(--warm); opacity: 1; }

body.page-dark .page-title { color: var(--warm); }

body.page-dark .form-field label {
  color: rgba(245, 240, 232, 0.65);
}

body.page-dark .form-field input,
body.page-dark .form-field textarea {
  border-color: rgba(245, 240, 232, 0.65);
  color: var(--warm);
}

body.page-dark .form-field input::placeholder,
body.page-dark .form-field textarea::placeholder {
  color: rgba(245, 240, 232, 0.25);
}

body.page-dark .form-field input:focus,
body.page-dark .form-field textarea:focus {
  border-color: rgba(245, 240, 232, 0.8);
}

body.page-dark .form-submit {
  background: var(--warm);
  color: var(--ink);
}

body.page-dark .form-submit:hover { background: #ffffff; }

body.page-dark footer {
  border-top-color: rgba(245, 240, 232, 0.2);
  color: rgba(245, 240, 232, 0.4);
}

body.page-dark footer a { color: rgba(245, 240, 232, 0.4); }
body.page-dark footer a:hover { color: var(--warm); }

body.page-dark .project-title { color: var(--warm); }
body.page-dark .project-meta { color: rgba(245, 240, 232, 0.5); }
body.page-dark .project-statement {
  color: rgba(245, 240, 232, 0.8);
  border-top-color: rgba(245, 240, 232, 0.15);
}
body.page-dark .back-link { color: rgba(245, 240, 232, 0.4); }
body.page-dark .back-link:hover { color: var(--warm); opacity: 1; }

/* Video embed — responsive 16:9 container */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 3rem;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Placeholder slots — for images/video not yet added */
.placeholder-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 240, 232, 0.04);
  border: 1px dashed rgba(245, 240, 232, 0.18);
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.25);
}
.placeholder-slot.video { aspect-ratio: 16/9; margin-bottom: 3rem; }
.placeholder-slot.still { aspect-ratio: 3/2; }

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
}

.nav-home {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.nav-home:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* Homepage */
.home-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
  text-align: left;
}

.home-wrap h1 {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.75;
  color: #3d3730;
  margin-bottom: 0.75rem;
}

.home-intro {
  font-size: 1rem;
  font-weight: 300;
  color: #3d3730;
  line-height: 1.75;
  margin-bottom: 4rem;
}

.home-section-label {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

/* Portfolio grid */
.portfolio-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.portfolio-wrap h1 {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--line);
}

.card-info { padding: 0.6rem 0 0; }

.card-title {
  font-size: 0.95rem;
  font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: normal;
}

.card-year {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--mid);
  margin-top: 0.15rem;
}

/* Selected works (homepage) */
.selected-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.selected-grid .card-thumb {
  aspect-ratio: 1/1;
}

.view-all {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 5rem;
}

.view-all:hover { text-decoration: underline; }

/* Project page */
.project-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.back-link {
  display: inline-block;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--mid);
  text-decoration: none;
  margin-bottom: 2rem;
}

.back-link:hover { color: var(--accent); }

.project-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.project-meta {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.project-statement {
  max-width: 640px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: #3d3730;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-bottom: 3rem;
}

.project-statement p + p { margin-top: 1rem; }

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.image-grid img {
  width: 100%;
  display: block;
}

/* About hero photo */
.about-photo {
  width: 100%;
  display: block;
  margin-bottom: 2.5rem;
}

/* Profile photo (CV) */
.profile-photo {
  width: 180px;
  display: block;
  margin-bottom: 2rem;
}

/* Contact form */
.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.6rem 0.75rem;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus { border-color: var(--ink); }

.form-field textarea {
  height: 8rem;
  resize: vertical;
}

.form-submit {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--warm);
  border: none;
  padding: 0.75rem 2rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.form-submit:hover { background: var(--accent); }

/* Text pages */
.text-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.section-label {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.5rem 0 0.6rem;
}

.text-wrap p {
  color: #3d3730;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
}

.text-wrap p + p { margin-top: 0.75rem; }

.text-wrap ul {
  list-style: none;
  color: #3d3730;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
}

.text-wrap ul li + li { margin-top: 0.2rem; }

.text-wrap a { color: var(--accent); text-decoration: none; }
.text-wrap a:hover { text-decoration: underline; }

/* Collaborators page */
.collaborator-block {
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.collaborator-block:first-of-type {
  padding-top: 0;
  border-top: none;
  margin-top: 0;
}

.collaborator-logo {
  max-height: 168px;
  max-width: 660px;
  width: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

.collaborator-logo.logo-lg {
  max-height: 336px;
  max-width: 1320px;
}

.collaborator-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}

.sub-label {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.75rem 0 0.4rem;
}

.collaborator-photo {
  width: 100%;
  display: block;
  margin-bottom: 1.75rem;
}

.photo-caption {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--mid);
  line-height: 1.5;
  margin-top: -1.15rem;
  margin-bottom: 1.75rem;
}

.collaborators-wrap {
  max-width: 1000px;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.closing-note {
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  font-style: italic;
  color: var(--mid);
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 2rem;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--mid);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer a { color: var(--mid); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 24, 0.96);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#lightbox.active { display: flex; }

.lb-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.lb-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  flex-shrink: 1;
}

.lb-caption {
  color: var(--warm);
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0.85;
  margin: 0;
}

.lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--warm);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  opacity: 0.7;
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--warm);
  font-size: 3.5rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  opacity: 0.7;
}

.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { opacity: 1; color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }
  .nav-links { gap: 1.25rem; }
  .grid,
  .selected-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .portfolio-wrap { padding: 2rem 1.25rem 4rem; }
  .image-grid { grid-template-columns: 1fr; }
  .project-wrap { padding: 2rem 1.25rem 4rem; }
  .text-wrap { padding: 2.5rem 1.25rem 4rem; }
  .collaborators-wrap { padding-left: 0.55rem; padding-right: 0.55rem; }
  .home-wrap { padding: 3rem 1.25rem 2rem; }
  footer { padding: 1rem 1.25rem; }
}

@media (max-width: 480px) {
  .grid,
  .selected-grid { grid-template-columns: 1fr; }
}
