:root {
  --bg: #fcfcfc;
  --ink: #101010;
  --muted: #7f7f7f;
  --line: rgba(16, 16, 16, 0.13);
  --soft: #eeeeee;
  --blue-soft: #c3cfda;
  --section-blue: #d6e3ef;
  --accent-cyan: #35c8ff;
  --accent-purple: #8c5cff;
  --accent-pink: #ff6fb7;
  --accent-lime: #d9ff6a;
  --accent-ice: #eaf8ff;
  --charcoal: #09090c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --heading-font: "Space Grotesk", "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  --main-card-h: clamp(486px, 43vw, 506px);
}

* {
  box-sizing: border-box;
}

html {
  background: #dfe7ee;
  color: var(--ink);
  scroll-behavior: smooth;
  scrollbar-width: none;
}

body {
  margin: 0;
  min-width: 320px;
  background: #dfe7ee;
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
  overflow-x: hidden;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

body.is-loading {
  overflow: hidden;
}

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

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

img,
canvas,
video {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  overflow: clip;
  background:
    linear-gradient(180deg, #fcfcfc 0%, #f6fbff 24%, #fcfcfc 48%, #f7f2ff 76%, #fcfcfc 100%);
}

section {
  max-width: 100%;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: clamp(16px, 2vw, 24px) clamp(18px, 3.2vw, 34px);
  color: var(--ink);
  pointer-events: none;
}

.site-logo,
.nav-link {
  pointer-events: auto;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: color 320ms var(--ease), opacity 320ms var(--ease);
}

.nav-link:hover,
.site-logo:hover {
  opacity: 0.7;
}

.site-logo {
  position: relative;
  display: block;
  width: clamp(54px, 5.2vw, 74px);
  aspect-ratio: 171 / 72;
}

.site-logo__mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
}

.section-timeline {
  position: fixed;
  left: clamp(12px, 1.2vw, 20px);
  top: 50%;
  z-index: 34;
  display: grid;
  gap: 13px;
  padding: 14px 10px 14px 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.section-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: linear-gradient(180deg, rgba(53, 200, 255, 0.26), rgba(140, 92, 255, 0.38), rgba(255, 111, 183, 0.22));
  opacity: 0.7;
}

.section-timeline__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(248px, 24vw);
  min-height: 18px;
  color: rgba(14, 18, 28, 0.48);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.08;
  pointer-events: auto;
  transition: color 260ms var(--ease), transform 260ms var(--ease), opacity 260ms var(--ease);
}

.section-timeline__dot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(14, 18, 28, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 8px 22px rgba(16, 16, 16, 0.08);
  transition: border-color 260ms var(--ease), background 260ms var(--ease), box-shadow 260ms var(--ease), transform 260ms var(--ease);
}

.section-timeline__dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(14, 18, 28, 0.34);
  transition: background 260ms var(--ease), transform 260ms var(--ease);
}

.section-timeline__label {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(16, 16, 16, 0.05);
  opacity: 0.58;
  transition: opacity 260ms var(--ease), background 260ms var(--ease), box-shadow 260ms var(--ease);
}

.section-timeline__item:hover,
.section-timeline__item.is-active {
  color: rgba(8, 9, 13, 0.94);
  transform: translate3d(2px, 0, 0);
}

.section-timeline__item:hover .section-timeline__label,
.section-timeline__item.is-active .section-timeline__label {
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 36px rgba(53, 200, 255, 0.12), 0 10px 28px rgba(140, 92, 255, 0.1);
  opacity: 1;
}

.section-timeline__item.is-active .section-timeline__dot {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink)) border-box;
  box-shadow: 0 0 0 5px rgba(53, 200, 255, 0.1), 0 12px 34px rgba(140, 92, 255, 0.2);
  transform: scale(1.18);
}

.section-timeline__item.is-active .section-timeline__dot::after {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
  transform: scale(0.9);
}

.project-menu {
  position: relative;
  pointer-events: auto;
}

.project-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, 200px);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(140, 92, 255, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.98)),
    #fff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(44, 59, 99, 0.18);
  opacity: 0;
  transform: translate3d(0, -8px, 0) scale(0.98);
  visibility: hidden;
  transition:
    opacity 240ms var(--ease),
    transform 280ms var(--ease),
    visibility 240ms var(--ease);
}

.project-menu:hover .project-dropdown,
.project-menu:focus-within .project-dropdown {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  visibility: visible;
}

