/* ============================================================================
   CREATIVE MODE — Apple-style "cover flow" career timeline
   Light studio UI: each career stage is a card; the active card sits in the
   center facing the viewer while the neighbours fan out in 3D.
   Scroll the wheel or drag the mouse like a touch swipe to move through
   the stages. Content of every stage lives on its card.
   Used together with creative markup in index.html + logic in cv-app.js
   ========================================================================== */

/* ---------- Mode switch button (visible in BOTH modes) ---------- */
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 11px;
  margin-left: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(160deg, #23201d, #131110);
  color: #fff;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 4px 14px rgba(20,16,12,0.24);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.mode-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 20px rgba(20,16,12,0.3); }
.mode-btn:active { transform: scale(0.96); }
.mode-btn:focus-visible { outline: 3px solid rgba(225,20,34,0.45); outline-offset: 3px; }
.mode-btn .mb-ic { display: inline-flex; }
.mode-btn .mb-ic svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; display: block; }
.mode-btn .mb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red, #e11422);
  animation: mbPulse 2.4s infinite;
}
@keyframes mbPulse {
  0% { box-shadow: 0 0 0 0 rgba(225,20,34,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(225,20,34,0); }
  100% { box-shadow: 0 0 0 0 rgba(225,20,34,0); }
}
@media (max-width: 860px) {
  .mode-btn .mb-t { display: none; }
  .mode-btn { padding: 0 10px; margin-left: 4px; }
}

/* ---------- Mode visibility ---------- */
body[data-mode="creative"] { overflow: hidden; height: 100dvh; }
body[data-mode="creative"] .nav-wrap,
body[data-mode="creative"] .ambient,
body[data-mode="creative"] .grain { display: none !important; }
body[data-mode="creative"] main,
body[data-mode="creative"] footer { display: none !important; }
body:not([data-mode="creative"]) #creativeRoot { display: none !important; }

/* ---------- Root / background (light) ---------- */
#creativeRoot {
  --c-bg: #f4f1ec;
  --c-ink: #1a1714;
  --c-dim: #6b645c;
  --c-faint: #a39c94;
  --c-red: #e11422;
  --c-line: rgba(26, 23, 20, 0.07);
  --glow: rgba(225, 20, 34, 0.12);
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(64% 50% at 50% 0%, rgba(255, 255, 255, 0.92), transparent 72%),
    radial-gradient(48% 42% at 72% 104%, var(--glow), transparent 70%),
    var(--c-bg);
  color: var(--c-ink);
  font-family: 'Be Vietnam Pro', sans-serif;
  overflow: hidden;
  animation: cRootIn 0.6s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}
#creativeRoot[data-era="0"] { --glow: rgba(238, 148, 38, 0.16); }
#creativeRoot[data-era="1"] { --glow: rgba(84, 130, 255, 0.13); }
#creativeRoot[data-era="2"] { --glow: rgba(58, 178, 235, 0.13); }
#creativeRoot[data-era="3"],
#creativeRoot[data-era="4"] { --glow: rgba(225, 20, 34, 0.12); }
@keyframes cRootIn { from { opacity: 0; } to { opacity: 1; } }

.c-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.c-grid {
  position: absolute;
  left: -30%; right: -30%; bottom: -42%;
  height: 92%;
  background-image:
    linear-gradient(var(--c-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-line) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(520px) rotateX(74deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}
.c-spot {
  position: absolute; inset: 0;
  background: radial-gradient(58% 46% at 50% 12%, var(--glow), transparent 72%);
}

/* ---------- Top bar ---------- */
.c-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
}
.c-brand { font-weight: 800; font-size: 14px; letter-spacing: -0.02em; white-space: nowrap; }
.c-brand b { color: var(--c-red); }
.c-top-label {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--c-faint);
  white-space: nowrap;
}
.c-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.c-editor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--c-dim);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid rgba(26, 23, 20, 0.12);
  background: rgba(255, 255, 255, 0.68);
  transition: color 0.3s, border-color 0.3s, transform 0.35s var(--ease-spring);
}
.c-editor:hover { color: var(--c-ink); border-color: rgba(26, 23, 20, 0.3); transform: translateY(-1px); }
.c-editor svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.7; }
/* Trên web (http/https) nút “Sửa nội dung” luôn ẩn — editor chỉ chạy offline tại máy */
html.is-web .c-editor { display: none; }
/* ltoggle trong .c-topbar dùng nguyên giao diện sáng mặc định của trang */

