:root {
  --bg: #000;
  --text: #f4f1ee;
  --muted: #c7c7c7;
  --accent: #7a4cff;
  --line: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Unbounded", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 42px);
  min-height: 132px;
  padding: 18px clamp(22px, 4vw, 60px);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
}

.wordmark img {
  width: clamp(390px, 29vw, 590px);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: clamp(12px, 2.2vw, 34px);
}

.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: clamp(11px, 0.92vw, 15px);
  font-weight: 300;
  transition: color 0.35s ease;
}

.site-nav a:not(.contacts-link)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.28em;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.about-links a,
.footer-contacts a {
  color: var(--muted);
  font-size: clamp(13px, 1.45vw, 17px);
  font-weight: 300;
  transition: color 0.35s ease;
}

.site-nav a:hover,
.about-links a:hover,
.footer-contacts a:hover {
  color: var(--accent);
}

.site-nav a:not(.contacts-link):hover::after,
.site-nav a:not(.contacts-link):focus-visible::after {
  transform: scaleX(1);
}

.site-nav .contacts-link {
  display: inline-block;
  padding: 0.08em 0.24em 0.14em;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.site-nav .contacts-link:hover,
.site-nav .contacts-link:focus-visible {
  color: #fff;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100svh - 86px);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("assets/images/home-cover.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.hero-logo {
  position: relative;
  width: min(52vw, 520px);
}

.works {
  padding: clamp(18px, 3vw, 42px) clamp(10px, 2vw, 24px) clamp(36px, 7vw, 96px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 clamp(8px, 2vw, 34px) 30px;
}

.filter {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 300;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter:hover,
.filter.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(8px, 2vw, 34px) 28px;
}

.section-head p,
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: lowercase;
}

h1 {
  font-size: clamp(40px, 8vw, 96px);
}

h2 {
  font-size: clamp(28px, 5vw, 56px);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.work-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  isolation: isolate;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 1.15s cubic-bezier(0.2, 0.72, 0.18, 1), filter 1.15s cubic-bezier(0.2, 0.72, 0.18, 1);
}

.work-card .card-image {
  object-fit: cover;
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(122, 76, 255, 0), rgba(122, 76, 255, 0)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
  pointer-events: none;
  z-index: 1;
  transition: background 1.05s cubic-bezier(0.2, 0.72, 0.18, 1);
}

.work-card a {
  display: block;
  position: relative;
  height: 100%;
}

.work-card h3 {
  position: absolute;
  top: clamp(48px, 5.6vw, 78px);
  left: clamp(20px, 4vw, 42px);
  z-index: 2;
  max-width: calc(100% - clamp(72px, 10vw, 118px));
  margin: 0;
  color: var(--accent);
  font-size: clamp(18px, 2.6vw, 34px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: lowercase;
  transition: color 0.75s cubic-bezier(0.2, 0.72, 0.18, 1);
}

.work-meta {
  position: absolute;
  top: clamp(20px, 4vw, 42px);
  left: clamp(20px, 4vw, 42px);
  z-index: 2;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  text-transform: lowercase;
}

.arrow {
  position: absolute;
  top: clamp(24px, 4vw, 44px);
  right: clamp(20px, 4vw, 42px);
  z-index: 2;
  width: 18px;
  height: 32px;
  margin-top: 8px;
  flex: none;
}

.rubrics {
  padding: clamp(8px, 1.5vw, 18px) clamp(24px, 5vw, 72px) clamp(22px, 3vw, 38px);
}

.rubric-grid {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.rubric-grid::-webkit-scrollbar {
  display: none;
}

.work-card:hover .card-image {
  filter: saturate(1.16) brightness(0.95);
  transform: scale(1.045);
}

.work-card:hover::after {
  background:
    linear-gradient(180deg, rgba(122, 76, 255, 0.3), rgba(122, 76, 255, 0.66)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.54));
}

.work-card:hover h3 {
  color: var(--muted);
}

.rubric-tab {
  flex: 0 0 auto;
  position: relative;
  color: #fff;
  font-size: clamp(13px, 1.15vw, 18px);
  font-weight: 300;
  line-height: 1;
  text-transform: lowercase;
  transition:
    color 0.45s ease,
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(0.2, 0.72, 0.18, 1);
}

.rubric-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.32em;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.2, 0.72, 0.18, 1);
}

.rubric-tab:hover,
.rubric-tab:focus-visible {
  color: var(--accent);
  transform: translateY(-2px);
}

.rubric-tab:hover::after,
.rubric-tab:focus-visible::after {
  transform: scaleX(1);
}

.rubric-tab:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 8px;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: clamp(46px, 8vw, 92px) clamp(24px, 5vw, 64px);
}

.about[hidden] {
  display: none;
}

.about-visual {
  display: grid;
  align-content: start;
  gap: 14px;
}

.about-portrait {
  position: relative;
  width: min(100%, 130px);
  margin: 0;
  overflow: visible;
}

.about-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.82) 100%);
  pointer-events: none;
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

.about-portrait figcaption {
  position: absolute;
  bottom: 8px;
  left: calc(100% - 16px);
  z-index: 1;
  width: clamp(240px, 27vw, 430px);
}

.about-portrait h2 {
  color: #fff;
  font-size: clamp(22px, 2.5vw, 38px);
  font-weight: 600;
  line-height: 0.98;
  white-space: nowrap;
}

