:root {
  /* Tông lạnh theo logo Bn1 (xanh #41c6fe → #1661fa) */
  --bg: #0e1116;
  --ink: #f8fbff;
  --ink-2: #dce7f6;
  --muted: #aab8cc;
  --line: rgba(214, 230, 255, .14);
  --accent: #3ab4ff;
  /* Tiêu đề: trắng xanh ở trên, xanh logo ở dưới */
  --title-grad: linear-gradient(180deg, #f4f9ff 6%, #b3e1ff 46%, #41c6fe 72%, #1661fa 110%);
  --title-glow: rgba(40, 145, 255, .4);
  --danger: #ff6b5b;
  /* Tiêu đề: Bricolage Grotesque · Chữ thường: Inter · Chữ nghiêng nhấn (<em>): Fraunces — cả ba đều có tiếng Việt */
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 3.2vw, 36px);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --ease-title: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg) radial-gradient(1200px 640px at 15% -10%, #16202c, transparent 60%) no-repeat;
  color: var(--ink);
  font: 400 15.5px/1.6 var(--sans);
  font-feature-settings: 'cv11', 'ss03';
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
.page { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter) 96px; }

/* ---------- Nền xanh: dải sáng lượn liên tục (canvas, app.js vẽ) ---------- */
.bg-waves { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; background: #041654; }

/* ---------- Thanh trên ---------- */
.topbar { display: flex; justify-content: center; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.brand { display: block; line-height: 0; transition: opacity .2s; }
.brand img { height: 36px; width: auto; animation: logo-in 1.2s var(--ease-title) both; }
.brand:hover { opacity: .8; }
@keyframes logo-in { from { opacity: 0; filter: blur(10px); transform: scale(.92); } }

/* ---------- Chữ tiêu đề: từng chữ trồi lên lần lượt (app.js tách chữ, gắn .split / .is-in) ---------- */
.split .w {
  display: inline-block; vertical-align: top; overflow: hidden;
  /* chừa chỗ cho chữ nghiêng và phần đuôi chữ (g, y) khỏi bị cắt */
  padding: .08em .1em .18em; margin: -.08em -.1em -.18em;
}
.split .wi {
  display: inline-block; transform: translateY(115%) rotate(5deg); transform-origin: 0 100%;
  opacity: 0; filter: blur(8px);
  transition: transform 1.05s var(--ease-title), opacity .8s ease, filter .9s ease;
  transition-delay: calc(var(--i) * 70ms + var(--d, 0ms));
}
.split.is-in .wi { transform: none; opacity: 1; filter: none; }
.display.split { --d: 180ms; } /* hero: chạy sau dòng chữ nhỏ phía trên */
/* ---------- Tiêu đề màu xanh logo + ánh sáng toả quanh chữ ---------- */
.about-title, .display, .h2, .row-title { color: #8fd0ff; caret-color: var(--accent); filter: drop-shadow(0 0 18px var(--title-glow)); }
/* Màu chuyển cắt theo nét chữ: chưa tách từ (đang sửa) thì phủ cả khối, đã tách thì phủ từng từ */
:is(.about-title, .display, .h2, .row-title):not(.split),
:is(.about-title, .display, .h2, .row-title).split .wi {
  background-image: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Chữ nghiêng nhấn (<em>): vệt sáng trắng quét qua sau khi chữ hiện */
:is(.display, .h2, .row-title).split em .wi {
  background-image: linear-gradient(100deg, #6cc8ff 40%, #ffffff 50%, #6cc8ff 60%);
  background-size: 300% 100%; background-position: 100% 0;
}
.split.is-in em .wi { animation: title-shine 1.8s ease both; animation-delay: calc(var(--i) * 70ms + var(--d, 0ms) + .7s); }
@keyframes title-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Quầng sáng xanh "thở" chậm phía sau tiêu đề */
.about-me-head, .hero-head, .section-head { position: relative; isolation: isolate; }
.about-me-head::before, .hero-head::before, .section-head::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(22,110,255,.32), rgba(65,198,254,.12) 55%, transparent);
  animation: ambient 7s ease-in-out infinite;
}
.hero-head::before { left: 50%; top: 45%; width: min(760px, 100%); height: 320px; margin: -160px 0 0 calc(min(760px, 100%) / -2); }
.about-me-head::before { left: 50%; top: 50%; width: min(560px, 100%); height: 220px; margin: -110px 0 0 calc(min(560px, 100%) / -2); animation-delay: -1.5s; }
.section-head::before { left: -40px; top: 50%; width: 420px; max-width: 100%; height: 180px; margin-top: -90px; animation-delay: -3s; }
@keyframes ambient { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }

/* ---------- About me (dưới logo) ---------- */
.about-me { padding-top: 44px; display: grid; gap: 22px; }
/* Tiêu đề nằm giữa, cùng kiểu chữ xanh phát sáng với "Various types of videos" */
.about-me-head { display: flex; justify-content: center; }
.about-title {
  margin: 0; text-align: center; text-wrap: balance;
  font: 600 clamp(44px, 7vw, 80px)/.96 var(--display); font-variation-settings: 'opsz' 96; letter-spacing: -.045em;
}
/* Đoạn giới thiệu canh trái (giữ như cũ) */
.about-me-body { display: grid; gap: 16px; max-width: 62ch; padding-left: calc(.32 * clamp(40px, 6vw, 64px)); }
.about-me-body p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.8; }
.about-me-body strong { color: var(--accent); font-weight: 500; }

/* ---------- Đoạn giới thiệu (trái) + timeline dựng phim mini (phải) ---------- */
.about-me-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; align-items: center; }
.nle {
  --lane-x: 38px;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(160,210,255,.18);
  background: linear-gradient(180deg, rgba(10,24,72,.78), rgba(4,12,40,.82));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 50px -20px rgba(58,180,255,.45), inset 0 1px 0 rgba(255,255,255,.08);
}
.nle-top {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid rgba(160,210,255,.12); background: rgba(255,255,255,.03);
  font: 500 11px/1 var(--sans); color: var(--muted);
}
.nle-dots { display: flex; gap: 6px; }
.nle-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(214,230,255,.22); }
.nle-dots i:first-child { background: #ff5f57; } .nle-dots i:nth-child(2) { background: #febc2e; } .nle-dots i:last-child { background: #28c840; }
.nle-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nle-tc {
  color: var(--accent); font: 600 12px/1 ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  letter-spacing: .04em; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(58,180,255,.6);
}
.nle-body { position: relative; padding: 0 12px 14px 0; }
/* thước thời gian: vạch nhỏ mỗi 8px, vạch lớn mỗi 64px */
.nle-ruler {
  height: 18px; margin-left: var(--lane-x);
  background:
    repeating-linear-gradient(90deg, rgba(214,230,255,.4) 0 1px, transparent 1px 64px) 0 100% / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, rgba(214,230,255,.18) 0 1px, transparent 1px 8px) 0 100% / 100% 5px no-repeat;
}
.nle-track { display: flex; align-items: center; height: 30px; margin-top: 6px; }
.nle-track.audio { height: 34px; }
.nle-track b {
  flex: none; width: var(--lane-x); text-align: center;
  font: 600 10px/1 var(--sans); letter-spacing: .06em; color: var(--muted);
}
.lane { position: relative; flex: 1; height: 100%; border-radius: 5px; background: rgba(255,255,255,.035); }
.clip {
  position: absolute; top: 2px; bottom: 2px; left: var(--x); width: calc(var(--w) - 3px);
  display: flex; align-items: center; padding: 0 8px; overflow: hidden; border-radius: 5px;
  font: 600 10px/1 var(--sans); color: rgba(255,255,255,.92); white-space: nowrap;
  border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  transform-origin: left center; animation: clip-in .9s var(--ease-title) var(--d, 0s) both;
}
.c-v1 { background: linear-gradient(180deg, #2f7dff, #1a55d6); }
.c-v2 { background: linear-gradient(180deg, #5a6cff, #3a44c9); }
.c-title { background: linear-gradient(180deg, #b45cff, #7d34d9); }
.c-fx { background: linear-gradient(180deg, #33c9ff, #1494d6); }
.c-a1, .c-a2 { padding: 0 4px; color: #7ff0c8; }
.c-a1 { background: linear-gradient(180deg, rgba(24,170,130,.55), rgba(10,110,90,.55)); }
.c-a2 { background: linear-gradient(180deg, rgba(30,150,170,.5), rgba(12,95,120,.5)); color: #8fe6ff; }
@keyframes clip-in { from { transform: scaleX(0); opacity: 0; } }
/* sóng âm: các vạch nhấp nhô lệch nhịp (app.js tạo vạch) */
.wave { display: flex; align-items: center; gap: 2px; width: 100%; height: 100%; }
.wave i {
  flex: 1; height: calc(var(--h) * 100%); min-height: 2px; border-radius: 1px; background: currentColor; opacity: .85;
  animation: eq 1.1s ease-in-out infinite alternate;
}
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
/* đầu phát: chạy hết chiều dài timeline trong 12 giây rồi lặp lại */
.nle-ph-lane { position: absolute; top: 0; bottom: 6px; left: var(--lane-x); right: 12px; pointer-events: none; }
.nle-ph { position: absolute; inset: 0; animation: playhead 12s linear infinite; }
.nle-ph i {
  position: absolute; left: 0; top: 4px; bottom: 0; width: 2px; margin-left: -1px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent), 0 0 22px rgba(58,180,255,.6);
}
.nle-ph i::before {
  content: ''; position: absolute; top: -4px; left: -5px; width: 12px; height: 10px;
  background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
@keyframes playhead { from { transform: translateX(0); } to { transform: translateX(100%); } }
@media (max-width: 900px) {
  .about-me-row { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .nle { max-width: 520px; }
}
@media (max-width: 640px) { .nle { display: none; } }

/* Hàng Creativity • Learning • Evolving: chỉ hiện trên điện thoại (máy tính đã có ở phần đầu video) */
.tags-row { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: 38px; }
/* Canh giữa: cùng trục với dải phần mềm / liên hệ phía trên */
.hero-head { display: grid; justify-items: center; gap: 24px; margin-bottom: 30px; text-align: center; }
.hero-head .lead { max-width: 56ch; margin-inline: auto; }
.status { display: grid; justify-items: center; gap: 14px; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font: 500 12px/1.3 var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.display { margin: 0; font: 600 clamp(44px, 7.6vw, 88px)/.96 var(--display); font-variation-settings: 'opsz' 96; letter-spacing: -.045em; text-wrap: balance; }
.display em, .h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.lead { margin: 18px 0 0; font: 400 clamp(16px, 1.6vw, 18px)/1.5 var(--sans); color: var(--ink-2); }

.rule { display: inline-block; width: 22px; height: 1px; background: var(--muted); flex: none; }
.tags { margin: 0; color: var(--muted); font: 400 10px/1.9 var(--sans); letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Phần mềm (dải phim chạy ngang) + Liên hệ (nút viên) ---------- */
.toolbelt { display: grid; justify-items: center; gap: 26px; margin: 0 auto 40px; max-width: 680px; }
.tb-group { display: grid; justify-items: center; gap: 12px; width: 100%; min-width: 0; }
/* Tiêu đề nhỏ có vạch hai bên */
.kicker { display: flex; align-items: center; gap: 12px; }
.kicker > span { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); opacity: .6; }
.kicker > span:last-child { transform: scaleX(-1); }
.kicker .caps { white-space: nowrap; }

/* Dải phim: lỗ răng cưa trên/dưới chạy cùng khung hình; hai đầu mờ dần */
.film {
  width: 100%; overflow: hidden; border-block: 1px solid rgba(214,230,255,.1);
  background: rgba(7,7,8,.72);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.film-track {
  position: relative; display: flex; width: max-content; margin: 0; padding: 15px 0; list-style: none;
  animation: film-roll 20s linear infinite;
}
.film:hover .film-track { animation-play-state: paused; }
.film-track::before, .film-track::after {
  content: ''; position: absolute; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg, rgba(214,230,255,.2) 0 8px, transparent 8px 16px);
}
.film-track::before { top: 5px; }
.film-track::after { bottom: 5px; }
.film-track li {
  display: flex; align-items: center; gap: 9px; margin: 0 4px; padding: 8px 16px 8px 10px; border-radius: 5px;
  border: 1px solid rgba(214,230,255,.07); background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  color: var(--ink-2); font: 500 12px/1 var(--sans); white-space: nowrap;
}
.film-track img { width: 24px; height: 24px; object-fit: contain; flex: none; }
@keyframes film-roll { to { transform: translateX(-50%); } }

/* Liên hệ: nút viên có logo + tên, rê chuột thì sáng lên theo màu thương hiệu */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips a {
  --glow: rgba(214,230,255,.3);
  display: flex; align-items: center; gap: 9px; padding: 6px 16px 6px 6px; border-radius: 999px;
  border: 1px solid rgba(214,230,255,.14); background: rgba(255,255,255,.035);
  color: var(--ink); text-decoration: none; font: 500 12.5px/1 var(--sans); outline: none;
  transition: border-color .3s, background .3s, box-shadow .3s, transform .3s var(--ease-title);
}
.chips a[data-social="instagram"] { --glow: rgba(225,48,108,.7); }
.chips a[data-social="gmail"] { --glow: rgba(234,67,53,.7); }
.chips a[data-social="whatsapp"] { --glow: rgba(37,211,102,.65); }
.chips a[data-social="tiktok"] { --glow: rgba(37,244,238,.55); }
.chips img { width: 26px; height: 26px; border-radius: 50%; flex: none; transition: transform .45s var(--ease-title); }
.chips a:hover, .chips a:focus-visible {
  border-color: var(--glow); background: rgba(255,255,255,.07); transform: translateY(-2px);
  box-shadow: 0 10px 26px -10px var(--glow);
}
.chips a:hover img, .chips a:focus-visible img { transform: rotate(-12deg) scale(1.08); }
.chips a[aria-disabled="true"] { cursor: default; }
body.editing .chips a { cursor: pointer; outline: 1px dashed rgba(58,180,255,.6); outline-offset: 2px; }

/* ---------- Trình phát ---------- */
.player { position: relative; aspect-ratio: 21 / 8; background: #000; overflow: hidden; cursor: pointer; }
.player .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player:fullscreen { aspect-ratio: auto; }
.player:fullscreen .media { object-fit: contain; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.65), transparent 38%), rgba(0,0,0,.12); }

/* Giới thiệu ngắn góc phải video: ẩn, rê chuột mới hiện (video mờ dần về phía chữ) */
.hero-fade, .hero-info { pointer-events: none; opacity: 0; transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(10,10,11,.9) 0%, rgba(10,10,11,.72) 28%, rgba(10,10,11,.3) 46%, transparent 62%);
}
.hero-info {
  position: absolute; top: 0; right: 0; bottom: 56px; width: min(38%, 400px);
  display: flex; flex-direction: column; justify-content: center; padding: 24px 32px 0 0;
  transform: translateX(14px); color: var(--ink);
}
.player:hover .hero-fade, .player:hover .hero-info,
.player:focus-within .hero-fade, .player:focus-within .hero-info { opacity: 1; transform: none; }
.player:fullscreen .hero-fade, .player:fullscreen .hero-info { display: none; }
.accent { color: var(--accent); }
.hero-info .caps { margin-bottom: 8px; }
.info-lead { margin: 0 0 14px; font: 500 clamp(17px, 1.7vw, 21px)/1.3 var(--display); letter-spacing: -.02em; }
.info-list { margin: 0; display: grid; gap: 8px; }
.info-list div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding-top: 8px; border-top: 1px solid rgba(214,230,255,.12); }
.info-list dt { color: var(--muted); font: 500 9.5px/1.7 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.info-list dd { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
@media (hover: none) { /* máy cảm ứng không rê chuột được -> hiện sẵn, ẩn khi đang xem video */
  .player:not(.is-full) .hero-fade, .player:not(.is-full) .hero-info { opacity: 1; transform: none; }
}
body.editing .hero-fade, body.editing .hero-info { opacity: 1; transform: none; }
body.editing .hero-info { pointer-events: auto; padding-top: 56px; z-index: 4; }

.big-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 14px; transition: opacity .3s; }
.ring {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.92); background: rgba(0,0,0,.18); color: #fff;
  backdrop-filter: blur(4px); transition: transform .25s, background .25s;
}
.ring svg { margin-left: 3px; }
.big-play:hover .ring { transform: scale(1.06); background: rgba(0,0,0,.32); }
.big-label { color: #fff; font: 500 11.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.player.is-full .big-play { opacity: 0; pointer-events: none; }
.player.is-full.is-paused .big-play { opacity: 1; pointer-events: auto; }

.controls { position: absolute; left: 22px; right: 22px; bottom: 12px; color: #fff; cursor: default; }
.progress { position: relative; height: 16px; cursor: pointer; outline: none; }
.progress .rail, .progress .bar { position: absolute; left: 0; top: 7px; height: 1px; transition: height .15s, top .15s; }
.progress .rail { right: 0; background: rgba(255,255,255,.35); }
.progress .bar { width: 0; background: #fff; }
.progress:hover .rail, .progress:hover .bar, .progress:focus-visible .rail, .progress:focus-visible .bar { height: 3px; top: 6px; }
.progress:focus-visible .bar { background: var(--accent); }
.ctrl-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; font: 500 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.time { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.ctrl { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border: 0; background: none; cursor: pointer; letter-spacing: inherit; }
.ctrl:hover { color: var(--accent); }
.toggle .i-play, .sound .i-sound { display: none; }
.player.is-paused .toggle .i-play, .player:not(.is-full) .toggle .i-play { display: block; }
.player.is-paused .toggle .i-pause, .player:not(.is-full) .toggle .i-pause { display: none; }
.player.is-unmuted .sound .i-sound { display: block; }
.player.is-unmuted .sound .i-muted { display: none; }

/* ---------- Dự án ---------- */
.works { padding-top: 64px; }
.section-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.h2 { margin: 0; font: 600 clamp(30px, 3.6vw, 40px)/1.05 var(--display); letter-spacing: -.035em; }
.rule.long { width: 44px; }
.tagline { margin: 0; font-size: 14px; color: var(--ink-2); }
.see-all { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.see-all svg { transition: transform .25s; }
.see-all:hover svg { transform: translateX(4px); }

.thumb { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #1a1b1d; cursor: pointer; outline: none; }
.thumb:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
/* Không đặt filter lên video: để trình duyệt đưa video thẳng cho phần cứng hiển thị (phát mượt, nhẹ máy) */
.thumb .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.thumb.is-previewing .media { transform: scale(1.04); }
.mini-play { position: absolute; left: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 1.5px solid #fff; background: rgba(0,0,0,.2); transition: transform .25s, background .25s; }
.mini-play svg { margin-left: 2px; }
.thumb:hover .mini-play { transform: scale(1.1); background: var(--accent); border-color: var(--accent); color: #111; }
.preview-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.15); opacity: 0; transition: opacity .3s; }
.preview-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.thumb.is-previewing .preview-bar { opacity: 1; }
.card .thumb { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
@media (hover: hover) {
  .card:hover .thumb { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8); }
}
.card-title { margin: 14px 2px 4px; font: 600 20px/1.2 var(--display); letter-spacing: -.025em; }
.card-meta { margin: 0 2px; font-size: 13px; color: var(--muted); }

/* ---------- Hàng thể loại: hiện 3 video, gạt ngang ---------- */
.rows { display: grid; gap: 40px; margin-top: 10px; }
.row { position: relative; padding-top: 26px; border-top: 1px solid var(--line); }
/* Hàng trống: 1 dải ngang gọn thay cho 3 khung dọc */
.row.is-empty .track { display: block; overflow: visible; cursor: default; }
.ghost-tile {
  display: grid; place-items: center; height: 120px; border-radius: var(--r-md);
  border: 1px dashed rgba(214,230,255,.16); background: rgba(255,255,255,.025);
  color: var(--muted); font-size: 13px; letter-spacing: .02em;
}
.row.is-empty .row-bg { top: 62%; font-size: clamp(64px, 10vw, 130px); }
body.editing .ghost-tile { display: none; }
body.editing .row.is-empty .add-tile { width: 100%; height: 120px; aspect-ratio: auto; }
.row-bg {
  position: absolute; left: -.04em; right: 0; top: 46%; transform: translateY(-50%); z-index: 0; overflow: hidden;
  font: 700 clamp(84px, 15vw, 200px)/1 var(--display); letter-spacing: -.05em; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(214,230,255,.08); pointer-events: none; user-select: none;
}
.row-head, .track, .pager { position: relative; z-index: 1; }
.row-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.row-title { margin: 0; font: 600 clamp(22px, 2.4vw, 28px)/1.1 var(--display); letter-spacing: -.03em; }
.row-count { color: var(--muted); font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.row-nav { margin-left: auto; display: flex; gap: 8px; }
.nav-btn { width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: opacity .25s, color .2s; }
.nav-btn:hover:not(:disabled) { color: var(--accent); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.row-del {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  align-items: center; justify-content: center; background: none; color: var(--ink-2); font-size: 16px; line-height: 1;
}
.row-del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.row.no-nav .row-nav, .row.no-nav .pager { display: none; }
/* Nút thêm (chỉ hiện khi chỉnh sửa) */
.row-add, .head-add {
  align-items: center; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid rgba(58,180,255,.55); background: rgba(58,180,255,.1); color: var(--accent);
  font: 500 12.5px/1 var(--sans); transition: background .2s, color .2s;
}
.row-add:hover, .head-add:hover { background: var(--accent); color: #111; }
.head-add { padding: 10px 18px; font-size: 13px; }

.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 14px) / 3); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; min-width: 0; }
.track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
body.editing .track { cursor: default; }
.add-tile { --glass-r: 18px !important; aspect-ratio: 9 / 16; align-items: center; justify-content: center; cursor: pointer; color: var(--accent); font-size: 14px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; color: var(--muted); font: 500 11px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.pg-cur { color: var(--ink); }
.pg-line { position: relative; width: 120px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.pg-line i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent); transition: transform .2s ease-out, width .2s; }

.cat-pick { align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 12px; color: var(--muted); }
.cat-pick select {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font: 400 13px/1.2 var(--sans);
}
.cat-pick option { background: #1a1b1d; color: var(--ink); }

.add-card { width: 100%; margin-top: 14px; padding: 18px; justify-content: center; border: 1px dashed rgba(58,180,255,.5); background: none; color: var(--accent); cursor: pointer; letter-spacing: .08em; }
.add-card:hover { background: rgba(58,180,255,.06); }

/* ---------- Chữ nhỏ in hoa (tiêu đề phụ) ---------- */
.caps { margin: 0; font: 400 10.5px/2 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
/* ---------- Khung video trống / lỗi ---------- */
.slot-msg { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; pointer-events: none; z-index: 1; }
.is-empty .slot-msg, .is-broken .slot-msg { display: grid; }
.is-empty .media, .is-broken .media { visibility: hidden; }

/* ---------- Chế độ chỉnh sửa ---------- */
.edit-only { display: none !important; }
body.editing .edit-only { display: flex !important; }
body.editing [data-edit] { outline: 1px dashed rgba(58,180,255,.45); outline-offset: 4px; cursor: text; border-radius: 2px; }
body.editing [data-edit]:hover { outline-color: rgba(58,180,255,.8); }
body.editing [data-edit]:focus { outline: 1px solid var(--accent); }
body.editing [data-edit]:empty::before { content: 'Nhập chữ…'; color: var(--muted); }
body.editing [data-media] { box-shadow: inset 0 0 0 1px rgba(58,180,255,.45); }

.media-tools { position: absolute; top: 10px; right: 10px; z-index: 5; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.media-tools button, .dock button {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
  background: rgba(14,17,22,.88); color: var(--ink); font-size: 12px; font-weight: 400; letter-spacing: .02em;
  backdrop-filter: blur(8px); transition: background .2s, color .2s, border-color .2s;
}
.media-tools button:hover, .dock button:hover { border-color: var(--accent); color: var(--accent); }
.media-tools .danger:hover { border-color: var(--danger); color: var(--danger); }
body.editing .player .big-play, body.editing .player .controls { opacity: .35; }

.dock { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 32px); }
.dock-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dock .dock-main { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 500; }
.dock .dock-main:hover { color: #111; filter: brightness(1.08); }
.dock button:disabled { opacity: .55; cursor: progress; }
.dock-hint { display: block; max-width: 380px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(14,17,22,.92); color: var(--ink-2); font-size: 12px; line-height: 1.6; backdrop-filter: blur(8px); }
body.editing .dock-hint.edit-only { display: block !important; }
kbd { padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 11px; }
.dock-status { font-size: 12px; color: var(--accent); opacity: 0; transition: opacity .3s; padding: 0 6px; }
.dock-status.show { opacity: 1; }

/* ---------- Xem video lớn ---------- */
dialog#lightbox { width: fit-content; max-width: 92vw; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
dialog#lightbox::backdrop { background: rgba(0,0,0,.86); backdrop-filter: blur(4px); }
dialog#lightbox video { display: block; width: auto; max-width: min(1100px, 92vw); max-height: 82vh; background: #000; }
.lb-caption { margin: 12px 0 0; font: 600 20px/1.3 var(--display); letter-spacing: -.02em; }
.lb-close { position: absolute; right: 0; top: -44px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 22px; line-height: 1; }
.lb-close:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Kính trong suốt (glass UI) ---------- */
.see-all, .ring, .mini-play, .dock button, .media-tools button, .dock-hint,
.lb-close, .add-card, .nav-btn, .add-tile {
  --glass-r: 999px;
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--glass-r);
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, rgba(255,255,255,.04) 50%, rgba(255,255,255,.08) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.45),
    inset 0 -2px 6px rgba(255,255,255,.06),
    0 10px 26px -8px rgba(0,0,0,.6),
    0 2px 6px rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}
.see-all, .ring, .dock button, .media-tools button, .dock-hint, .add-card, .nav-btn, .add-tile { position: relative; }
/* Vệt bóng sáng nửa trên */
:is(.see-all, .ring, .mini-play, .dock button, .media-tools button, .dock-hint,
.lb-close, .add-card, .nav-btn, .add-tile)::before {
  content: ''; position: absolute; inset: 1px 1px 52% 1px; z-index: -1; pointer-events: none;
  border-radius: var(--glass-r) var(--glass-r) 40% 40% / var(--glass-r) var(--glass-r) 60% 60%;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
}
/* Viền ánh cầu vồng */
:is(.see-all, .ring, .mini-play, .dock button, .media-tools button, .dock-hint,
.lb-close, .add-card, .nav-btn, .add-tile)::after {
  content: ''; position: absolute; inset: -1px; z-index: -1; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: conic-gradient(from 200deg, transparent 0 12%, rgba(255,150,100,.6) 20%, rgba(255,230,140,.45) 25%,
    rgba(120,210,255,.6) 32%, transparent 42% 62%, rgba(190,150,255,.5) 72%, rgba(120,255,210,.35) 78%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.see-all { padding: 11px 18px; }
.dock-hint { --glass-r: 16px; background: linear-gradient(180deg, rgba(30,31,34,.82), rgba(14,17,22,.88)); }
.add-card { --glass-r: 18px; }
.ring { border-width: 1px; background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.05) 55%, rgba(255,255,255,.1)); }
.big-play:hover .ring { background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.08) 55%, rgba(255,255,255,.14)); }
.media-tools button, .dock button { background: linear-gradient(180deg, rgba(40,41,44,.75), rgba(14,17,22,.8) 55%, rgba(30,31,34,.8)); }
.see-all:hover, .dock button:hover, .media-tools button:hover, .lb-close:hover, .add-card:hover {
  border-color: rgba(255,255,255,.38);
}
/* Nút chính: kính màu nhấn, bóng như kẹo */
.dock .dock-main {
  border-color: rgba(255,255,255,.55);
  background: linear-gradient(180deg, #9fe0ff 0%, #3ab4ff 46%, #1661fa 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.85), inset 0 -3px 8px rgba(8,40,130,.35), 0 10px 26px -8px rgba(58,180,255,.5);
}
.dock .dock-main::before { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); }

/* Khung video: bo tròn, viền kính */
.player { border-radius: var(--r-lg); }
.thumb { border-radius: var(--r-md); }
.player::after, .thumb::after {
  content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.12);
}
.player:fullscreen { border-radius: 0; }
.player:fullscreen::after { display: none; }
dialog#lightbox video { border-radius: 16px; }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 900px) {
  .track { grid-auto-columns: calc((100% - 14px) / 2); }
  .hero-info { width: 46%; padding-right: 22px; }
  .info-list div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
  .hero-fade, .hero-info { display: none; }
  .hero { padding-top: 28px; }
  .topbar { padding: 14px 0; }
  .brand img { height: 28px; }
  .eyebrow { font-size: 11px; letter-spacing: .2em; }
  .ring { width: 54px; height: 54px; }
  .big-play { gap: 10px; margin-top: -14px; }
  .big-label { font-size: 10px; }
  .player { aspect-ratio: 16 / 10; border-radius: 16px; }
  .thumb { border-radius: 14px; }
  .controls { left: 14px; right: 14px; }
  .sound-label { display: none; }
  /* Hero */
  .hero-head { gap: 16px; margin-bottom: 20px; }
  .tags { display: none; }
  .lead { margin-top: 12px; font-size: 15px; }
  /* Dự án */
  .works { padding-top: 48px; }
  .section-head { gap: 8px 12px; }
  .section-head .h2 { font-size: 28px; }
  .tagline { order: 3; width: 100%; font-size: 13px; }
  .see-all { margin-left: auto; padding: 10px 12px; }
  .see-all > span { display: none; }
  .track { grid-auto-columns: 64%; gap: 10px; }
  .row-nav { display: none; }
  .rows { gap: 28px; }
  .row { padding-top: 20px; }
  .row-head { margin-bottom: 14px; }
  .row-title { font-size: 22px; }
  .row-bg { font-size: 64px; }
  .ghost-tile, body.editing .row.is-empty .add-tile { height: 88px; }
  .card-title { font-size: 17px; margin-top: 12px; }
  .card-meta { font-size: 12px; }
  .section-head .rule { display: none; }
  .dock-hint { max-width: 100%; }
}
/* ---------- Ánh sáng môi trường quanh video ----------
   app.js vẽ khung hình thu nhỏ của mỗi video vào 1 canvas trong lớp này (nằm ngay trên nền xanh, dưới nội dung)
   và đặt đúng vị trí video mỗi khung hình -> ánh sáng loang ra nền, không bị khung nào cắt. */
.ambient-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient-layer .ambient {
  position: absolute; left: 0; top: 0; display: block; opacity: 0; transform-origin: center;
  border-radius: 24px; filter: blur(22px) saturate(1.7) brightness(1.15);
  /* chỉ chuyển độ mờ (GPU làm gần như miễn phí); thời lượng hiện/tắt do app.js đặt */
  will-change: transform, opacity; transition: opacity .6s cubic-bezier(.4, 0, .2, 1);
}
.ambient-layer .ambient.is-hero { filter: blur(36px) saturate(1.7) brightness(1.1); }

/* ---------- Tối ưu khung hình ----------
   Nền phía sau chuyển động liên tục -> kính mờ (backdrop-filter) phải làm mờ lại MỖI khung hình, rất nặng.
   Bỏ kính mờ ở các nút nằm trên nền, thay bằng nền hơi đặc hơn (nhìn gần như cũ). */
.see-all, .nav-btn, .ring, .mini-play, .lb-close, .add-card, .add-tile {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.see-all, .nav-btn { background: linear-gradient(180deg, rgba(40,70,140,.55), rgba(10,24,64,.6)); }
/* Báo trước cho trình duyệt các phần sẽ chuyển động -> tách lớp riêng cho GPU */
.film-track { will-change: transform; }
.player-wrap, .card { position: relative; }
/* canvas trong mẫu HTML: ẩn cho tới khi app.js chuyển nó sang lớp ánh sáng */
.player-wrap > .ambient, .card > .ambient { display: none; }
/* Chừa chỗ trên/dưới hàng video để quầng sáng không bị cắt (bù lại bằng lề âm cho bố cục không đổi) */
.track { padding-block: 20px 30px; margin-block: -16px -30px; }

/* ---------- Thẻ video tối giản: video sạch bo tròn, chữ nằm dưới, ánh xanh khi được chọn ---------- */
.card .thumb {
  border-radius: 22px;
  box-shadow: 0 24px 44px -24px rgba(0,0,0,.85);
  transition: transform .6s var(--ease-title), box-shadow .6s var(--ease-title), opacity .6s var(--ease-title);
}
/* viền sáng mảnh bên trong ảnh */
.thumb::after { box-shadow: inset 0 0 0 1px rgba(214,230,255,.12); }
/* lớp tối rất nhẹ ở đáy để nút phát luôn nổi */
.card .thumb::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(2,8,20,.55), transparent);
}
/* Nút phát: tròn xanh logo, được chọn thì sáng hơn và toả sáng */
.mini-play {
  left: auto; right: 14px; bottom: 14px; z-index: 3; width: 42px; height: 42px;
  border: 1px solid rgba(160,220,255,.55); border-radius: 50%; color: #fff;
  background: linear-gradient(160deg, rgba(65,198,254,.92), rgba(22,97,250,.92));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px -8px rgba(22,97,250,.8);
  transition: background .35s, color .35s, transform .45s var(--ease-title), box-shadow .35s;
}
.mini-play::before, .mini-play::after { display: none; }
.mini-play svg { width: 14px; height: 14px; }
/* Tên (màu chuyển xanh như các tiêu đề) + mô tả xanh nhạt dưới video */
.card-title {
  margin: 16px 4px 4px; color: #8fd0ff; font: 600 19px/1.2 var(--display); letter-spacing: -.025em;
  background-image: var(--title-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  caret-color: var(--accent); filter: drop-shadow(0 0 10px rgba(40,145,255,.3)); transition: filter .4s;
}
.card-meta { margin: 0 4px; color: #a8d4f4; font: 400 13px/1.45 var(--sans); }
/* Các nút khác trong phần dự án cũng xanh */
.row-count { color: var(--accent); }
.see-all { color: var(--accent); }
.nav-btn { color: var(--accent); }
.pg-cur { color: var(--accent); }

/* Đang chạy xem trước (rê chuột trên máy tính): ánh xanh quanh video, nút phát trắng */
.card .thumb.is-previewing {
  box-shadow: 0 0 0 1px rgba(170,225,255,.5), 0 24px 44px -24px rgba(0,0,0,.85);
}
.thumb.is-previewing .mini-play, .thumb:hover .mini-play {
  background: linear-gradient(160deg, #7fdcff, #2a7dff); color: #fff; border-color: #bfe8ff; transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(58,180,255,.2), 0 10px 28px -6px rgba(58,180,255,.9);
}
@media (hover: hover) {
  .card:hover .thumb { transform: translateY(-6px); }
  .card:hover .card-title { filter: drop-shadow(0 0 14px rgba(58,180,255,.6)); }
}

/* ---------- Điện thoại: khối kính kiểu visionOS ----------
   Khối kính chỉ dùng nền trong mờ (không backdrop-filter): nền phía sau chuyển động liên tục,
   làm mờ thật sẽ rất nặng mà nhìn gần như nhau. */
html { -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px) {
  :root {
    --panel-bg: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.03));
    --panel-line: rgba(255,255,255,.12);
    --panel-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 24px 48px -28px rgba(0,0,0,.8);
    --ease-out: cubic-bezier(.22,1,.36,1);
  }

  /* Thanh trên: chỉ còn logo, không khung; dính đầu màn hình khi cuộn (bấm logo để về đầu trang).
     Quầng tối mềm sau logo giúp logo vẫn rõ khi đè lên chữ/video. */
  .topbar {
    position: sticky; top: calc(env(safe-area-inset-top, 0px) + 6px); z-index: 30;
    margin-top: 10px; padding: 8px 0; border: 0; pointer-events: none;
  }
  .topbar .brand { position: relative; pointer-events: auto; padding: 6px 14px; }
  .topbar .brand::before {
    content: ''; position: absolute; inset: -10px -36px; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(2,8,34,.78), rgba(2,8,34,.4) 60%, transparent);
    opacity: 0; transition: opacity .35s;
  }
  .topbar .brand img { transition: height .35s var(--ease-title); filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); }
  .topbar.is-stuck .brand::before { opacity: 1; }
  .topbar.is-stuck .brand img { height: 24px; }
  .brand img { height: 28px; }
  .about-me { padding-top: 30px; gap: 18px; }
  .about-me-body p { font-size: 14.5px; line-height: 1.75; }
  .tags-row {
    display: flex; justify-content: center; align-items: center; gap: 14px; margin: 10px 0 0;
    color: var(--muted); font: 500 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
  }
  /* bù khoảng giãn chữ ở cuối từ để cả hàng nằm đúng giữa */
  .tags-row span { display: inline-flex; align-items: center; gap: 14px; margin-right: -.24em; }
  .tags-row span + span::before {
    content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
  }
  .hero { padding-top: 24px; }

  /* Phần mềm + Liên hệ: 2 dòng canh giữa */
  .toolbelt { gap: 22px; margin-bottom: 30px; }
  .kicker .caps { font-size: 9.5px; letter-spacing: .18em; }
  .film-track li { padding: 7px 14px 7px 9px; font-size: 11.5px; }
  .film-track img { width: 22px; height: 22px; }
  /* Liên hệ: lưới 2×2 đều nhau */
  .chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .chips a { padding: 6px 12px 6px 6px; }

  /* Video đầu: khung bo lớn, nút "Xem" dạng viên trắng góc dưới trái (như nút Watch) */
  .player { aspect-ratio: 4 / 3; border-radius: 26px; }
  .shade { background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.15) 55%, transparent); }
  .big-play {
    left: 14px; top: auto; bottom: 14px; margin: 0; transform: none;
    display: flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px;
    border-radius: 999px; background: #fff; color: #111;
    box-shadow: 0 10px 26px -10px rgba(0,0,0,.7);
    transition: opacity .3s, transform .25s var(--ease-out);
  }
  .big-play:active { transform: scale(.96); }
  .big-play .ring {
    width: 36px; height: 36px; border: 0; background: #111; color: #fff; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .big-play .ring::before, .big-play .ring::after { display: none; }
  .big-play .ring svg { width: 16px; height: 16px; }
  .big-play:hover .ring { transform: none; background: #111; }
  .big-label { color: #111; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: none; text-shadow: none; }
  /* Đang chạy xem trước: ẩn thanh điều khiển cho gọn; bấm xem thật mới hiện */
  .player:not(.is-full) .controls { opacity: 0; pointer-events: none; }
  .controls { transition: opacity .3s; }

  /* Tiêu đề mục */
  /* Tiêu đề + nút "Read more" chung 1 dòng */
  .section-head { margin-bottom: 14px; flex-wrap: wrap; gap: 6px 10px; }
  .section-head .h2 { font-size: 26px; min-width: 0; }
  .see-all { padding: 7px 12px; gap: 8px; font-size: 9px; letter-spacing: .14em; }
  .see-all svg { width: 15px; height: 15px; }
  .see-all > span { display: inline; }

  /* Mỗi thể loại là 1 khối kính */
  .rows { gap: 14px; }
  .row {
    padding: 16px 0 14px; border: 1px solid var(--panel-line); border-radius: 26px; overflow: hidden;
    background: var(--panel-bg); box-shadow: var(--panel-shadow);
  }
  .row-bg { display: none; }
  .row-head { padding: 0 16px; margin-bottom: 12px; gap: 10px; }
  .row-title { font-size: 19px; }
  .row-count { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 9px; letter-spacing: .14em; }
  .track { grid-auto-columns: 74%; gap: 12px; padding: 22px 16px 30px; margin-block: -10px -12px; scroll-padding-inline: 16px; }
  .ghost-tile { border-radius: 18px; }
  .pager { margin-top: 2px; }

  /* Thẻ đang xem sáng rõ với ánh xanh; thẻ hai bên dịu đi */
  .card .thumb { border-radius: 20px; }
  .card-title { font-size: 17px; margin-top: 14px; }
  .card-meta { font-size: 12px; }
  .card-title, .card-meta { transition: opacity .5s var(--ease-title), color .4s; }
  /* làm tối bằng độ mờ (GPU làm gần như miễn phí) thay vì filter trên video */
  body:not(.editing) .card:not(.is-active) .thumb { opacity: .5; transform: scale(.96); }
  body:not(.editing) .card:not(.is-active) :is(.card-title, .card-meta) { opacity: .45; }
  body:not(.editing) .card.is-active .thumb {
    box-shadow: 0 0 0 1px rgba(170,225,255,.5), 0 24px 44px -24px rgba(0,0,0,.85);
  }
  body:not(.editing) .card.is-active .mini-play {
    background: linear-gradient(160deg, #7fdcff, #2a7dff); border-color: #bfe8ff;
    box-shadow: 0 0 0 4px rgba(58,180,255,.2), 0 10px 28px -6px rgba(58,180,255,.9);
  }
  .card:active .thumb { transform: scale(.98); }

  .see-all, .nav-btn { transition: transform .25s var(--ease-out); }
  .see-all:active { transform: scale(.95); }

  .dock { bottom: calc(12px + env(safe-area-inset-bottom)); right: 12px; }
  dialog#lightbox video { border-radius: 22px; }

  /* Hiện dần khi cuộn tới (lớp .reveal do app.js gắn) */
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .reveal.is-in { opacity: 1; transform: none; }
  .row.reveal .card { opacity: 0; transform: translateX(24px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
  .row.reveal.is-in .card { opacity: 1; transform: none; }
  .row.reveal.is-in .card:nth-child(2) { transition-delay: .08s; }
  .row.reveal.is-in .card:nth-child(3) { transition-delay: .16s; }
  body.editing .reveal, body.editing .row.reveal .card { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .brand img, .split.is-in em .wi, .about-me-head::before, .hero-head::before, .section-head::before { animation: none; }
  /* Dải phim đứng yên: bỏ bản nhân đôi, xếp giữa */
  .film-track { animation: none; width: 100%; flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .film-track .clone { display: none; }
  .nle-ph, .wave i, .clip { animation: none; }
  .split .wi { transform: none; opacity: 1; filter: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}
