/* cursor — a poem
 * Monochrome, full-bleed layout with mix-blend separators,
 * custom cursor, animated corners and a skewed marquee.
 *
 * Design system is a homage to brunotome.dev. See NOTICE.md.
 * Type: Space Mono (Google Fonts).
 */

@import url("https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;1,700&display=swap");

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */
html,
body {
  background-color: #000;
  cursor: none !important;
}

body {
  margin: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  animation: page-in 0.6s ease-out both;
}

@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media only screen and (max-width: 1100px) {
  html,
  body {
    cursor: default !important;
  }
}

/* ------------------------------------------------------------------ *
 * Browser fallback (shown by JS when feature-detect fails)
 * ------------------------------------------------------------------ */
.ie {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #000;
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.ie-wrapper {
  overflow: hidden;
}

.ie-wrapper span {
  display: block;
}

.ie-wrapper span:first-of-type {
  transform: translateY(-200%) skewX(10deg);
}

.ie-wrapper span:last-of-type {
  transform: translateY(200%) skewX(-15deg);
}

/* ------------------------------------------------------------------ *
 * Custom cursor
 * ------------------------------------------------------------------ */
#cursor {
  position: fixed;
  top: -30px;
  left: -30px;
  width: 60px;
  height: 60px;
  pointer-events: none;
  will-change: transform;
  z-index: 4;
  mix-blend-mode: difference;
}

#cursor .cursor-dot {
  fill: #fff;
}

#cursor .cursor-ring {
  fill: transparent;
  stroke: #fff;
  stroke-width: 1;
  transform-origin: center;
}

@media only screen and (max-width: 1100px) {
  #cursor {
    opacity: 0;
    visibility: hidden;
  }
}

/* ------------------------------------------------------------------ *
 * Marquee separators (top and bottom)
 * ------------------------------------------------------------------ */
.separator {
  position: fixed;
  left: 5vmax;
  width: calc(100vw - 10vmax);
  height: 5vmax;
  background-color: #fff;
  overflow: hidden;
  z-index: 4;
}

@media only screen and (max-width: 780px) {
  .separator {
    left: 5vw;
    width: 90vw;
    height: 5vw;
  }
}

.separator-top {
  top: 0;
  transform: translateY(-100%);
}

.separator-bottom {
  bottom: 0;
  transform: translateY(100%);
}

.separator-mobile {
  display: none;
  -webkit-clip-path: inset(100px 0 0 0);
  clip-path: inset(100px 0 0 0);
}

@media only screen and (max-width: 780px) {
  .separator-mobile {
    position: relative;
    left: auto;
    display: block;
    margin-bottom: 15px;
  }
}

.separator h2 {
  margin: 1.3vw 0 0;
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 2vw;
  line-height: 1.33;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
  transform: translateX(0);
  will-change: transform;
}

.separator h2 span {
  display: inline-block;
}

.separator h2 span:nth-child(odd) {
  transform: skew(20deg);
}

.separator h2 span:nth-child(even) {
  transform: skew(-20deg);
}

/* ------------------------------------------------------------------ *
 * Big diagonal halves (the inverted-color reveal)
 * ------------------------------------------------------------------ */
#root .big-half {
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
  z-index: 5;
}

#root .big-half.right {
  top: 50vh;
  right: -50vw;
  transform: translateX(-150vw) skewX(30deg) scaleY(0.5);
}

#root .big-half.left {
  top: -50vh;
  left: -50vw;
  transform: translateX(150vw) skewX(30deg) scaleY(0.5);
}

@media only screen and (max-width: 1100px) {
  #root .big-half.right,
  #root .big-half.left {
    height: calc(var(--vh, 1vh) * 100);
  }
  #root .big-half.right {
    top: calc(var(--vh, 1vh) * 50);
  }
  #root .big-half.left {
    top: calc(var(--vh, 1vh) * -50);
  }
}

/* ------------------------------------------------------------------ *
 * About overlay + body scroll mask
 * ------------------------------------------------------------------ */
#root .overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  pointer-events: none;
  z-index: 4;
  transform: scaleY(0);
  will-change: transform;
}

@media only screen and (max-width: 1100px) {
  #root .overlay {
    height: calc(var(--vh, 1vh) * 100);
  }
}

#root .about-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: opacity, transform;
}

@media only screen and (max-width: 1100px) {
  #root .about-wrapper {
    height: calc(var(--vh, 1vh) * 100);
  }
}

#root .about-wrapper h1 {
  position: relative;
  margin: 0;
  padding: 5vw;
  color: #fff;
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 6vw;
  line-height: 1.03;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  z-index: 1;
}

@media only screen and (max-width: 780px) {
  #root .about-wrapper h1 {
    font-size: 8vw;
    line-height: 1.085;
  }
}

@media only screen and (max-width: 700px) {
  #root .about-wrapper h1 {
    padding: 2.5vmax;
  }
}

#root .about-wrapper h1 .about-section-line {
  display: block;
  overflow: hidden;
  will-change: transform;
}

#root .about-wrapper h1 .about-section-line div {
  transform: translateY(110%) scaleY(0.95);
}

