/* ════════════════════════════════════════════════════════════
   MIKA LIM - portfolio
   Modern editorial: bone paper, graphite ink, electric cobalt.
   ════════════════════════════════════════════════════════════ */

:root {
  /* palette - bone paper, graphite ink, electric cobalt */
  --paper: #f1f1ec;
  --stone: #e3e4dc;
  --ink: #14161b;
  --ink-soft: #23262c;
  --accent: #2b3ff2;
  --accent-deep: #1d2bc0;
  --accent-lite: #7c89ff;
  --muted: #6b6f78;
  --line: rgba(20, 22, 27, 0.14);
  --line-paper: rgba(241, 241, 236, 0.16);

  /* type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", monospace;

  /* rhythm */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-pad: clamp(5rem, 12vh, 9rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

html,
body {
  overflow-x: clip;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 460;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── shared atoms ─────────────────────────────────────────── */

.sec-label {
  color: var(--muted);
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--ink);
  transition:
    background 0.35s var(--ease-out),
    color 0.35s var(--ease-out),
    border-color 0.35s;
  will-change: transform;
}
.btn-pill__arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-out);
}
.btn-pill:hover .btn-pill__arrow {
  transform: translateX(4px);
}
.btn-pill--solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-pill--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-pill--ghost {
  background: var(--paper);
}
.btn-pill--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-pill--paper {
  border-color: var(--paper);
  color: var(--paper);
}
body.dark .btn-pill--paper {
  border-color: #fff;
  color: #fff;
}
body.dark .btn-pill--paper:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-pill--paper:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a8c5c;
  margin-right: 0.45rem;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 140, 92, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(74, 140, 92, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 140, 92, 0);
  }
}

/* line-mask reveals (animated by JS; visible without JS) */
.line-mask {
  display: block;
  overflow: hidden;
}
.line-inner {
  display: inline-block;
  will-change: transform;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
}
.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── preloader ────────────────────────────────────────────── */

.preloader {
  display: none;
}
.js .preloader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--paper);
}
.preloader__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.preloader__greeting {
  color: var(--muted);
}
.preloader__count {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 1;
  color: var(--ink);
}
.preloader__count sup {
  font-size: 0.25em;
  color: var(--accent);
}
.preloader__curtain {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
}

/* ── cursor ───────────────────────────────────────────────── */

.cursor {
  display: none;
}
@media (pointer: fine) {
  .js .cursor {
    display: block;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3000;
  }
  .js body,
  .js a,
  .js button,
  .js [data-cursor] {
    cursor: none;
  }
  .cursor__dot {
    position: absolute;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--accent);
  }
  .cursor__ring {
    position: absolute;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
      width 0.3s var(--ease-out),
      height 0.3s var(--ease-out),
      margin 0.3s var(--ease-out),
      background 0.3s;
  }
  .cursor__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--on-accent, var(--paper));
    opacity: 0;
    transition: opacity 0.25s;
  }
  .cursor.is-view .cursor__ring {
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    background: color-mix(in srgb, var(--accent) 92%, transparent);
  }
  .cursor.is-view .cursor__label {
    opacity: 1;
  }
  .cursor.is-hover .cursor__label {
    opacity: 1;
  }
  .cursor.is-hover .cursor__ring {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    background: color-mix(in srgb, var(--accent) 92%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}

/* ── nav theme toggle ────────────────────────────────────── */

.theme-switch {
  --ts: 18.75px;
  --cw: 5.625em;
  --ch: 2.5em;
  --cr: 6.25em;
  --cd: 3.375em;
  --smd: 2.125em;
  --sun: #eea112;
  --moon: #e6d7a4;
  --spot: #b7ab7c;
  --co: calc((var(--cd) - var(--ch)) / 2 * -1);
  --star: #eff0b4;
  --cl: #e6dfc8;
  --bcl: #b7ab7c;
  --t: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --ct: 0.3s cubic-bezier(0, -0.02, 0.35, 1.17);
  display: inline-flex;
  vertical-align: middle;
}
.theme-switch,
.theme-switch *,
.theme-switch *::before,
.theme-switch *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: var(--ts);
}
.theme-switch__container {
  width: var(--cw);
  height: var(--ch);
  background: var(--accent);
  border-radius: var(--cr);
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 -0.062em 0.062em rgba(0, 0, 0, 0.25),
    0 0.062em 0.125em rgba(255, 255, 255, 0.94);
  transition: var(--t);
  position: relative;
}
.theme-switch__container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  box-shadow:
    0 0.05em 0.187em rgba(0, 0, 0, 0.25) inset,
    0 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  border-radius: var(--cr);
}
.theme-switch__checkbox {
  display: none;
}
.theme-switch__circle {
  width: var(--cd);
  height: var(--cd);
  background: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: var(--co);
  top: var(--co);
  border-radius: var(--cr);
  box-shadow:
    inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
    inset 0 0 0 3.375em rgba(255, 255, 255, 0.1),
    0 0 0 0.625em rgba(255, 255, 255, 0.1),
    0 0 0 1.25em rgba(255, 255, 255, 0.1);
  display: flex;
  transition: var(--ct);
  pointer-events: none;
}
.theme-switch__sun-moon {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: var(--smd);
  height: var(--smd);
  margin: auto;
  border-radius: var(--cr);
  background: var(--sun);
  box-shadow:
    0.062em 0.062em 0.062em 0 rgba(254, 255, 239, 0.61) inset,
    0 -0.062em 0.062em 0 #a85f0a inset;
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25))
    drop-shadow(0 0.062em 0.125em rgba(0, 0, 0, 0.25));
  overflow: hidden;
  transition: var(--t);
}
.theme-switch__moon {
  transform: translateX(100%);
  width: 100%;
  height: 100%;
  background: var(--moon);
  border-radius: inherit;
  box-shadow:
    0.062em 0.062em 0.062em 0 rgba(254, 255, 239, 0.61) inset,
    0 -0.062em 0.062em 0 #969696 inset;
  transition: var(--t);
  position: relative;
}
.theme-switch__spot {
  position: absolute;
  top: 0.75em;
  left: 0.312em;
  width: 0.75em;
  height: 0.75em;
  border-radius: var(--cr);
  background: var(--spot);
  box-shadow: 0 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}
