/* =============================================================================
   PORTFOLIO — styles
   You don't need to edit this file to update the website (see HOW-TO-UPDATE.txt).
   ========================================================================== */

:root {
  --nav-height: 4.25rem;
}

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

html {
  background: #000;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

ul {
  list-style: none;
}

img,
video {
  display: block;
}

button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.section {
  min-height: 100vh;
}

.page-label {
  margin-bottom: 0.9rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.72;
  text-transform: uppercase;
}


/* ---------- Header ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.site-header {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-header a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-header-role {
  font-size: 0.42em;
  font-weight: 400;
  letter-spacing: 0.24em;
  line-height: 1.4;
}

.site-header a,
.nav-links a {
  transition: color 0.3s;
}

.site-header a:hover {
  color: rgb(255, 0, 0);
}

.nav-links a:hover {
  color: rgb(98, 255, 0);
}

.nav-links a[data-nav="work"]:hover,
.mobile-nav a[data-nav="work"]:hover {
  color: rgb(98, 255, 0);
}

.nav-links a[data-nav="stills"]:hover,
.mobile-nav a[data-nav="stills"]:hover {
  color: rgb(255, 105, 180);
}

.nav-links a[data-nav="about"]:hover,
.mobile-nav a[data-nav="about"]:hover {
  color: rgb(255, 255, 0);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.65rem;
}

/* An invisible bold copy reserves the width, so the menu doesn't shift when an item turns bold */
.nav-links a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
}

.nav-links a::after {
  content: attr(data-nav);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}

.nav-links a.is-active,
.mobile-nav a.is-active {
  font-weight: 400;
}

/* ---------- Mobile menu ---------- */

.hamburger {
  display: none;
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
}

.hamburger span,
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger span {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span::before {
  top: -0.35rem;
}

.hamburger span::after {
  top: 0.35rem;
}

.hamburger.open span {
  background: transparent;
}

.hamburger.open span::before {
  transform: translateY(0.35rem) rotate(45deg);
}

.hamburger.open span::after {
  transform: translateY(-0.35rem) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1rem;
  letter-spacing: 0.07em;
  text-align: center;
  font-weight: 700;
  transition: color 0.25s, background 0.25s, font-weight 0.25s;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.06);
}


/* ---------- Home ---------- */

.hero-section {
  position: relative;
  min-height: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero-video,
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  pointer-events: none;
}

/* The still sits on top of the video and fades away once the video plays */
.hero-poster {
  transition: opacity 0.5s;
}

.hero-section.is-playing .hero-poster {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.3);
}


/* ---------- Index ---------- */

.projects-section {
  padding-top: var(--nav-height);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1140px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
}

.project-card:focus-visible {
  outline-offset: -4px;
}

.project-card video,
.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card video {
  pointer-events: none;
}

/* The cover sits on top of the preview video and fades away while it plays */
.project-card img {
  transition: opacity 0.5s;
}

.project-card.is-playing img {
  opacity: 0;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.75rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card.is-active .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
}

.project-title {
  font-weight: 500;
}

.project-subtitle {
  font-weight: 200;
}

.project-credit {
  margin-top: 0.25rem;
  font-size: 0.525rem;
  line-height: 1.2;
}

.project-credit span {
  font-weight: 400;
}

.notice {
  padding: 3rem 1rem;
  font-size: 0.6rem;
  text-align: center;
  opacity: 0.6;
}


/* ---------- About ---------- */

.about-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.5rem 4rem;
}

.about-columns {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4rem;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.about-text {
  max-width: 560px;
  font-size: 0.72rem;
  letter-spacing: 0.018em;
  line-height: 1.72;
  text-transform: none;
}

.about-text p {
  margin-bottom: 0.9rem;
}

.about-text em {
  font-style: italic;
}

.about-image {
  flex-shrink: 0;
  width: 280px;
  height: auto;
  margin-top: 0.15rem;
  object-fit: cover;
}

.about-meta {
  margin-top: 2.1rem;
}

.about-meta-header {
  padding-bottom: 0.55rem;
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 200;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.about-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-bottom: 1.7rem;
}

.about-meta-item {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  column-gap: 0.7rem;
  align-items: baseline;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.about-meta-year {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  opacity: 0.5;
}

.about-meta-copy {
  min-width: 0;
}

.about-meta-copy a {
  font-size: 0.6rem;
}

.meta-source {
  font-weight: 400;
}

.meta-sep {
  padding: 0 0.28rem;
  font-weight: 200;
  opacity: 0.55;
}

.meta-title {
  opacity: 0.85;
}

/* Links: a thin line grows from the middle on hover */
.underline-link {
  position: relative;
}

.underline-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #fff;
  opacity: 0;
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.underline-link:hover::after {
  width: 100%;
  opacity: 1;
}


/* ---------- Pages of their own: Stills and the project pages ---------- */

.page {
  min-height: 100vh;
  padding: 6.5rem 1.5rem 4rem;
}

#stills {
  background: #000;
  color: #fff;
}

body.stills-page .nav {
  color: #fff;
}

body.stills-page .hamburger span,
body.stills-page .hamburger span::before,
body.stills-page .hamburger span::after {
  background: #fff;
}

body.stills-page .hamburger.open span {
  background: transparent;
}

.page-inner {
  max-width: 920px;
  margin: 0 auto;
}

/* Three-column masonry grid keeps each still at its original aspect ratio. */
.stills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 4px;
  gap: 4px;
}

.still {
  grid-row-end: span 1;
  overflow: hidden;
  background: #000;
}

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


/* ---------- Project page ---------- */

/* Two columns of body text: title and subtitle | description */
.project-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  font-size: 0.72rem;
  letter-spacing: 0.018em;
  line-height: 1.72;
  text-transform: none;
}

.project-page-title {
  font-weight: 400;
}

.project-description p {
  margin-bottom: 0.9rem;
}

.project-description em {
  font-style: italic;
}

.project-video {
  aspect-ratio: 16 / 9;
  background: #0b0b0b;
}

.project-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Up to 3 images a row, sharing one height; a shorter last row stretches to fill the width */
.project-images {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.project-images-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.project-images-row figure {
  flex: 1.778 1 0; /* 16:9 until the image arrives and tells its real shape */
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: #111;
}

.project-images-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ---------- Phones and small tablets ---------- */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .page {
    padding: 4.5rem 1.15rem 3rem;
  }

  .stills-grid {
    gap: 2px;
  }

  .project-intro {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.78rem;
    line-height: 1.75;
  }

  /* Phones: one image per row, full width */
  .project-images,
  .project-images-row {
    gap: 2px;
  }

  .project-images {
    margin-top: 2px;
  }

  .project-images-row {
    flex-direction: column;
  }

  .project-images-row figure {
    flex: none !important;
    width: 100%;
  }

  .about-section {
    padding: 4.5rem 1.15rem 3rem;
  }

  .about-columns {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .about-image {
    order: -1;
    width: 100%;
    margin: 0;
  }

  .about-text {
    max-width: 100%;
    padding-top: 0.25rem;
    font-size: 0.78rem;
    line-height: 1.75;
  }

  .about-meta-item {
    font-size: 0.68rem;
  }
}
