:root {
  --paper: #f3eee6;
  --paper-soft: #f8f4ed;
  --ink: #261f1b;
  --ink-muted: rgba(38, 31, 27, 0.7);
  --accent: #8c6bd6;
  --line: rgba(112, 98, 86, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle, rgba(67, 55, 47, 0.055) 0.7px, transparent 0.8px),
    radial-gradient(circle, rgba(140, 107, 214, 0.05) 0.6px, transparent 0.7px);
  background-size: 15px 15px, 23px 23px;
  background-position: 0 0, 7px 8px;
}

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

body.has-blob-cursor {
  cursor: none;
}

body.has-blob-cursor a,
body.has-blob-cursor button,
body.has-blob-cursor [role="button"] {
  cursor: none;
}

.blob-cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}

.blob-cursor__blob {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(185, 78, 78, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(185, 78, 78, 0.15);
  transition: width 160ms ease, height 160ms ease, border-radius 160ms ease;
}

.blob-cursor__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(185, 78, 78, 0.95);
  border-radius: 50%;
}

.blob-cursor.is-link-hover .blob-cursor__blob {
  border-width: 2px;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 40;
  image-rendering: pixelated;
  opacity: 0.28;
}

.click-spark-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 70;
}

.print-stamp {
  position: absolute;
  width: clamp(88px, 11vw, 142px);
  aspect-ratio: 1;
  border: 1px solid rgba(185, 78, 78, 0.42);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(185, 78, 78, 0.46);
  opacity: 0.56;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.print-stamp::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(185, 78, 78, 0.38);
  border-radius: 50%;
}

.print-stamp--title {
  right: 1.4rem;
  top: -1.3rem;
  transform: rotate(-10deg);
}

.print-stamp--gallery {
  left: -1rem;
  top: -0.8rem;
  transform: rotate(9deg);
}

.project-asset {
  position: absolute;
  margin: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.38;
  mix-blend-mode: multiply;
}

.project-asset img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.16);
}

.project-asset--computer {
  width: clamp(120px, 16vw, 220px);
  right: -0.5rem;
  top: -0.7rem;
  transform: rotate(-5deg);
}

.project-asset--lips {
  width: clamp(130px, 18vw, 240px);
  right: 0.4rem;
  top: -1.1rem;
  transform: rotate(-8deg);
}

.editorial-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--paper-soft);
  background-image:
    radial-gradient(circle, rgba(67, 55, 47, 0.055) 0.7px, transparent 0.8px),
    radial-gradient(circle, rgba(185, 78, 78, 0.04) 0.6px, transparent 0.7px);
  background-size: 15px 15px, 23px 23px;
  background-position: 0 0, 7px 8px;
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.editorial-loader__frame {
  position: absolute;
  inset: clamp(1rem, 3vw, 2.3rem);
  pointer-events: none;
}

.editorial-loader__frame span {
  position: absolute;
  background: rgba(112, 98, 86, 0.5);
}

.editorial-loader__frame span:nth-child(1),
.editorial-loader__frame span:nth-child(2) {
  left: 0;
  right: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left center;
}

.editorial-loader__frame span:nth-child(1) {
  top: 0;
}

.editorial-loader__frame span:nth-child(2) {
  bottom: 0;
}

.editorial-loader__frame span:nth-child(3),
.editorial-loader__frame span:nth-child(4) {
  top: 0;
  bottom: 0;
  width: 1px;
  transform: scaleY(0);
  transform-origin: top center;
}

.editorial-loader__frame span:nth-child(3) {
  left: 0;
}

.editorial-loader__frame span:nth-child(4) {
  right: 0;
}

.editorial-loader__center {
  position: relative;
  text-align: center;
}

.editorial-loader__micro {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(38, 31, 27, 0.62);
  opacity: 0;
  transform: translateY(8px);
}

.editorial-loader__monogram {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.08em;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-transform: uppercase;
}

.editorial-loader__monogram span {
  opacity: 0;
  transform: translateY(16px);
}