.theme-switch__spot:nth-of-type(2) {
  width: 0.375em;
  height: 0.375em;
  top: 0.937em;
  left: 1.375em;
}
.theme-switch__spot:nth-last-of-type(3) {
  width: 0.25em;
  height: 0.25em;
  top: 0.312em;
  left: 0.812em;
}
.theme-switch__clouds {
  width: 1.25em;
  height: 1.25em;
  background: var(--cl);
  border-radius: var(--cr);
  position: absolute;
  bottom: -0.625em;
  left: 0.312em;
  box-shadow:
    0.937em 0.312em var(--cl),
    -0.312em -0.312em var(--bcl),
    1.437em 0.375em var(--cl),
    0.5em -0.125em var(--bcl),
    2.187em 0 var(--cl),
    1.25em -0.062em var(--bcl),
    2.937em 0.312em var(--cl),
    2em -0.312em var(--bcl),
    3.625em -0.062em var(--cl),
    2.625em 0 var(--bcl),
    4.5em -0.312em var(--cl),
    3.375em -0.437em var(--bcl),
    4.625em -1.75em 0 0.437em var(--cl),
    4em -0.625em var(--bcl),
    4.125em -2.125em 0 0.437em var(--bcl);
  transition: var(--t);
}
.theme-switch__stars {
  position: absolute;
  color: var(--star);
  top: -100%;
  left: 0.312em;
  width: 2.75em;
  height: auto;
  transition: var(--t);
}
.theme-switch__checkbox:checked + .theme-switch__container {
  background: #1d1f2c;
}
.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__circle {
  left: calc(100% - var(--co) - var(--cd));
}
.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__circle:hover {
  left: calc(100% - var(--co) - var(--cd) - 0.187em);
}
.theme-switch__circle:hover {
  left: calc(var(--co) + 0.187em);
}
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
  transform: translate(0);
}
.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__clouds {
  bottom: -4.062em;
}
.theme-switch__checkbox:checked
  + .theme-switch__container
  .theme-switch__stars {
  top: 50%;
  transform: translateY(-50%);
}

