:root {
  --ink: #06130e;
  --ivory: #f2efe2;
  --acid: #c7db4e;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; min-width: 320px; color: var(--ivory); background: var(--ink); font-family: var(--sans); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--acid); color: var(--ink); }

.grain { position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: .045; 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='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }
.cursor-glow { position: fixed; width: 30rem; height: 30rem; border-radius: 50%; pointer-events: none; z-index: 0; opacity: .14; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(187,212,76,.23), transparent 65%); }
.sound-toggle { position: relative; z-index: 1; flex: 0 0 2.75rem; display: grid; width: 2.75rem; height: 2.75rem; padding: 0; place-items: center; border: 1px solid rgba(242,239,226,.2); border-radius: 50%; color: var(--ivory); background: rgba(4,11,8,.72); cursor: pointer; transition: border-color .3s ease,background .3s ease,color .3s ease; }
.sound-toggle:hover,.sound-toggle:focus-visible { border-color: rgba(199,219,78,.72); background: rgba(7,23,17,.92); outline: none; }
.sound-bars { width: 1rem; height: .9rem; display: flex; align-items: center; justify-content: center; gap: .14rem; }
.sound-bars i { width: 1px; height: 35%; background: currentColor; transform-origin: center; }
.sound-toggle[aria-pressed="true"] { color: var(--acid); }
.sound-toggle[aria-pressed="true"] .sound-bars i { animation: soundLevel .8s ease-in-out infinite alternate; }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(2) { animation-delay: -.55s; }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(3) { animation-delay: -.28s; }
@keyframes soundLevel { from { transform: scaleY(.65); } to { transform: scaleY(2.4); } }

.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #06110d; transition: transform 1s cubic-bezier(.76,0,.24,1) .35s; }
.intro span { position: absolute; bottom: 12%; width: 0; height: 1px; background: var(--acid); animation: load 1.25s ease forwards; }
.intro.is-done { transform: translateY(-101%); }
@keyframes load { to { width: min(22rem,62vw); } }

.site-header { position: relative; z-index: 2; min-height: 100svh; padding: 2rem clamp(1.2rem,3.8vw,4.5rem) 3rem; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 23%, rgba(176,203,71,.16), transparent 25rem), linear-gradient(180deg,#06130e,#071711); border-top: 1px solid rgba(242,239,226,.18); }
.hero-center { width: 100%; margin: auto 0; display: flex; flex-direction: column; align-items: center; }
.logo-orbit { position: relative; z-index: 1; width: clamp(20rem,40vw,38rem); height: clamp(20rem,44vh,34rem); margin-bottom: clamp(1rem,2.6vh,2.5rem); }
.logo-orbit::before { content: ""; position: absolute; inset: 15% 5% 4%; border-radius: 50%; background: radial-gradient(circle,rgba(199,219,78,.3) 0%,rgba(128,151,42,.13) 40%,transparent 72%); filter: blur(1.8rem); transform: scale(.92); animation: logoGlow 5s ease-in-out infinite; }
.logo-model { position: relative; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 0 1.7rem rgba(199,219,78,.16)); opacity: 0; transform: translateY(1rem) scale(.96); transition: opacity 1.2s ease .15s, transform 1.4s cubic-bezier(.2,.8,.2,1) .15s; }
.is-ready .logo-model { opacity: 1; transform: translateY(0) scale(1); }
@keyframes logoGlow { 50% { opacity: .68; transform: scale(1.08); } }

.masthead { position: relative; z-index: 2; width: 100%; margin: 0; display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: .18em; font-family: var(--serif); font-size: clamp(4.7rem,10.7vw,12.2rem); font-weight: 600; line-height: .72; letter-spacing: -.075em; text-transform: uppercase; white-space: nowrap; }
.masthead span,.masthead em { display: inline-block; font-style: normal; opacity: 0; transform: translateY(80%); }
.is-ready .masthead span { animation: titleIn 1s cubic-bezier(.2,.8,.2,1) .05s forwards; }
.is-ready .masthead em { color: var(--acid); animation: titleIn 1s cubic-bezier(.2,.8,.2,1) .15s forwards; }
.masthead b { height: 1px; margin-left: .2em; background: rgba(242,239,226,.65); transform: scaleX(0); transform-origin: left; }
.is-ready .masthead b { animation: lineIn .9s ease .8s forwards; }
@keyframes titleIn { to { opacity: 1; transform: translateY(0); } }
@keyframes lineIn { to { transform: scaleX(1); } }

.projects { position: relative; z-index: 2; padding-top: clamp(11rem,32svh,24rem); background: #040b08; }
.project-chapter { --progress: 0; --stage-opacity: 0; --stage-inset: 9%; --stage-radius: 2.4rem; --stage-lift: 4rem; --stage-scale: .97; --image-scale: 1.09; --image-y: 3%; --frame-ratio: 16 / 9; --frame-max-width: 163.6svh; position: relative; min-height: 155svh; padding: 2.2vh clamp(.75rem,1.5vw,1.5rem) 30vh; }
.project--designer { --frame-ratio: 1842 / 1058; --frame-max-width: 160.1svh; }
.project--mahjong { --frame-ratio: 1730 / 909; --frame-max-width: 175.1svh; }
.project-stage { position: sticky; top: 50%; width: min(100%,var(--frame-max-width)); height: auto; aspect-ratio: var(--frame-ratio); margin: 0 auto; display: block; overflow: hidden; background: #101510; clip-path: inset(var(--stage-inset) round var(--stage-radius)); transform: translateY(calc(-50% + var(--stage-lift))) scale(var(--stage-scale)); opacity: var(--stage-opacity); will-change: clip-path,transform,opacity; }
.project-image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; transform: translateY(var(--image-y)) scale(var(--image-scale)); transition: filter .8s ease; will-change: transform; }
.project--designer .project-image { object-position: 52% 48%; filter: saturate(.74) contrast(1.08) brightness(.73); }
.project--mahjong .project-image { object-position: 67% 52%; filter: saturate(.92) contrast(1.04) brightness(.72); }
.project--vr .project-image { object-position: center; filter: saturate(.7) contrast(1.12) brightness(.7); }
.project-stage:hover .project-image { filter: saturate(.98) contrast(1.04) brightness(.78); }
.project-shade { position: absolute; z-index: 2; inset: 0; background: linear-gradient(90deg,rgba(2,10,7,.76) 0%,rgba(2,10,7,.24) 48%,transparent 75%), linear-gradient(0deg,rgba(2,10,7,.62),transparent 48%); }
.project-copy { position: absolute; z-index: 3; left: clamp(1.4rem,5vw,5rem); right: clamp(1.4rem,5vw,5rem); bottom: clamp(2rem,7vh,6rem); display: flex; align-items: flex-end; gap: 2rem; transform: translateY(var(--copy-lift,2rem)); opacity: var(--copy-opacity,.25); will-change: transform,opacity; }
.project-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(4.1rem,10vw,11rem); font-weight: 600; line-height: .72; letter-spacing: -.065em; text-transform: uppercase; }
.project-copy p { margin: 0 0 .5rem; color: rgba(242,239,226,.66); font-family: var(--serif); font-size: clamp(2rem,3.5vw,4rem); text-transform: uppercase; }
.project-action { margin: 0 0 .4rem auto; min-width: 12rem; padding: .9rem 0; border-bottom: 1px solid rgba(242,239,226,.72); text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; }
.project-action b { float: right; font-size: 1.15rem; font-weight: 400; transition: transform .3s ease; }
.project-stage:hover .project-action b { transform: translate(.4rem,-.4rem); }
.project-emblem { position: absolute; z-index: 3; right: clamp(1.5rem,4vw,4rem); top: clamp(1.5rem,4vw,4rem); width: clamp(7rem,13vw,13rem); opacity: .18; filter: grayscale(1) brightness(2); mix-blend-mode: screen; }
.project-emblem--jom { width: clamp(5rem,8vw,8rem); opacity: .75; filter: none; }

.about { min-height: 100svh; padding: 6rem clamp(1.2rem,3.8vw,4.5rem) 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 5rem; background: var(--ink); border-top: 1px solid rgba(242,239,226,.13); }
.about-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.4rem; text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; }
.about-head > a { color: var(--acid); font-size: 1.7rem; }
.about-statement { max-width: 73rem; margin: auto 0; font-family: var(--serif); font-size: clamp(2.6rem,5.2vw,6.2rem); line-height: .92; letter-spacing: -.045em; }
.about-contact { display: grid; grid-template-columns: 1fr auto; align-items: end; padding-top: 1.5rem; border-top: 1px solid rgba(242,239,226,.24); text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; }
.about-contact-actions { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.about-contact a { color: var(--acid); text-transform: none; letter-spacing: .03em; font-size: clamp(1rem,1.4vw,1.35rem); }
.about-contact b { margin-left: .8rem; font-weight: 400; }

@media (max-width:900px) {
  .logo-orbit { width: clamp(18rem,64vw,28rem); height: clamp(18rem,37vh,25rem); margin-bottom: 1.25rem; }
  .masthead { grid-template-columns: 1fr; gap: 0; white-space: normal; font-size: clamp(4.15rem,16vw,7rem); line-height: .73; }
  .masthead b { display: none; }
  .projects { padding-top: clamp(8rem,24svh,14rem); }
  .project-chapter { min-height: 145svh; padding-left: 0; padding-right: 0; padding-bottom: 27vh; }
  .project-stage { height: auto; clip-path: inset(8% 3% round 1.5rem); }
  .project-copy { display: block; }
  .project-copy h2 { font-size: clamp(3.7rem,15vw,7rem); }
  .project-copy p { font-size: 2rem; }
  .project-action { display: block; margin: 2.2rem 0 0; }
}
@media (max-width:520px) {
  .site-header { padding-top: 1rem; }
  .logo-orbit { width: min(78vw,22rem); height: min(34vh,21rem); margin-bottom: 1rem; }
  .project-image { inset: 0; width: 100%; height: 100%; }
  .project--designer .project-image { object-position: 57% center; }
  .project--mahjong .project-image { object-position: 69% center; }
  .project-copy { bottom: 2.2rem; }
  .project-copy h2 { font-size: clamp(3.25rem,15vw,5rem); }
  .project-emblem { display: none; }
  .about { min-height: 92svh; gap: 3.5rem; }
  .about-statement { font-size: clamp(2.25rem,10vw,3.8rem); }
  .about-contact { grid-template-columns: 1fr; gap: 1rem; }
  .about-contact-actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; scroll-behavior: auto!important; transition-duration: .01ms!important; }
  .intro { display: none; }
  .masthead span,.masthead em,.logo-model,.project-stage { opacity: 1; transform: none; }
  .logo-orbit::before { animation: none; }
  .sound-toggle[aria-pressed="true"] .sound-bars i { animation: none; transform: scaleY(1.6); }
  .project-stage { clip-path: none; }
  .cursor-glow { display: none; }
}
