:root {
  --background: #101011;
  --ink: #ebebf1;
  --pad: 5px;
  --font: 'Arial', 'Helvetica Neue', Arial, sans-serif;
  --media-h: clamp(280px, 54vw, 610px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;

}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #030304;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -60px;
  background: white;
  padding: 8px;
  z-index: 100;
}

.skip:focus {
  top: 5px;
}

.site-head {
  padding:  var(--pad) ;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
}

.site-id {
  white-space: nowrap;
}

.site-head nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2vw, 35px);
}

.site-head a {
  text-decoration: none;
}

.site-head a:hover,
.site-head a:focus-visible {
  text-decoration: underline;
}

.news {
  padding: 20px var(--pad) 50px;
  display: grid;
  grid-template-columns: minmax(95px, 18%) 1fr;
  gap: 10px;
  max-width: 1120px;
}

.label {
  font: inherit;
  margin: 0;
}

.news-items {
  max-width: 810px;
}

.news-items p {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  margin: 0 0 5px;
}

.news-items p span:first-child {
  font-variant-numeric: tabular-nums;
}

.news-items i {
  font-style: italic;
}

.works-lead {
  padding: 104px var(--pad) 38px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.works-lead p {
  max-width: 650px;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: normal;
}

.works-lead span {
  white-space: nowrap;
}

.project {
  padding: 0 0 clamp(90px, 10vw, 120px);
}

.project-head {
  margin: 0 var(--pad) 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 30px;
}

.project-title {
  font-size: 1.125rem;
  line-height: inherit;
  margin: 0;
  font-weight: 400;
}

.project-sub {
  margin-left: 0.5ch;
}

.project-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.project-reel {
  position: relative;
}

.project-media {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* Allow vertical page scrolling; horizontal reel travel is drag/arrow only. */
  touch-action: pan-y;
  cursor: grab;
}

.project-media::-webkit-scrollbar {
  display: none;
}

.project-media.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}

.reel-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  /* background: rgba(16, 16, 17, .82); */
  /* color: #ffffff; */
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.reel-arrow-previous {
  left: 10px;
}

.reel-arrow-next {
  right: 10px;
}

.reel-arrow:hover {
  color: var(--background);
}
.reel-arrow:focus-visible {
  outline-color: var(--ink);
}

/* A hidden arrow must remain hidden even though .reel-arrow uses display:grid. */
.reel-arrow[hidden] {
  display: none;
}

.media-track {
  display: flex;
  width: max-content;
  gap: 7px;
  padding: 0 var(--pad);
}

.media {
  display: block;
  position: relative;
  flex: 0 0 auto;
  height: var(--media-h);
  max-width: calc(100vw - 2 * var(--pad));
  overflow: hidden;
  scroll-snap-align: start;
  background: #302e34;
  width: min(calc(var(--media-h) * var(--ratio, 1.55)), calc(100vw - 2 * var(--pad)));
  margin: 0;
}

.media img,
.media video,
.media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.media img,
.media video {
  object-fit: contain;
  background: #302e34;
}

.media-natural {
  width: auto;
  max-width: none;
}

.media-natural img,
.media-natural video {
  width: auto;
}

.media iframe {
  width: 125%;
  height: 125%;
  transform: scale(.8);
  transform-origin: top left;
  background: #e2e0dc;
}

.media-cover {
  object-fit: cover !important;
}

.media-click {
  display: block;
  position: absolute;
  right: 11px;
  bottom: 11px;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  background: var(--background);
  padding: 6px 8px;
}

.media-click:hover {
  text-decoration: underline;
}

/* Minimal playback controls, shown only on video hover/focus. */
.video-controls {
  position: absolute;
  z-index: 4;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: rgba(16, 16, 17, .86);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
}

.media:hover .video-controls,
.media:focus-within .video-controls {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.video-controls button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.video-controls button:hover,
.video-controls button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.video-progress {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 40px;
  min-width: 40px;
  margin: 0;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.video-progress::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--ink) var(--played, 0%), rgba(235,235,241,.35) var(--played, 0%));
}

.video-progress::-moz-range-track {
  height: 2px;
  background: rgba(235,235,241,.35);
}

.video-progress::-moz-range-progress {
  height: 2px;
  background: var(--ink);
}

.video-progress::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  margin-top: -2.5px;
}

.video-progress::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.video-progress:disabled {
  cursor: default;
  opacity: .45;
}

@media (hover: none) {
  .video-controls {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.project-details {
  padding: 13px var(--pad) 0;
  display: grid;
  grid-template-columns: minmax(130px, 23%) minmax(300px, 750px) 1fr;
  gap: 10px;
}

.project-meta {
  padding-right: 30px;
}

.project-description {
  max-width: 720px;
}

.project-description p {
  margin: 0 0 10px;
}

.project-description a {
  white-space: nowrap;
}

.project-description p:last-child {
  margin-bottom: 0;
}

.project-extra {
  text-align: right;
  white-space: nowrap;
}

.project-locked .media {
  background: #4a4750;
  color: #070709;
}

.locked-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 19px;
}

.locked-panel span:nth-child(2) {
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1.07;
  letter-spacing: -0.03em;
}

.locked-panel button {
  align-self: start;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.locked-panel button:hover {
  text-decoration: none;
}

.about {
  padding: 0 var(--pad) 45px;
  display: grid;
  grid-template-columns: minmax(130px, 23%) minmax(300px, 750px) 1fr;
  gap: 10px;
}

.about-copy p {
  margin: 0 0 19px;
  max-width: 720px;
}

.footnote {
  text-align: right;
  white-space: nowrap;
  align-self: end;
}

dialog {
  width: min(490px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  border: 0;
  background: #c5c1cb;
  color: var(--ink);
  padding: 23px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, .22);
}

dialog::backdrop {
  background: rgba(10, 10, 12, .48);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

dialog p {
  margin: 30px 0 40px;
}

dialog label {
  display: block;
  margin-bottom: 5px;
}

dialog input {
  background: transparent;
  color: inherit;
  border: 1px solid #09080a;
  border-radius: 0;
  width: 100%;
  outline-offset: 2px;
  padding: 11px;
}

.plain-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dialog-actions {
  display: flex;
  gap: 22px;
  align-items: baseline;
  margin-top: 18px;
}

#password-status {
  font-size: 13px;
}

@media (max-width: 700px) {
  body {
    font-size: 14px;
  }

  .site-head {
    padding-top: 13px;
  }

  .news {
    padding-top: 65px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-items p {
    grid-template-columns: 68px 1fr;
    gap: 10px;
  }

  .works-lead {
    padding-top: 83px;
    padding-bottom: 38px;
    align-items: start;
  }

  .works-lead p {
    font-size: inherit;
  }

  .works-lead span {
    display: none;
  }

  :root {
    --media-h: clamp(240px, 68vw, 430px);
  }

  .project {
    padding-bottom: 96px;
  }

  .project-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
  }

  .project-meta {
    padding-right: 0;
  }

  .project-extra {
    text-align: left;
    margin-top: 7px;
  }

  .about {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 25px;
  }

  .footnote {
    margin-top: 45px;
    text-align: left;
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-media {
    scroll-behavior: auto;
  }
}