/* ── dark mode overrides ────────────────────────────────── */
body.dark {
  --paper: #0f1117;
  --stone: #191b23;
  --ink: #e8e8ec;
  --ink-soft: #b0b4c0;
  --line: rgba(232, 232, 236, 0.1);
  --line-paper: rgba(232, 232, 236, 0.08);
  --muted: #6e7380;
  --accent: #5c7cfc;
  --accent-deep: #8ea4ff;
  --accent-lite: #3d5fdb;
  --geo-color: #ffffff;
  --on-accent: #ffffff;
}
body.dark .about {
  background: var(--stone);
}
body.dark .case {
  background: var(--stone);
  color: var(--ink);
}
body.dark .case__stage {
  background: transparent;
}
body.dark .contact {
  background: var(--stone);
  color: var(--ink);
}
body.dark .footer__big {
  -webkit-text-stroke-color: rgba(232, 232, 236, 0.22);
}
body.dark .contact-modal__panel {
  background: var(--stone);
}
body.dark .contact-modal__field input,
body.dark .contact-modal__field textarea {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
body.dark .work-expanded,
body.dark .service-expanded {
  background: var(--paper);
}
body.dark .mhs-browser {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
}
.nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--paper) 0%,
    var(--paper) 10%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  transition: background 0.45s;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}
.nav__blend {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  color: var(--ink);
  position: relative;
  z-index: 1;
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.nav__logo sup {
  color: inherit;
  font-size: 0.55em;
}
.nav__links {
  display: flex;
  gap: 1.8rem;
}
.nav__links a {
  font-size: 0.88rem;
  font-weight: 500;
  position: relative;
  padding: 0.2rem 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__cta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  padding: 0.7rem 1.4rem;
  font-size: 0.88rem;
}
.nav__cta:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.nav__burger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.nav__burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition:
    transform 0.35s var(--ease-out),
    background 0.45s;
}
.nav--inverse .nav__burger span {
  background: var(--ink);
}
.nav__burger[aria-expanded="true"] span {
  background: var(--ink) !important;
}
.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--stone);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7rem var(--gutter) 3rem;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu__links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.menu__links a {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2.6rem, 11vw, 4.5rem);
  line-height: 1.15;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.menu__links a em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--accent);
}
.menu__foot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.menu__foot a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
}
.menu__foot p {
  color: var(--muted);
}

/* ── hero ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 14vh, 8rem) var(--gutter) 0;
}

.hero-arch {
  position: absolute;
  right: clamp(1rem, 7vw, 9rem);
  bottom: -16px;
  width: clamp(260px, 32vw, 480px);
  height: calc(min(72vh, 680px) + 16px);
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  overflow: hidden;
  background: linear-gradient(
    170deg,
    #ccd4ef 0%,
    #5a73e8 35%,
    #2434c8 60%,
    #6f85ec 80%,
    #2b3ff2 100%
  );
  z-index: 0;
}
.hero-arch__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-arch__canvas.is-on {
  opacity: 1;
}
.hero-arch__overlay {
  position: absolute;
  inset: 0 0 -5px 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(to top, var(--paper) 0%, transparent 8%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  color: var(--muted);
  margin-bottom: clamp(1rem, 3vh, 2rem);
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 640;
  font-optical-sizing: auto;
  font-size: clamp(4.2rem, 16.5vw, 15rem);
  line-height: 0.86;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-left: -0.04em;
}
.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.hero__line--indent {
  padding-left: clamp(2rem, 12vw, 14rem);
}
.hero__star {
  display: inline-block;
  color: var(--accent);
  font-size: 0.32em;
  vertical-align: super;
  margin-left: 0.15em;
}
.split-chars {
  display: inline-block;
}
.split-chars .char {
  display: inline-block;
  will-change: transform;
}

.hero__tag {
  max-width: 34ch;
  margin-top: clamp(1.4rem, 4vh, 2.6rem);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.5;
}
.hero__tag em {
  color: var(--accent-deep);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(1.4rem, 3.5vh, 2.4rem);
}

.hero__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1.6rem;
  margin-top: auto;
}
.hero__avail {
  display: flex;
  align-items: center;
}
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}
.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: var(--ink);
  display: block;
  animation: scrollHint 2.2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scrollHint {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  45% {
    transform: scaleY(1);
    transform-origin: top;
  }
  55% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}
.hero__geo {
  color: var(--muted);
  text-align: right;
}

/* ── marquee band ─────────────────────────────────────────── */

