/* ==============================================================
   style.css — "bộ quần áo" của trang
   Mục lục:
   0. Token màu & chữ (đổi màu cả trang ở đây)
   1. Nền tảng (reset, body, tiện ích)
   2. Topbar + nút icon + nút sáng/tối
   3. Liquid nav (menu hiệu ứng nước)
   4. Nút bấm (btn)
   5. Hero + canvas + điện thoại Termux
   6. Section chung
   7. About (avatar, facts, stack)
   8. Marquee
   9. Projects (thẻ)
   10. Journey (timeline)
   11. Contact + footer + toast
   12. Hiệu ứng xuất hiện khi cuộn (reveal)
   13. Chế độ giảm chuyển động
   ============================================================== */

/* ---------- 0. TOKEN ----------
   Bố cục: nội dung căn trái trong cột 1160px, menu nổi như một giọt nước. */
:root {
  --bg: #F3F7F6;          /* nền chính: trắng bạc hà */
  --surface: #FFFFFF;     /* nền thẻ */
  --surface-2: #E6EFEC;   /* nền phụ */
  --ink: #13201E;         /* chữ chính */
  --muted: #52625F;       /* chữ phụ */
  --line: rgba(19, 32, 30, .12);
  --accent: #0FA884;      /* màu nhấn */
  --accent-ink: #077258;  /* màu nhấn dùng cho CHỮ (đủ tương phản) */
  --on-accent: #062A21;   /* chữ nằm trên nền màu nhấn */
  --liquid-1: #3DDBB0;    /* 3 màu của chất lỏng */
  --liquid-2: #7D89FF;
  --liquid-3: #FFB547;
  --glass: rgba(255, 255, 255, .72);
  --shadow: 0 10px 30px -12px rgba(19, 48, 42, .25);
  --term-bg: #0E1A18;     /* nền terminal (giống nhau cả 2 theme) */
  --term-ink: #CFE9E2;

  --font-display: "Unbounded", "Be Vietnam Pro", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --ease-liquid: cubic-bezier(.65, 0, .25, 1.25);  /* hơi "nảy" như nước */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1160px;
  --nav-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1413; --surface: #122120; --surface-2: #183029; --ink: #E4F1EE; --muted: #97ADA8;
    --line: rgba(228, 241, 238, .13); --accent: #3DDBB0; --accent-ink: #62E7C3; --on-accent: #04211A;
    --liquid-1: #1FBF95; --liquid-2: #5B68F5; --liquid-3: #F59A35;
    --glass: rgba(14, 26, 24, .7); --shadow: 0 14px 34px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1413; --surface: #122120; --surface-2: #183029; --ink: #E4F1EE; --muted: #97ADA8;
  --line: rgba(228, 241, 238, .13); --accent: #3DDBB0; --accent-ink: #62E7C3; --on-accent: #04211A;
  --liquid-1: #1FBF95; --liquid-2: #5B68F5; --liquid-3: #F59A35;
  --glass: rgba(14, 26, 24, .7); --shadow: 0 14px 34px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- 1. NỀN TẢNG ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); /* chừa chỗ menu đáy (mobile) */
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--liquid-1); color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-s); text-decoration: none; transition: top .2s; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
.noscript { padding: 24px; text-align: center; }

/* Thanh tiến trình cuộn */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--liquid-1), var(--liquid-2), var(--liquid-3)); }

