/* ------------------------------------------------------------
   Tokens. Một màu nhấn (mint), một hệ bo góc:
   bề mặt 16px, nút và tag dạng viên thuốc.
------------------------------------------------------------ */
:root {
  --bg: #f2f3f1;
  --surface: #e9ebe8;
  --text: #111312;
  --muted: #565c58;
  --line: rgba(17, 19, 18, 0.13);
  --line-strong: rgba(17, 19, 18, 0.32);
  --accent: #0d7a4b;
  --accent-soft: rgba(13, 122, 75, 0.14);
  --on-accent: #f4f7f5;
  --glow: rgba(13, 122, 75, 0.14);

  --radius: 16px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0c;
    --surface: #131514;
    --text: #e9ebe9;
    --muted: #9aa09b;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.3);
    --accent: #5cd6a0;
    --accent-soft: rgba(92, 214, 160, 0.15);
    --on-accent: #05140d;
    --glow: rgba(92, 214, 160, 0.13);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0c;
  --surface: #131514;
  --text: #e9ebe9;
  --muted: #9aa09b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.3);
  --accent: #5cd6a0;
  --accent-soft: rgba(92, 214, 160, 0.15);
  --on-accent: #05140d;
  --glow: rgba(92, 214, 160, 0.13);
}

/* ------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.muted { color: var(--muted); max-width: 34ch; }

/* Khung ảnh dùng chung: ảnh phóng nhẹ để trôi theo lúc cuộn */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); will-change: transform; }

/* ------------------------------------------------------------ Progress + nav */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  will-change: transform;
}

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav__logo-short { display: none; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2rem); font-size: 0.95rem; }
.nav__links a { position: relative; color: var(--muted); transition: color 0.3s var(--ease); white-space: nowrap; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }

.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text); font-size: 1.1rem; cursor: pointer;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), translate 0.35s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:active { transform: scale(0.94); }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 500; font-size: 1rem; white-space: nowrap;
  transition: transform 0.4s var(--ease), translate 0.35s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary i { transition: transform 0.4s var(--ease); }