.band {
  background: var(--accent);
  color: var(--paper);
  transform: rotate(-1.6deg) scale(1.02);
  margin: clamp(2rem, 6vh, 4rem) -2vw;
  overflow: hidden;
  border-top: 1px solid var(--accent-deep);
  border-bottom: 1px solid var(--accent-deep);
}
.band__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
  padding: 0.85rem 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  letter-spacing: 0.02em;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ── case study ───────────────────────────────────────────── */

.case {
  background: var(--ink);
  color: var(--paper);
  padding: var(--section-pad) var(--gutter);
  margin-top: clamp(2rem, 6vh, 4rem);
  border-radius: clamp(20px, 4vw, 48px) clamp(20px, 4vw, 48px) 0 0;
}
.case .sec-label {
  color: rgba(241, 241, 236, 0.55);
  border-color: var(--line-paper);
}

.case__title {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.case__title em {
  color: var(--accent-lite);
  font-weight: 460;
}
.case__sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: rgba(241, 241, 236, 0.75);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 340;
}

.case__body {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  margin-top: clamp(3rem, 8vh, 6rem);
  align-items: start;
}
.case__body > * {
  min-width: 0;
}
.case__copy p strong {
  color: var(--accent-lite);
  font-weight: 600;
}
.case__copy > p {
  color: rgba(241, 241, 236, 0.85);
}

.case__points {
  margin: 2.2rem 0;
  display: grid;
  gap: 0.9rem;
}
.case__points li {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-paper);
  color: rgba(241, 241, 236, 0.85);
  font-size: 0.98rem;
}
.case__points .mono {
  color: var(--accent-lite);
}

.case__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
  margin-bottom: 2.4rem;
}
.case__meta dt {
  color: rgba(241, 241, 236, 0.5);
  margin-bottom: 0.25rem;
}
.case__meta dd {
  font-size: 0.95rem;
}

/* mockup stage */
.case__stage {
  position: relative;
  min-height: 540px;
  max-width: 620px;
}

.mhs-browser {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(241, 241, 236, 0.25);
  max-width: 620px;
  will-change: transform;
}
.mhs-browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1d2026;
  padding: 10px 14px;
}
.mhs-browser__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4d525c;
}
.mhs-browser__url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #9aa0ad;
  background: rgba(241, 241, 236, 0.07);
  border-radius: 6px;
  padding: 3px 12px;
}
.mhs-browser__img {
  display: block;
  width: 100%;
  height: auto;
}

.mhs-phone {
  position: absolute;
  right: -0.75rem;
  bottom: -2.75rem;
  width: min(208px, 46vw);
  aspect-ratio: 367 / 813;
  padding: 0.5rem;
  background: linear-gradient(155deg, #2a2d34, #0c0d10);
  border-radius: 2.4rem;
  box-shadow:
    0 36px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(241, 241, 236, 0.12),
    inset 0 0 0 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  will-change: transform;
}
.mhs-phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.95rem;
  overflow: hidden;
  background: #0c0d10;
}
.mhs-phone__notch {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 1.05rem;
  border-radius: 100px;
  background: #07080a;
  box-shadow: inset 0 0 0 1px rgba(241, 241, 236, 0.08);
  z-index: 2;
}
.mhs-phone__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.mhs-browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1d2026;
  padding: 10px 14px;
}
.mhs-browser__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4d525c;
}
.mhs-browser__url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #9aa0ad;
  background: rgba(241, 241, 236, 0.07);
  border-radius: 6px;
  padding: 3px 12px;
}

/* ── case stats ───────────────────────────────────────────── */

.case__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: clamp(4rem, 10vh, 7rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line-paper);
}
.case__stats .stat b {
  color: var(--accent-lite);
}
.case__stats .stat span {
  color: rgba(241, 241, 236, 0.6);
}

.case__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-paper);
}
.case__gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-paper);
  transition: transform 0.3s var(--ease-out);
}
.case__gallery img:hover {
  transform: scale(1.02);
}

/* ── selected works ───────────────────────────────────────── */

