:root {
  --bg: #ffffff;
  --ink: #0d0e0e;
  --grid: #eeeeee;
  --cyan: #36c5f0;
  --yellow: #ecb22e;
  --green: #2eb67d;
  --pink: #e01e5a;
  --brown: #522e29;
  --paper: #f9dfa0;
  --line: #111212;
  --mono: "DM Mono", "Fragment Mono", monospace;
  --hand: "Just Me Again Down Here", cursive;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
  font-family: var(--mono);
  font-size: 14px;
  overflow-x: hidden;
}

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

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  height: 49px;
  border-bottom: 1px solid #cfcfcf;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.logo-link {
  display: grid;
  width: 67px;
  place-items: center;
  border-right: 1px solid #cfcfcf;
}

.logo {
  width: 34px;
  height: 23px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 3.2;
}

.desktop-nav {
  display: flex;
}

.desktop-nav a,
.contact-btn,
.mobile-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  height: 49px;
  padding: 0 17px;
  border-right: 1px solid #cfcfcf;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.desktop-nav a.active {
  background: var(--cyan);
}

.desktop-nav a {
  transition: background 160ms ease, box-shadow 160ms ease;
}

.desktop-nav a:hover {
  box-shadow: inset 0 -4px 0 var(--ink);
}

.nav-icon,
.heart {
  position: relative;
  width: 15px;
  height: 15px;
  display: inline-block;
}

.home-icon::before {
  content: "";
  position: absolute;
  inset: 3px 2px 1px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 40%, 100% 100%, 15% 100%, 15% 45%);
}

.spark-icon::before,
.spark-icon::after {
  content: "";
  position: absolute;
  inset: 6px 0;
  background: var(--ink);
}

.spark-icon::after {
  transform: rotate(90deg);
}

.case-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--ink);
  clip-path: polygon(0 15%, 100% 15%, 100% 85%, 0 85%, 20% 50%);
}

.block-icon::before {
  content: "";
  position: absolute;
  inset: 8px 2px 2px 3px;
  background: var(--ink);
  box-shadow: 5px -5px 0 var(--ink);
}

.heart::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--ink);
  clip-path: polygon(50% 88%, 12% 48%, 12% 25%, 32% 18%, 50% 31%, 68% 18%, 88% 25%, 88% 48%);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 17px;
}

.bubble-mini {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: #f1f1f1;
  font-size: 11px;
  font-weight: 700;
}

.contact-btn {
  min-width: 116px;
  height: 35px;
  border: 1px solid var(--ink);
  justify-content: center;
  padding: 0 12px;
}

.mobile-menu,
.mobile-nav {
  display: none;
}

.hero-section {
  position: relative;
  min-height: 1265px;
  padding-top: 49px;
}

.speech-bubble {
  position: sticky;
  top: 50vh;
  z-index: 2;
  width: max-content;
  margin: 460px auto 0;
  padding: 14px 18px 15px;
  border: 3px solid var(--line);
  border-radius: 0 18px 18px;
  background: var(--cyan);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  transform-origin: 18% 18%;
  will-change: transform;
}

.curve-line {
  position: absolute;
  left: -3vw;
  right: -3vw;
  bottom: -115px;
  height: 260px;
  border-top: 2px solid #bfbfbf;
  border-radius: 50% 50% 0 0;
  transform: rotate(-1deg);
  will-change: transform;
}

.about-section {
  position: relative;
  min-height: 1900px;
  padding: 130px 7vw 0;
}

.about-curve-img {
  position: absolute;
  top: -185px;
  left: 50%;
  width: min(1320px, 115vw);
  height: 135px;
  object-fit: fill;
  opacity: 0.86;
  transform: translateX(-50%) rotate(-1deg);
  pointer-events: none;
}

.hand-note {
  font-family: var(--hand);
  font-size: 28px;
  line-height: 1;
}

.note-left {
  position: absolute;
  top: 45px;
  left: 15vw;
  transform: rotate(12deg);
}

.tilted-label {
  position: absolute;
  top: 150px;
  left: 50%;
  padding: 9px 16px;
  border: 3px solid var(--ink);
  background: var(--bg);
  box-shadow:
    -10px -10px 0 -8px var(--bg),
    -10px -10px 0 -6px var(--ink),
    10px 10px 0 -8px var(--bg),
    10px 10px 0 -6px var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 38px;
  font-weight: 700;
  transform: translateX(-50%) rotate(-8deg);
}