/* ---------- Stage layout ---------- */
.c-stage {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* ---------- HUD — dải thông tin nổi bên trái ---------- */
.c-hud {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  z-index: 6;
  width: 332px;
  display: flex;
  flex-direction: column;
  padding: 86px 20px 96px 46px;
  min-width: 0;
  pointer-events: none;
}
.c-hud > * { pointer-events: auto; }
.c-count { display: flex; align-items: baseline; gap: 6px; font-family: 'Space Grotesk', sans-serif; }
.c-count #cIdx { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.c-count .c-total { color: var(--c-faint); font-size: 1rem; font-weight: 500; letter-spacing: 0.04em; }
.c-years {
  margin-top: 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* tab chuyển nhóm thẻ: Hồ sơ (giới thiệu · học vấn · kỹ năng) / Kinh nghiệm */
.c-flows {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 14px rgba(26, 23, 20, 0.05);
}
.c-flow-tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--c-faint);
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.35s var(--ease, ease), color 0.35s var(--ease, ease);
}
.c-flow-tab:hover { color: var(--c-ink); }
.c-flow-tab.on { background: var(--c-ink); color: #fff; }
.c-flow-tab:focus-visible { outline: 2px solid rgba(225, 20, 34, 0.5); outline-offset: 2px; }
.c-hud-role {
  margin-top: 22px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.c-hud-co { margin-top: 6px; color: var(--c-dim); font-size: 0.86rem; line-height: 1.5; max-width: 30ch; }
.c-hud-spacer { flex: 1 1 auto; min-height: 18px; pointer-events: none; }

/* stage dots */
.c-dots { display: flex; flex-direction: column; gap: 2px; }
.c-dot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 0 6px 0 2px;
  border: 0;
  background: transparent;
  color: var(--c-faint);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-align: left;
  transition: color 0.35s;
}
.c-dot::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
  flex: none;
  transition: background 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-spring);
}
.c-dot:hover { color: var(--c-dim); }
.c-dot.active { color: var(--c-ink); }
.c-dot.active::before { background: var(--c-red); box-shadow: inset 0 0 0 1.5px var(--c-red), 0 0 12px rgba(225,20,34,0.65); transform: scale(1.15); }
.c-dot .c-dot-line {
  position: absolute;
  left: 6px; top: -9px;
  width: 1px; height: 9px;
  background: rgba(26, 23, 20, 0.14);
}
.c-dot:first-child .c-dot-line { display: none; }
.c-dot:focus-visible { outline: 2px solid rgba(225,20,34,0.5); outline-offset: 2px; border-radius: 8px; }

/* arrows */
.c-arrows { display: flex; gap: 10px; margin-top: 22px; }
.c-arrow {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(26, 23, 20, 0.14);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(26, 23, 20, 0.07);
  color: var(--c-ink);
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), border-color 0.3s, opacity 0.3s, background 0.3s;
}
.c-arrow svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.c-arrow:hover { border-color: rgba(26, 23, 20, 0.3); background: #fff; transform: translateY(-2px); }
.c-arrow:active { transform: scale(0.94); }
.c-arrow[disabled] { opacity: 0.28; pointer-events: none; }
.c-arrow:focus-visible { outline: 3px solid rgba(225,20,34,0.5); outline-offset: 2px; }

/* ---------- Scene & rig — sân khấu của cover flow ---------- */
.c-scene {
  position: absolute;
  left: 332px; right: 0; top: 0; bottom: 0; /* dời sang phải HUD để thẻ rộng không đè lên cột điều hướng */
  z-index: 5;
  perspective: 1800px;
  perspective-origin: 50% 46%;
}
.c-rig {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translate3d(0, 0, 0);
  transition: transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: grab;
  touch-action: pan-y;
}
.c-rig.dragging, .c-rig.dragging *, .c-rig.dragging .cf-card, .c-rig.dragging .cf-card * { cursor: grabbing; }
.c-rig.dragging { transition: none; }
.c-rig:not(.ready) .cf-card { transition: none; }

/* ---------- Cover-flow cards ---------- */
.cf-card {
  --tx: 0%; --tz: 0px; --ry: 0deg; --sca: 1;
  position: absolute;
  left: 50%; top: 50%;
  /* bề ngang gấp đôi bản cũ (tỉ lệ 0.8 → 1.6); màn hình hẹp tự thu chiều cao để chừa chỗ thẻ hai bên */
  height: min(680px, 74vh, calc((100vw - 532px) / 1.6));
  aspect-ratio: 1.6;
  transform: translate(-50%, -50%)
    translateX(var(--tx))
    translateZ(var(--tz))
    rotateY(var(--ry))
    scale(var(--sca));
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--c-ink);
  border: 1px solid rgba(26, 23, 20, 0.08);
  border-radius: 30px;
  box-shadow: 0 24px 64px rgba(26, 23, 20, 0.14), 0 4px 14px rgba(26, 23, 20, 0.05);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  backface-visibility: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 320ms ease, visibility 0s;
}
.cf-card.pre { opacity: 0; --sca: 0.94; }