/* Khi đổi theme mà trình duyệt không hỗ trợ View Transition: mờ dần */
.theme-fade, .theme-fade * { transition: background-color .45s, color .45s, border-color .45s !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- 2. TOPBAR ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 49; background: var(--bg); }
.topbar {
  position: fixed; z-index: 50;
  top: env(safe-area-inset-top, 0px); left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  transition: background-color .3s, box-shadow .3s, padding .3s;
}
.topbar.is-scrolled { background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
@media (min-width: 900px) { .topbar.is-scrolled { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; } }

.brand {
  width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none;
  font: 800 1.1rem/1 var(--font-display); color: var(--on-accent);
  background: linear-gradient(135deg, var(--liquid-1), var(--liquid-2));
  border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%;
  animation: morph 9s ease-in-out infinite;
  box-shadow: var(--shadow);
}
.topbar__tools { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 50%; background: var(--glass); color: var(--ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s var(--ease-liquid), border-color .2s;
}
.icon-btn:hover { transform: scale(1.08); border-color: var(--accent); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.calm-toggle[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }

/* Icon mặt trời ⇄ mặt trăng */
.theme-toggle .tt-core { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center; transition: transform .6s var(--ease-liquid); }
.theme-toggle .tt-hole { transition: transform .6s var(--ease-liquid); }
.theme-toggle .tt-rays { transform-origin: 12px 12px; transition: transform .6s var(--ease-liquid), opacity .4s; }
:root[data-theme="dark"] .theme-toggle .tt-core { transform: scale(1.7); }
:root[data-theme="dark"] .theme-toggle .tt-hole { transform: translate(-8px, -1px); }
:root[data-theme="dark"] .theme-toggle .tt-rays { transform: rotate(90deg) scale(0); opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .tt-core { transform: scale(1.7); }
  :root:not([data-theme="light"]) .theme-toggle .tt-hole { transform: translate(-8px, -1px); }
  :root:not([data-theme="light"]) .theme-toggle .tt-rays { transform: rotate(90deg) scale(0); opacity: 0; }
}

/* ---------- 3. LIQUID NAV ----------
   Ý tưởng: 2 giọt (head chạy nhanh, tail chạy chậm) + bộ lọc #goo
   → khi di chuyển chúng kéo dài và dính nhau như nước. */
.liquid-nav {
  position: fixed; z-index: 55;
  left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 6px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  width: min(440px, calc(100vw - 24px));
}
.liquid-nav ul { position: relative; z-index: 1; display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.liquid-nav li { flex: 1 1 0; min-width: 0; }
.liquid-nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--nav-h); padding: 0 4px; border-radius: 999px; white-space: nowrap;
  text-decoration: none; color: var(--muted); font-size: .6875rem; font-weight: 600; line-height: 1;
  transition: color .3s; -webkit-tap-highlight-color: transparent;
}
.liquid-nav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease-liquid); }
.liquid-nav a:hover { color: var(--ink); }
.liquid-nav a.is-active, .liquid-nav a.is-hover { color: var(--on-accent); }
.liquid-nav a.is-active svg { transform: translateY(-1px) scale(1.08); }
.liquid-nav a:focus-visible { outline-offset: -3px; }

.liquid-nav__goo { position: absolute; inset: 6px; filter: url(#goo); pointer-events: none; }
.blob {
  position: absolute; top: 0; left: 0; height: 100%; width: 60px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--liquid-1), var(--liquid-2));
  will-change: transform, width;
}
.blob--head { transition: transform .38s var(--ease-liquid), width .38s var(--ease-liquid); }
.blob--tail { transition: transform .72s var(--ease-out), width .72s var(--ease-out); transform-origin: center; height: 76%; top: 12%; }
.drop { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--liquid-2); pointer-events: none; animation: drop .7s var(--ease-out) forwards; }
@keyframes drop {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(var(--dx), var(--dy)) scale(0); }
}