.polaroid {
  position: absolute;
  width: 155px;
  margin: 0;
  padding: 12px 12px 35px;
  background: #fff;
  box-shadow: 0 24px 28px rgba(0, 0, 0, 0.14);
  will-change: transform;
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.polaroid figcaption {
  position: absolute;
  bottom: 9px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--hand);
  font-size: 22px;
}

.polaroid-left {
  top: 320px;
  left: 5vw;
  transform: rotate(11deg);
}

.polaroid-right {
  top: 325px;
  right: 5vw;
  transform: rotate(-14deg);
}

.hero-intro {
  position: relative;
  top: 500px;
  max-width: 1080px;
  margin: 0 auto;
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: clamp(40px, 4.8vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
  transform-origin: center;
}

.inline-asset {
  display: inline-flex;
  height: 1em;
  align-items: center;
  margin: 0 0.08em;
  vertical-align: -0.13em;
  transform-origin: center;
}

.inline-asset img {
  display: block;
  width: auto;
  height: 1.03em;
  object-fit: contain;
}

.skill-wall {
  position: relative;
  top: 800px;
  display: grid;
  justify-content: center;
  gap: 10px;
}

.row {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.skill {
  display: inline-flex;
  height: 58px;
  align-items: center;
  padding: 0 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  transform-origin: center;
  will-change: transform;
}

.skill.yellow,
.stamp.yellow-stamp {
  background: var(--yellow);
}

.skill.green {
  background: var(--green);
}

.skill.pink {
  background: var(--pink);
  color: #fff;
}

.skill.blue,
.stamp.dots {
  background: var(--cyan);
}

.stamp {
  position: relative;
  width: 62px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  transform-origin: center;
  will-change: transform;
}

.yellow-stamp {
  outline: 3px dashed var(--ink);
  outline-offset: -7px;
}

.yellow-stamp i {
  width: 28px;
  height: 28px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.flower {
  background: var(--green);
}

.flower::before {
  content: "";
  width: 52px;
  height: 52px;
  background: var(--ink);
  clip-path: polygon(45% 0, 55% 0, 58% 35%, 100% 18%, 100% 30%, 65% 52%, 100% 75%, 92% 86%, 56% 64%, 55% 100%, 43% 100%, 42% 64%, 8% 88%, 0 75%, 35% 52%, 0 30%, 0 18%, 42% 35%);
  animation: spin 18s linear infinite;
}

.flower i {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pink);
}

.eye {
  background: #fff;
}

.eye::before {
  content: "";
  width: 42px;
  height: 30px;
  background: var(--pink);
  clip-path: ellipse(50% 36% at 50% 50%);
}

.eye i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.dots::before,
.dots::after,
.dots i {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
}

.dots::before {
  top: 9px;
  left: 11px;
}

.dots::after {
  right: 10px;
  bottom: 9px;
}

.dots i {
  right: 13px;
  top: 15px;
}

.explore {
  position: absolute;
  top: 1390px;
  left: 50%;
  text-align: center;
  transform: translateX(-50%) rotate(-5deg);
}

.explore::after {
  content: "";
  display: block;
  width: 82px;
  height: 15px;
  margin: -2px auto 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-2deg);
}

.sticky-note {
  position: absolute;
  top: 1625px;
  left: 50%;
  width: 300px;
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 16px 22px;
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.22;
  transform: translateX(-50%) rotate(-3deg);
  will-change: transform;
}

.projects {
  display: grid;
  gap: 126px;
  width: min(1250px, calc(100% - 10vw));
  margin: 0 auto 190px;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.05fr);
  min-height: 780px;
  padding: 24px 24px 24px 16px;
  gap: 24px;
  border: 0 solid transparent;
  transform-origin: center top;
  will-change: transform;
}

.project-card.cyan {
  background: var(--cyan);
}

.project-card.black {
  background: var(--ink);
  color: #fff;
}

.project-card.yellow {
  background: var(--yellow);
}

.project-card.magenta {
  background: var(--pink);
  color: #fff;
}

.folder-tab {
  position: absolute;
  top: -1px;
  left: 0;
  width: 285px;
  height: 70px;
  background: inherit;
  clip-path: polygon(0 0, 82% 0, 100% 100%, 0 100%);
}

.folder-tab.center {
  left: 38%;
  transform: translateX(-50%);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.project-meta {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  padding: 6px 0 4px;
  min-height: 100%;
  font-weight: 700;
  text-transform: uppercase;
}

.project-meta p {
  margin: 0 0 58px;
}

.pixel-corner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;
  background: var(--ink);
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 0 100%, 0 60%, 60% 60%);
}

.pixel-corner.white {
  background: #fff;
}

.dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 16px;
  border-radius: 50%;
  background: var(--ink);
  vertical-align: -1px;
}

.dot.white {
  background: #fff;
}

.project-meta a {
  width: max-content;
  border-bottom: 1px solid currentColor;
  padding-bottom: 8px;
  transition: transform 160ms ease, letter-spacing 160ms ease;
}

.project-meta a:hover {
  letter-spacing: 0.04em;
  transform: translateX(5px);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-self: end;
}

.tags span,
.selected-frame figcaption {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 43px;
  padding: 0 14px;
  background: var(--ink);
  color: var(--cyan);
}

.black .tags span,
.magenta .tags span {
  background: #fff;
  color: var(--ink);
}

.magenta .tags span {
  color: var(--pink);
}

.tags span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-top: 13px solid currentColor;
  border-right: 13px solid transparent;
  opacity: 0.98;
}

.selected-frame {
  position: relative;
  z-index: 1;
  align-self: end;
  margin: 0;
  border: 3px solid currentColor;
  min-height: 640px;
  background: #ddd;
  overflow: visible;
  transition: transform 220ms cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}

.selected-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 640px;
  object-fit: cover;
  transform-origin: center;
  transition: filter 220ms ease, transform 420ms cubic-bezier(0.19, 1, 0.22, 1);
}

.selected-frame figcaption {
  position: absolute;
  top: 23px;
  right: 23px;
  color: currentColor;
  background: #fff;
  gap: 8px;
}

.cyan .selected-frame figcaption,
.yellow .selected-frame figcaption {
  background: var(--ink);
}

.cyan .selected-frame figcaption {
  color: var(--cyan);
}

.yellow .selected-frame figcaption {
  color: var(--yellow);
}

.black .selected-frame figcaption {
  color: var(--ink);
}

.magenta .selected-frame figcaption {
  color: var(--pink);
}

.selected-frame figcaption span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  background: currentColor;
  color: #fff;
  font-size: 10px;
}

.cyan .selected-frame figcaption span,
.yellow .selected-frame figcaption span {
  color: var(--ink);
}

.handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid currentColor;
  background: #fff;
}

.tl {
  top: -10px;
  left: -10px;
}

.tr {
  top: -10px;
  right: -10px;
}

.bl {
  bottom: -10px;
  left: -10px;
}

.br {
  right: -10px;
  bottom: -10px;
}

.playground {
  width: min(1020px, calc(100% - 10vw));
  min-height: 520px;
  margin: 0 auto 110px;
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(260px, 1fr);
  align-items: center;
  gap: 130px;
}

.blob {
  position: relative;
  width: 380px;
  aspect-ratio: 1;
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 49% 51% 45% 55% / 42% 48% 52% 58%;
  transform: rotate(18deg);
}

.blob::before,
.blob::after {
  content: "";
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 50%;
  z-index: -1;
}

.blob::before {
  top: -8%;
  left: 3%;
}

.blob::after {
  right: -7%;
  bottom: 7%;
}

.blob span {
  position: absolute;
  top: 46%;
  width: 28px;
  height: 54px;
  border-radius: 14px;
  background: var(--ink);
  transform: rotate(-18deg);
}

.blob span:first-child {
  left: 43%;
}

.blob span:last-child {
  left: 57%;
}