.btn--primary:hover i { transform: translate(2px, 2px); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ------------------------------------------------------------ Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid; align-items: center;
  padding: 6rem 0 3rem;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(60% 55% at 78% 45%, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }

.net {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}

.eyebrow {
  font-family: var(--font-mono); font-size: 1.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3.1rem, 9.2vw, 7.4rem);
  line-height: 1.02; letter-spacing: -0.045em;
}
.hero__title em { font-style: normal; color: var(--accent); }
.line { display: block; overflow: hidden; padding-top: 0.14em; margin-top: -0.14em; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.line > span { display: inline-block; }
.hero__sub { margin-top: 1.75rem; max-width: 34ch; font-size: 1.2rem; color: var(--muted); }
.hero__cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Viền sáng xoay quanh khung ảnh */
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
  will-change: transform;
}
.portrait::before {
  content: ""; position: absolute; inset: -60%;
  background: conic-gradient(from 0deg, transparent 0 62%, var(--accent) 100%);
  animation: spin 7s linear infinite;
}
.portrait::after {
  content: ""; position: absolute; inset: 1px; border-radius: calc(var(--radius) - 1px);
  background:
    radial-gradient(90% 70% at 30% 20%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.portrait span, .portrait img { position: relative; z-index: 1; }
.portrait span {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(6rem, 14vw, 11rem); letter-spacing: -0.06em; line-height: 1;
  color: var(--accent);
}
.portrait img { width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; border-radius: calc(var(--radius) - 1px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Dải chữ chạy */
.marquee { overflow: hidden; padding: clamp(1.5rem, 4vw, 3rem) 0; user-select: none; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; flex-shrink: 0; gap: clamp(1.5rem, 3vw, 3rem); padding-right: clamp(1.5rem, 3vw, 3rem); }
.marquee__group span {
  font-family: var(--font-display); font-weight: 700; white-space: nowrap;
  font-size: clamp(3rem, 8vw, 7rem); letter-spacing: -0.04em; line-height: 1.1;
  color: transparent; -webkit-text-stroke: 1.5px var(--muted);
}
.marquee__group b { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 5vw, 4rem); color: var(--accent); }

/* ------------------------------------------------------------ Sections */
.section { padding: clamp(5.5rem, 13vw, 10.5rem) 0; }
.section--tight { padding-bottom: 0; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 5.5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.h2--xl { font-size: clamp(3.4rem, 11vw, 9rem); }
.lead { margin-top: 1.5rem; max-width: 34ch; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.45; letter-spacing: -0.01em; }

/* Giới thiệu */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.about__photo { margin-top: clamp(0rem, 6vw, 5rem); }
.about__photo .media { aspect-ratio: 4 / 5; }
.identity { margin-top: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); }
.identity > div { padding: 1.25rem 0; }
.identity > div:first-child { padding-top: 0; }
.identity > div:last-child { padding-bottom: 0; }
.identity > div + div { border-top: 1px solid var(--line); }
.identity dt { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.identity dd { margin-top: 0.35rem; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.02em; line-height: 1.25; }
.identity dd.mono { font-family: var(--font-mono); font-size: clamp(1.35rem, 2.4vw, 1.85rem); color: var(--accent); }

/* Chữ sáng dần theo lúc cuộn */
.words .wd { opacity: 0.2; transition: opacity 0.6s var(--ease); }
.words .wd.lit { opacity: 1; }

/* Câu chuyện: cảnh ghim toàn màn hình */
.story { position: relative; height: 320vh; }
.story__stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; display: grid; align-items: center; }
/* Khung ảnh bắt đầu nhỏ có bo góc rồi nở ra phủ kín màn hình (JS đổi các biến --iy, --ix, --ir) */
.story__frame {
  position: absolute; inset: 0; overflow: hidden; background: #05080a;
  clip-path: inset(var(--iy, 0px) var(--ix, 0px) round var(--ir, 0px));
}
.js .story__frame { --iy: 12dvh; --ix: 9vw; --ir: 16px; }
.story__bg { position: absolute; inset: 0; }
.story__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); will-change: transform; }
.story__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 7, 9, 0.9) 0%, rgba(4, 7, 9, 0.6) 55%, rgba(4, 7, 9, 0.22) 100%); }
.story__inner { position: relative; }
.story__text {
  max-width: 26em; color: #eef2ef;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.55rem, 3.1vw, 2.7rem); line-height: 1.28; letter-spacing: -0.025em;
}

/* Kỹ năng: hành trình của một gói tin */
.skills__intro { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.journey { position: relative; height: 640vh; }
.journey__stage {
  position: sticky; top: 0; height: 100dvh;
  padding: calc(var(--nav-h) + 1rem) 0 1.5rem;
  display: grid; align-items: center;
}
.journey__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }

.route-wrap { position: relative; }
.route__line { position: absolute; left: 10px; width: 2px; background: var(--line); }
.route__fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.route__packet {
  position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 7px var(--accent-soft);
  will-change: transform;
}
.station { position: relative; padding: 0.85rem 0 0.85rem 2.75rem; opacity: 0.4; transition: opacity 0.6s var(--ease); }
.station.is-active { opacity: 1; }
.station__node {
  position: absolute; left: 4px; top: 1.35rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.station.is-active .station__node, .station.is-done .station__node { background: var(--accent); border-color: var(--accent); }
.station.is-done { opacity: 0.65; }
.station h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.15rem); letter-spacing: -0.03em; line-height: 1.15; }
.station__tag { display: block; margin-top: 0.15rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.station__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.8s var(--ease); }
.station.is-active .station__body { grid-template-rows: 1fr; }
.station__body > div { overflow: hidden; min-height: 0; }
.station__body p { margin-top: 0.85rem; color: var(--muted); max-width: 44ch; }
.station__img { display: none; }

