@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Raleway:wght@300;400;500;600&display=swap');

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

:root {
  --forest:    #2A3828;
  --sage:      #5C7A58;
  --parchment: #F4EFE4;
  --cream:     #FAF7F2;
  --stone:     #8E8475;
  --terra:     #B5633A;
  --ink:       #1E2220;
  --mist:      #E8E3D9;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Raleway', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
/* Prevent grid children from overflowing their column */
.bio-grid > *, .contact-block > *, .pub-item > *, .project-body > *, .intro-grid > * { min-width: 0; }
/* Prevent long words/URLs from breaking layout */
p, li, dd, h1, h2, h3 { overflow-wrap: break-word; word-break: break-word; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--forest);
  padding: 0 3rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300; font-size: 1.1rem;
  color: var(--parchment); letter-spacing: 0.08em;
  text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--mist); text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--parchment); }
.mobile-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--forest); z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--parchment); text-decoration: none; font-size: 1.2rem; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 860px) {
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* HERO */
.hero { height: 78vh; min-height: 480px; background: linear-gradient(135deg, #1e2e1c 0%, #2A3828 45%, #3d5438 100%); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.hero-img { display: none; }
.hero-content { position: relative; z-index: 2; padding: 3rem 4rem; max-width: 680px; }
.hero-eyebrow { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mist); margin-bottom: 0.75rem; }
.hero-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 300; color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.hero-sub { color: var(--mist); font-size: 0.9rem; max-width: 480px; font-weight: 300; line-height: 1.7; }
@media (max-width: 600px) { .hero-content { padding: 2rem 1.5rem; } }

/* PAGE HEADER */
.page-header { background: var(--forest); padding: 5rem 4rem 4rem; }
.page-header .eyebrow { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage); margin-bottom: 0.75rem; }
.page-header h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300; color: #fff; line-height: 1.2; }
@media (max-width: 600px) { .page-header { padding: 3rem 1.5rem 2.5rem; } }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding-top: 5rem; padding-bottom: 5rem; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 400; margin-bottom: 2rem; color: var(--forest); padding-bottom: 0.75rem; border-bottom: 1px solid var(--mist); }
@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .section { padding-top: 3rem; padding-bottom: 3rem; }
  .update-item h2 { font-size: 1.35rem; }
  .update-item p { font-size: 0.92rem; }
  .prose { font-size: 0.93rem; }
  /* Gallery and image grids: force 2 columns instead of minmax overflow */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .update-images { grid-template-columns: repeat(2, 1fr); }
  /* Project cards: force single column */
  .project-cards { grid-template-columns: 1fr; }
  /* Awards: allow year + text to wrap on tiny screens */
  .awards-list li { flex-wrap: wrap; gap: 0.5rem; }
}

/* INTRO GRID */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3rem; margin: 5rem 0; }
.intro-card .label { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--terra); margin-bottom: 1rem; font-weight: 600; }
.intro-card p { font-size: 0.95rem; color: #3a3a3a; line-height: 1.8; }
@media (max-width: 768px) { .intro-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* PROJECT LIST (home) */
.project-categories { margin: 4rem 0; }
.category-block { margin-bottom: 3rem; }
.category-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 500; color: var(--forest); margin-bottom: 0.75rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-link { display: inline-block; padding: 0.45rem 1rem; border: 1px solid var(--sage); color: var(--forest); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.04em; transition: all 0.2s; }
.project-link:hover { background: var(--forest); color: #fff; border-color: var(--forest); }

/* PROSE */
.prose { max-width: 720px; font-size: 1rem; line-height: 1.85; color: #333; }
.prose p { margin-bottom: 1.4em; }
.prose strong { font-weight: 600; color: var(--forest); }
.prose em { font-style: italic; }
.prose h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; margin: 2.5rem 0 1rem; color: var(--forest); }

/* GALLERY GRID */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; margin: 2rem 0; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: opacity 0.2s; }
.gallery-grid img:hover { opacity: 0.88; }

/* PROJECT CARDS */
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.project-card { text-decoration: none; display: block; border: 1px solid var(--mist); background: #fff; transition: box-shadow 0.2s; }
.project-card:hover { box-shadow: 0 8px 32px rgba(42,56,40,0.12); }
.project-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.project-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.project-card-cat { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--terra); margin-bottom: 0.4rem; }
.project-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 400; color: var(--forest); }

/* BIO */
.bio-grid { display: grid; grid-template-columns: 280px 1fr; gap: 4rem; margin-top: 3rem; }
.bio-portrait { width: 100%; display: block; }
@media (max-width: 680px) { .bio-grid { grid-template-columns: 1fr; } }

/* AWARDS */
.awards-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--mist); display: flex; gap: 1.5rem; align-items: baseline; }
.awards-list .year { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--terra); min-width: 50px; font-style: italic; }