.playground p {
  max-width: 520px;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.contact-panel {
  width: min(1250px, calc(100% - 10vw));
  min-height: 760px;
  display: grid;
  place-items: center;
  margin: 0 auto 130px;
  border-radius: 28px;
  background: var(--brown);
  overflow: hidden;
  will-change: transform;
}

.contact-sticker {
  display: inline-flex;
  padding: 20px 32px 18px;
  border: 4px solid var(--ink);
  background: var(--cyan);
  box-shadow: 0 0 0 0 var(--ink);
  font-family: "Fragment Mono", var(--mono);
  font-size: clamp(54px, 9vw, 104px);
  font-weight: 700;
  line-height: 0.85;
  text-transform: uppercase;
  transform: rotate(-8deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.contact-sticker:hover {
  transform: rotate(-5deg) scale(1.03);
  box-shadow: 10px 10px 0 var(--ink);
}

.bottom-ruler {
  position: fixed;
  z-index: 12;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  height: 26px;
  padding: 0 0 0;
  color: #aaa;
  font-size: 10px;
  pointer-events: none;
}

.bottom-ruler span {
  position: relative;
  min-width: 32px;
}

.bottom-ruler span::before {
  content: "";
  display: block;
  width: 1px;
  height: 10px;
  margin-bottom: 2px;
  background: #bbb;
}

.cursor-dot {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(54, 197, 240, 0.82);
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 160ms ease, height 160ms ease, opacity 160ms ease, background 160ms ease;
}

.cursor-dot.active {
  width: 42px;
  height: 42px;
  background: rgba(236, 178, 46, 0.72);
}

.is-dragging .selected-frame {
  transition-duration: 80ms;
}

.motion-ready .speech-bubble,
.motion-ready .note-left,
.motion-ready .tilted-label,
.motion-ready .polaroid,
.motion-ready .hero-intro,
.motion-ready .inline-asset,
.motion-ready .skill,
.motion-ready .stamp,
.motion-ready .explore,
.motion-ready .sticky-note,
.motion-ready .project-card,
.motion-ready .playground,
.motion-ready .contact-panel {
  will-change: transform, opacity;
}

.reveal-pop {
  animation: popIn 620ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.reveal-card {
  opacity: 1;
  transform: translateY(0) rotate(0.001deg);
  transition: opacity 540ms ease, transform 640ms cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-card.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.86);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot {
    display: none;
  }
}

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

  .cursor-dot {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    background-size: 76px 76px;
  }

  .topbar {
    grid-template-columns: 63px 1fr auto;
  }

  .desktop-nav,
  .top-actions {
    display: none;
  }

  .logo-link {
    width: 63px;
  }

  .mobile-menu {
    display: inline-flex;
    grid-column: 3;
    min-width: 107px;
    margin: 8px 14px 7px 0;
    height: 34px;
    border: 1px solid var(--ink);
    background: #fff;
  }

  .mobile-menu span,
  .mobile-menu span::before {
    width: 16px;
    height: 2px;
    background: var(--ink);
  }

  .mobile-menu span::before {
    content: "";
    display: block;
    transform: translateY(-6px);
  }

  .mobile-nav {
    position: fixed;
    z-index: 19;
    top: 49px;
    left: 0;
    right: 0;
    display: none;
    border-bottom: 1px solid #cfcfcf;
    background: #fff;
  }

  .mobile-nav.open {
    display: grid;
  }

  .mobile-nav a {
    padding: 18px;
    border-top: 1px solid #e5e5e5;
    font-weight: 700;
    text-transform: uppercase;
  }

  .hero-section {
    min-height: 950px;
  }

  .speech-bubble {
    margin-top: 405px;
    font-size: 28px;
  }

  .curve-line,
  .note-left,
  .tilted-label {
    display: none;
  }

  .about-section {
    min-height: 1530px;
    padding: 0 15px;
  }

  .about-curve-img {
    display: none;
  }

  .polaroid {
    top: 0;
    width: 147px;
  }

  .polaroid-left {
    left: 19px;
    transform: rotate(12deg);
  }

  .polaroid-right {
    right: 22px;
    transform: rotate(-12deg);
  }

  .hero-intro {
    top: 245px;
    max-width: 350px;
    font-size: 29px;
    line-height: 1.08;
  }

  .inline-asset {
    margin: 0 0.05em;
    vertical-align: -0.12em;
  }

  .skill-wall {
    top: 410px;
  }

  .row {
    flex-wrap: wrap;
    gap: 7px;
  }

  .skill {
    height: 48px;
    padding: 0 12px;
    font-size: 25px;
  }

  .stamp {
    width: 50px;
    height: 48px;
  }

  .explore {
    top: 890px;
  }

  .sticky-note {
    top: 1120px;
    width: calc(100% - 70px);
    min-height: 80px;
    font-size: 14px;
  }

  .projects {
    width: calc(100% - 30px);
    gap: 56px;
    margin-bottom: 90px;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px 15px 16px;
    gap: 22px;
  }

  .folder-tab {
    width: 230px;
    height: 62px;
  }

  .folder-tab.center {
    left: 42%;
  }

  .project-meta {
    min-height: 300px;
  }

  .project-meta p {
    margin-bottom: 28px;
  }

  .selected-frame {
    min-height: 0;
  }

  .selected-frame img {
    min-height: 390px;
  }

  .selected-frame figcaption {
    top: 18px;
    right: 18px;
  }

  .playground {
    width: calc(100% - 30px);
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 70px;
  }

  .playground p {
    order: -1;
    font-size: 14px;
  }

  .blob {
    width: min(78vw, 320px);
    margin: 0 auto;
  }

  .contact-panel {
    width: calc(100% - 30px);
    min-height: 650px;
    border-radius: 24px;
  }
}