@media only screen and (max-width: 1100px) {
  #root .about-wrapper h1 .about-section-line div {
    transform: translateY(110%) scaleY(1);
  }
}

#root .about-wrapper h1 a {
  position: relative;
  display: inline-block;
  color: #fff;
  text-decoration: none;
  cursor: none !important;
}

#root .about-wrapper h1 a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  background-color: #fff;
  mix-blend-mode: difference;
  transform: translateY(-50%) scaleY(0.05);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  will-change: transform;
}

@media only screen and (max-width: 1100px) {
  #root .about-wrapper h1 a::after {
    transform: translateY(-50%) scaleY(1);
  }
}

@media (hover: hover) {
  #root .about-wrapper h1 a:hover::after {
    transform: translateY(-50%) scaleY(1);
  }
}

#root .about-wrapper .credits {
  padding-top: 20px;
  overflow: hidden;
}

#root .about-wrapper .credits span {
  display: block;
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
  transform: translateY(200%);
}

#root .about-wrapper .credits span a {
  cursor: pointer !important;
}

#root .about-wrapper .credits span a::after {
  top: auto;
  bottom: 0;
  transform: translateY(0) scaleY(1);
}

@media only screen and (max-width: 320px) {
  #root .about-wrapper .credits span {
    font-size: 13px;
  }
}

/* ------------------------------------------------------------------ *
 * Decorative animated corners + close affordances
 * ------------------------------------------------------------------ */
#root .corner,
#root .close {
  position: fixed;
  width: 5vmax;
  height: 5vmax;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
}

@media only screen and (max-width: 1080px) {
  #root .corner,
  #root .close {
    display: none;
  }
}

#root .corner span,
#root .close span {
  position: absolute;
  display: block;
  background-color: #fff;
  mix-blend-mode: difference;
  will-change: transform, width;
}

#root .corner span.down,
#root .close span.down {
  width: calc(100% - 1.5vw);
  height: 1px;
}

#root .corner span.up,
#root .close span.up {
  height: calc(100% - 1.5vw);
  width: 1px;
}

#root .corner.top,
#root .close.top { top: 0; }

#root .corner.bottom,
#root .close.bottom,
#root .corner.bottom .up,
#root .close.bottom .up,
#root .corner.top .down,
#root .close.top .down { bottom: 0; }

#root .corner.left,
#root .close.left { left: 0; }

#root .corner.right,
#root .close.right,
#root .corner.left .up,
#root .close.left .up,
#root .corner.right .down,
#root .close.right .down { right: 0; }

#root .corner.top.left   { transform: translate3d(-100%, -100%, 0); }
#root .corner.top.right  { transform: translate3d( 100%, -100%, 0); }
#root .corner.bottom.left  { transform: translate3d(-100%,  100%, 0); }
#root .corner.bottom.right { transform: translate3d( 100%,  100%, 0); }

#root .close {
  z-index: 10;
  mix-blend-mode: normal;
  pointer-events: all;
}

#root .close::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: -1;
}

#root .close.bottom.right span { display: none; }

@media only screen and (max-width: 1080px) {
  #root .close.bottom.right {
    display: block;
    width: 50px;
    height: 50px;
    background-color: #000;
    transform: translateY(100%);
  }

  #root .close.bottom.right span { display: block; }

  #root .close.bottom.right span.up {
    height: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: rotate(45deg);
  }

  #root .close.bottom.right span.down {
    width: 100%;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
}

/* ------------------------------------------------------------------ *
 * Project list — skewed SVG titles with hover-stroke animation
 * ------------------------------------------------------------------ */
#root .projects__container {
  padding: 5vw;
  position: relative;
  z-index: 2;
  will-change: transform;
}

#root .projects__container article {
  position: relative;
  margin-bottom: 2.5vmax;
  perspective: 100vmin;
  perspective-origin: bottom;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity, visibility;
}

#root .projects__container article:nth-child(odd) svg {
  transform: skewX(25deg);
}

#root .projects__container article:nth-child(even) svg {
  transform: skewX(-25deg);
}

@media only screen and (max-width: 1100px) {
  #root .projects__container article {
    margin-bottom: 1.5vmax;
  }
}

#root .projects__container article:last-of-type {
  margin-bottom: 0;
}

@media only screen and (max-width: 780px) {
  #root .projects__container article:nth-child(2) {
    margin-top: 9vw;
  }
}

#root .projects__container article a {
  display: block;
  cursor: none;
  text-decoration: none;
}

#root .projects__container article svg {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
}

#root .projects__container article svg text {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-style: italic;
  font-size: 96px;
  fill: #fff;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

@media (hover: hover) {
  #root .projects__container article:hover svg text,
  #root .projects__container article:focus-within svg text {
    fill: transparent;
    stroke: #fff;
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-linejoin: miter;
    stroke-miterlimit: 8;
    animation: trace 2s infinite alternate;
  }
}

@keyframes trace {
  0%   { stroke-dasharray: 100; }
  100% { stroke-dasharray: 50; }
}

/* About-link tile uses the same look as projects */
#root .about-link svg text {
  font-style: normal;
}
