/* ================================================
   BlitzUI Tokens — Dark Mode (default for Cimang)
   ================================================ */
:root {
  --primary: #ffb300;
  --primary-deep: #e59a00;
  --primary-soft: #3b2e0e;
  --on-primary: #1a1208;

  --acid-lime: #c6ff3d;
  --acid-pink: #ff3daa;
  --acid-blue: #2d6bff;

  --bg: #0e0b05;
  --bg-elev: #15110a;
  --bg-sunken: #080602;
  --bg-tint: #1f1a0e;
  --ink: #fbf6e8;
  --ink-mid: #d9cfb4;
  --ink-soft: #8a8068;
  --ink-faint: #5a5238;
  --hairline: #2c2616;
  --hairline-soft: #1f1a0e;

  --font-sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Menlo", monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;

  --nav-bg: rgba(14, 11, 5, 0.88);
  --ring-color: rgba(251, 246, 232, 0.25);
}

/* ================================================
   Light Mode
   ================================================ */
body.light-mode {
  --bg: #faf6ec;
  --bg-elev: #f0e8d4;
  --bg-sunken: #fefcf4;
  --bg-tint: #e8dfc8;
  --ink: #1a1208;
  --ink-mid: #3b2e0e;
  --ink-soft: #7a6840;
  --ink-faint: #b09870;
  --hairline: #d4c8a0;
  --hairline-soft: #e5dcc4;
  --nav-bg: rgba(250, 246, 236, 0.9);
  --ring-color: rgba(26, 18, 8, 0.15);
}

/* ================================================
   Reset
   ================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
  overflow-x: hidden;
}

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

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

/* ================================================
   Noise Canvas — subtle film grain overlay
   ================================================ */
#noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.038;
}

/* ================================================
   Custom Cursor
   ================================================ */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

.cur-dot {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 50%;
  transition:
    background var(--dur-2) var(--ease),
    transform var(--dur-1) var(--ease);
}

.cur-ring {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ring-color);
  border-radius: 50%;
}

body.is-hovering .cur-dot {
  transform: scale(2.2);
  background: var(--primary);
}

body.is-hovering .cur-ring {
  transform: scale(1.6);
  border-color: rgba(255, 179, 0, 0.3);
}

/* ================================================
   Nav
   ================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--hairline);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mid);
}

.nav__mark {
  width: 26px;
  height: 26px;
  background: var(--primary);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--on-primary);
  border-radius: 2px;
  flex-shrink: 0;
  letter-spacing: 0;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--ink-faint);
  cursor: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transition:
    border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease);
}

.theme-toggle:hover {
  border-color: var(--ink-faint);
  color: var(--ink-mid);
}

/* Sun = switch to light (shown in dark mode); Moon = switch to dark (shown in light mode) */
body:not(.light-mode) .icon-moon {
  display: none;
}
body.light-mode .icon-sun {
  display: none;
}

.pulse {
  width: 6px;
  height: 6px;
  background: var(--acid-lime);
  border-radius: 50%;
  animation: pulse-anim 1.6s ease-in-out infinite;
}

@keyframes pulse-anim {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.6);
  }
}

/* ================================================
   Hero
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 48px 96px;
  overflow: hidden;
}

/* -- Decorative crosses -- */
.cross {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
}
.cross::before,
.cross::after {
  content: "";
  position: absolute;
  background: var(--hairline);
}
.cross::before {
  width: 100%;
  height: 1px;
  top: 50%;
  transform: translateY(-50%);
}
.cross::after {
  height: 100%;
  width: 1px;
  left: 50%;
  transform: translateX(-50%);
}

/* -- Corner annotations -- */
.corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  line-height: 1.7;
  z-index: 10;
  pointer-events: none;
}
.corner--tl {
  top: 90px;
  left: 48px;
}
.corner--tr {
  top: 90px;
  right: 48px;
  text-align: right;
}

/* ================================================
   Hero Content
   ================================================ */
.hero__content {
  position: relative;
  z-index: 10;
}