/* vị trí từng thẻ theo khoảng cách tới giai đoạn hiện tại */
.cf-card.o-0  { --tx: 0%;     --tz: 0px;    --ry: 0deg;   z-index: 60; }
.cf-card.o-p1 { --tx: 36%;    --tz: -150px; --ry: -54deg; z-index: 50; }
.cf-card.o-m1 { --tx: -36%;   --tz: -150px; --ry: 54deg;  z-index: 50; }
.cf-card.o-p2 { --tx: 66%;    --tz: -310px; --ry: -58deg; z-index: 40; }
.cf-card.o-m2 { --tx: -66%;   --tz: -310px; --ry: 58deg;  z-index: 40; }
.cf-card.o-p3 { --tx: 88%;    --tz: -450px; --ry: -62deg; z-index: 30; }
.cf-card.o-m3 { --tx: -88%;   --tz: -450px; --ry: 62deg;  z-index: 30; }
.cf-card.o-p3, .cf-card.o-m3 { opacity: 0; }
/* thẻ hai bên: bấm chuột vào để nhảy thẳng tới thẻ đó, nhưng nội dung bên trong không tương tác */
.cf-card:not(.o-0) { pointer-events: auto; cursor: pointer; }
.cf-card:not(.o-0) > * { pointer-events: none; }
/* thẻ lớp thứ ba vẫn tắt tương tác (đứng sau, gần như vô hình) */
.cf-card.o-p3, .cf-card.o-m3 {
  pointer-events: none;
  visibility: hidden;
  transition: transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 320ms ease, visibility 0s 680ms;
}

/* thẻ thuộc nhóm còn lại — mờ nhanh tại chỗ, nhường sân khấu cho nhóm đang xem */
.cf-card.off {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease, visibility 0s 220ms;
}

/* lớp phủ làm mờ dần các thẻ hai bên */
.cf-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: #f4f1ec;
  opacity: 0;
  pointer-events: none;
  z-index: 9;
  transition: opacity 0.55s ease;
}
.cf-card.o-p1::after, .cf-card.o-m1::after { opacity: 0.45; }
.cf-card.o-p2::after, .cf-card.o-m2::after { opacity: 0.7; }
.cf-card.o-p3::after, .cf-card.o-m3::after { opacity: 0.85; }

/* ---------- Card content ---------- */
.cf-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 18px 28px 22px;
  scrollbar-width: none; /* ẩn thanh cuộn — vẫn cuộn được bằng bánh xe, kéo chuột hoặc cảm ứng */
}
.cf-scroll::-webkit-scrollbar { display: none; }
.cf-scroll:focus-visible { outline: 2px solid var(--c-red); outline-offset: -3px; }
.cf-content { display: flow-root; }
.cf-scroll-cue {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.96) 75%);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s 200ms;
}
.cf-card.o-0.has-more .cf-scroll-cue {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.cf-scroll-hint {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(26, 23, 20, 0.1);
  border-radius: 50%;
  background: #fff;
  color: var(--c-dim);
  box-shadow: 0 3px 12px rgba(26, 23, 20, 0.08);
  cursor: pointer;
  pointer-events: none;
  transition: transform 200ms ease;
}
.cf-card.o-0.has-more .cf-scroll-hint { pointer-events: auto; }
.cf-scroll-hint:hover { transform: translateY(2px); }
.cf-scroll-hint:active { transform: scale(0.94); }
.cf-scroll-hint:focus-visible { outline: 2px solid var(--c-red); outline-offset: 3px; }
.cf-scroll-chevron { display: flex; }
.cf-scroll-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cf-scroll-label {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .cf-card.o-0.has-more:not(.off) .cf-scroll-chevron {
    animation: cfScrollDown 2.4s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  }
}
@keyframes cfScrollDown {
  0%, 20%, 80%, 100% { transform: translateY(-2px); opacity: 0.65; }
  50% { transform: translateY(3px); opacity: 1; }
}

/* đầu thẻ cố định: số thứ tự + nhãn (hoặc logo công ty) đứng yên khi cuộn nội dung */
.cf-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 28px 15px;
  border-bottom: 1px solid rgba(26, 23, 20, 0.07);
}
.cf-head .cf-top { flex: 1 1 auto; min-width: 0; }

