:root {
  color-scheme: dark;
  --background: #1c1d18;
  --foreground: #f6f0e4;
  --muted: #c2bcae;
  --accent: #ebc48a;
  --line: #555346;
  --gutter: clamp(20px, 6vw, 100px);
  --display-font: "Archivo Black", "Arial Black", Arial, sans-serif;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
}

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

body {
  margin: 0;
}

.home-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
}

.portfolio {
  width: min(1120px, calc(100% - 2 * var(--gutter)));
  margin: clamp(28px, 5vw, 64px) auto;
  padding-block: 24px;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template: "portrait identity" auto "portrait work" 1fr / minmax(0, 0.83fr) minmax(0, 1fr);
  column-gap: clamp(32px, 6vw, 84px);
  row-gap: 42px;
  align-items: start;
}

.identity {
  grid-area: identity;
  padding-top: clamp(8px, 4.7vw, 64px);
}

.identity h1 {
  margin: 0 0 23px;
  font-family: var(--display-font);
  font-weight: 900;
  font-size: clamp(49px, 7.1vw, 105px);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.identity h1 span {
  display: block;
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: clamp(0.875rem, 1.26vw, 1.0625rem);
  line-height: 1.5;
}

.roles span {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
}

.roles span + span::before {
  content: "·" / "";
}

a {
  color: var(--accent);
  text-underline-offset: 0.24em;
}

a:hover {
  color: var(--foreground);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.imdb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.external-arrow {
  position: relative;
  width: 8px;
  height: 8px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.external-arrow::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 11px;
  height: 1px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}

.portrait {
  grid-area: portrait;
  display: block;
  width: 100%;
  height: auto;
  background: #37332b;
}

.work {
  grid-area: work;
  border-top: 1px solid var(--line);
}

.work-link {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 69px;
  padding: 12px 2px 12px 0;
  color: var(--foreground);
  text-decoration: none;
  font-size: clamp(1.25rem, 1.9vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.work-link:hover {
  color: var(--accent);
}

.chevron {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.gallery {
  width: min(1120px, calc(100% - 2 * var(--gutter)));
  margin: clamp(24px, 5vw, 64px) auto;
  border-top: 1px solid var(--line);
}

.gallery-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.gallery-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}

.gallery-nav .home-link {
  gap: 8px;
  color: var(--foreground);
  font-weight: 700;
}

.gallery-nav a:hover,
.gallery-nav [aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

.gallery-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  font-size: 0.9375rem;
}

.gallery h1 {
  margin: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 48px);
  font-family: var(--display-font);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.video-grid:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px clamp(24px, 4vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-card {
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
}

.video-card h2 {
  margin: 12px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.video-player {
  display: block;
  width: 100%;
  height: auto;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #12130f;
}

video.video-player {
  object-fit: contain;
}

.video-empty {
  margin: 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 860px) {
  .video-grid:not([hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 740px) {
  .portfolio {
    width: min(470px, calc(100% - 2 * var(--gutter)));
    grid-template: "identity" auto "portrait" auto "work" auto / minmax(0, 1fr);
    gap: 24px;
    padding-block: 24px 0;
    border-bottom: 0;
  }

  .identity {
    padding-top: 0;
  }

  .identity h1 {
    font-size: clamp(42px, 11vw, 72px);
    margin-bottom: 14px;
  }

  .roles {
    margin-bottom: 6px;
  }

  .work-link {
    min-height: 62px;
  }
}