.project-dropdown a {
  display: grid;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.15;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.project-dropdown a img {
  width: 200px;
  aspect-ratio: 1;
  border-radius: 16px;
  object-fit: cover;
}

.project-dropdown a:hover {
  background: linear-gradient(135deg, rgba(53, 200, 255, 0.14), rgba(255, 111, 183, 0.12));
}

.loader-bubble {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: #dfe7ee;
  pointer-events: auto;
  overflow: hidden;
}

.loader-bubble__text {
  display: grid;
  place-items: center;
  width: clamp(180px, 28vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18% 18%, #e0eef7 0 16%, transparent 34%),
    radial-gradient(circle at 82% 22%, #ecf8fa 0 18%, transparent 36%),
    radial-gradient(circle at 76% 84%, #e1d7cf 0 18%, transparent 38%),
    linear-gradient(135deg, #878785, #9da3a5 18%, #8c5cff 42%, #35c8ff 62%, #ff6fb7 82%, #d9ff6a);
  background-size: 180% 180%, 170% 170%, 190% 190%, 240% 240%;
  color: #000;
  font-size: clamp(62px, 11vw, 150px);
  font-weight: 900;
  line-height: 1;
  animation: bubbleGradient 5200ms ease-in-out infinite alternate;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 820ms var(--ease),
    transform 1200ms var(--ease);
}

body.sequence-ready .loader-bubble {
  pointer-events: none;
  animation: loaderFade 1200ms var(--ease) forwards;
}

body.sequence-ready .loader-bubble__text {
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(12);
}

.sequence-stage {
  position: relative;
  height: 245svh;
  background: #dfe7ee;
}

.sequence-stage__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #dfe7ee;
}

.sequence-canvas {
  width: 100%;
  height: 100%;
  background: #dfe7ee url("new003-webp-desktop/frame-001.webp") center / cover no-repeat;
  opacity: 0;
  transition: opacity 560ms var(--ease);
}

.sequence-canvas.is-ready {
  opacity: 1;
}

.sequence-shade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(252, 252, 252, 0.62), rgba(234, 248, 255, 0.14) 34%, rgba(252, 252, 252, 0) 58%),
    linear-gradient(180deg, rgba(252, 252, 252, 0.04), rgba(252, 252, 252, 0) 52%, rgba(246, 251, 255, 0.72) 92%, #f8fbff 99%);
}

.hero-copy {
  --copy-x: 112vw;
  --copy-y: -8px;
  position: absolute;
  z-index: 2;
  top: clamp(140px, 18vh, 210px);
  right: clamp(24px, 6vw, 96px);
  display: grid;
  justify-items: center;
  width: min(520px, calc(100% - 48px));
  color: var(--ink);
  text-align: center;
  opacity: 0;
  transform: translate3d(var(--copy-x), var(--copy-y), 0);
  will-change: transform, opacity;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-family: var(--heading-font);
  font-size: clamp(64px, 7.4vw, 118px);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 1px 22px rgba(16, 16, 16, 0.12), 0 0 34px rgba(255, 255, 255, 0.22);
}

.hero-description {
  max-width: 46ch;
  margin: 0 0 34px;
  font-size: clamp(15px, 1.18vw, 18px);
  font-weight: 400;
  line-height: 1.48;
  color: rgba(16, 16, 16, 0.78);
}

.pill-button {
  display: inline-grid;
  place-items: center;
  min-width: 132px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(16, 16, 16, 0.16);
  border-radius: 999px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(110deg, rgba(53, 200, 255, 0.48), rgba(140, 92, 255, 0.32), rgba(255, 111, 183, 0.38)) border-box;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(16, 16, 16, 0.08);
  transition:
    background-color 280ms var(--ease),
    border-color 280ms var(--ease),
    color 280ms var(--ease),
    transform 280ms var(--ease),
    box-shadow 280ms var(--ease);
}

.pill-button:hover {
  border-color: transparent;
  background: linear-gradient(110deg, #101010, #20203a 46%, #101010) padding-box, linear-gradient(110deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink)) border-box;
  color: #fff;
  box-shadow: 0 18px 48px rgba(53, 200, 255, 0.22), 0 18px 42px rgba(140, 92, 255, 0.16);
}

.scroll-cue {
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -8px, 0) scale(0.96);
}

.scroll-cue.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.main-projects {
  position: relative;
  z-index: 1;
  padding: clamp(34px, 6vw, 64px) clamp(16px, 4vw, 56px) clamp(98px, 14vw, 170px);
  background:
    linear-gradient(135deg, rgba(53, 200, 255, 0.12), rgba(255, 255, 255, 0) 34%),
    linear-gradient(315deg, rgba(255, 111, 183, 0.12), rgba(255, 255, 255, 0) 36%),
    #f8fbff;
  margin-top: -1px;
}

.stack-wrap {
  position: relative;
  min-height: 405svh;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(24px, 4vw, 46px);
  width: min(1166px, 100%);
  height: var(--main-card-h);
  margin: 0 auto;
  padding: clamp(16px, 1.6vw, 20px);
  border: 1px solid rgba(14, 18, 28, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, #ffffff 0%, #f7fbff 48%, #ffffff 100%);
  color: var(--ink);
  overflow: hidden;
  transform-origin: 50% 72%;
  transition:
    transform 420ms var(--ease),
    box-shadow 420ms var(--ease),
    border-color 420ms var(--ease);
}

.main-card {
  position: sticky;
  top: calc(50svh - (var(--main-card-h) / 2));
  margin-bottom: 34vh;
}

.main-card:nth-child(1) {
  z-index: 3;
}

.main-card:nth-child(2) {
  z-index: 4;
}

.main-card:nth-child(3) {
  z-index: 5;
}

.project-card:hover {
  border-color: rgba(53, 200, 255, 0.42);
  box-shadow: 0 30px 90px rgba(44, 59, 99, 0.14), 0 20px 54px rgba(140, 92, 255, 0.12);
}

.project-media,
.side-media {
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #eaf8ff, #f5f0ff);
}

.project-media img,
.side-media img,
.gallery-card img,
.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media img,
.side-media img {
  transform: scale(1);
  transition: transform 850ms var(--ease), filter 500ms var(--ease);
}

.project-card:hover .project-media img,
.side-card:hover .side-media img {
  transform: scale(1.5);
}

.project-info {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  padding: clamp(6px, 1.5vw, 16px) clamp(6px, 1.2vw, 10px);
}

.project-info h2,
.side-copy h2 {
  margin: 0 0 28px;
  font-size: clamp(44px, 5.2vw, 66px);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  color: #08090d;
}

.project-info p,
.side-copy p {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.28;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-self: end;
  margin-top: auto;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(234, 248, 255, 0.86));
  font-size: 12px;
  font-weight: 400;
}

.tags span:nth-child(3n + 1) {
  border-color: rgba(53, 200, 255, 0.38);
}

.tags span:nth-child(3n + 2) {
  border-color: rgba(140, 92, 255, 0.32);
}

.tags span:nth-child(3n) {
  border-color: rgba(255, 111, 183, 0.32);
}

.read-cursor,
.read-cursor-dot {
  pointer-events: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.7);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.read-cursor {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c3cfda, #eaf8ff 48%, #f5e8ff);
  color: rgba(16, 16, 16, 0.72);
  font-size: 16px;
  font-weight: 400;
}

.read-cursor-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #343434, #8c5cff);
}

body.has-read-cursor .read-cursor,
body.has-read-cursor .read-cursor-dot {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.side-projects {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  min-height: 112svh;
  margin-top: -100svh;
  padding: clamp(112px, 17vw, 190px) clamp(16px, 4vw, 56px) clamp(130px, 16vw, 210px);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.82), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(221, 234, 246, 0.74), transparent 36%),
    radial-gradient(circle at 56% 86%, rgba(247, 243, 255, 0.72), transparent 34%),
    linear-gradient(180deg, #f8fcff 0%, #eaf4fb 34%, #ddeaf6 68%, #f7f3ff 100%);
  transform: translate3d(0, var(--side-cover-y, 56vh), 0);
  will-change: transform;
}

.side-card {
  display: grid;
  grid-template-columns: minmax(190px, 320px) minmax(260px, 1fr);
  gap: 16px;
  flex: 0 0 104px;
  height: 308px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, #ffffff 0%, #eef9ff 48%, #fff7fb 100%);
  color: var(--ink);
  overflow: hidden;
  transition:
    flex-basis 560ms var(--ease),
    transform 700ms var(--ease),
    background-color 360ms var(--ease),
    border-color 360ms var(--ease),
    box-shadow 420ms var(--ease);
  transform: translate3d(0, var(--side-depth, 0px), 0);
}

.side-card--active {
  flex-basis: min(1040px, calc(100vw - 168px));
  border-color: rgba(53, 200, 255, 0.42);
  box-shadow: 0 28px 90px rgba(53, 200, 255, 0.12), 0 28px 80px rgba(140, 92, 255, 0.12);
}

.side-copy {
  min-width: 280px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 280ms var(--ease);
}

.side-card--active .side-copy {
  opacity: 1;
}

.side-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4vw, 48px);
}

