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

html {
  height: 100%;
}

body {
  background-color: #111111;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #ffffff;
  text-decoration: none;
}

/* Initial-hidden state for staggered reveal (JS-driven).
   The project-title is also hidden initially because JS will FLIP it from
   the landing list-item position into the sidebar before revealing. */
.project-title,
.project-description,
.project-media > * {
  opacity: 0;
}

/* ── Two-column layout ── */

.project-page {
  display: flex;
  min-height: 100vh;
}

/* Fixed left sidebar */
.project-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(33%, 560px);
  height: 100vh;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

/* Persistent header — matches landing page position, no animation */
.back-name {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -1px;
  flex-shrink: 0;
  margin-bottom: 70px;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
}

.back-name:hover {
  opacity: 0.7;
}

/* Project title — paired with the clicked list item on the landing for a shared-element morph */
.project-title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  flex-shrink: 0;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
}

/* Description block */
.project-body {
  margin-top: 20px;
  flex: 1;
}

.project-description {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
}

.project-description p + p {
  margin-top: 20px;
}

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

.project-description a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-description a:hover {
  opacity: 0.7;
}

/* Scrollable right media column */
.project-media {
  margin-left: min(33%, 560px);
  width: calc(100% - min(33%, 560px));
  padding-top: calc(40px + 2.1875rem + 70px);
  padding-left: 60px;
  padding-right: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Vimeo / iframe embed — aspect ratio set inline per-embed via padding-top */
.media-embed {
  width: 100%;
  position: relative;
  flex-shrink: 0;
}

.media-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Looping video (silent) */
video.media-video {
  width: 100%;
  display: block;
  flex-shrink: 0;
}

/* Video with mute toggle */
.media-video-wrapper {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
}

.media-video-wrapper video {
  width: 100%;
  display: block;
}

.unmute-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background 0.2s ease;
}

.unmute-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* ── Mobile ── */

@media (max-width: 767px) {
  .project-page {
    flex-direction: column;
  }

  .back-name {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 45px;
  }

  .project-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 30px 15px 40px;
  }

  .project-title {
    font-size: 0.875rem;
  }

  .project-body {
    margin-top: 20px;
  }

  .project-media {
    margin-left: 0;
    width: 100%;
    padding-top: 0;
    padding-left: 15px;
    padding-right: 15px;
    gap: 10px;
  }
}
