/* ═══════════════════════════════════════════════════
   RESET & TOKENS
═══════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Courier Prime", monospace;
  text-decoration: none;
}

:root {
  --clr-bg: #fff;
  --clr-ink: #1a1612;
  --clr-muted: #ffffff;
  --clr-accent: #605d5d;
  --clr-gold: #ffffff;
  --pill-bg: rgba(170, 170, 170, 0.5);
  --pill-hover-bg: rgba(120, 120, 120, 0.7);
  --text-white: #ffffff;
  --transition-speed: 0.4s;
  --bezier: cubic-bezier(0.34, 1.45, 0.64, 1);
  --nav-h: 38px;
  --nav-w-compact: 190px;
  --nav-w-pill: 600px;
  --nav-r: 99px;
  --nav-bg: rgba(86, 85, 83, 0.5);
  --nav-bg-open: rgba(86, 85, 83, 0.75);
  --dot-d: 7px;
  --dot-gap: 14px;
  --bar-w: 52px;
  --bar-h: 7px;
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.4, 0, 0.2, 1);
  --x: -50%;
  --y: -50%;
  --reveal-size: 160px;
}

/* ═══════════════════════════════════════════════════
   PAGE
═══════════════════════════════════════════════════ */
html {
  scroll-behavior: auto;
}

body {
  background: var(--clr-bg);
  color: var(--clr-ink);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════ */
header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  height: 100px;
  z-index: 1000;
  padding: 30px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
  overflow: visible;
}

header * {
  pointer-events: auto;
}

.navlinks {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 2.5px;
  padding: 0;
  margin: 0;
}

/* ═══════════════════════════════════════════════════
   LOGO
═══════════════════════════════════════════════════ */
.logo {
  height: 40px;
  width: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
  transition: 0.3s;
  background-color: rgba(170, 170, 170, 0.5);
}

