:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --ink: #171717;
  --muted: #6d6860;
  --line: #d9d3c8;
  --panel: #fffdf8;
  --accent: #b92f2b;
  --green: #365a47;
  --blue: #2b536f;
  --shadow: 0 18px 48px rgba(20, 18, 16, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fbfaf7;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid #1e1e1e;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.nav a:hover,
.contact a:hover {
  color: var(--accent);
}

main {
  padding: 0 22px 56px;
}

.intro {
  display: block;
  min-height: 33vh;
  padding: 30px 0 34px;
  border-bottom: 1px solid #1e1e1e;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: none;
  margin-bottom: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: clamp(58px, 11vw, 178px);
  font-weight: 850;
  line-height: 0.92;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 46px;
  color: var(--muted);
  line-height: 1.45;
}

.work {
  padding-top: 18px;
}

.work-head,
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.view-tools,
.filters {
  display: flex;
  flex-wrap: wrap;
}

.view-tools {
  gap: 6px;
}

.filters {
  justify-content: flex-start;
  margin: 18px 0 34px;
}

.filter-button,
.tool-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-button {
  padding: 0 13px;
}

.tool-button {
  min-width: 56px;
  padding: 0 10px;
}

.filter-button:hover,
.filter-button.is-active,
.tool-button:hover,
.tool-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
}

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

.project {
  display: grid;
  grid-column: span 6;
  gap: 12px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.project:nth-child(3n) {
  grid-column: 3 / span 8;
}

.project--portrait {
  grid-column: span 4;
}

.project--portrait:nth-child(3n) {
  grid-column: span 4;
}

.project-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}

.project--portrait .project-media {
  aspect-ratio: 9 / 16;
}

.project-media img,
.project-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
}

.project-media video {
  opacity: 1;
  transition: opacity 220ms ease, transform 240ms ease;
}

.project:hover img,
.project:hover video {
  transform: scale(1.035);
  filter: contrast(1.05);
}

.project-index {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 4px 7px;
  background: rgba(246, 244, 238, 0.86);
  color: var(--ink);
  font-size: 11px;
}

.project-folder {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 4px 7px;
  background: rgba(246, 244, 238, 0.86);
  color: var(--ink);
  font-size: 11px;
}

.project-copy {
  display: grid;
  gap: 3px;
}

.project-title {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.about,
.contact {
  display: grid;
  grid-template-columns: 180px minmax(0, 760px);
  gap: 28px;
  padding: 52px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 54px;
}

.about p,
.contact a {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.08;
}

.project-dialog {
  width: min(1120px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(13, 12, 10, 0.68);
}

.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(17, 17, 17, 0.74);
  color: #fff;
  cursor: pointer;
}

.dialog-media {
  background: #111;
}

.dialog-media img,
.dialog-media iframe,
.dialog-media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  object-fit: contain;
}

.dialog-media video.is-portrait {
  max-height: min(78vh, 920px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  background: #111;
}

.external-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(64vh, 720px);
  overflow: hidden;
  background: #111;
}

.external-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.external-link {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 12px 16px;
  background: var(--panel);
  color: var(--ink);
}

.dialog-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 28px;
  align-items: start;
  padding: 24px;
}

.dialog-copy .eyebrow,
.dialog-copy h3 {
  grid-column: 1 / -1;
}

.dialog-copy h3 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
}

dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  line-height: 1.25;
}

.project-link {
  align-self: end;
  min-height: 40px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  text-align: center;
}

.series-switcher {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.series-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 10px;
}

.series-button:hover,
.series-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
}

.project-link.is-disabled {
  display: none;
}

@media (max-width: 980px) {
  .work-grid {
    grid-template-columns: 1fr;
  }

  .project,
  .project:nth-child(3n) {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .site-header,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .intro,
  .about,
  .contact,
  .dialog-copy {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
    padding-top: 42px;
  }

  h1 {
    font-size: clamp(50px, 19vw, 92px);
    line-height: 0.94;
  }

  dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .site-header {
    align-items: flex-start;
    min-height: 76px;
    padding-top: 16px;
  }

  .nav {
    gap: 13px;
    font-size: 12px;
  }

  .project-title {
    white-space: normal;
  }
}