/* PUBLICATIONS */
.pub-grid { display: grid; gap: 4rem; margin-top: 2rem; }
.pub-item { display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem; align-items: start; }
.pub-item img { width: 100%; object-fit: cover; }
.pub-item h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 0.75rem; color: var(--forest); font-style: italic; }
.pub-item p { font-size: 0.92rem; line-height: 1.8; color: #444; margin-bottom: 0.8em; }
@media (max-width: 600px) { .pub-item { grid-template-columns: 1fr; } }
.pub-item--full { display: block; border-top: 1px solid var(--mist); padding-top: 2rem; }

/* CONTACT */
.contact-block { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 3rem; }
.contact-info dt { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); margin-top: 1.5rem; margin-bottom: 0.3rem; }
.contact-info dd { font-size: 1rem; color: var(--ink); }
.contact-info a { color: var(--terra); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
@media (max-width: 680px) { .contact-block { grid-template-columns: 1fr; } }

/* UPDATES */
.update-item { margin-bottom: 4rem; padding-bottom: 4rem; border-bottom: 1px solid var(--mist); }
.update-item:last-child { border-bottom: none; }
.update-item h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 400; margin-bottom: 1rem; color: var(--forest); }
.update-item .location { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--terra); margin-bottom: 1rem; }
.update-item p { font-size: 0.95rem; line-height: 1.8; color: #333; margin-bottom: 0.8em; }
.update-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; margin-top: 1.5rem; }
.update-images img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* PROJECT PAGE */
.project-hero { height: 60vh; min-height: 380px; position: relative; overflow: hidden; background: var(--forest); }
.project-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.project-hero-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.65)); padding: 3rem 4rem 2.5rem; }
.project-hero-caption .cat { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #aaa; margin-bottom: 0.5rem; }
.project-hero-caption h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 300; color: #fff; }
.project-body { display: grid; grid-template-columns: 1fr 300px; gap: 4rem; margin: 5rem 0; }
.project-sidebar-label { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); margin-bottom: 0.5rem; margin-top: 2rem; }
.project-sidebar-label:first-child { margin-top: 0; }
.project-sidebar p { font-size: 0.9rem; color: #555; margin-bottom: 0; }
@media (max-width: 860px) { .project-body { grid-template-columns: 1fr; } .project-hero-caption { padding: 2rem 1.5rem; } }

/* FOOTER */
footer { background: var(--forest); color: var(--stone); text-align: center; padding: 3rem 2rem; font-size: 0.82rem; letter-spacing: 0.06em; margin-top: 2rem; }
footer a { color: var(--mist); text-decoration: none; }

/* LIGHTBOX */
.lightbox-overlay { display:none; position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,0.92); cursor:zoom-out; align-items:center; justify-content:center; }
.lightbox-overlay.open { display:flex; }
.lightbox-overlay img { max-width:92vw; max-height:92vh; object-fit:contain; box-shadow:0 8px 60px rgba(0,0,0,0.6); }
.lightbox-close { position:fixed; top:1.5rem; right:1.75rem; color:#fff; font-size:2rem; line-height:1; cursor:pointer; opacity:0.7; transition:opacity 0.2s; font-family:sans-serif; }
.lightbox-close:hover { opacity:1; }
.gallery-grid figure { cursor:zoom-in; }
.gallery-grid figure img { transition:opacity 0.2s; }
.gallery-grid figure:hover img { opacity:0.85; }

.update-video { margin-top: 2rem; border-radius: 4px; overflow: hidden; aspect-ratio: 16/9; width: 100%; }
.update-video iframe { width: 100%; height: 100%; display: block; }