.editorial-loader__seal {
  width: clamp(74px, 9vw, 108px);
  aspect-ratio: 1;
  margin: 0.4rem auto 0;
  border: 1px solid rgba(185, 78, 78, 0.52);
  border-radius: 50%;
  padding: 0.42rem;
  opacity: 0;
  transform: scale(0.92) rotate(-6deg);
}

.editorial-loader__seal img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: grayscale(0.26) contrast(0.92);
  opacity: 0.46;
}

body.is-loading .editorial-loader__frame span:nth-child(1) {
  animation: frame-x 420ms ease forwards;
}

body.is-loading .editorial-loader__frame span:nth-child(2) {
  animation: frame-x 420ms ease 90ms forwards;
}

body.is-loading .editorial-loader__frame span:nth-child(3) {
  animation: frame-y 420ms ease 190ms forwards;
}

body.is-loading .editorial-loader__frame span:nth-child(4) {
  animation: frame-y 420ms ease 240ms forwards;
}

body.is-loading .editorial-loader__micro {
  animation: loader-fade-up 360ms ease 300ms forwards;
}

body.is-loading .editorial-loader__monogram span:nth-child(1) {
  animation: loader-fade-up 420ms ease 360ms forwards;
}

body.is-loading .editorial-loader__monogram span:nth-child(2) {
  animation: loader-fade-up 420ms ease 460ms forwards;
}

body.is-loading .editorial-loader__seal {
  animation: loader-seal 620ms cubic-bezier(0.22, 1, 0.36, 1) 470ms forwards;
}

body.is-leaving .editorial-loader {
  opacity: 1;
  visibility: visible;
}

body.is-loaded .editorial-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes frame-x {
  to {
    transform: scaleX(1);
  }
}

@keyframes frame-y {
  to {
    transform: scaleY(1);
  }
}

@keyframes loader-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loader-seal {
  0% {
    opacity: 0;
    transform: scale(0.92) rotate(-6deg);
  }

  65% {
    opacity: 1;
    transform: scale(1.02) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.startup-loader {
  display: none;
}

.startup-reveal {
  opacity: 0;
  transform: translateY(10px);
}

body.is-ready .startup-reveal {
  animation: startupReveal 320ms ease forwards;
}

body.is-ready .startup-reveal--preview {
  animation-delay: 0.03s;
}

body.is-ready .startup-reveal--wave {
  animation-delay: 0.06s;
}

body.is-ready .startup-reveal--title {
  animation-delay: 0.09s;
}

.project-page {
  width: min(96vw, 1320px);
  min-height: 100vh;
  margin: 1.2rem auto;
  padding: 1.2rem 1.5rem 2.1rem;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  position: relative;
  overflow: hidden;
}

.project-page::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 78, 78, 0.22);
  pointer-events: none;
}

.project-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-topbar > span {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
}

.project-topbar__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.project-topbar__links a,
.project-open {
  transition: color 120ms ease;
}

.project-topbar__links a:hover,
.project-open:hover {
  color: var(--accent);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2.3rem;
  padding: 1.9rem 2.5vw 0.8rem;
}