.works {
  padding: var(--section-pad) var(--gutter);
}
.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
}
.work-card {
  display: block;
}
.work-card__thumb {
  position: relative;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.work-card__thumb span {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(3.5rem, 7vw, 6rem);
  color: rgba(241, 241, 236, 0.92);
  transition: transform 0.6s var(--ease-out);
}
.work-card:hover .work-card__thumb span {
  transform: scale(1.12) rotate(-3deg);
}
.thumb-kopi {
  background:
    radial-gradient(
      circle at 70% 30%,
      rgba(241, 241, 236, 0.18) 0 18%,
      transparent 19%
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(241, 241, 236, 0.12) 0 30%,
      transparent 31%
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(241, 241, 236, 0.07) 0 44%,
      transparent 45%
    ),
    linear-gradient(150deg, #3a2a1d, #1d1611);
}
.thumb-park {
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0 34px,
      rgba(43, 63, 242, 0.55) 34px 40px
    ),
    linear-gradient(150deg, #23282e, #14171b);
}
.thumb-sewa {
  background:
    radial-gradient(
      circle at 25% 80%,
      rgba(241, 241, 236, 0.14) 0 26%,
      transparent 27%
    ),
    linear-gradient(150deg, #2e5339, #1c3324);
}
.thumb-bug {
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 21px,
      rgba(241, 241, 236, 0.05) 21px 22px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 21px,
      rgba(241, 241, 236, 0.05) 21px 22px
    ),
    radial-gradient(
      circle at 28% 72%,
      rgba(232, 130, 12, 0.4) 0 18%,
      transparent 46%
    ),
    linear-gradient(150deg, #2b2118, #15110c);
}
.thumb-invoice {
  background:
    radial-gradient(
      circle at 78% 24%,
      rgba(255, 255, 255, 0.16) 0 20%,
      transparent 21%
    ),
    radial-gradient(
      circle at 78% 24%,
      rgba(255, 255, 255, 0.08) 0 32%,
      transparent 33%
    ),
    linear-gradient(150deg, #15a394, #0f766e 55%, #0b4f49);
}
.thumb-resume {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(241, 241, 236, 0.09) 0 2px,
      transparent 2px 17px
    ),
    linear-gradient(150deg, #34406a, #171c2c);
}
.work-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
  margin-bottom: 0.5rem;
}
.work-card__row h3 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}
.work-card__row .mono {
  color: var(--muted);
}
.work-card__tags {
  color: var(--muted);
}

/* ── about ────────────────────────────────────────────────── */

.about {
  background: var(--stone);
  padding: var(--section-pad) var(--gutter);
  border-radius: clamp(20px, 4vw, 48px);
  margin: 0 clamp(0.5rem, 1.5vw, 1.5rem);
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) 3fr;
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.about__portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.about__shader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 3 / 4;
  max-height: min(480px, 70vh);
  border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px;
  overflow: hidden;
  z-index: 0;
  background: linear-gradient(160deg, #6f85ec 0%, #2b3ff2 55%, #131e7a 100%);
}
.about__shader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 3 / 4;
  max-height: min(480px, 70vh);
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(to top, var(--stone) 0%, transparent 13%);
  pointer-events: none;
}
.about__portrait-art {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(480px, 70vh);
  border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px;
  overflow: hidden;
  background-image:
    radial-gradient(
      circle at 30% 25%,
      rgba(241, 241, 236, 0.35) 0 12%,
      transparent 32%
    ),
    radial-gradient(
      circle at 75% 80%,
      rgba(20, 22, 27, 0.35) 0 20%,
      transparent 50%
    ),
    linear-gradient(160deg, #6f85ec 0%, #2b3ff2 55%, #131e7a 100%);
  background-size: cover, cover, cover;
  background-position: center, center, center;
  margin-bottom: 0.9rem;
  /* washout aligned with arch overlay */
  -webkit-mask-image: linear-gradient(to top, transparent 0%, black 3%);
  mask-image: linear-gradient(to top, transparent 0%, black 3%);
}
.about__portrait .mono {
  color: var(--muted);
  text-align: center;
}
.about__title {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 1.8rem;
}
.about__title em {
  color: var(--accent-deep);
}
/* hacker-decode scramble chars */
.tg {
  color: var(--accent-lite);
}
.to {
  color: var(--muted);
  opacity: 0.6;
}
.is-decoded {
  color: var(--accent);
}
.about__copy > p {
  max-width: 56ch;
  color: var(--ink-soft);
}
.about__copy > p strong {
  color: var(--accent);
  font-weight: 600;
}
.about__copy > p em {
  color: var(--accent-deep);
}
.about__resume {
  margin-top: 2rem;
  align-self: flex-start;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* ── services ─────────────────────────────────────────────── */

.services {
  padding: var(--section-pad) var(--gutter);
}
.services__list {
  border-top: 1px solid var(--line);
}
.svc-row {
  position: relative;
  display: grid;
  grid-template-columns: 4rem 1fr auto 3rem;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3.5vw, 2.4rem) 0.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  cursor: default;
}
.svc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
  z-index: 0;
}
.svc-row:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}
.svc-row > * {
  position: relative;
  z-index: 1;
  transition:
    color 0.35s,
    transform 0.45s var(--ease-out);
}
.svc-row__idx {
  color: var(--accent);
}
.svc-row h3 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.6rem, 4.2vw, 3.2rem);
  letter-spacing: -0.01em;
}
.svc-row__tags {
  color: var(--muted);
}
.svc-row__arrow {
  font-size: 1.4rem;
}
.svc-row:hover h3 {
  color: var(--paper);
  transform: translateX(12px);
}
.svc-row:hover .svc-row__tags {
  color: color-mix(in srgb, var(--paper) 60%, transparent);
}
.svc-row:hover .svc-row__arrow {
  color: var(--accent-lite);
  transform: translateX(6px) rotate(-45deg);
}

