﻿:root {
      --ac: #d4b483;
      --ac2: #f3e6c8;
      --mut: #9aa1b2;
      --ink: #e8ecf5;
      --line: rgba(212, 180, 131, .22);
      --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
      --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
      box-sizing: border-box
    }

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

    html,
    body {
      background: #07080c;
      color: var(--ink);
      font: 16px/1.55 var(--sans);
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility
    }

    body {
      height: 560vh
    }

    canvas {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 0
    }

    #vig {
      position: fixed;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(7, 8, 12, .7) 100%), linear-gradient(180deg, rgba(7, 8, 12, .75), transparent 18%, transparent 68%, rgba(7, 8, 12, .8))
    }

    #grain {
      position: fixed;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      opacity: .05;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")
    }

    #bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      z-index: 8;
      transform-origin: left;
      transform: scaleX(0);
      background: linear-gradient(90deg, var(--ac), var(--ac2));
      box-shadow: 0 0 12px rgba(212, 180, 131, .6)
    }

    .hud {
      position: fixed;
      z-index: 5;
      pointer-events: none
    }

    .hud * {
      pointer-events: auto
    }

    .mono {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      font: 600 24px/1 var(--serif);
      color: var(--ac);
      border: 1px solid var(--line);
      background: rgba(212, 180, 131, .06);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px)
    }

    /* header */
    #brand {
      top: 0;
      left: 0;
      right: 0;
      padding: calc(18px + env(safe-area-inset-top, 0px)) 5vw 0;
      display: flex;
      justify-content: space-between;
      align-items: center
    }

    #brand .id {
      display: flex;
      align-items: center;
      gap: 12px;
      color: inherit;
      text-decoration: none
    }

    .bn {
      font-weight: 600;
      letter-spacing: .24em;
      font-size: 12px;
      line-height: 1.2
    }

    .bn em {
      display: block;
      font-style: normal;
      color: var(--mut);
      letter-spacing: .16em;
      font-size: 10px;
      font-weight: 500;
      margin-top: 4px;
      text-transform: uppercase
    }

    /* side nav */
    #dots {
      right: 3vw;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      gap: 4px;
      align-items: flex-end;
      padding: 12px 12px;
      border-radius: 16px;
      background: rgba(10, 12, 18, .45);
      border: 1px solid rgba(255, 255, 255, .06);
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px)
    }

    #dots button {
      background: none;
      border: 0;
      color: var(--mut);
      font: 600 11px var(--sans);
      letter-spacing: .16em;
      cursor: pointer;
      display: flex;
      gap: 10px;
      align-items: center;
      padding: 7px 4px;
      transition: color .25s
    }

    #dots button:hover {
      color: var(--ac2)
    }

    #dots button i {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      border: 1px solid var(--ac);
      display: block;
      transition: .3s
    }

    #dots button.on {
      color: #fff
    }

    #dots button.on i {
      background: var(--ac);
      box-shadow: 0 0 12px var(--ac);
      transform: scale(1.3)
    }

    @media(max-width:640px) {
      #dots button span {
        display: none
      }

      #dots {
        padding: 10px 8px;
        right: 2vw
      }
    }

    /* intro */
    #intro {
      left: 5vw;
      bottom: 12vh;
      max-width: 640px;
      padding-right: 5vw
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      color: var(--ac);
      letter-spacing: .26em;
      text-transform: uppercase;
      font-size: 11px;
      font-weight: 600
    }

    .eyebrow::before {
      content: "";
      width: 34px;
      height: 1px;
      background: var(--ac)
    }

    #intro h1 {
      font: 400 clamp(46px, 7.4vw, 96px)/.98 var(--serif);
      margin: 18px 0 16px;
      letter-spacing: -.015em
    }

    #intro h1 span {
      font-style: italic;
      background: linear-gradient(90deg, var(--ac), var(--ac2));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent
    }

    #intro p {
      color: var(--mut);
      max-width: 460px;
      font-size: 16px
    }

    .acts {
      margin: 22px 0 0 -5px
    }

    .stats {
      display: flex;
      gap: 36px;
      margin-top: 30px;
      padding-top: 20px;
      border-top: 1px solid var(--line);
      max-width: 460px
    }

    .stats dt {
      font: 500 36px/1 var(--serif);
      color: var(--ac2)
    }

    .stats dd {
      font-size: 10.5px;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: var(--mut);
      margin-top: 8px
    }

    @media(max-width:640px) {
      .stats {
        gap: 22px
      }

      .stats dt {
        font-size: 28px
      }

      #intro {
        bottom: 10vh
      }
    }

    /* section counter */
    #sec {
      left: 5vw;
      bottom: calc(24px + env(safe-area-inset-bottom, 0px));
      display: flex;
      gap: 16px;
      align-items: center;
      transition: opacity .4s
    }

    #sec em {
      font: italic 500 30px/1 var(--serif);
      color: var(--ac);
      font-style: normal;
      letter-spacing: .02em;
      min-width: 92px
    }

    #sec div {
      border-left: 1px solid var(--line);
      padding-left: 16px
    }

    #sec b {
      display: block;
      font-size: 12px;
      letter-spacing: .24em;
      color: #fff;
      text-transform: uppercase;
      font-weight: 600
    }

    #sec span {
      color: var(--mut);
      font-size: 13px
    }

    /* scroll hint */
    #hint {
      left: 50%;
      bottom: calc(20px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      color: var(--mut);
      font-size: 10px;
      letter-spacing: .32em;
      animation: b 1.8s ease-in-out infinite
    }

    .mouse {
      width: 20px;
      height: 32px;
      border: 1px solid var(--ac);
      border-radius: 12px;
      position: relative
    }

    .mouse::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 6px;
      width: 2px;
      height: 6px;
      margin-left: -1px;
      border-radius: 2px;
      background: var(--ac);
      animation: w 1.8s infinite
    }

    @keyframes b {
      50% {
        transform: translate(-50%, 6px)
      }
    }

    @keyframes w {
      0% {
        opacity: 0;
        transform: translateY(0)
      }

      30% {
        opacity: 1
      }

      100% {
        opacity: 0;
        transform: translateY(10px)
      }
    }

    @media(max-width:640px) {
      #hint {
        display: none
      }
    }

    /* contact */
    #ct {
      left: 50%;
      top: 17%;
      transform: translateX(-50%);
      text-align: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity .6s, visibility .6s;
      width: 90vw
    }

    #ct.on {
      opacity: 1;
      visibility: visible
    }

    #ct h2 {
      font: 400 clamp(36px, 5.6vw, 68px)/1.04 var(--serif);
      margin: 14px 0 0
    }

    #ct h2 span {
      font-style: italic;
      color: var(--ac)
    }

    #ct p {
      color: var(--mut);
      margin: 12px auto 22px;
      max-width: 480px
    }

    #ft {
      left: 50%;
      bottom: calc(18px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-50%);
      opacity: 0;
      visibility: hidden;
      transition: opacity .6s, visibility .6s;
      font-size: 11px;
      color: var(--mut);
      letter-spacing: .1em;
      white-space: nowrap
    }

    #ft.on {
      opacity: 1;
      visibility: visible
    }

    /* buttons */
    .b {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 5px;
      padding: 12px 22px;
      border-radius: 99px;
      border: 1px solid rgba(212, 180, 131, .45);
      color: #fff;
      text-decoration: none;
      font: 500 14px var(--sans);
      letter-spacing: .02em;
      background: rgba(10, 12, 18, .55);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      cursor: pointer;
      transition: transform .25s, box-shadow .25s, border-color .25s
    }

    .b:hover {
      transform: translateY(-2px);
      border-color: var(--ac);
      box-shadow: 0 8px 28px rgba(212, 180, 131, .18)
    }

    .b.p {
      background: linear-gradient(90deg, var(--ac), var(--ac2));
      color: #14110a;
      border-color: transparent;
      font-weight: 600;
      box-shadow: 0 8px 26px rgba(212, 180, 131, .28)
    }

    .b.p:hover {
      box-shadow: 0 12px 34px rgba(212, 180, 131, .42)
    }

    .b.sm {
      padding: 9px 18px;
      font-size: 13px;
      margin: 0
    }

    .b:focus-visible,
    #dots button:focus-visible,
    .x:focus-visible,
    #brand .id:focus-visible {
      outline: 2px solid var(--ac2);
      outline-offset: 3px
    }

    /* project modal */
    .md {
      position: fixed;
      inset: 0;
      z-index: 50;
      background: rgba(4, 5, 9, .72);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      visibility: hidden;
      transition: opacity .35s, visibility .35s
    }

    .md.open {
      opacity: 1;
      visibility: visible
    }

    .box {
      --g1: #d4b483;
      --g1a: rgba(212, 180, 131, .18);
      --g2: #f3e6c8;
      background: radial-gradient(120% 70% at 100% 0%, var(--g1a), transparent 60%), #0d1017;
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 22px;
      max-width: 660px;
      width: 100%;
      max-height: 88vh;
      overflow: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      padding: 40px 36px 30px;
      position: relative;
      box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
      transform: translateY(18px) scale(.98);
      transition: transform .45s cubic-bezier(.2, .8, .2, 1)
    }

    .md.open .box {
      transform: none
    }

    .box::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--g1), var(--g2))
    }

    .x {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, .05);
      border: 1px solid rgba(255, 255, 255, .1);
      color: #fff;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      transition: background .2s
    }

    .x:hover {
      background: rgba(255, 255, 255, .14)
    }

    .box small {
      color: var(--ac);
      letter-spacing: .2em;
      text-transform: uppercase;
      font-size: 11px;
      font-weight: 600
    }

    .box h3 {
      font: 400 clamp(38px, 6vw, 56px)/1.02 var(--serif);
      margin: 12px 0 4px
    }

    .box .ds {
      color: #b4bccd;
      margin: 12px 0 24px;
      line-height: 1.7
    }

    .mg {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1px;
      background: rgba(255, 255, 255, .08);
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 14px;
      overflow: hidden;
      margin-bottom: 20px
    }

    .mg div {
      background: #0d1017;
      padding: 14px 16px
    }

    .mg b {
      display: block;
      font-size: 10px;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: var(--mut);
      font-weight: 600;
      margin-bottom: 4px
    }

    .mg span {
      font-size: 14px;
      color: #dfe4ef
    }

    .chip {
      display: inline-block;
      font-size: 12px;
      padding: 5px 13px;
      border-radius: 99px;
      border: 1px solid rgba(255, 255, 255, .12);
      background: rgba(255, 255, 255, .03);
      color: #c9d0de;
      margin: 3px 6px 3px 0
    }

    .mf {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      margin-top: 26px;
      flex-wrap: wrap
    }

    .mf .b {
      margin: 0
    }

    .nv {
      display: flex;
      gap: 8px
    }

    .nv .b {
      min-width: 44px;
      height: 44px;
      padding: 0 12px;
      justify-content: center;
      font-size: 16px
    }

    @media(max-width:520px) {
      .mg {
        grid-template-columns: 1fr
      }

      .box {
        padding: 36px 22px 24px
      }
    }

    /* loader + fallback */
    #load {
      position: fixed;
      inset: 0;
      z-index: 90;
      background: #07080c;
      display: grid;
      place-items: center;
      transition: opacity .8s, visibility .8s
    }

    #load.done {
      opacity: 0;
      visibility: hidden
    }

    #load>div {
      text-align: center
    }

    #load .mono {
      width: 64px;
      height: 64px;
      font-size: 36px;
      border-radius: 18px;
      margin: 0 auto 22px
    }

    #load i {
      display: block;
      width: 140px;
      height: 1px;
      background: rgba(255, 255, 255, .1);
      margin: 0 auto;
      position: relative;
      overflow: hidden
    }

    #load i::after {
      content: "";
      position: absolute;
      inset: 0;
      background: var(--ac);
      transform: translateX(-100%);
      animation: ld 1.4s ease-in-out infinite
    }

    @keyframes ld {
      to {
        transform: translateX(100%)
      }
    }

    #load small {
      display: block;
      margin-top: 16px;
      letter-spacing: .3em;
      font-size: 10px;
      color: var(--mut);
      text-transform: uppercase
    }

    #err {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 60;
      background: #07080c;
      padding: 10vw;
      text-align: center
    }

    #err h2 {
      font: 400 40px var(--serif);
      color: var(--ac2);
      margin-bottom: 10px
    }

    #err p {
      color: var(--mut)
    }

    @media(prefers-reduced-motion:reduce) {
      * {
        animation: none !important;
        transition-duration: .01ms !important
      }
    }

    /* ===== responsive layer ===== */
    #intro {
      max-width: 760px
    }

    #intro h1 {
      white-space: nowrap
    }

    body {
      overflow-x: hidden
    }

    body.modal-open {
      overflow: hidden
    }

    .eyebrow {
      flex-wrap: wrap;
      row-gap: 6px
    }

    @supports(height:100dvh) {
      .box {
        max-height: 88dvh
      }
    }

    @media(max-width:900px) {
      #intro {
        max-width: 560px
      }

      #ct {
        max-height: calc(100vh - 17% - 70px);
        overflow: auto
      }
    }

    @media(max-width:640px) {
      #brand {
        padding-left: max(4.5vw, 16px);
        padding-right: max(4.5vw, 16px)
      }

      .bn {
        letter-spacing: .2em
      }

      .bn em {
        display: none
      }

      .mono {
        width: 36px;
        height: 36px;
        font-size: 22px
      }

      #intro {
        left: max(4.5vw, 16px);
        width: calc(100vw - max(4.5vw, 16px) - 62px);
        max-width: none;
        padding-right: 0;
        bottom: calc(9vh + env(safe-area-inset-bottom, 0px))
      }

      .eyebrow {
        font-size: 10px;
        letter-spacing: .16em;
        gap: 10px
      }

      .eyebrow::before {
        width: 20px
      }

      #intro h1 {
        font-size: clamp(36px, 11vw, 52px);
        margin: 14px 0 12px
      }

      #intro p {
        font-size: 14.5px
      }

      .acts {
        margin-top: 16px
      }

      .acts .b {
        padding: 11px 16px;
        font-size: 13px
      }

      .stats {
        margin-top: 20px;
        padding-top: 14px;
        gap: 18px
      }

      .stats dt {
        font-size: 26px
      }

      .stats dd {
        font-size: 9px;
        letter-spacing: .12em
      }

      #sec {
        left: max(4.5vw, 16px);
        gap: 12px
      }

      #sec em {
        font-size: 22px;
        min-width: 68px
      }

      #sec b {
        font-size: 11px
      }

      #sec span {
        font-size: 12px
      }

      #dots {
        right: 6px;
        padding: 8px 6px
      }

      #dots button {
        padding: 9px 6px
      }

      #ct {
        top: 12%;
        width: 92vw;
        padding: 22px 16px 18px
      }

      #ct h2 {
        font-size: clamp(30px, 9.4vw, 44px)
      }

      #ct p {
        font-size: 14px;
        margin: 10px auto 16px
      }

      #ct .b {
        padding: 11px 16px;
        font-size: 13px
      }

      #ft {
        white-space: normal;
        text-align: center;
        width: 88vw;
        font-size: 10px;
        letter-spacing: .06em
      }

      .box {
        padding: 34px 20px 22px;
        border-radius: 18px;
        max-height: calc(100dvh - 24px)
      }

      .md {
        align-items: flex-start;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px))
      }
    }

    @media(max-height:720px) {
      .stats {
        display: none
      }
    }

    @media(max-height:560px) {
      #intro p {
        display: none
      }

      #intro h1 {
        font-size: clamp(34px, 9vh, 54px)
      }

      .acts {
        margin-top: 12px
      }

      #intro {
        bottom: 6vh
      }

      #ct {
        top: 64px;
        max-height: calc(100vh - 110px)
      }

      #ct p,
      #ft {
        display: none
      }
    }

#fallbackProjects {
  margin: 28px auto 0;
  max-width: 900px;
  display: grid;
  gap: 12px;
}

.fallback-project {
  display: block;
  padding: 16px 18px;
  border: 1px solid rgba(212, 180, 131, .22);
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  background: #0d1017;
}

.fallback-project span {
  display: block;
  color: #9aa1b2;
  margin-top: 4px;
  font-size: 13px;
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #07080c;
  padding: 10vw;
}

.file-warning {
  position: fixed;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 9999;
  background: #15110a;
  color: #f3e6c8;
  border: 1px solid rgba(212, 180, 131, .55);
  padding: 10px 16px;
  border-radius: 10px;
  font: 600 12px Inter, system-ui;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.project-preview {
  margin: 18px 0 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #080a10;
  aspect-ratio: 16 / 9;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tech-label {
  display: block;
  margin-bottom: 8px;
  color: #9aa1b2;
}