.project-copy__meta {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-copy h1 {
  margin: 0;
  max-width: 18ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.7rem, 3.1vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.project-copy__lead {
  margin: 0.75rem 0 0;
  max-width: 36ch;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.project-open {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-preview {
  display: flex;
  justify-content: flex-end;
}

.project-preview__card {
  width: min(100%, 330px);
  aspect-ratio: 0.95 / 1;
  border: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  background:
    repeating-linear-gradient(
      164deg,
      rgba(20, 17, 14, 0.14) 0 1px,
      rgba(0, 0, 0, 0) 1px 3px
    ),
    repeating-linear-gradient(
      10deg,
      rgba(20, 17, 14, 0.07) 0 1px,
      rgba(0, 0, 0, 0) 1px 4px
    ),
    #e7dfd2;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.project-preview__paper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 1.15rem 1.15rem 1rem;
}

.project-preview__micro {
  margin: 0;
  color: rgba(38, 31, 27, 0.68);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-preview__paper h3 {
  margin: 1rem 0 1.15rem;
  max-width: 8ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-preview__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(112, 98, 86, 0.32);
}

.project-preview__list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.72rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(112, 98, 86, 0.22);
  color: var(--ink-muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.project-preview__list span {
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-preview:hover .project-preview__card {
  border-color: rgba(185, 78, 78, 0.68);
  background-color: #e9decd;
}

.project-titleband {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0;
}

.project-badge {
  position: absolute;
  left: 36%;
  top: -1.05rem;
  transform: translateX(-50%);
}

.project-badge__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(185, 78, 78, 0.28);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(248, 244, 237, 0.72);
}

.project-titleband h2 {
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.9rem, 8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-titleband__brand {
  display: block;
}

.project-titleband__system {
  margin-bottom: 1.05em;
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.66rem, 1.1vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(38, 31, 27, 0.66);
}

.project-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  padding: 1.2rem 0 0;
}

.kicker {
  margin: 0 0 0.58rem;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-details p {
  margin: 0;
  max-width: 30ch;
  line-height: 1.52;
  color: var(--ink-muted);
}

.project-gallery {
  position: relative;
  padding: 2.2rem 0 0;
}

.project-gallery__intro {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  padding-bottom: 1rem;
  border-top: 1px solid var(--line);
}

.project-gallery__intro h3 {
  margin: 0;
  max-width: 26ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.3rem, 2vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "a a a a a a a a b b b b"
    "a a a a a a a a b b b b"
    "c c c c d d d d d d d d"
    "c c c c d d d d d d d d";
  grid-auto-rows: minmax(130px, 13vw);
  gap: 0;
  margin-inline: -1.5rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ece3d4;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 240ms ease, transform 240ms ease, filter 140ms ease;
}

.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  filter: opacity(0.95);
}

.gallery-item--text {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(236, 227, 212, 0.76)),
    linear-gradient(135deg, rgba(185, 78, 78, 0.05), rgba(38, 31, 27, 0.02));
}

.gallery-item__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 1.2rem 1.15rem 1rem;
}

.gallery-item__index {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-item__body h4 {
  margin: 0 0 0.58rem;
  max-width: 12ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.gallery-item__body p {
  margin: 0;
  max-width: 30ch;
  color: var(--ink-muted);
  line-height: 1.55;
}

.gallery-item__body code {
  padding: 0 0.2em;
  font-family: inherit;
  font-size: 0.95em;
  color: var(--ink);
  background: rgba(185, 78, 78, 0.08);
}

.gallery-item__meta {
  display: inline-block;
  margin-top: 1rem;
  color: rgba(38, 31, 27, 0.58);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-item:nth-child(1) {
  grid-area: a;
}

.gallery-item:nth-child(2) {
  grid-area: b;
}

.gallery-item:nth-child(3) {
  grid-area: c;
}

.gallery-item:nth-child(4) {
  grid-area: d;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.38) brightness(1.07) sepia(0.26);
  mix-blend-mode: multiply;
}

@keyframes startupReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .project-topbar,
  .project-hero,
  .project-details,
  .project-gallery__intro {
    grid-template-columns: 1fr;
  }

  .project-topbar__links {
    justify-content: flex-start;
  }

  .project-hero {
    gap: 1.4rem;
    padding: 1.3rem 0 0.5rem;
  }

  .project-preview {
    justify-content: flex-start;
  }

  .project-badge {
    left: 52%;
    top: -0.85rem;
  }

  .project-titleband__system {
    margin-bottom: 0;
  }

  .project-asset--computer,
  .project-asset--lips {
    width: clamp(90px, 28vw, 140px);
    right: 0.4rem;
  }

  .project-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "a a"
      "b c"
      "d d";
    grid-auto-rows: minmax(170px, 42vw);
  }

  .print-stamp--title {
    right: 0.6rem;
    top: -1rem;
  }

  .print-stamp--gallery {
    left: auto;
    right: 0.6rem;
    top: -0.7rem;
  }

  .project-asset--computer,
  .project-asset--lips {
    display: none;
  }
}

@media (max-width: 720px) {
  .project-page {
    width: 100%;
    margin: 0;
    border-left: none;
    border-right: none;
    padding: 1rem 1rem 1.8rem;
  }

  .project-page::before {
    inset: 0;
    border-left: none;
    border-right: none;
  }

}

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