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

:root {
  --ink: #16161a;
  --paper: #f7f7f5;
  --muted: #8a877f;
  --accent: #16161a;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light only; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* grey gradient + noise ground */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f5f5f3 45%, #ebebe8 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

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

.wrap { max-width: 880px; margin: 0 auto; padding: 0 48px; }

/* NAV */
.topnav { padding: 24px 0 0; }
.topnav .wrap { display: flex; gap: 20px; flex-wrap: wrap; }
.topnav a { font-size: 15px; font-weight: 400; letter-spacing: 0.01em; }

/* SECTIONS */
.section { padding: 72px 0 0; }
#about { padding-top: 40px; }
#works  { padding-top: 36px; }

/* ABOUT */
.about-layout {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 52px;
  align-items: center;
  padding-top: 0;
}
.about-photo {
  width: 96px; height: 127px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.about-bio p {
  font-size: 14px; margin: 0 0 12px; max-width: 48ch; line-height: 1.65;
}
.about-bio p:last-child { margin: 0; }

/* WORKS GRID */
.section-label {
  font-size: 12px; margin: 0 0 22px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
}

.works-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 32px;
  margin-bottom: 56px;
}

/* WORKS LIST (vertical, with thumbnails) */
.works-list { margin-bottom: 56px; }
.works-list-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.works-list-item:hover { color: var(--ink); }
.works-list-item img {
  width: 96px;
  height: 66px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.works-list-info { display: flex; flex-direction: column; gap: 4px; }
.works-list-title { font-size: 15px; }
.works-list-year { font-size: 13px; }

.work-item, .cat-item {
  width: 160px;
  flex-shrink: 0;
}

.work-item img, .cat-item img {
  width: 160px;
  height: 110px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}
.work-item a:hover img { opacity: 0.75; }

.work-title { font-size: 14px; margin: 0 0 2px; font-weight: 400; }
.work-meta  { font-size: 12px; color: var(--muted); margin: 0; font-style: italic; }
.cat-title  { font-size: 14px; margin: 0 0 2px; font-weight: 400; }
.cat-meta   { font-size: 12px; color: var(--muted); margin: 0; font-style: italic; }

/* BIO / TEACHING / CONTACT */
.text-section { padding: 72px 0 0; }
.text-section .label {
  font-size: 12px; margin: 0 0 28px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
}
.text-section p { font-size: 14px; max-width: 50ch; margin: 0 0 10px; line-height: 1.7; }
.text-section p:last-child { margin: 0; }
.contact-links { display: flex; gap: 28px; font-size: 14px; }

footer { padding: 72px 0 56px; font-size: 13px; color: var(--muted); }
footer a { margin-right: 20px; }
footer a:hover { color: var(--accent); }

/* ─── PROJECT PAGES ─── */
.project-wrap { padding-top: 52px; padding-bottom: 80px; }

.back-link {
  display: inline-block; font-size: 13px; color: var(--muted);
  font-style: italic; margin-bottom: 44px;
}
.back-link:hover { color: var(--accent); }

.project-eyebrow {
  font-size: 12px; color: var(--muted); font-style: italic; margin: 0 0 8px;
}
.project-title {
  font-size: 38px; font-weight: 400; margin: 0 0 6px; line-height: 1.05;
  letter-spacing: -0.01em;
}
.project-meta { font-size: 13px; color: var(--muted); font-style: italic; margin: 0 0 44px; }

/* centered hero image like the reference screenshots */
.project-hero-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 44px;
}
.project-hero {
  display: block;
  max-width: 480px;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
}

.project-body { margin-bottom: 60px; }
.project-body p {
  font-size: 14px; line-height: 1.75; margin: 0 0 16px; max-width: 54ch;
}
.project-body p:last-child { margin-bottom: 0; }
.project-roles { font-size: 13px; color: var(--muted); margin: 20px 0 0; font-style: italic; }

/* small image grid inside project pages */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 16px;
  margin: 36px 0 48px;
}
.project-grid img {
  width: 200px; height: 140px;
  object-fit: cover; display: block;
  transition: opacity 0.2s; cursor: pointer;
}
.project-grid img:hover { opacity: 0.75; }

/* captioned grid for stage design / exhibition */
.caption-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 24px;
  margin: 32px 0 48px;
}
.caption-item { width: 190px; }
.caption-item img { width: 190px; height: 130px; object-fit: cover; display: block; margin-bottom: 8px; }
.caption-item p { font-size: 12px; color: var(--muted); margin: 0; font-style: italic; }

/* horizontal photo strip */
.photo-strip-section { padding: 48px 0 72px; }
.photo-strip-label { font-size: 12px; color: var(--muted); font-style: italic; margin: 0 0 16px; }
.photo-strip {
  display: flex; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip img {
  height: 200px; width: auto; flex-shrink: 0;
  object-fit: cover; cursor: pointer; transition: opacity 0.2s;
}
.photo-strip img:hover { opacity: 0.75; }

/* LIGHTBOX */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(16,16,18,0.95);
  align-items: center; justify-content: center;
  padding: 48px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 88vh;
  object-fit: contain; display: block;
}
.lightbox-close {
  position: absolute; top: 18px; right: 24px;
  width: 40px; height: 40px;
  font-size: 26px; font-weight: 300; color: #fff; cursor: pointer;
  background: none; border: none; line-height: 1; padding: 0;
  font-family: 'Inter', sans-serif;
  opacity: 0.8; transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }

/* any content image outside the homepage opens in the lightbox */
body.has-lightbox .wrap img:not(.about-photo) { cursor: zoom-in; }

/* inner pages: narrower measure, closer to the homepage.
   Scoped to >600px so the mobile layout is untouched. */
@media (min-width: 601px) {
  body.inner .wrap { max-width: 680px; }
}

/* short viewports: keep about + selected works on the first screen */
@media (max-height: 780px) and (min-width: 601px) {
  .topnav { padding: 18px 0 0; }
  #about { padding-top: 28px; }
  #works { padding-top: 26px; }
  .about-photo { width: 84px; height: 111px; }
  .about-layout { grid-template-columns: 84px 1fr; gap: 40px; }
  .about-bio p { margin: 0 0 9px; line-height: 1.55; }
  .section-label { margin: 0 0 14px; }
  .works-list-item { padding: 4px 0; }
  .works-list-item img { width: 84px; height: 58px; }
  .works-list-info { gap: 2px; }
}

@media (max-height: 660px) and (min-width: 601px) {
  .topnav { padding: 14px 0 0; }
  #about { padding-top: 20px; }
  #works { padding-top: 20px; }
  .about-photo { width: 74px; height: 98px; }
  .about-layout { grid-template-columns: 74px 1fr; gap: 32px; }
  .works-list-item img { width: 74px; height: 51px; }
  .works-list-item { padding: 3px 0; }
}

@media (max-width: 600px) {
  .topnav a { font-size: 16px; }
  .about-layout { grid-template-columns: 1fr; gap: 20px; }
  .about-photo { width: 90px; height: 118px; }
  .work-item, .cat-item { width: 140px; }
  .work-item img, .cat-item img { width: 140px; height: 96px; }
  .project-title { font-size: 26px; }
  .project-grid img { width: 150px; height: 105px; }
}