.tags { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  padding: 0.28rem 0.85rem; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.station.is-active .tags li, .pcard:hover .tags li { border-color: var(--accent); }

.journey__visual {
  position: relative; width: 100%; height: min(72dvh, 660px);
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.journey__visual img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.12); transition: opacity 1.1s var(--ease); will-change: transform, opacity;
}
.journey__visual img.is-active { opacity: 1; }

/* Ba câu hỏi: panel sau vuốt từ dưới lên phủ panel trước */
.wipe { position: relative; height: 420vh; }
.wipe__stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; background: #05080a; }
.wipe__panel { position: absolute; inset: 0; display: grid; align-items: end; }
.js .wipe__panel:not(:first-child) { clip-path: inset(100% 0 0 0); }
.wipe__bg { position: absolute; inset: 0; overflow: hidden; }
.wipe__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); will-change: transform; }
.wipe__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 7, 9, 0.9) 0%, rgba(4, 7, 9, 0.45) 55%, rgba(4, 7, 9, 0.2) 100%); }
.wipe__inner { position: relative; padding-bottom: clamp(3rem, 10dvh, 6.5rem); }
.wipe__content { max-width: 900px; will-change: transform, opacity; }
.wipe__q { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 5.6vw, 5rem); line-height: 1.06; letter-spacing: -0.04em; color: #f1f4f2; }
.wipe__a { margin-top: 1.25rem; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #c3cac5; }

/* Cách mình học: cuộn dọc thành chuyển động ngang */
.pan { position: relative; }
.pan__stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; padding-top: var(--nav-h); display: flex; align-items: center; }
.pan__bgword {
  position: absolute; left: 4vw; top: 50%; margin-top: -0.55em; pointer-events: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(9rem, 26vw, 24rem); line-height: 1; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong); opacity: 0.55; will-change: transform;
}
.pan__track { position: relative; display: flex; align-items: center; gap: clamp(2rem, 4vw, 4.5rem); padding: 0 var(--gutter); width: max-content; will-change: transform; }
.pan__intro { flex: none; width: min(34vw, 460px); }
.panel { flex: none; width: clamp(280px, 30vw, 440px); }
.panel:nth-of-type(even) { margin-top: 9dvh; }
.panel__media { width: 100%; height: min(50dvh, 520px); }
.panel h3 { margin-top: 1.25rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.03em; line-height: 1.15; }
.panel p { margin-top: 0.5rem; color: var(--muted); max-width: 40ch; }
.js .panel__media { clip-path: inset(0 calc((1 - var(--t, 1)) * 45%) 0 0 round var(--radius)); opacity: calc(0.3 + 0.7 * var(--t, 1)); }
.js .panel h3, .js .panel p { opacity: var(--t, 1); }
.pan__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.75rem; height: 2px; background: var(--line); }
.pan__bar i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* Công cụ: lưới logo, viền mảnh */
.logos {
  margin-top: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.logos li {
  display: grid; place-items: center; aspect-ratio: 1.5; background: var(--bg); color: var(--muted);
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.logos li:hover { color: var(--accent); background: var(--surface); }
.logos svg { width: clamp(30px, 3.4vw, 46px); height: auto; }

/* Nhìn từ gần: ba cột ảnh trôi với tốc độ khác nhau */
.gallery-section { overflow: hidden; }
.gallery { margin-top: clamp(2.5rem, 6vw, 4.5rem); display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: clamp(0.75rem, 1.6vw, 1.5rem); align-items: start; }
.gallery__col { display: grid; gap: clamp(0.75rem, 1.6vw, 1.5rem); will-change: transform; }
.g-43 { aspect-ratio: 4 / 3; }
.g-34 { aspect-ratio: 3 / 4; }
.g-45 { aspect-ratio: 4 / 5; }

/* Dự án: thẻ xếp chồng khi cuộn */
.stack { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.pcard {
  position: sticky; top: calc(var(--nav-h) + 1.25rem + var(--k, 0) * 14px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  min-height: min(68dvh, 560px); margin-bottom: 16vh;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transform-origin: 50% 0; will-change: transform;
}
.pcard:nth-child(1) { --k: 0; }
.pcard:nth-child(2) { --k: 1; }
.pcard:nth-child(3) { --k: 2; margin-bottom: 0; }
.pcard:nth-child(even) { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.pcard:nth-child(even) .pcard__media { order: 2; }
.pcard__media { border-radius: 0; height: 100%; min-height: 300px; }
.pcard__body { padding: clamp(1.5rem, 3.2vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.pcard h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 2.9vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.15; }
.facts { margin-top: 1.5rem; }
.facts > div + div { margin-top: 1.1rem; }
.facts dt { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.facts dd { margin-top: 0.25rem; color: var(--muted); max-width: 46ch; }

/* Tuyên ngôn + mục tiêu. Chữ khổng lồ tô bằng ảnh, ảnh trôi trong nét chữ khi cuộn */
.maskword {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 20vw, 17rem);
  line-height: 1.1; letter-spacing: -0.05em; padding: 0.12em 0 0.1em;
  color: var(--accent);
  background-image: url(assets/img/city.jpg);
  background-image: image-set(url(assets/img/city-1200.avif) type("image/avif"), url(assets/img/city.jpg) type("image/jpeg"));
  background-size: cover; background-position: 50% var(--my, 50%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px var(--line-strong);
}
.statement__text {
  max-width: 20em; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 4.3rem); line-height: 1.12; letter-spacing: -0.04em;
}
.goals { margin-top: clamp(3.5rem, 8vw, 7rem); max-width: 860px; }
.goals__title { font-family: var(--font-mono); font-weight: 400; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.goals li { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 1rem 2rem; align-items: baseline; padding: 1.4rem 0; }
.goals li + li { border-top: 1px solid var(--line); }
.goals strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
.goals span { color: var(--muted); }

/* Liên hệ: khép lại bằng chính bức ảnh mở đầu câu chuyện */
.contact {
  --c-text: #eef2ef; --c-muted: #b7beb9; --c-accent: #5cd6a0; --c-line: rgba(255, 255, 255, 0.28);
  position: relative; overflow: hidden; isolation: isolate; color: var(--c-text);
  padding: clamp(7rem, 16vw, 12rem) 0 clamp(5rem, 10vw, 8rem);
}
.contact__bg { position: absolute; inset: 0; z-index: -2; background: #05080a; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); will-change: transform; }
.contact__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(4, 7, 9, 0.62) 32%, rgba(4, 7, 9, 0.86) 100%); }
.contact__lead { margin-top: 1.5rem; max-width: 32ch; font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--c-muted); }
.contact__mail {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: clamp(1.75rem, 4vw, 3rem);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 4vw, 3rem); letter-spacing: -0.03em;
  padding-bottom: 0.2rem; border-bottom: 1px solid var(--c-line);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__mail i { transition: transform 0.5s var(--ease); }
.contact__mail:hover { color: var(--c-accent); border-color: var(--c-accent); }
.contact__mail:hover i { transform: translate(4px, -4px); }
.contact__links { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact__links a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1.2rem;
  border: 1px solid var(--c-line); border-radius: 999px; font-size: 0.95rem;
  background: rgba(4, 7, 9, 0.35);
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease), translate 0.35s var(--ease);
}
.contact__links a:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.contact__links i { font-size: 1.15rem; color: var(--c-accent); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 3rem; }
.footer__course { text-align: right; }

/* ------------------------------------------------------------ Motion */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .portrait.reveal { transform: none; }

.js .line > span { transform: translateY(110%); }
.js.loaded .line > span { transform: none; transition: transform 1.2s var(--ease); }
.js.loaded .line:nth-child(2) > span { transition-delay: 0.1s; }

/* Tiêu đề hiện từng chữ */
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.14em 0 0.1em; margin: -0.14em 0 -0.1em; }
.js .split .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--w, 0) * 80ms); }
.js .split.in .w > span { transform: none; }