/* ── contact ──────────────────────────────────────────────── */

.contact {
  background: var(--ink);
  color: var(--paper);
  border-radius: clamp(20px, 4vw, 48px);
  margin: 0 clamp(0.5rem, 1.5vw, 1.5rem);
  padding: var(--section-pad) var(--gutter);
  text-align: center;
}
.contact__kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  color: rgba(241, 241, 236, 0.75);
  margin-bottom: 1rem;
}
.contact__cta {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(3rem, 12vw, 11.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: color 0.4s;
  will-change: transform;
}
.contact__cta:hover {
  color: var(--accent-lite);
}
.contact__arrow {
  display: inline-block;
  transition: transform 0.45s var(--ease-out);
}
.contact__cta:hover .contact__arrow {
  transform: translate(0.06em, -0.06em) rotate(45deg);
}
.contact__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: clamp(3.5rem, 9vh, 6rem);
  padding-top: 2.2rem;
  border-top: 1px solid var(--line-paper);
  text-align: left;
}
.contact__meta .mono {
  color: rgba(241, 241, 236, 0.5);
  margin-bottom: 0.5rem;
}
.contact__meta a {
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    color 0.3s;
}
.contact__meta a:hover {
  color: var(--accent-lite);
  border-color: var(--accent-lite);
}
.contact__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

/* ── footer ───────────────────────────────────────────────── */