.side-copy p {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 400;
}

.side-card:not(.side-card--active) {
  grid-template-columns: 1fr;
  padding: 10px;
}

.side-card:not(.side-card--active) .side-media {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  filter: saturate(0.78) contrast(1.02);
}

.side-card:not(.side-card--active) .side-copy {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chalk-section {
  position: relative;
  z-index: 3;
  height: 190svh;
  margin-top: -1px;
  padding: clamp(52px, 6vw, 84px) clamp(28px, 9vw, 116px) clamp(84px, 12vw, 138px);
  background:
    radial-gradient(circle at 18% 18%, rgba(224, 246, 255, 0.46), transparent 34%),
    radial-gradient(circle at 82% 24%, rgba(248, 236, 255, 0.42), transparent 36%),
    radial-gradient(circle at 56% 86%, rgba(255, 247, 251, 0.56), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fcff 38%, #fcf8ff 72%, #ffffff 100%);
  overflow: hidden;
  transform: none;
  will-change: auto;
}

.chalk-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.chalk-sentence {
  z-index: 2;
  position: sticky;
  top: 50%;
  display: flex;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  gap: 0.16em 0.24em;
  font-size: 48px;
  font-family: var(--heading-font);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  justify-content: center;
  transform: translateY(calc(-50% + var(--chalk-depth, 0px)));
  color: rgba(7, 10, 18, 0.92);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.chalk-word {
  display: inline-block;
  transform: translate3d(var(--from-x), var(--from-y), 0) rotate(var(--from-r));
  opacity: 0.08;
  transition: color 160ms linear;
  will-change: transform, opacity;
}

.pencil-cursor {
  pointer-events: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 95;
  opacity: 0;
  font-size: 32px;
  transform: translate3d(-50%, -50%, 0) scaleX(-1) rotate(0deg);
  transition: opacity 160ms var(--ease);
}

.chalk-eraser {
  position: fixed;
  top: auto;
  bottom: clamp(18px, 3.2vw, 32px);
  left: auto;
  right: max(24px, calc(50% - 390px));
  z-index: 6;
  width: clamp(92px, 8vw, 124px);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  opacity: var(--eraser-opacity, 0);
  pointer-events: none;
  transform: translate3d(calc(135% - var(--eraser-x, 0%)), var(--eraser-y, 0px), 0) rotate(8deg);
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 520ms var(--ease);
  filter: drop-shadow(0 18px 34px rgba(53, 200, 255, 0.24));
}

body.is-in-chalk .chalk-eraser {
  pointer-events: auto;
}

.chalk-eraser:hover {
  transform: translate3d(calc(135% - var(--eraser-x, 0%)), calc(var(--eraser-y, 0px) - 3px), 0) rotate(7deg);
}

.chalk-eraser img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chalk-palette {
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 3.2vw, 32px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 48px);
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 44px rgba(34, 50, 74, 0.14);
  backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 18px, 0);
  transition: opacity 180ms ease-out, transform 220ms ease-out;
}

body.is-in-chalk .chalk-palette {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}

.chalk-color {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 4px;
  background: transparent;
  cursor: pointer;
}

.chalk-color::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(8, 10, 18, 0.14);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease);
}