.cf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cf-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.cf-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-red);
  border: 1px solid rgba(225, 20, 34, 0.3);
  background: rgba(225, 20, 34, 0.06);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.cf-head .cf-logo { flex: none; min-height: 0; display: flex; align-items: center; justify-content: flex-end; margin: 0; }
.cf-role { font-size: 1.35rem; font-weight: 700; line-height: 1.28; letter-spacing: -0.02em; }
.cf-co { margin-top: 6px; font-size: 0.82rem; color: var(--c-dim); line-height: 1.5; }
.cf-period {
  display: inline-block;
  margin-top: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: #8b2b33;
  background: rgba(225, 20, 34, 0.08);
  border: 1px solid rgba(225, 20, 34, 0.22);
  padding: 5px 10px;
  border-radius: 999px;
}
.cf-list { list-style: none; margin-top: 16px; display: grid; gap: 11px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cf-list li {
  position: relative;
  padding-left: 17px;
  font-size: 12.8px;
  line-height: 1.62;
  color: #4b453e;
}
.cf-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 1.5px;
  background: var(--c-red);
  transform: rotate(45deg);
}
.cf-list li b { color: var(--c-ink); font-weight: 700; }
.cf-foot {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed rgba(26, 23, 20, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-faint);
}
.cf-foot.one { justify-content: center; }

/* thẻ giới thiệu (nhóm Hồ sơ) — ảnh chân dung bên trái, phần chữ bên phải */
.cf-hero { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 26px; align-items: start; }
.cf-photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: #fbf9f6;
  box-shadow: 0 14px 34px rgba(26, 23, 20, 0.12);
}
.cf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-greet { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
.cf-greet span { color: var(--c-red); }
.cf-chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cf-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-dim);
  border: 1px solid rgba(26, 23, 20, 0.12);
  background: #fbf9f6;
}
.cf-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--c-ink);
  color: #fff;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(26, 23, 20, 0.16);
  transition: transform 0.35s var(--ease-spring, ease), box-shadow 0.35s;
}
.cf-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(26, 23, 20, 0.2); }
.cf-btn:active { transform: scale(0.97); }
.cf-btn:focus-visible { outline: 2px solid rgba(225, 20, 34, 0.55); outline-offset: 2px; }
.cf-btn.ghost { background: transparent; color: var(--c-ink); border: 1px solid rgba(26, 23, 20, 0.2); box-shadow: none; }
.cf-btn.ghost:hover { border-color: rgba(26, 23, 20, 0.4); background: rgba(26, 23, 20, 0.03); }

/* thẻ học vấn */
.cf-edu-wrap { margin-top: 20px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cf-edu {
  display: grid;
  gap: 3px;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: #fbf9f6;
}
.cf-edu-y { font-family: 'Space Mono', monospace; font-size: 9.5px; letter-spacing: 0.12em; color: var(--c-red); }
.cf-edu-deg { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.cf-edu-school { font-size: 11.5px; color: var(--c-dim); line-height: 1.45; }

/* thẻ học vấn gộp thêm ngoại ngữ + chứng chỉ & đào tạo (ngăn cách bằng đường kẻ mảnh) */
.cf-edu-wrap + .cf-groups { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--c-line); }

/* thẻ kỹ năng — các nhóm tự xếp nhiều cột khi thẻ đủ rộng */
.cf-groups {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 24px;
  align-items: start;
}
.cf-group { margin-top: 0; }
.cf-group-h { font-size: 12.5px; font-weight: 700; letter-spacing: -0.01em; }
.cf-sdesc { margin-top: 4px; font-size: 11.5px; color: var(--c-dim); line-height: 1.55; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cf-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--c-dim);
  background: rgba(26, 23, 20, 0.05);
  border: 1px solid rgba(26, 23, 20, 0.08);
}
.cf-tag.red { color: var(--c-red); background: rgba(225, 20, 34, 0.07); border-color: rgba(225, 20, 34, 0.25); }
.cf-lang { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 10px; }
.cf-lang .n { font-size: 12px; font-weight: 600; }
.cf-lang .b { height: 5px; border-radius: 999px; background: rgba(26, 23, 20, 0.09); overflow: hidden; }
.cf-lang .b i { display: block; height: 100%; border-radius: inherit; background: var(--c-red); }
.cf-lang .m { font-family: 'Space Mono', monospace; font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-faint); }
.cf-cert { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.cf-cert .d {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-red);
  background: rgba(225, 20, 34, 0.1);
}
.cf-cert .t { min-width: 0; }
.cf-cert .t b { display: block; font-size: 12px; font-weight: 700; }
.cf-cert .t span { display: block; font-size: 10.5px; color: var(--c-dim); margin-top: 1px; }