.footer {
  padding: clamp(3rem, 7vh, 5rem) var(--gutter) 1.6rem;
  overflow: hidden;
}
.footer__big {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(4rem, 17vw, 16rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(20, 22, 27, 0.25);
  user-select: none;
}
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 5vh, 3.5rem);
  padding-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer__top {
  background: none;
  border: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.footer__top:hover {
  color: var(--accent);
}

/* ── responsive ───────────────────────────────────────────── */

@media (max-width: 1024px) {
  .case__body {
    grid-template-columns: 1fr;
  }
  .case__stage {
    min-height: 0;
    margin-top: 1rem;
  }
  .mhs-browser {
    max-width: min(640px, 100%);
    margin: 0 auto;
  }
  .mhs-phone {
    width: min(126px, 35vw);
    bottom: -0.5rem;
    right: 10px;
  }
  .case__stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__grid {
    grid-template-columns: 1fr;
  }
  .about__portrait {
    position: relative;
    max-width: 320px;
    margin-top: -102px;
  }
  .about__portrait-art,
  .about__shader,
  .about__shader-overlay {
    max-height: min(358px, 55vh);
  }
  .about__title {
    margin-top: calc(3rem + 50px);
  }
}

@media (max-width: 768px) {
  /* keep theme toggle + burger reachable; hide only desktop links + CTA */
  .nav__links,
  .nav__cta {
    display: none;
  }
  .nav__burger {
    display: flex;
  }
  .works__grid {
    grid-template-columns: 1fr;
  }
  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .svc-row {
    grid-template-columns: 2.4rem 1fr 2rem;
  }
  .svc-row__tags {
    display: none;
  }
  .contact__meta {
    grid-template-columns: 1fr;
  }
  .hero__geo {
    display: none;
  }
  .hero-arch {
    right: 50%;
    transform: translateX(50%);
    width: min(320px, 78vw);
    height: 56vh;
    border-radius: 30% 30% 0 0 / 32% 32% 0 0;
    opacity: 0.9;
  }
  .hero__line--indent {
    padding-left: clamp(1.2rem, 9vw, 4rem);
  }
  .case__stats {
    gap: 1.4rem;
  }
  .mhs-phone {
    width: min(112px, 32vw);
    bottom: -1rem;
    right: 10px;
  }
}

/* ── reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .band__track {
    animation: none;
  }
  .hero-arch__canvas {
    display: none;
  }
}

/* ════════════════════════════════════════════════════════════
   DATA-DRIVEN UPDATES
   ════════════════════════════════════════════════════════════ */

/* GEO text legibility fix (data.json → --geo-color) */
.hero__geo {
  color: var(--geo-color, #14161b);
}

/* FIX #3: work card thumb smooth transform */
.work-card__thumb span {
  will-change: transform;
}

/* FIX #4: svc-row ::before should not capture pointer events */
.svc-row::before {
  pointer-events: none;
}

/* FIX #8: hero arch clipPath smooth */
.hero-arch {
  will-change: clip-path;
}

/* ── contact modal ──────────────────────────────────────── */

.contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2600;
}
.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 27, 0.75);
  backdrop-filter: blur(6px);
}
.contact-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  width: min(440px, 90vw);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.contact-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.contact-modal__close:hover {
  color: var(--ink);
}
.contact-modal__title {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.6rem;
  margin-bottom: 1.4rem;
}
.contact-modal__field {
  margin-bottom: 1rem;
}
.contact-modal__field label {
  display: block;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.required {
  color: #c95a3c;
}
.contact-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}
.contact-modal__consent svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.05rem;
  color: var(--accent);
}
.contact-modal__alt {
  text-transform: none;
  letter-spacing: 0;
}
.contact-modal__alt a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    color 0.3s;
}
.contact-modal__alt a:hover {
  color: var(--accent-deep);
  border-bottom-color: currentColor;
}
.contact-modal__field.is-invalid input,
.contact-modal__field.is-invalid textarea {
  border-color: #c95a3c;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.contact-modal__field input,
.contact-modal__field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.25s;
}
.contact-modal__field input:focus,
.contact-modal__field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-modal__field textarea {
  resize: vertical;
}
.contact-modal__error {
  color: #c95a3c;
  font-size: 0.82rem;
  margin-top: 0.3rem;
  display: block;
}
.contact-modal__submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}
.contact-modal__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(241, 241, 236, 0.4);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.contact-modal__success {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent-deep);
  padding: 1rem 0;
}
.contact-modal__server-error {
  color: #c95a3c;
  text-align: center;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-style: italic;
}

/* ── work expanded (card-to-modal) ──────────────────────── */

.work-expanded {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: var(--paper);
  overflow: hidden;
}
.work-expanded__inner {
  height: 100dvh;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem)
    clamp(1.5rem, 3vh, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.work-expanded__header {
  text-align: center;
  flex-shrink: 0;
}
.work-expanded__title {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.1;
}
.work-expanded__year {
  display: block;
  margin-top: 0.25rem;
}
.work-expanded__tags {
  color: var(--muted);
  margin-top: 0.15rem;
}
.work-expanded__sep {
  width: 100%;
  height: 1px;
  background: var(--line);
  flex-shrink: 0;
  margin: clamp(0.6rem, 2vh, 1.2rem) 0;
}
.work-expanded__carousel {
  width: 100%;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
}
.work-expanded__gallery {
  display: flex;
  gap: 0;
  width: 100%;
  max-height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 12px;
}
.work-expanded__gallery::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.work-expanded__gallery img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 12px;
  scroll-snap-align: center;
  flex-shrink: 0;
}
.work-expanded__desc-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.6rem) 0.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  width: 100%;
  flex-shrink: 0;
  cursor: default;
}
.work-expanded__desc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
  z-index: 0;
  pointer-events: none;
}
.work-expanded__desc-row:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}
.work-expanded__desc-row > * {
  position: relative;
  z-index: 1;
  transition:
    color 0.35s,
    transform 0.45s var(--ease-out);
}
.work-expanded__desc-row .work-expanded__desc {
  max-width: none;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}