.chalk-color span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--swatch-a), var(--swatch-b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 8px 18px rgba(8, 10, 18, 0.14);
  transition: transform 220ms var(--ease);
}

.chalk-color:hover span,
.chalk-color.is-active span {
  transform: scale(0.88);
}

.chalk-color.is-active::before {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(8, 10, 18, 0.56);
}

body.has-pencil .pencil-cursor {
  opacity: 1;
}

.gallery-section {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 100svh;
  margin-top: -12px;
  padding: clamp(94px, 12vw, 134px) 0 clamp(88px, 10vw, 124px);
  background:
    linear-gradient(180deg, #d8e9f7 0%, #f8fcff 14%, #fff 48%, #f8fcff 100%);
  overflow: hidden;
}

.marquee {
  display: flex;
  min-width: 200vw;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
}

.marquee span {
  display: inline-block;
  padding-right: 0.6em;
}

.gallery-marquee {
  position: absolute;
  left: 0;
  top: 38%;
  z-index: 0;
  color: rgba(8, 9, 13, 0.11);
  mix-blend-mode: normal;
  font-size: clamp(42px, 6.2vw, 78px);
  font-family: var(--heading-font);
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
  animation: marqueeLeft 15s linear infinite;
}

.gallery-track {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns:
    minmax(92px, min(19vw, 260px))
    minmax(280px, min(58vw, 820px))
    minmax(92px, min(19vw, 260px));
  grid-template-rows: clamp(300px, 42vw, 520px);
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: clamp(28px, 6vw, 78px);
  min-height: clamp(360px, 48vw, 600px);
  padding: 0 clamp(24px, 6vw, 74px);
  cursor: grab;
  touch-action: pan-y;
  transform: translate3d(var(--gallery-drag-x, 0px), var(--gallery-depth, 0px), 0);
  transition: transform 900ms var(--ease);
}

.gallery-track.is-dragging {
  cursor: grabbing;
  transition: none;
}

.gallery-card {
  position: relative;
  display: none;
  align-self: center;
  justify-self: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1.55;
  height: clamp(220px, 27vw, 340px);
  padding: 0;
  border: 0;
  appearance: none;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #eaf8ff, #fff0f7);
  box-shadow: 0 24px 80px rgba(44, 59, 99, 0.11);
  transform: scale(0.78);
  filter: none;
  opacity: 0.7;
  transition:
    transform 420ms var(--ease),
    opacity 320ms var(--ease);
}

.gallery-card.is-prev,
.gallery-card.is-next,
.gallery-card.is-active {
  display: block;
  grid-row: 1;
}

.gallery-card.is-prev {
  grid-column: 1;
}

.gallery-card.is-active {
  grid-column: 2;
  height: clamp(300px, 42vw, 520px);
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 36px 110px rgba(44, 59, 99, 0.18), 0 20px 70px rgba(140, 92, 255, 0.1);
}

.gallery-card.is-next {
  grid-column: 3;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-card.is-active::after {
  content: "Exterior product design works";
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 14px 36px rgba(16, 16, 16, 0.12);
  opacity: 0;
  transform: translate3d(-50%, 8px, 0);
  transition: opacity 240ms var(--ease), transform 280ms var(--ease);
  white-space: nowrap;
}

.gallery-card.is-active:hover::after {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.gallery-pagination {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: clamp(18px, 2.2vw, 28px);
}

.gallery-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.24);
  cursor: pointer;
  transition:
    width 260ms var(--ease),
    background-color 260ms var(--ease),
    opacity 260ms var(--ease);
}

.gallery-dot.is-active {
  width: 18px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
}

.gallery-dot:hover {
  background: rgba(16, 16, 16, 0.62);
}

.why-contact-shell {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.86), transparent 30%),
    radial-gradient(circle at 78% 24%, rgba(233, 245, 255, 0.8), transparent 36%),
    radial-gradient(circle at 54% 86%, rgba(248, 236, 255, 0.72), transparent 32%),
    linear-gradient(180deg, #fcfcfc 0%, #f1f3ff 34%, #e9f5ff 68%, #f8ecff 100%);
  padding-bottom: clamp(24px, 4vw, 44px);
}