/* -- Eyebrow -- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up 0.5s var(--ease) 0.1s forwards;
}

.eyebrow__dash {
  width: 24px;
  height: 1px;
  background: var(--hairline);
}

.eyebrow__sep {
  color: var(--hairline);
}

/* -- Title -- */
.title-block {
  margin-bottom: 0;
}

.title-row {
  overflow: hidden;
  line-height: 0.86;
}

.title-row + .title-row {
  margin-top: 4px;
}

.word {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(76px, 13vw, 196px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.86;
  opacity: 0;
  transform: translateY(105%);
}

.word--1 {
  color: var(--ink);
  animation: slide-up 1s var(--ease-out) 0.3s forwards;
}

.word--2 {
  animation: slide-up 1s var(--ease-out) 0.46s forwards;
  display: flex;
  align-items: baseline;
}

.word--2 .w-text {
  color: var(--ink-mid);
}

.word--2 .w-dot {
  color: var(--primary);
  margin-left: 4px;
}

/* -- Clickable characters -- */
.char {
  display: inline;
  transition: color var(--dur-1) var(--ease);
}

.char:hover {
  color: var(--primary);
}

/* -- Divider + body -- */
.hero__lower {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up 0.6s var(--ease) 0.9s forwards;
}

.hero__desc {
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--ink-mid);
  line-height: 1.6;
  max-width: 46ch;
}


/* ================================================
   Marquee Strip
   ================================================ */
.marquee-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  border-top: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--bg-sunken);
  z-index: 20;
}

.marquee-track {
  display: flex;
  animation: marquee 28s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.marquee-content {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.m-sep {
  margin: 0 22px;
  color: var(--primary);
  font-size: 8px;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ================================================
   Keyframes
   ================================================ */
@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
  .nav {
    padding: 16px 24px;
  }

  .hero {
    padding: 100px 24px 88px;
    justify-content: flex-end;
  }

  .corner--tr {
    display: none;
  }

  .corner--tl {
    top: 80px;
    left: 24px;
  }

  .cross {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav__brand span {
    display: none;
  }
}

/* mobile — restore native cursor */
@media (hover: none) {
  body {
    cursor: auto;
  }
  #cursor {
    display: none;
  }
}

/* ================================================
   Project Panel — absolute inside hero
   ================================================ */
@media (min-width: 769px) {
  .hero {
    padding-right: calc(340px + 48px);
  }

  .corner--tr {
    right: calc(340px + 20px);
  }
}

.hero__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  border-left: 1px solid var(--hairline);
  background: var(--bg);
  z-index: 15;
}

.hero__panel::-webkit-scrollbar {
  display: none;
}

/* ================================================
   Project Panel
   ================================================ */
.panel__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* paddingTop / paddingBottom set by JS */
}

.pcard-wrap {
  height: 38vh;
  height: 38svh;
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
  transform-origin: center;
}

/* ================================================
   Project Card
   ================================================ */
.pcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.pcard__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pcard__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.pcard__name {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.35s var(--ease);
}

.pcard-wrap.is-active .pcard__name {
  color: var(--ink-mid);
}

.pcard__thumb {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  aspect-ratio: 1;
  transition: border-color 0.35s var(--ease);
}

.pcard-wrap.is-active .pcard__thumb {
  border-color: var(--ink-faint);
}

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

/* ================================================
   Mobile — panel flows below hero as horizontal scroll
   ================================================ */
@media (max-width: 768px) {
  .hero {
    overflow: visible;
    padding-bottom: 48px;
  }

  .hero__panel {
    position: static;
    width: 100%;
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    border-left: none;
    border-top: 1px solid var(--hairline);
    background: var(--bg);
  }

  .hero__panel::-webkit-scrollbar {
    display: none;
  }

  .panel__inner {
    flex-direction: row;
    padding: 20px 24px !important;
    gap: 16px;
    width: max-content;
  }

  .pcard-wrap {
    flex-shrink: 0;
    width: 220px;
    height: auto;
    padding: 0;
    transform: none !important;
    opacity: 1 !important;
  }

  .pcard__thumb img {
    filter: none !important;
  }
}