/* Khối ảnh mở ra như rèm */
.js .about__photo.reveal .media { clip-path: inset(0 0 100% 0 round var(--radius)); }
.js .about__photo.reveal.in .media { clip-path: inset(0 0 0 0 round var(--radius)); transition: clip-path 1.5s var(--ease) 0.1s; }

/* Tag hiện lần lượt */
.js .reveal .tags li {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease), border-color 0.3s var(--ease);
  transition-delay: calc(350ms + var(--t, 0) * 55ms), calc(350ms + var(--t, 0) * 55ms), 0s;
}
.js .reveal.in .tags li { opacity: 1; transform: none; }

/* Logo công cụ hiện lần lượt */
.js .logos.reveal li { opacity: 0; transform: scale(0.9); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), color 0.4s var(--ease), background-color 0.4s var(--ease); transition-delay: calc(250ms + var(--t, 0) * 45ms), calc(250ms + var(--t, 0) * 45ms), 0s, 0s; }
.js .logos.reveal.in li { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .line > span, .js .split .w > span, .js .reveal .tags li, .js .logos.reveal li { opacity: 1; transform: none; transition: none; }
  .js .about__photo.reveal .media { clip-path: none; }
  .words .wd { opacity: 1; transition: none; }
  .journey__visual img, .station, .station__body { transition: none; }
  .portrait::before { animation: none; }
  .progress { display: none; }
}