/* thẻ liên hệ (giai đoạn cuối) */
.cf-hello { margin-top: 24px; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
.cf-hello span { color: var(--c-red); }
.cf-lead { margin-top: 10px; font-size: 12.5px; line-height: 1.65; color: var(--c-dim); max-width: 62ch; }
.cf-links { margin-top: 18px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cf-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(26, 23, 20, 0.1);
  background: #fbf9f6;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, transform 0.35s var(--ease-spring, ease);
}
.cf-link:hover { border-color: rgba(225, 20, 34, 0.45); background: rgba(225, 20, 34, 0.05); transform: translateY(-1px); }
.cf-link .li {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(225, 20, 34, 0.1);
  color: var(--c-red);
}
.cf-link .li svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.cf-link .lk {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-faint);
}
.cf-link .lv { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; word-break: break-word; }

/* ---------- Hint pill ---------- */
.c-hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 9;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 19px 11px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(26, 23, 20, 0.1);
  box-shadow: 0 14px 34px rgba(26, 23, 20, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  transition: opacity 0.5s var(--ease, ease), transform 0.5s var(--ease, ease);
}
.c-hint.gone { opacity: 0; transform: translateX(-50%) translateY(14px); pointer-events: none; }
.c-mouse {
  position: relative;
  width: 20px; height: 31px;
  border: 1.6px solid rgba(26, 23, 20, 0.52);
  border-radius: 11px;
  flex: none;
}
.c-mouse i {
  position: absolute;
  left: 50%; top: 6px;
  width: 2.5px; height: 7px;
  margin-left: -1.25px;
  border-radius: 2px;
  background: #1a1714;
  animation: cWheel 1.7s ease-in-out infinite;
}
@keyframes cWheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(9px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
.c-hint-tx b { display: block; font-size: 12.5px; font-weight: 600; }
.c-hint-tx span { display: block; font-size: 11px; color: var(--c-dim); margin-top: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .c-hud {
    left: 0; right: 0; top: 0; bottom: auto;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    padding: 64px 18px 0;
    align-content: flex-start;
  }
  .c-count #cIdx { font-size: 2rem; }
  /* dải ngang chỉ giữ số đếm + tab nhóm thẻ; mốc thời gian đã có trên thẻ giữa */
  .c-years { display: none; }
  .c-flows { order: 1; margin: 0; padding: 3px; }
  .c-flow-tab { padding: 9px 13px; }
  .c-hud-role, .c-hud-co { display: none; }
  .c-hud-spacer { display: none; }
  .c-dots {
    position: fixed;
    left: 0; right: 0; bottom: 14px;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    z-index: 9;
  }
  .c-dot { min-height: 44px; padding: 0 3px; }
  .c-dot .c-dot-t { display: none; }
  .c-dot .c-dot-line { display: none; }
  .c-arrows { position: fixed; right: 14px; bottom: 64px; margin: 0; flex-direction: column; z-index: 9; }
  .c-arrow { width: 44px; height: 44px; background: rgba(255, 255, 255, 0.78); }
  .c-hint { bottom: 74px; }
  .c-hint-tx span { display: none; }
  .c-top-label { display: none; }

  .c-scene { left: 0; }
  .cf-card {
    height: min(620px, 66vh, calc(100vh - 215px), calc((100vw - 64px) / 1.48));
    height: min(620px, 66vh, calc(100dvh - 215px), calc((100vw - 64px) / 1.48));
    aspect-ratio: 1.48;
  }
  .cf-card.o-p1 { --tz: -140px; }
  .cf-card.o-m1 { --tz: -140px; }
  .cf-card.o-p2 { --tz: -290px; }
  .cf-card.o-m2 { --tz: -290px; }
}

@media (max-width: 560px) {
  .cf-card {
    height: min(560px, 66vh, calc(100vh - 215px), calc((100vw - 48px) / 1.4));
    height: min(560px, 66vh, calc(100dvh - 215px), calc((100vw - 48px) / 1.4));
    aspect-ratio: 1.4;
  }
  .cf-head { padding: 18px 20px 12px; }
  .cf-scroll { padding: 14px 20px 18px; }
  .cf-role { font-size: 1.2rem; }
}

/* màn hình dọc rất hẹp — ảnh chân dung xuống dưới phần chữ */
@media (max-width: 440px) {
  .cf-hero { grid-template-columns: 1fr; gap: 18px; }
  .cf-photo { max-width: 190px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #creativeRoot { animation: none; }
  #creativeRoot *, #creativeRoot *::before, #creativeRoot *::after {
    transition: none !important;
    animation: none !important;
  }
  .mode-btn .mb-dot { animation: none; }
}
.c-hint.gone .c-mouse i { animation: none; }