.logo img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.logo:hover {
  background-color: var(--pill-hover-bg);
  transform: translateY(-2px);
}

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(86, 85, 83, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.25s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.back-to-top:hover {
  background: rgba(120, 118, 116, 0.7);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════
   SMART NAV (About / Work dropdowns)
═══════════════════════════════════════════════════ */
.smart-container {
  position: relative;
  width: 90px;
  height: 40px;
  transition: width var(--transition-speed) var(--bezier);
}

.smart-box {
  position: absolute;
  top: 0;
  left: 1px;
  z-index: 100;
  width: 100%;
  height: 100%;
  background-color: rgba(170, 170, 170, 0.5);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition:
    height 0.4s var(--bezier),
    border-radius 0.4s,
    background-color 0.3s;
}

/* Dùng .is-open từ JS thay vì :hover — tránh đóng ngay khi chuột ra 1px */
.smart-container.is-open {
  width: 320px;
}

.smart-container.is-open .smart-box {
  height: 320px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.box-label {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-white);
  font-weight: 500;
  font-size: 14px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.smart-container.is-open .box-label {
  transform: translateY(-100%);
  opacity: 0;
}

.box-hidden-content {
  opacity: 0;
  visibility: hidden;
  padding: 30px;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease 0.3s,
    transform 0.5s ease 0.3s;
}

.smart-container.is-open .box-hidden-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.content-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.content-top h3 {
  color: #fff;
  font-size: 22px;
  margin: 0;
}

.content-top a {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background 0.22s ease,
    border-color 0.22s ease;
  white-space: nowrap;
}
.content-top a:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

.box-hidden-content p {
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════════
   BANNER
═══════════════════════════════════════════════════ */
.banner-scroll-wrapper {
  height: 200vh;
  position: relative;
  background: #000;
}

.hero-header {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  transform-origin: top center;
  /* OPT: bỏ border-radius khỏi will-change — không GPU-accelerated, browser dùng CPU
     GSAP animate border-radius sẽ tự promote layer khi cần */
  will-change: transform;
  z-index: 10;
}

.banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.banner picture {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  display: block;
  /* OPT: bỏ will-change thường trực — GSAP tự promote layer khi animation bắt đầu */
}

/* ── CONTENT BANER ──────────────────────────────── */
.content-baner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 20;
  pointer-events: none;
  padding: 0 3.5vw 5vh;
}

.cb-title {
  margin: 0;
  padding: 0;
  width: 100%;
  line-height: 0.88;
}

/* Part A — enormous ghost outline: last name as architectural element */
.cb-title-a {
  display: block;
  font-family: "Courier Prime", monospace !important;
  font-size: clamp(5.5rem, 28vw, 26rem);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.88);
  letter-spacing: 0.04em;
  line-height: 0.85;
  text-align: left;
  mix-blend-mode: overlay;
}

/* Part B — solid fill, right-flush, separated by a thin rule */
.cb-title-b {
  display: block;
  font-family: "Courier Prime", monospace !important;
  font-size: clamp(1.8rem, 6.5vw, 6rem);
  color: #fff;
  letter-spacing: 0.28em;
  line-height: 1;
  text-align: right;
  margin-top: 0.18em;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  padding-top: 0.2em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

/* ═══════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════ */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14vh 13vw;
  position: relative;
  z-index: 20;
  overflow: clip; /* clip ≠ hidden: không tạo scroll container → sticky con hoạt động */
}

.lbl h2 {
  /* display: flex; */
  /* align-items: center; */
  font-size: 64px;
  text-align: center;
  justify-content: center;
}

.section.about,
.section.work {
  justify-content: center;
  padding-top: 120px;
}

.section.about {
  overflow: visible; /* cho phép #ph-root tràn ra ngoài padding 13vw */
  padding-bottom: 0; /* ph-root nằm sát đáy section */
}

.section.work {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.s3 {
  min-height: 1300vh;
}
.s4 {
  min-height: 300vh;
}
.s1,
.s2,
.s5 {
  min-height: 100vh;
}

.s3 {
  color: #1a1612;
}

.s3 .lbl,
.s3 .body {
  color: rgba(255, 255, 255, 0.85);
}

.s4 {
  color: #e6e0d4;
}

.s4 .lbl,
.s4 .body {
  color: rgba(230, 224, 212, 0.4);
}

/* ── ALTERNATING BG OVER BODY IMAGE ──
   Odd sections : trong suốt → bg image hiện nguyên
   Even sections: lớp phủ tối ấm → tương tự tone work section ── */
.section.about,
.section.s1,
.section.s3,
.section.s5 {
  background: transparent;
}

.section.work,
.section.s2,
.scroll-section {
  background: rgba(20, 14, 8, 0.1);
}

.lbl {
  font-family: "Courier Prime", monospace;
  font-size: 14px;
  color: #6b1a1a;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.ttl {
  font-family: "Courier Prime", monospace;
  font-size: clamp(38px, 6vw, 84px);
  font-weight: 200;
  line-height: 1.07;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
  max-width: 620px;
}

.body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--clr-muted);
  max-width: 400px;
  font-weight: 300;
}

.ghost {
  position: absolute;
  right: 8vw;
  bottom: 6vh;
  font-family: "Courier Prime", monospace;
  font-size: clamp(80px, 15vw, 200px);
  font-weight: 200;
  opacity: 0.04;
  user-select: none;
  line-height: 1;
  color: currentColor;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   NAV SHELL
═══════════════════════════════════════════════════ */
#nav {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  flex-shrink: 0;
  height: var(--nav-h);
  width: var(--nav-w-compact);
  border-radius: var(--nav-r);
  overflow: hidden;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition:
    width 0.52s var(--ease-spring),
    background 0.28s ease;
}

#nav[data-state="pill"] {
  width: var(--nav-w-pill);
  background: var(--nav-bg-open);
}

.layer-dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--dot-gap);
  padding: 0 20px;
  z-index: 1;
  transition: opacity 0.22s var(--ease-snappy);
}

#nav[data-state="pill"] .layer-dots {
  opacity: 0;
  pointer-events: none;
}

.nav-dot {
  position: relative;
  height: var(--bar-h);
  width: var(--dot-d);
  border-radius: 99px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  transition:
    width 0.4s var(--ease-spring),
    background 0.28s ease,
    opacity 0.28s ease;
}

.nav-dot.is-active {
  width: var(--bar-w);
  background: rgba(255, 255, 255, 0.1);
}

.nav-dot.is-visited {
  width: var(--dot-d);
  background: #ffffffd8;
}

.dot-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-gold));
  box-shadow: 3px 0 12px rgba(196, 120, 58, 0.6);
  pointer-events: none;
}

.nav-dot:not(.is-active) .dot-fill {
  opacity: 0;
}

.nav-dot.is-active .dot-fill {
  opacity: 1;
}

.layer-links {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease 0s;
}

#nav[data-state="pill"] .layer-links {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.22s;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 13px;
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.18s ease;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-link.is-active {
  color: rgba(255, 255, 255, 0.95);
}

.nav-link::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  translate: -50% 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--clr-gold);
  scale: 0;
  transition: scale 0.25s var(--ease-spring);
}

.nav-link.is-active::after {
  scale: 1;
}

/* ═══════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(45, 74, 62, 0.3);
  border-radius: 3px;
}

/* reveal styles → public/css/reveal.css */