/* ------------------------------------------------------------ Responsive (< 900px: một cột, bỏ cảnh ghim của hành trình và thẻ dự án) */
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 7rem; }
  .hero__grid, .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { aspect-ratio: 16 / 10; max-width: 460px; }
  .about__photo .media { aspect-ratio: 16 / 11; }
  .story { height: 260vh; }
  .story__shade { background: linear-gradient(180deg, rgba(4, 7, 9, 0.72), rgba(4, 7, 9, 0.85)); }

  .journey { height: auto; }
  .journey__stage { position: static; height: auto; padding: 2rem 0 0; }
  .journey__grid { grid-template-columns: minmax(0, 1fr); }
  .journey__visual { display: none; }
  .route__line { top: 1.6rem; bottom: 2rem; }
  .route__fill, .route__packet { display: none; }
  .station, .station.is-done { opacity: 1; padding-bottom: 2rem; }
  .station__body { grid-template-rows: 1fr; }
  .station__node { background: var(--accent); border-color: var(--accent); }
  .station__img { display: block; margin-top: 1.25rem; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }

  .wipe { height: 360vh; }

  .pan { height: auto !important; padding: 4rem 0; }
  .pan__stage { position: static; height: auto; padding-top: 0; display: block; overflow: visible; }
  .pan__bgword, .pan__bar { display: none; }
  .pan__track { flex-direction: column; align-items: stretch; width: auto; gap: 2.5rem; transform: none !important; }
  .pan__intro { width: auto; }
  .panel, .panel:nth-of-type(even) { width: auto; margin-top: 0; }
  .panel__media { height: auto; aspect-ratio: 16 / 11; }
  .js .panel__media { clip-path: none; opacity: 1; }
  .js .panel h3, .js .panel p { opacity: 1; }

  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery__col { transform: none !important; }

  .pcard, .pcard:nth-child(even) { position: static; display: block; min-height: 0; margin-bottom: 1.75rem; }
  .pcard__media { aspect-ratio: 16 / 10; min-height: 0; }
  .footer__course { text-align: left; }
  .goals li { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
}
@media (max-width: 520px) {
  .nav__logo-full { display: none; }
  .nav__logo-short { display: inline; }
  .nav__links { gap: 0.9rem; font-size: 0.88rem; }
  .btn { padding: 0.8rem 1.3rem; }
}