.about-roles {
  display: grid;
  gap: 1px;
  margin: 7px 0 0;
}

.about-roles strong {
  display: block;
  color: var(--accent);
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 700;
  line-height: 1.18;
}

.about-copy {
  display: grid;
  gap: 6px;
  max-width: 760px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 1.45vw, 16px);
  font-weight: 300;
  line-height: 1.58;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding-top: 10px;
}

.education {
  display: grid;
  gap: 5px;
  padding-top: 3px;
}

.education ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.education li {
  color: var(--muted);
  font-size: clamp(12px, 1.15vw, 14px);
  font-weight: 300;
  line-height: 1.45;
}

.education strong {
  color: #fff;
  font-weight: 600;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(34px, 6vw, 72px) clamp(22px, 4vw, 60px);
}

.footer-logo img {
  width: clamp(280px, 22vw, 440px);
  height: auto;
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
}

.project-page {
  min-height: calc(100svh - 86px);
}

.project-video {
  padding: 0 clamp(18px, 4vw, 56px) clamp(28px, 5vw, 62px);
}

.project-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #111;
}

.project-hero,
.project-intro {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
  padding-inline: clamp(18px, 4vw, 56px);
}

.project-hero {
  padding-top: clamp(26px, 5vw, 64px);
  padding-bottom: clamp(22px, 4vw, 48px);
}

.project-intro {
  padding-bottom: clamp(34px, 7vw, 86px);
}

.project-heading {
  display: grid;
  gap: 10px;
  max-width: 980px;
}

.project-heading h1 {
  color: var(--accent);
  font-size: clamp(24px, 3.2vw, 46px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.back-link,
.project-button {
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  text-transform: lowercase;
}

.back-link {
  grid-column: 1 / -1;
}

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

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-self: start;
}

.project-links {
  display: contents;
}

.project-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.project-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.project-description {
  display: grid;
  gap: 7px;
  max-width: 1180px;
}

.project-description p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 1.08vw, 18px);
  font-weight: 300;
  line-height: 1.46;
}

.project-description strong {
  color: #fff;
  font-weight: 600;
}

.project-label {
  display: inline-block;
  margin-right: 0.22em;
  padding: 0 0.12em 0.04em;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.project-gallery-section,
.related-projects {
  padding: 0 0 clamp(46px, 8vw, 104px);
}

.project-featured-media {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 640px);
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
  padding: 0 clamp(18px, 4vw, 56px) clamp(32px, 5vw, 64px);
}

.project-featured-gif {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  background: #101010;
}

.project-featured-gif img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-featured-gif[data-featured-aspect="wide"] {
  max-width: 460px;
  aspect-ratio: 16 / 9;
}

.project-featured-copy .project-description {
  max-width: 620px;
}

.project-gallery-section--compact {
  padding-inline: clamp(18px, 4vw, 56px);
}

.project-gallery--compact-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.15vw, 16px);
  max-width: 1320px;
}

.project-gallery--compact-row[data-count="6"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.project-gallery--compact-row[data-count="7"] {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.project-gallery--compact-row img {
  object-fit: contain;
  transform: none;
}

.project-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
}

.project-section-head h2 {
  color: var(--accent);
  font-size: clamp(22px, 4vw, 48px);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.project-gallery[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-gallery[data-count="8"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-gallery[data-photo-project="true"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-gallery[data-reels-project="true"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-gallery figure {
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: #101010;
}

.project-gallery[data-reels-project="true"] figure {
  aspect-ratio: 9 / 16;
}

.project-gallery[data-gallery-aspect="four-five"] figure {
  aspect-ratio: 4 / 5;
}

.project-gallery figure[data-wide="true"] {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.075);
  transform-origin: center;
  color: transparent;
  font-size: 0;
}

.project-gallery[data-reels-project="true"] img {
  transform: none;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}

.related-card {
  background: #101010;
}

.related-card a {
  display: grid;
  gap: 14px;
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: brightness(0.84);
  color: transparent;
  font-size: 0;
  transition: filter 0.2s ease;
}

.related-card:hover img {
  filter: brightness(1) saturate(1.08);
}

.related-card-copy {
  display: grid;
  gap: 8px;
  padding: 0 0 4px;
}

.related-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.35;
  text-transform: lowercase;
}

.related-card-copy h3 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(14px, 1.35vw, 20px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: 0;
  text-transform: lowercase;
  transition: color 0.2s ease;
}

.related-card:hover h3 {
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 102px;
  }

  .wordmark img {
    width: min(82vw, 320px);
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: calc(100svh - 74px);
  }

  .about,
  .project-intro,
  .project-featured-media,
  .project-gallery,
  .related-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    justify-items: start;
  }

  .footer-logo img {
    width: 230px;
  }

  .footer-contacts {
    justify-content: flex-start;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .project-intro {
    padding-top: 0;
  }

  .project-featured-gif {
    max-width: min(76vw, 360px);
  }

  .project-gallery--compact-row,
  .project-gallery--compact-row[data-count="6"],
  .project-gallery--compact-row[data-count="7"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .back-link {
    grid-column: auto;
  }

  .project-description p {
    font-size: clamp(13px, 4.1vw, 18px);
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .about-portrait {
    width: 120px;
  }

  .about-portrait figcaption {
    left: calc(100% - 12px);
    width: min(78vw, 300px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
