:root {
  color-scheme: dark light;
  --panel: rgba(12, 12, 12, 0.84);
  --panel-line: rgba(255, 255, 255, 0.18);
  --text: #f7f4ef;
  --muted: rgba(247, 244, 239, 0.68);
  --accent: #f2accd;
  --dark: #050505;
  --light: #faf8f3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--dark);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100svh;
  background: var(--dark);
}

.art-flow {
  min-height: 100svh;
  width: 100%;
}

.art-section {
  display: block;
  position: relative;
  overflow: visible;
  background: var(--section-bg, var(--dark));
  line-height: 0;
}

.art-image {
  width: 100%;
  height: auto;
  display: block;
}

.home-link-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: auto;
}

.home-art-link {
  position: absolute;
  display: block;
  border-radius: 4px;
  color: transparent;
  font-size: 0;
  line-height: 0;
  background: rgba(255, 255, 255, 0.001);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(247, 244, 239, 0.18);
  outline: 0;
}

.home-art-link:focus-visible {
  outline: 2px solid #f7f4ef;
  outline-offset: 4px;
}


.project-placeholder-mask-layer,
.project-embed-layer {
  position: absolute;
  inset: 0;
  line-height: 0;
  pointer-events: none;
}

.project-placeholder-mask-layer {
  z-index: 6;
  overflow: hidden;
}

.project-embed-layer {
  z-index: 7;
}

.project-placeholder-mask {
  position: absolute;
  background: #050505;
  box-shadow: 0 0 0 12px #050505;
}

.project-video-slot {
  position: absolute;
  overflow: hidden;
  background: #050505;
  line-height: 0;
  pointer-events: auto;
}

.project-video-slot--desktop {
  box-shadow: 0 0 0 10px #050505;
}

.project-embed,
.project-video-poster {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #050505;
  pointer-events: auto;
}

.project-video-slot--desktop .project-embed {
  width: calc(100% + 28px);
  height: calc(100% + 28px);
}

.project-video-poster {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

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

.project-video-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.12);
}

.project-video-poster__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(42px, 14vw, 68px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.72);
  transform: translate(-50%, -50%);
}

.project-video-poster__play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8%;
  border-top: clamp(9px, 3vw, 14px) solid transparent;
  border-bottom: clamp(9px, 3vw, 14px) solid transparent;
  border-left: clamp(14px, 4.4vw, 22px) solid #f7f4ef;
}

.project-video-slot:focus-within,
.project-embed:focus-visible,
.project-video-poster:focus-visible {
  outline: 2px solid #f7f4ef;
  outline-offset: 4px;
}

.project-heading {
  min-height: 42svh;
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 104px) clamp(20px, 6vw, 88px);
  background: var(--heading-bg, #050505);
  color: var(--heading-fg, #f7f4ef);
}

.project-heading__inner {
  width: min(920px, 100%);
}

.project-kicker {
  margin: 0 0 18px;
  color: currentColor;
  opacity: 0.62;
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-heading h1 {
  margin: 0;
  max-width: 12ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: lowercase;
}

.projects-page {
  min-height: 100svh;
  padding: clamp(40px, 7vw, 96px) clamp(16px, 5vw, 72px);
  background: var(--heading-bg, #050505);
  color: var(--heading-fg, #f7f4ef);
}

.projects-page__inner {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.projects-page h1 {
  margin: 0 0 clamp(28px, 5vw, 64px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: lowercase;
}

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

.project-card {
  display: grid;
  gap: 10px;
  color: currentColor;
  text-decoration: none;
}

.project-card .art-image {
  aspect-ratio: 4952 / 3243;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.project-card__label {
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: lowercase;
}


.variant-strip {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.variant-strip button,
.tool-panel button,
.project-list button {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 7px 12px;
  line-height: 1;
}

.variant-strip button[aria-pressed="true"],
.tool-panel button[aria-pressed="true"],
.project-list button[aria-current="true"] {
  border-color: rgba(255, 255, 255, 0.44);
  background: var(--light);
  color: #151515;
}

.compare-grid {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.compare-cell {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--section-bg, var(--dark));
  line-height: 1.2;
}

.compare-label {
  z-index: 2;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.compare-cell .art-image {
  height: calc(100svh - 34px);
  object-fit: contain;
  background: var(--section-bg, var(--dark));
}

.tool-toggle {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  z-index: 30;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  backdrop-filter: blur(18px);
}

.tool-panel {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: calc(max(14px, env(safe-area-inset-top)) + 52px);
  z-index: 30;
  width: min(360px, calc(100vw - 28px));
  max-height: calc(100svh - 80px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.tool-panel[hidden] {
  display: none;
}

.tool-group {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-group:last-child {
  margin-bottom: 0;
}

.tool-label {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-list {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
}

.project-list button {
  width: 100%;
  border-radius: 6px;
  text-align: left;
  line-height: 1.1;
}

.empty-state {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--text);
  background: var(--dark);
  text-align: center;
}

.empty-state p {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 740px) {
  .projects-page {
    padding: 34px 14px 48px;
  }

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

  .project-card .art-image {
    aspect-ratio: 3243 / 4952;
  }

  .tool-panel {
    left: 14px;
    right: 14px;
    width: auto;
  }

  .compare-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 50svh));
  }

  .compare-cell .art-image {
    height: calc(50svh - 34px);
  }

  .project-heading {
    min-height: 34svh;
  }
}
