@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@300;400;500;600&display=swap");

:root {
  color-scheme: dark;
  --ink: #f1eee8;
  --muted: #96938e;
  --red: #ef382f;
  --black: #080808;
  --line: rgba(255, 255, 255, 0.16);
  font-family: "Manrope", Arial, sans-serif;
  background: var(--black);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(118deg, transparent 0 43%, rgba(239, 56, 47, 0.065) 43.1% 43.3%, transparent 43.45%),
    radial-gradient(circle at 72% 30%, rgba(181, 38, 38, 0.2), transparent 33rem),
    radial-gradient(circle at 8% 78%, rgba(83, 94, 109, 0.18), transparent 42rem),
    radial-gradient(circle at 96% 94%, rgba(119, 25, 34, 0.2), transparent 36rem),
    radial-gradient(circle at 24% 14%, rgba(103, 16, 22, 0.11), transparent 27rem),
    linear-gradient(145deg, #171a20 0%, #0d0f12 44%, #1d0d11 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.045;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

.cover {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(560px, 1fr) auto;
  min-height: 100svh;
  padding: 28px clamp(22px, 4vw, 64px) 24px;
  overflow: hidden;
}

.cover::before {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.cover::before {
  inset: 0;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: clamp(54px, 6vw, 88px) clamp(54px, 6vw, 88px);
  mask-image: radial-gradient(ellipse 70% 65% at 70% 45%, black 4%, transparent 76%);
}

.background-accents {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.background-accents::before,
.background-accents::after {
  position: absolute;
  content: "";
}

.background-accents::before {
  left: 24%;
  top: 8%;
  width: 52vw;
  height: 76vh;
  border-radius: 48% 52% 38% 62%;
  background: radial-gradient(ellipse, rgba(89, 39, 45, 0.34), rgba(31, 24, 28, 0.13) 58%, transparent 74%);
  filter: blur(28px);
  transform: rotate(-12deg);
}

.background-accents::after {
  left: -7%;
  bottom: 5%;
  width: 41vw;
  height: 31vh;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: linear-gradient(135deg, rgba(78, 39, 45, 0.34), rgba(28, 17, 21, 0.18));
  clip-path: polygon(0 22%, 76% 0, 100% 68%, 18% 100%);
  transform: rotate(-7deg);
}

.accent {
  position: absolute;
  display: block;
}

.accent-slab {
  right: 3%;
  top: 7%;
  width: clamp(90px, 11vw, 180px);
  height: clamp(210px, 34vh, 390px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(155deg, rgba(59, 65, 76, 0.42), rgba(20, 22, 27, 0.2));
  clip-path: polygon(38% 0, 100% 13%, 63% 100%, 0 84%);
  transform: rotate(13deg);
  filter: blur(0.2px);
}

.ambient-polygon {
  --polygon-angle: 0deg;
  position: absolute;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.075),
    rgba(20, 22, 26, 0.62) 24%,
    rgba(2, 3, 4, 0.88) 51%,
    rgba(122, 23, 28, 0.48) 67%,
    rgba(30, 33, 38, 0.5) 78%,
    rgba(255, 255, 255, 0.055)
  );
  background-size: 240% 240%;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055), 0 26px 80px rgba(0, 0, 0, 0.24);
  opacity: 0.5;
  filter: blur(0.15px);
  transform: rotate(var(--polygon-angle));
  animation:
    polygon-shimmer 13s ease-in-out infinite alternate,
    polygon-drift 24s ease-in-out infinite alternate;
}

.ambient-polygon::after {
  position: absolute;
  inset: -35%;
  content: "";
  background: linear-gradient(
    105deg,
    transparent 34%,
    rgba(255, 255, 255, 0.025) 43%,
    rgba(239, 56, 47, 0.16) 50%,
    rgba(121, 29, 31, 0.07) 57%,
    transparent 66%
  );
  transform: translate3d(-78%, 18%, 0) rotate(7deg);
  animation: polygon-glint 9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.ambient-polygon-one {
  --polygon-angle: -11deg;
  top: 18%;
  left: 8%;
  width: clamp(150px, 19vw, 310px);
  height: clamp(210px, 31vh, 390px);
  clip-path: polygon(16% 0, 100% 23%, 73% 100%, 0 68%);
}

.ambient-polygon-two {
  --polygon-angle: 8deg;
  right: 12%;
  bottom: 8%;
  width: clamp(190px, 25vw, 410px);
  height: clamp(130px, 22vh, 260px);
  clip-path: polygon(24% 0, 100% 18%, 82% 100%, 0 74%);
  animation-delay: -4s, -13s;
  animation-duration: 17s, 29s;
}

.ambient-polygon-two::after {
  animation-delay: -5s;
  animation-duration: 12s;
}

.ambient-polygon-three {
  --polygon-angle: -4deg;
  left: 38%;
  bottom: -5%;
  width: clamp(180px, 22vw, 360px);
  height: clamp(180px, 29vh, 340px);
  clip-path: polygon(50% 0, 100% 75%, 18% 100%, 0 28%);
  animation-delay: -8s, -6s;
  animation-duration: 19s, 31s;
}

.ambient-polygon-three::after {
  animation-delay: -8s;
  animation-duration: 14s;
}

.ambient-polygon-four {
  --polygon-angle: 17deg;
  top: 7%;
  right: 34%;
  width: clamp(100px, 13vw, 210px);
  height: clamp(120px, 18vh, 220px);
  clip-path: polygon(38% 0, 100% 42%, 64% 100%, 0 71%, 8% 17%);
  animation-delay: -11s, -19s;
  animation-duration: 15s, 27s;
}

.ambient-polygon-four::after {
  animation-delay: -3s;
  animation-duration: 11s;
}

.ambient-polygon-five {
  --polygon-angle: -23deg;
  top: 48%;
  left: 1%;
  width: clamp(90px, 11vw, 180px);
  height: clamp(120px, 18vh, 220px);
  clip-path: polygon(15% 12%, 82% 0, 100% 71%, 46% 100%, 0 58%);
  animation-delay: -6s, -10s;
  animation-duration: 16s, 26s;
}

.ambient-polygon-six {
  --polygon-angle: 12deg;
  top: 33%;
  right: 1%;
  width: clamp(120px, 15vw, 250px);
  height: clamp(170px, 25vh, 300px);
  clip-path: polygon(42% 0, 100% 31%, 79% 100%, 0 82%, 9% 19%);
  animation-delay: -13s, -3s;
  animation-duration: 21s, 34s;
}

.ambient-polygon-seven {
  --polygon-angle: 5deg;
  top: -4%;
  left: 17%;
  width: clamp(120px, 16vw, 270px);
  height: clamp(100px, 16vh, 190px);
  clip-path: polygon(9% 23%, 72% 0, 100% 61%, 56% 100%, 0 76%);
  animation-delay: -2s, -16s;
  animation-duration: 14s, 28s;
}

.ambient-polygon-eight {
  --polygon-angle: -8deg;
  right: 25%;
  bottom: 18%;
  width: clamp(100px, 13vw, 220px);
  height: clamp(90px, 14vh, 170px);
  clip-path: polygon(25% 0, 100% 28%, 69% 100%, 0 63%);
  animation-delay: -10s, -22s;
  animation-duration: 18s, 32s;
}

.ambient-polygon-five::after { animation-delay: -7s; }
.ambient-polygon-six::after { animation-delay: -10s; }
.ambient-polygon-seven::after { animation-delay: -2s; }
.ambient-polygon-eight::after { animation-delay: -12s; }

.masthead,
footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: lowercase;
}

.wordmark {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-decoration: none;
}

.location {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.location span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.1fr) minmax(220px, 0.55fr);
  align-items: center;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.hero::before {
  position: absolute;
  inset: 12% -14% 10% 31%;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  content: "";
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 42%),
    linear-gradient(160deg, rgba(42, 45, 52, 0.38), rgba(10, 10, 12, 0.08));
  clip-path: polygon(15% 0, 100% 0, 84% 100%, 0 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.065), -30px 30px 90px rgba(0, 0, 0, 0.12);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.project-index,
.project-meta,
footer {
  font-family: "DM Mono", monospace;
  text-transform: lowercase;
}

h1 {
  margin: 0;
  font-size: clamp(54px, 6.6vw, 112px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.07em;
}

h1 em {
  display: inline-block;
  margin-left: clamp(22px, 5vw, 86px);
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1px rgba(241, 238, 232, 0.68);
}

.intro {
  max-width: 370px;
  margin: 38px 0 0;
  padding-left: 48px;
  color: var(--muted);
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 300;
  line-height: 1.7;
}

.intro::before {
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 20px 4px -48px;
  content: "";
  background: var(--red);
}

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(55vw, 730px);
  justify-self: center;
  margin-left: -12%;
  animation: reveal 1.2s 0.12s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.hero-art img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  filter: drop-shadow(0 32px 45px rgba(0, 0, 0, 0.55));
}

.vertical-label {
  position: absolute;
  right: 1%;
  bottom: 18%;
  color: #77736f;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

.project-card {
  position: relative;
  left: clamp(14px, 2vw, 28px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-self: end;
  min-height: 250px;
  margin-bottom: 9vh;
  padding: 24px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 220ms ease, transform 220ms ease;
  animation: rise 0.9s 0.25s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.project-card::before {
  position: absolute;
  inset: -1px 0;
  z-index: -1;
  content: "";
  background: var(--red);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--red);
  outline: none;
  transform: translateY(-5px);
}

.project-card:hover::before,
.project-card:focus-visible::before {
  transform: scaleY(1);
}

.project-index,
.project-meta {
  font-size: 9px;
  letter-spacing: 0.1em;
}

.project-index {
  color: var(--muted);
}

.project-title {
  margin: auto 0;
  font-size: clamp(22px, 2.15vw, 34px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.project-meta b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 300;
}

.project-card:hover .project-index,
.project-card:hover .project-meta,
.project-card:focus-visible .project-index,
.project-card:focus-visible .project-meta {
  color: var(--ink);
}

footer {
  color: #65625e;
  justify-content: flex-end;
}

footer p {
  margin: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes polygon-shimmer {
  0%, 24% {
    background-position: 0% 30%;
    opacity: 0.38;
    filter: brightness(0.82) blur(0.15px);
  }
  52% {
    background-position: 100% 70%;
    opacity: 0.58;
    filter: brightness(1.16) blur(0.15px);
  }
  76%, 100% {
    background-position: 20% 100%;
    opacity: 0.44;
    filter: brightness(0.9) blur(0.15px);
  }
}

@keyframes polygon-glint {
  0%, 22% {
    opacity: 0;
    transform: translate3d(-78%, 18%, 0) rotate(7deg);
  }
  38% {
    opacity: 0.72;
  }
  56% {
    opacity: 0;
    transform: translate3d(78%, -18%, 0) rotate(7deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(78%, -18%, 0) rotate(7deg);
  }
}

@keyframes polygon-drift {
  from {
    transform: rotate(calc(var(--polygon-angle) - 2deg)) translate3d(-3px, 2px, 0) scale(0.985);
  }
  to {
    transform: rotate(calc(var(--polygon-angle) + 2.5deg)) translate3d(4px, -3px, 0) scale(1.015);
  }
}

@media (max-width: 900px) {
  .cover {
    grid-template-rows: auto auto auto;
    min-height: 100svh;
  }

  .hero {
    grid-template-columns: 1fr 0.65fr;
    padding: 70px 0 60px;
  }

  .hero-copy {
    z-index: 2;
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .hero-art {
    grid-column: 1 / -1;
    grid-row: 1 / 3;
    width: min(82vw, 650px);
    margin: 90px -24% -80px 0;
    justify-self: end;
    opacity: 0.78;
  }

  .project-card {
    grid-column: 2;
    grid-row: 2;
    min-height: 210px;
    margin: 100px 0 0;
  }
}

@media (max-width: 600px) {
  .cover {
    grid-template-rows: auto 1fr auto;
    padding: 20px clamp(16px, 5vw, 24px) 18px;
  }

  .masthead {
    gap: 16px;
  }

  .wordmark {
    font-size: 13px;
    letter-spacing: 0.22em;
  }

  .location {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: clamp(48px, 12vh, 82px) 0 34px;
  }

  .hero::before {
    inset: 25% -32% 23% 8%;
    opacity: 0.65;
  }

  .accent-slab {
    right: -8%;
    top: 17%;
    opacity: 0.72;
  }

  .ambient-polygon-one {
    left: -18%;
    opacity: 0.16;
  }

  .ambient-polygon-two {
    right: -24%;
    opacity: 0.32;
  }

  .ambient-polygon-three {
    left: 20%;
    bottom: 2%;
    opacity: 0.24;
  }

  .ambient-polygon-four {
    right: 7%;
  }

  .ambient-polygon-five,
  .ambient-polygon-seven {
    display: none;
  }

  .ambient-polygon-six {
    right: -18%;
    opacity: 0.3;
  }

  .ambient-polygon-eight {
    right: 3%;
    bottom: 24%;
    opacity: 0.24;
  }

  h1 {
    font-size: clamp(48px, 15.5vw, 68px);
    line-height: 0.9;
  }

  h1 em {
    margin-left: clamp(18px, 10vw, 42px);
  }

  .intro {
    max-width: 290px;
    margin-top: 24px;
    padding-left: 38px;
    font-size: 12px;
    line-height: 1.55;
  }

  .intro::before {
    width: 22px;
    margin-right: 16px;
    margin-left: -38px;
  }

  .hero-art {
    position: relative;
    width: min(108vw, 480px);
    max-width: none;
    margin: -8px auto -22px;
    align-self: center;
    opacity: 0.9;
  }

  .hero-art img {
    filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.52));
  }

  .vertical-label {
    right: 8%;
    bottom: 20%;
    font-size: 7px;
  }

  .project-card {
    left: 0;
    width: 100%;
    max-width: 360px;
    min-height: 154px;
    margin: 0 0 26px auto;
    padding: 18px;
    background: rgba(8, 8, 8, 0.58);
    backdrop-filter: blur(12px);
  }

  .project-title {
    font-size: clamp(24px, 8vw, 30px);
  }

  footer {
    font-size: 8px;
  }
}

@media (max-width: 360px) {
  .location {
    gap: 7px;
    font-size: 7px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-art {
    width: 112vw;
  }

  .project-card {
    min-height: 146px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