.why-me {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: 132svh;
  padding: 78px clamp(18px, 5vw, 80px) 64px;
  overflow: hidden;
}

.why-layout {
  position: sticky;
  top: 96px;
  z-index: 2;
}

.skills-marquee {
  z-index: 0;
  color: rgba(8, 10, 18, 0.08);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
}

.skills-marquee--top {
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 0;
  animation: marqueeLeft 22s linear infinite;
}

.skills-marquee--bottom {
  position: absolute;
  left: 0;
  bottom: clamp(28px, 5vw, 62px);
  z-index: 0;
  margin-top: 0;
  animation: marqueeRight 22s linear infinite;
}

.why-layout {
  display: grid;
  position: sticky;
  z-index: 2;
  grid-template-columns: minmax(220px, 0.8fr) minmax(480px, 1fr);
  gap: clamp(34px, 7vw, 80px);
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  transform: translate3d(0, var(--why-depth, 0px), 0);
  transition: transform 900ms var(--ease);
}

.why-layout h2 {
  margin: 0;
  color: #080a12;
  font-size: clamp(64px, 7vw, 86px);
  font-family: var(--heading-font);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 18px 50px rgba(53, 200, 255, 0.16);
}

.bento-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 176px;
  gap: 16px;
}

.bento-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 8px 22px rgba(93, 113, 148, 0.035);
  transform: translate3d(0, 28px, 0);
  opacity: 0;
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.bento-card.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.bento-card.is-visible:hover {
  transform: translate3d(0, -6px, 0);
}

