:root {
  --bg: #ffffff;
  --ink: #161513;
  --muted: #7a766d;
  --line: #e7e3da;
  --accent: #a9723f;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- header / nav ---------- */
.site-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 40px 48px 16px;
  font-family: "Space Grotesk", -apple-system, sans-serif;
}

/* name + role on the left, nav on the right */
.site-header nav { order: 2; }

.site-header .brand {
  order: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.site-header .logo {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.site-header .role {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-header nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-header nav a:hover { color: var(--ink); }

.site-header nav a.current { color: var(--ink); }

/* ---------- homepage hero ---------- */
.hero {
  padding: 90px 48px 60px;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 520px;
}

.about-hero {
  max-width: 1080px;
}

.about-layout {
  display: flex;
  gap: 56px;
  align-items: flex-start;
  margin-top: 24px;
}

.about-text {
  flex: 1 1 460px;
  min-width: 0;
}

.about-text p:first-child {
  margin-top: 0;
}

.about-photo {
  flex: 1 1 460px;
  min-width: 0;
}

.about-photo img {
  width: 100%;
  display: block;
}

@media (max-width: 800px) {
  .about-layout { flex-direction: column; }
}

/* ---------- project grid ---------- */
.project-grid {
  display: grid;
  /* fixed column count (not auto-fit) so tightening the gap/widening the
     max-width can't sneak in an extra column and shrink the cards instead
     of enlarging them */
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px 48px 100px;
  /* 4376 = 2188 * 2 (doubled) */
  max-width: 4376px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
}

.project-card {
  display: block;
  position: relative;
}

.project-card .thumb {
  aspect-ratio: 2 / 1;
  background: linear-gradient(135deg, #d9d4c8 0%, #c7c0af 55%, #d3cdbe 100%);
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.project-card img {
  aspect-ratio: 2 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.project-card .thumb::after {
  content: attr(data-label);
  position: absolute;
  bottom: 10px; left: 10px;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(22,21,19,0.4);
}

/* full-frame darkening on hover — a real black overlay (not an opacity
   fade, which would wash the image toward the page's white background
   instead of darkening it) so the centered text stays legible */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover::before { opacity: 1; }

.project-card .cap {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 0 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.project-card:hover .cap {
  opacity: 1;
}

.project-card .cap h3 {
  font-family: "Space Grotesk", -apple-system, sans-serif;
  font-size: 24px;
  font-weight: 300;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
}

.project-card .cap span {
  font-family: "Space Grotesk", -apple-system, sans-serif;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- project detail page ---------- */
.project-header {
  padding: 16px 48px 0;
}

.project-header .back {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.project-header .back:hover { color: var(--ink); }

.project-header h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.project-header .meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-header .blurb {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 560px;
}

/* watch section (single trailer, centered) */
.watch-section {
  padding: 48px 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 675px;
  aspect-ratio: 16 / 9;
  background: #1c1a17;
  margin-bottom: 16px;
  overflow: hidden;
}

.video-embed.centered {
  margin: 0 auto 16px;
}

.video-embed iframe {
  width: 100%; height: 100%; border: 0;
}

.video-embed.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a867c;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.episode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.episode-list .video-embed {
  max-width: 340px;
}

/* project description (between video and stills) */
.project-desc {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 48px 8px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

/* stills grid — flat row-major layout (see build.js), each photo keeps
   its native composition, never cropped. CSS Grid (not flex) for the
   columns: some browsers mishandle equal-width flex columns once they
   contain images with large native pixel dimensions (ours run
   2880-3024px wide) — grid's 1fr tracks don't have that problem.
   grid-template-columns is set inline per-project since column count
   varies with how many stills there are. */
.still-grid {
  display: grid;
  align-items: start;
  gap: 12px;
  padding: 20px 48px 100px;
  max-width: 1050px;
  margin: 0 auto;
}

.still-grid-item {
  min-width: 0;
}

.still-grid-item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 640px) {
  .still-grid { grid-template-columns: 1fr !important; }
}

/* placeholder blocks (no real image yet) still need a box to show in */
.still-grid-item .still {
  aspect-ratio: 3 / 2;
  width: 100%;
  background: linear-gradient(135deg, #d9d4c8 0%, #c7c0af 55%, #d3cdbe 100%);
  position: relative;
  overflow: hidden;
}

.still-grid-item .still::after {
  content: attr(data-label);
  position: absolute;
  bottom: 10px; left: 10px;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(22,21,19,0.4);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 48px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.site-footer a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .site-header, .hero, .project-grid, .project-header, .watch-section { padding-left: 24px; padding-right: 24px; }
  .stills-stack figure { padding: 0 24px; }
  /* the full email address doesn't fit on one line with the rest of the
     nav at phone widths — let the header wrap instead of clipping it */
  .site-header { flex-wrap: wrap; row-gap: 10px; }
  .site-header nav { flex-wrap: wrap; row-gap: 8px; gap: 16px; }
  .site-header .role { display: none; }
}