.work-expanded__desc-row .work-expanded__live {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.work-expanded__desc-row .work-expanded__live-arrow {
  font-size: 1.1rem;
}
.work-expanded__desc-row:hover .work-expanded__desc {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}
.work-expanded__desc-row:hover .work-expanded__live {
  color: var(--paper);
  transform: translateX(6px);
}
.work-expanded__placeholder {
  width: 100%;
  max-width: 1200px;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.work-expanded__placeholder span {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(3rem, 8vw, 6rem);
  color: rgba(241, 241, 236, 0.92);
}
.work-expanded__close {
  position: fixed;
  top: 1.2rem;
  right: var(--gutter);
  z-index: 2600;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s;
}
.work-expanded__close:hover {
  background: var(--accent);
}
.work-expanded__others {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  flex-shrink: 0;
  width: 100%;
  justify-content: center;
}
.work-expanded__other-card {
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 5 / 3;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}
.work-expanded__other-card:hover {
  transform: scale(1.05);
}
.work-expanded__other-card span {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.4rem;
  color: rgba(241, 241, 236, 0.92);
}
.work-expanded__other-card p {
  font-size: 0.75rem;
  color: rgba(241, 241, 236, 0.7);
  margin-top: 0.3rem;
}

/* ── service expanded ───────────────────────────────────── */

.service-expanded {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: var(--paper);
  overflow: hidden;
}
.service-expanded__inner {
  height: 100dvh;
  max-width: 1340px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vh, 5rem) clamp(1.25rem, 4vw, 3rem)
    clamp(1.5rem, 4vh, 2.5rem);
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  grid-template-areas: "media info";
  align-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.service-expanded__carousel {
  grid-area: media;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
}
.service-expanded__gallery {
  display: flex;
  gap: 0;
  width: 100%;
  overflow-x: auto;
  min-height: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 12px;
}
.service-expanded__gallery::-webkit-scrollbar {
  display: none;
}
.service-expanded__gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(760px, 72dvh);
  object-fit: cover;
  border-radius: 12px;
  scroll-snap-align: center;
  flex-shrink: 0;
}
.service-expanded__placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(760px, 72dvh);
  border-radius: 12px;
  background: linear-gradient(150deg, var(--stone), var(--paper));
  display: grid;
  place-items: center;
}
.service-expanded__info {
  grid-area: info;
  align-self: center;
  min-height: 0;
  overflow-y: auto;
}
.service-expanded__placeholder span {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--accent);
  opacity: 0.4;
}
.service-expanded__info h2 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.service-expanded__tags {
  color: var(--muted);
  margin-bottom: 1rem;
}
.service-expanded__desc {
  max-width: 56ch;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.service-expanded__live {
  display: inline-flex;
}
.service-expanded__close {
  position: fixed;
  top: 1.2rem;
  right: var(--gutter);
  z-index: 2600;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.3s;
}
.service-expanded__close:hover {
  background: var(--accent);
}

/* carousel arrows for detail media */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.85;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition:
    opacity 0.25s,
    background 0.25s,
    transform 0.25s;
}
.carousel__btn:hover {
  opacity: 1;
  background: var(--accent);
}
.carousel__btn--prev {
  left: 0.6rem;
}
.carousel__btn--next {
  right: 0.6rem;
}
.carousel__btn:active {
  transform: translateY(-50%) scale(0.92);
}

/* detail overlays: single column + scroll on small screens */
@media (max-width: 768px) {
  .work-expanded__inner {
    align-items: stretch;
    padding: clamp(2.5rem, 6vh, 3.5rem) clamp(1rem, 3vw, 1.5rem)
      clamp(1rem, 3vh, 1.5rem);
    overflow-y: auto;
  }
  .work-expanded__header {
    text-align: left;
  }
  .work-expanded__desc-row {
    padding: 1rem 0.25rem;
  }
  .work-expanded__desc {
    max-width: none;
  }
  .service-expanded__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "info";
    align-content: start;
    height: 100dvh;
    overflow-y: auto;
    gap: 1.25rem;
  }
  .work-expanded__gallery img,
  .work-expanded__placeholder,
  .service-expanded__gallery img,
  .service-expanded__placeholder {
    max-height: 34dvh;
  }
}