.bento-card--wide {
  grid-column: span 1;
}

.bento-card--tall {
  grid-row: span 2;
}

.bento-card img {
  filter: saturate(0.92) contrast(1.02);
  transform: translate3d(0, var(--why-y, 0px), 0) scale(1.03);
  transition: transform 900ms var(--ease), filter 420ms var(--ease);
}

.bento-card p {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.1;
  color: rgba(16, 16, 16, 0.86);
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.36);
}

.contact-section {
  position: relative;
  z-index: 2;
  min-height: 620px;
  margin: clamp(42px, 7vw, 88px) clamp(18px, 3vw, 36px) 0;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}

.contact-video {
  display: none;
}

.contact-highlight {
  position: absolute;
  right: -12%;
  bottom: -18%;
  width: 56vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 62%);
  mix-blend-mode: screen;
}

.contact-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  width: min(460px, 44%);
  min-height: 620px;
  margin-left: auto;
  margin-right: clamp(60px, 9vw, 128px);
  transform: translate3d(0, var(--contact-depth, 0px), 0);
  transition: transform 900ms var(--ease);
}

.contact-copy h2 {
  margin: 0 0 30px;
  font-size: clamp(54px, 6vw, 78px);
  font-family: var(--heading-font);
  font-weight: 950;
  line-height: 1.15;
  color: #101010;
  text-shadow: 0 20px 60px rgba(255, 255, 255, 0.22);
}

.contact-actions {
  display: flex;
  gap: 18px;
}