@media (min-width: 900px) {
  .liquid-nav { top: calc(14px + env(safe-area-inset-top, 0px)); bottom: auto; width: auto; }
  .liquid-nav li { flex: 0 0 auto; }
  .liquid-nav a { flex-direction: row; height: 44px; padding: 0 18px; font-size: .9375rem; gap: 8px; min-width: 0; }
  .liquid-nav a svg { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- 4. NÚT BẤM ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px; overflow: hidden; isolation: isolate;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease-liquid), box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn > span { position: relative; z-index: 1; }
.btn:active { transform: scale(.96); }
/* Nút "nước dâng": giọt xoay dâng lên khi rê chuột */
.btn--liquid { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn--liquid::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 135%;
  width: 260%; aspect-ratio: 1; margin-left: -130%;
  background: linear-gradient(120deg, var(--liquid-1), var(--liquid-2));
  border-radius: 42%;
  transition: top .7s var(--ease-out);
  animation: spin 6s linear infinite;
}
.btn--liquid:hover::before, .btn--liquid:focus-visible::before { top: -40%; }
.btn--liquid:hover, .btn--liquid:focus-visible { color: var(--on-accent); }
.btn--ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: .9rem; }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: calc(96px + env(safe-area-inset-top, 0px));
  padding-bottom: 56px;
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
}
.hero__liquid {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, transparent 18%, #000 55%, #000 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent 18%, #000 55%, #000 85%, transparent);
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
.hero__text { min-width: 0; }
.hero__hello { font-weight: 500; color: var(--muted); font-size: 1.125rem; }
.hero__name {
  font: 800 clamp(3.4rem, 15vw, 8.6rem)/1.08 var(--font-display);
  letter-spacing: -.045em; margin: 4px 0 6px; padding-top: .12em;
  overflow-wrap: anywhere;
}
.hero__name .ch { display: inline-block; cursor: default; }
.js .hero__name .ch { animation: letter-in .9s var(--ease-liquid) both; animation-delay: calc(var(--i) * 60ms + 150ms); }
.js .hero__name.is-ready .ch { animation: none; }
.js .hero__name.is-ready .ch.is-jelly { animation: jelly .7s var(--ease-out); }
.hero__role { font: 600 clamp(1.15rem, 3.4vw, 1.5rem)/1.3 var(--font-display); letter-spacing: -.01em; min-height: 1.4em; color: var(--accent-ink); }
.rotator { display: inline-block; }
.rotator.is-out { animation: role-out .35s var(--ease-out) forwards; }
.rotator.is-in { animation: role-in .55s var(--ease-liquid) both; }
.hero__lead { max-width: 34em; margin-top: 18px; color: var(--muted); font-size: 1.125rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Điện thoại Termux */
.phone { margin: 0; justify-self: center; width: min(330px, 100%); perspective: 900px; }
.phone__body {
  position: relative; border-radius: 38px; padding: 10px 12px 16px;
  background: var(--term-bg); color: var(--term-ink);
  border: 6px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgba(10, 40, 35, .45);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
  animation: float 7s ease-in-out infinite;
}
.phone__status { display: flex; align-items: center; justify-content: space-between; padding: 2px 10px 8px; font: 600 .75rem/1 var(--font-body); }
.phone__notch { width: 74px; height: 20px; border-radius: 999px; background: #000; }
.phone__icons { display: flex; gap: 3px; align-items: flex-end; }
.phone__icons i { display: block; width: 4px; background: currentColor; border-radius: 1px; }
.phone__icons i:nth-child(1) { height: 5px; } .phone__icons i:nth-child(2) { height: 8px; } .phone__icons i:nth-child(3) { height: 11px; }
.phone__title { font: 600 .75rem/1 var(--font-mono); color: #7FA79D; padding: 6px 10px 10px; border-bottom: 1px solid rgba(207, 233, 226, .1); }
.term {
  margin: 0; padding: 12px 10px 4px; min-height: 250px;
  font: 400 .78rem/1.65 var(--font-mono); white-space: pre-wrap; word-break: break-word;
}
.term .p { color: #3DDBB0; } .term .ok { color: #FFC56B; } .term .out { color: #8FB5AB; }
.term .cursor { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: #3DDBB0; animation: blink 1s steps(1) infinite; }
.phone__cap { margin-top: 14px; text-align: center; font-size: .875rem; color: var(--muted); }

@media (min-width: 900px) {
  .hero { padding-top: calc(130px + env(safe-area-inset-top, 0px)); padding-bottom: 96px; }
  .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 48px; }
  .hero__liquid {
    -webkit-mask-image: linear-gradient(to right, transparent 25%, #000 65%), linear-gradient(to bottom, #000 75%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 25%, #000 65%), linear-gradient(to bottom, #000 75%, transparent);
    mask-composite: intersect;
  }
}

/* ---------- 6. SECTION CHUNG ---------- */
.section { padding-block: clamp(72px, 10vw, 136px); scroll-margin-top: 40px; }
.section__title { font: 700 clamp(2rem, 6vw, 3.4rem)/1.1 var(--font-display); letter-spacing: -.035em; }
.section__lead { margin-top: 14px; max-width: 38em; color: var(--muted); font-size: 1.125rem; }
#top { scroll-margin-top: 0; }

/* ---------- 7. ABOUT ---------- */
.about__grid { display: grid; gap: 36px; margin-top: 40px; align-items: start; }
.avatar {
  width: min(260px, 70vw); aspect-ratio: 1; max-width: 100%;
  display: grid; place-items: center; overflow: hidden;
  font: 800 clamp(4rem, 12vw, 6rem)/1 var(--font-display); color: var(--on-accent);
  background: linear-gradient(140deg, var(--liquid-1), var(--liquid-2) 60%, var(--liquid-3));
  background-size: 200% 200%;
  border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%;
  animation: morph 12s ease-in-out infinite, hue 10s ease-in-out infinite alternate;
  box-shadow: var(--shadow);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.about__body { min-width: 0; display: grid; gap: 28px; }
.about__bio { display: grid; gap: 14px; max-width: 38em; font-size: 1.125rem; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .95rem; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; }
@media (max-width: 420px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }
@media (min-width: 900px) { .about__grid { grid-template-columns: 300px minmax(0, 1fr); gap: 64px; } }

.stack { display: grid; gap: 28px; margin-top: 64px; }
.stack__group h3 { font: 700 1.125rem/1.3 var(--font-display); letter-spacing: -.01em; }
.stack__group p { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chip {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: .95rem; font-weight: 500; transition: color .3s, border-color .3s;
}
.chip::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, var(--liquid-1), var(--liquid-2)); transform: translateY(105%); border-radius: 40% 40% 0 0; transition: transform .45s var(--ease-liquid), border-radius .45s; }
.chip:hover { color: var(--on-accent); border-color: transparent; }
.chip:hover::before { transform: translateY(0); border-radius: 0; }
@media (min-width: 760px) { .stack { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

/* ---------- 8. MARQUEE ---------- */
.marquee { overflow: hidden; padding-block: 22px; border-block: 1px solid var(--line); background: var(--surface-2); }
.marquee__track { display: flex; width: max-content; gap: 48px; animation: marquee 32s linear infinite; }
.marquee__track span { font: 700 clamp(1.4rem, 4vw, 2.2rem)/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; color: var(--ink); opacity: .85; }
.marquee__track span:nth-child(3n+2) { color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- 9. PROJECTS ---------- */
.cards { display: grid; gap: 18px; margin-top: 44px; }
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .card--featured { grid-column: 1 / -1; }
  /* thẻ cuối bị lẻ một mình → kéo full hàng */
  .cards > .card--featured:first-child ~ .card:last-child:nth-child(even) { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .cards:has(> .card:nth-child(4):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards:has(> .card:nth-child(4):last-child) > .card:last-child { grid-column: auto; }
}
.card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: clamp(22px, 3.4vw, 34px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out), border-color .3s, box-shadow .3s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--liquid-1) 22%, transparent), transparent 60%);
}
.card:hover .card__glow { opacity: 1; }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.card h3 { font: 700 clamp(1.3rem, 3vw, 1.75rem)/1.2 var(--font-display); letter-spacing: -.025em; }
.card--featured h3 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
.card__status { font-size: .8125rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--accent-ink); white-space: nowrap; }
.card__role { color: var(--muted); font-weight: 500; font-size: .95rem; }
.card__desc { max-width: 40em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.tags li { font: 600 .75rem/1 var(--font-mono); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.card__link { margin-top: auto; padding-top: 8px; align-self: flex-start; font-weight: 600; color: var(--accent-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.card__link::after { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: width .35s var(--ease-liquid); }
.card__link:hover::after { width: 32px; }

/* ---------- 10. JOURNEY ---------- */
.timeline { position: relative; list-style: none; margin: 48px 0 0; padding: 0 0 0 36px; display: grid; gap: 34px; }
.timeline__line { position: absolute; left: 9px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--line); }
.timeline__line span { display: block; width: 100%; height: 100%; border-radius: inherit; transform-origin: 50% 0; transform: scaleY(var(--fill, 0)); background: linear-gradient(var(--liquid-1), var(--liquid-2)); }
.step { position: relative; max-width: 40em; }
.step::before {
  content: ""; position: absolute; left: -35px; top: 6px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--line); transition: border-color .4s, background-color .4s, transform .5s var(--ease-liquid);
}
.step.is-in::before { border-color: var(--accent); background: var(--liquid-1); transform: scale(1.1); }
.step__when { font-size: .875rem; font-weight: 600; color: var(--accent-ink); }
.step h3 { font: 700 1.3rem/1.3 var(--font-display); letter-spacing: -.02em; margin: 2px 0 6px; }
.step p { color: var(--muted); }

/* ---------- 11. CONTACT, FOOTER, TOAST ---------- */
.contact__inner { display: grid; gap: 18px; }
.contact__title { font: 800 clamp(2.4rem, 9vw, 5.6rem)/1.05 var(--font-display); letter-spacing: -.045em; max-width: 12em; }
.contact__text { font-size: 1.125rem; color: var(--muted); max-width: 34em; }
.contact__list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact__item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__label { width: 7.5em; color: var(--muted); font-size: .95rem; }
.contact__value { flex: 1 1 12em; min-width: 0; font-weight: 600; font-size: 1.125rem; overflow-wrap: anywhere; }
.contact__actions { display: flex; gap: 8px; }

.footer { padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer a { color: var(--accent-ink); }

.toast {
  position: fixed; z-index: 70; left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px) scale(.9); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .95rem;
  box-shadow: var(--shadow); transition: transform .45s var(--ease-liquid), opacity .3s; max-width: calc(100vw - 32px);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

/* ---------- 12. REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-liquid), filter .8s; transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }
.js .card.reveal.is-in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: opacity .8s var(--ease-out), transform .5s var(--ease-out), filter .8s, border-color .3s, box-shadow .3s; }

/* ---------- KEYFRAMES ---------- */
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%; }
  33% { border-radius: 60% 40% 38% 62% / 45% 62% 38% 55%; }
  66% { border-radius: 38% 62% 60% 40% / 62% 45% 55% 38%; }
}
@keyframes hue { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(calc(-50% - 24px)); } }
@keyframes letter-in {
  0% { opacity: 0; transform: translateY(70%) scaleY(1.5) scaleX(.7); filter: blur(10px); }
  60% { opacity: 1; transform: translateY(-6%) scaleY(.88) scaleX(1.08); filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
@keyframes jelly {
  0% { transform: none; } 30% { transform: scale(1.25, .75); } 45% { transform: scale(.8, 1.2); }
  60% { transform: scale(1.1, .92); } 80% { transform: scale(.97, 1.03); } 100% { transform: none; }
}
@keyframes role-out { to { opacity: 0; transform: translateY(-40%); filter: blur(6px); } }
@keyframes role-in { from { opacity: 0; transform: translateY(50%); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- 13. GIẢM CHUYỂN ĐỘNG ----------
   Tôn trọng cài đặt hệ điều hành + nút "giảm chuyển động" trên trang */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .marquee__track { flex-wrap: wrap; width: auto; }
}
.calm { scroll-behavior: auto; }
.calm *, .calm *::before, .calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
.calm .js .reveal, .calm .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
.calm .marquee__track { flex-wrap: wrap; width: auto; }
.calm .hero__liquid { opacity: .55; }