@keyframes loaderFade {
  0% {
    opacity: 1;
    visibility: visible;
  }

  76% {
    opacity: 1;
    visibility: visible;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes bubbleGradient {
  0% {
    background-position: 0% 18%, 100% 12%, 82% 88%, 0% 50%;
  }

  100% {
    background-position: 100% 70%, 8% 88%, 64% 18%, 100% 50%;
  }
}

@keyframes headlineGradient {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@keyframes marqueeLeft {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-25%, 0, 0);
  }
}

@keyframes marqueeRight {
  from {
    transform: translate3d(-25%, 0, 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes contactGradient {
  0% {
    background-position: 0% 70%, 100% 12%, 42% 46%, 0% 50%;
  }

  50% {
    background-position: 40% 40%, 70% 52%, 58% 38%, 55% 50%;
  }

  100% {
    background-position: 100% 30%, 8% 88%, 64% 58%, 100% 50%;
  }
}

@keyframes verticalLoop {
  0% {
    transform: translateY(-38%) rotate(180deg);
  }

  100% {
    transform: translateY(-68%) rotate(180deg);
  }
}

@media (max-width: 980px) {
  .section-timeline {
    display: none;
  }

  .project-dropdown {
    position: fixed;
    top: 58px;
    left: 50%;
    right: auto;
    grid-template-columns: repeat(3, 128px);
    gap: 10px;
    width: max-content;
    max-width: calc(100vw - 32px);
    transform: translate3d(-50%, -8px, 0) scale(0.98);
  }

  .project-menu:hover .project-dropdown,
  .project-menu:focus-within .project-dropdown {
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  .project-dropdown a {
    align-content: start;
    justify-items: center;
    text-align: center;
  }

  .project-dropdown a img {
    width: 128px;
    border-radius: 14px;
  }

  .project-card,
  .side-card {
    grid-template-columns: 1fr;
  }

  .project-info h2,
  .side-copy h2 {
    margin-bottom: 14px;
    font-size: 32px;
    line-height: 1;
  }

  .project-info p,
  .side-copy p {
    font-size: 16px;
    line-height: 1.32;
  }

  .project-card .tags span,
  .side-card .tags span {
    min-height: 34px;
    font-size: 14px;
  }

  .side-projects {
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    min-height: 112svh;
    overflow-x: clip;
  }

  .side-card {
    flex-basis: 84px;
    transform: none;
  }

  .side-card--active {
    flex-basis: min(720px, calc(100vw - 112px));
  }

  .why-layout {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    width: min(520px, calc(100% - 40px));
    margin: 0 auto;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .site-nav {
    padding: 16px 18px;
  }

  .project-dropdown {
    top: 54px;
    left: 50%;
    right: auto;
    grid-template-columns: 1fr;
    justify-items: stretch;
    width: min(280px, calc(100vw - 36px));
    min-width: 0;
    padding: 10px;
    transform: translate3d(-50%, -8px, 0) scale(0.98);
  }

  .project-menu:hover .project-dropdown,
  .project-menu:focus-within .project-dropdown {
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  .project-dropdown a {
    justify-items: center;
    min-height: 42px;
    padding: 12px 14px;
    text-align: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
  }

  .project-dropdown a img {
    display: none;
  }

  .project-dropdown a span {
    display: block;
    width: 100%;
  }

  .project-dropdown {
    grid-template-columns: 1fr;
  }

  .sequence-stage {
    height: 205svh;
  }

  .hero-copy {
    --copy-x: 0vw;
    --copy-y: 12px;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(340px, calc(100% - 32px));
    transform: translate3d(-50%, -50%, 0) translate3d(var(--copy-x), var(--copy-y), 0);
  }

  .hero-copy h1 {
    font-size: clamp(54px, 17vw, 82px);
  }

  .hero-description {
    max-width: 31ch;
    font-size: 15px;
  }

  .stack-wrap {
    min-height: auto;
  }

  .main-card {
    position: relative;
    top: auto;
    margin-bottom: 18px;
  }

  .side-projects {
    margin-top: 0;
    min-height: 100svh;
    padding: 72px 16px 96px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transform: none;
  }

  .side-card,
  .side-card--active {
    display: grid;
    grid-template-columns: 1fr;
    flex-basis: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px;
  }

  .side-card:not(.side-card--active) {
    grid-template-columns: 92px 1fr;
  }

  .side-card:not(.side-card--active) .side-media {
    width: 76px;
    height: 76px;
  }

  .side-card .side-copy,
  .side-card--active .side-copy {
    position: static;
    min-width: 0;
    opacity: 1;
  }

  .side-card:not(.side-card--active) .side-copy {
    position: static;
    opacity: 1;
  }

  .side-card:not(.side-card--active) .side-copy p,
  .side-card:not(.side-card--active) .tags {
    display: none;
  }

  .project-info h2,
  .side-copy h2 {
    margin-bottom: 14px;
    font-size: 32px;
    line-height: 1;
  }

  .project-info p,
  .side-copy p {
    font-size: 16px;
    line-height: 1.32;
  }

  .project-card {
    min-height: 0;
    height: auto;
  }

  .project-media {
    min-height: 260px;
  }

  .sequence-canvas {
    background-image: url("new003-webp-mobile/frame-001.webp");
  }

  .project-card .tags span,
  .side-card .tags span {
    min-height: 34px;
    font-size: 14px;
  }

  .chalk-section {
    height: 170svh;
    padding: 96px 24px;
  }

  .chalk-sentence {
    font-size: clamp(30px, 8.2vw, 48px);
  }

  .chalk-eraser {
    bottom: 76px;
    right: 16px;
    width: 80px;
    border-radius: 22px;
  }

  .chalk-palette {
    bottom: 16px;
    gap: 8px;
    padding: 8px;
  }

  .chalk-color {
    width: 36px;
    height: 36px;
  }

  .gallery-track {
    grid-template-columns: 16vw 68vw 16vw;
    grid-template-rows: clamp(260px, 74vw, 420px);
    gap: 18px;
    min-height: clamp(320px, 84vw, 480px);
    padding: 0 16px;
  }

  .gallery-card {
    height: clamp(190px, 48vw, 280px);
    border-radius: 16px;
  }

  .gallery-card.is-active {
    height: clamp(260px, 74vw, 420px);
  }

  .gallery-card.is-active::after {
    bottom: 14px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 190px;
  }

  .bento-card--tall {
    grid-row: span 1;
  }

  .contact-section,
  .contact-copy {
    min-height: 560px;
  }

  .contact-section {
    margin-top: 42px;
  }

  .contact-copy h2 {
    font-size: clamp(46px, 15vw, 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
