/* ============================================================
   PORTFOLIO — Dark / Modern
   Design tokens ở :root — đổi màu, font, spacing tại đây
   ============================================================ */
:root {
  /* Colors */
  --bg:          #0a0b10;
  --bg-alt:      #0f1117;
  --surface:     #151823;
  --surface-2:   #1b1f2e;
  --border:      #262b3a;
  --text:        #e7ecf4;
  --text-muted:  #dfe5ee;   /* gần như trắng - chỉ nhạt hơn --text một chút */
  --accent:      #16c284;
  --accent-2:    #4fe0a6;
  --accent-soft: rgba(22, 194, 132, 0.14);
  --gradient:    linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

  /* Type */
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  /* Toàn site dùng một font duy nhất: Inter.
     Giữ lại biến này để chỗ nào cần chữ tiêu đề vẫn khai báo riêng được. */
  --font-display: var(--font-body);

  /* Layout */
  --container:   1120px;
  --radius:      16px;
  --radius-sm:   10px;
  --nav-h:       72px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Layout helpers ---------- */
.container { width: min(var(--container), 92%); margin-inline: auto; position: relative; z-index: 1; }
.section { padding: 78px 0; position: relative; z-index: 1; }
/* Nền liền mạch cho cả trang (bỏ dải xen kẽ để trông thống nhất 1 khối) */
.section--alt { background: transparent; }
.section + .section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1120px, 92%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  opacity: .6;
}

.section__head { text-align: center; margin-bottom: 56px; }
/* Tên khối là chữ lớn nhất; câu mô tả bên dưới nhỏ và nhạt hơn */
.section__eyebrow {
  display: block; font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 10px; line-height: 1.2;
}
.section__title {
  font-family: var(--font-display); font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 500; line-height: 1.5; letter-spacing: 0;
  color: var(--text-muted); max-width: 62ch; margin-inline: auto;
}

/* ---------- Ngắt dòng hài hòa (tránh chữ lẻ loi ở cuối dòng) ---------- */
h1, h2, h3,
.section__title, .hero__name, .hero__role,
.hero__tagline { text-wrap: balance; }
p, .about__text p, .timeline__desc, .project__desc { text-wrap: pretty; }

/* Bàn tay vẫy ở hero - gốc xoay đặt ở cổ tay cho giống vẫy thật */
.wave {
  display: inline-block;
  transform-origin: 70% 75%;
  animation: vayTay 3s ease-in-out infinite;
}
@keyframes vayTay {
  0%, 58%, 100% { transform: rotate(0deg); }
  62% { transform: rotate(16deg); }
  67% { transform: rotate(-9deg); }
  72% { transform: rotate(16deg); }
  77% { transform: rotate(-5deg); }
  82% { transform: rotate(11deg); }
  88% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 26px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gradient); color: #0a0b10; box-shadow: 0 8px 24px -8px rgba(22,194,132,0.55); }
.btn--primary:hover { box-shadow: 0 12px 32px -8px rgba(22,194,132,0.8); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn--outline { border: 2px solid var(--accent); color: var(--accent-2); background: transparent; box-shadow: 0 8px 24px -12px rgba(22,194,132,0.5); }
.btn--outline:hover { background: var(--accent-soft); border-color: var(--accent-2); box-shadow: 0 12px 30px -10px rgba(22,194,132,0.7); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* Dòng phụ dưới vai trò ở hero */
.hero__role-sub {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin: -12px 0 20px;
}

/* CTA chính: chữ hoa, giãn chữ, nặng đô hơn */
.btn--caps {
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
}
.btn--caps span { transition: transform 0.25s var(--ease); }
.btn--caps:hover span { transform: translateX(4px); }

/* CTA phụ: viền mảnh, không tranh chỗ với nút chính */
/* Nút "Tải CV" cạnh nút chính ở hero. Dùng --text chứ không phải
   --text-muted: nền sáng thì ra chữ đen đọc rõ, nền tối vẫn tự sáng lên. */
.btn--quiet {
  border: 1px solid var(--border); color: var(--text);
  background: transparent; font-weight: 500;
}
.btn--quiet:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted);
}
.tag--metric {
  color: var(--accent-2); font-weight: 600;
  border-color: rgba(22, 194, 132, 0.35);
  background: rgba(22, 194, 132, 0.09);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  display: flex; align-items: center; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 11, 16, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; position: relative; }
.nav__link {
  position: relative;
  padding: 8px 14px; border-radius: 8px; font-size: 0.92rem; color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--text); background: var(--accent-soft); }

.nav__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-h); }
.hero__inner { display: grid; grid-template-columns: 1fr 0.92fr; gap: 56px; align-items: center; }
.hero__hi { color: var(--text); font-weight: 500; margin-bottom: 10px; }
.hero__name {
  /* Inter rộng hơn font cũ nên siết cỡ chữ và khoảng cách chữ để tên giữ một dòng */
  font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  font-weight: 700; line-height: 1.05; margin-bottom: 10px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__role { font-size: clamp(1.2rem, 3vw, 1.7rem); font-weight: 600; color: var(--text); margin-bottom: 20px; }
.hero__role-typed { color: var(--text); }
.hero__tagline { color: var(--text-muted); max-width: 58ch; margin-bottom: 14px; text-wrap: pretty; }
.hero__tagline--last { margin-bottom: 30px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero__socials { display: flex; gap: 12px; }
.social {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.social svg { width: 19px; height: 19px; fill: currentColor; }
.social:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

.hero__photo { position: relative; display: grid; place-items: center; }
.hero__photo-wrap {
  width: min(440px, 94%); aspect-ratio: 1; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--border); position: relative; z-index: 2;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.hero__photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero__blob {
  position: absolute; inset: 0; margin: auto; width: 78%; aspect-ratio: 1;
  background: var(--gradient); filter: blur(60px); opacity: 0.35; z-index: 1;
  border-radius: 50%; animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }

.hero__scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); }
.hero__scroll-mouse {
  display: block; width: 24px; height: 38px; border: 2px solid var(--text-muted); border-radius: 14px; position: relative;
}
.hero__scroll-mouse::after {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 7px; background: var(--accent); border-radius: 2px; animation: scroll 1.6s infinite;
}
@keyframes scroll { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 80% { opacity: 0; top: 18px; } }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about__text p { color: var(--text-muted); margin-bottom: 16px; }
/* Không còn đoạn văn ở trên nên bỏ margin-top */
.about__facts { display: grid; gap: 10px; }
.about__facts li { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.about__fact-k { color: var(--text-muted); font-size: 0.9rem; }
.about__fact-v { font-weight: 600; }

.about__quote { display: flex; align-items: center; }
.about__quote blockquote {
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  font-weight: 600; line-height: 1.5; color: var(--text);
  border-left: 3px solid var(--accent); padding-left: 24px; margin: 0;
}
.about__quote blockquote::before {
  content: '\201C'; display: block; font-family: Georgia, serif;
  font-size: 3rem; line-height: 0.55; color: var(--accent); opacity: 0.5; margin-bottom: 8px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; text-align: center;
}
.stat__num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__plus { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.stat__label { display: block; margin-top: 6px; color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   KẾT QUẢ / KPI + biểu đồ tăng trưởng
   ============================================================ */
.kpi__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.kpi__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 34px; }
.kpi__value { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-display); line-height: 1; white-space: nowrap; }
.kpi__num {
  font-size: clamp(2.5rem, 5vw, 3.6rem); font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kpi__pre, .kpi__suffix { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.kpi__pre { margin-right: 2px; }
.kpi__label { color: var(--text-muted); font-size: 0.95rem; margin-top: 8px; }

.kpi-chart { width: 100%; }
.kpi-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.kpi-chart__line {
  fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease);
}
.kpi-chart.is-visible .kpi-chart__line { stroke-dashoffset: 0; }
.kpi-chart__area { opacity: 0; transition: opacity 1.2s ease 1.0s; }
.kpi-chart.is-visible .kpi-chart__area { opacity: 1; }
/* Mũi tên chạy dọc đường chứ không đứng sẵn ở cuối: dùng offset-path
   đi đúng lộ trình của đường, offset-rotate tự xoay theo hướng đang đi.
   Vì thế hình mũi tên phải vẽ quanh gốc toạ độ và chĩa về +X.
   Thời lượng và nhịp lấy đúng bằng đường, nếu lệch thì mũi tên rời khỏi
   đầu đường giữa chừng. */
.kpi-chart__tip {
  fill: var(--accent-2); opacity: 0;
  /* Dự phòng cho trình duyệt không hiểu offset-path (Safari dưới 16):
     mũi tên vẽ quanh gốc toạ độ nên không có dòng này nó sẽ nằm chết ở
     góc trái trên. Đặt sẵn ở cuối đường, đúng góc nghiêng đoạn cuối. */
  transform: translate(420px, 26px) rotate(-16.7deg);
  offset-path: path("M0,175 L60,158 L120,163 L180,128 L240,108 L300,66 L360,44 L420,26");
  offset-rotate: auto;
  offset-distance: 0%;
  transition: offset-distance 2.2s var(--ease), opacity 0.35s ease;
  filter: drop-shadow(0 0 6px var(--accent));
}
@supports (offset-path: path("M0 0 L1 1")) {
  .kpi-chart__tip { transform: none; }
}
.kpi-chart.is-visible .kpi-chart__tip { opacity: 1; offset-distance: 100%; }


@media (max-width: 820px) { .kpi__inner { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 480px) {
  .kpi__grid { grid-template-columns: 1fr; gap: 20px; }
  .kpi__value { flex-wrap: wrap; }
}
@media (max-width: 460px) { .kpi__grid { gap: 20px; } }

/* ============================================================
   SKILLS
   ============================================================ */
.skills__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 16px; text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.skill-card__icon { width: 42px; height: 42px; fill: var(--accent); display: block; margin: 0 auto 14px; }
.skill-card__title { font-family: var(--font-display); font-size: 1rem; margin-bottom: 8px; line-height: 1.3; }
.skill-card__desc { color: var(--text-muted); font-size: 0.82rem; line-height: 1.55; }
.skill-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) { .skills__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .skills__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   EXPERIENCE — Timeline
   ============================================================ */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline__item { position: relative; padding: 0 0 40px 24px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline__item--edu::before { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(22,194,132,0.14); }
.timeline__date { font-family: var(--font-display); font-size: 0.82rem; color: var(--text); letter-spacing: 0.04em; }
.timeline__role { font-size: 1.2rem; font-weight: 600; margin-top: 4px; }
.timeline__org { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 8px; }
.timeline__desc { color: var(--text-muted); }

/* Thành tựu dạng metric card */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; margin-top: 16px; }
.metric {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; transition: border-color 0.25s, transform 0.25s var(--ease);
}
.metric:hover { border-color: var(--accent); transform: translateY(-3px); }
.metric__v {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--accent); line-height: 1.2;
}
.metric__l { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; line-height: 1.35; }
@media (max-width: 520px) { .metrics { grid-template-columns: 1fr; } }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 26px; }
/* Trang /case-study/ có 4 thẻ. Lưới auto-fit ở trên nhét vừa 3 cột nên
   thẻ thứ tư rơi xuống hàng dưới một mình. Ép đúng 2 cột cho 2+2, ảnh
   bìa cũng được rộng gấp đôi so với xếp 4 cột. */
.projects__grid--doi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .projects__grid--doi { grid-template-columns: 1fr; } }
.project {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.project:hover { transform: translateY(-6px); border-color: var(--accent); }
.project__thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.project__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.project:hover .project__thumb img { transform: scale(1.06); }
.project__body { padding: 22px; }
/* Tên case study trên thẻ - cùng quy tắc: tiêu đề thì màu xanh */
.project__title {
  font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px;
  color: var(--accent-2); letter-spacing: 0.01em;
}
.project__desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.project__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.project__links { display: flex; gap: 18px; }
.project__links a { color: var(--text); font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.project__links a:hover { color: var(--accent-2); }

/* Case-study (Problem / Solution / Flow / Impact) */
.casestudy { display: grid; gap: 9px; margin: 4px 0 16px; }
.cs-row { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: start; }
.cs-row dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--text); padding-top: 2px; }
.cs-row dd { font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.cs-row--impact { padding-top: 9px; border-top: 1px solid var(--border); }
.cs-row--impact dd { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .cs-row { grid-template-columns: 1fr; gap: 3px; } .cs-row dt { padding-top: 6px; } }

/* ============================================================
   NHÃN HÀNG / ĐỐI TÁC (logo wall)
   ============================================================ */
.brands__marquee {
  overflow: hidden; position: relative; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brands__track {
  display: flex; width: max-content;
  /* Chừa lề trên dưới: logo phóng to 1.08 khi rê chuột, không có chỗ thở
     thì bị chính khung marquee (overflow:hidden) cắt mất viền trên và dưới */
  padding-block: 9px;
  animation: brandScroll 45s linear infinite;
  will-change: transform;
}
.brands__marquee:hover .brands__track { animation-play-state: paused; }
@keyframes brandScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.brand-logo {
  flex: 0 0 auto; width: 104px; height: 104px; margin-right: 30px;
  border-radius: 50%; overflow: hidden; background: #fff;
  border: 1px solid var(--border); box-shadow: 0 6px 18px -8px rgba(0,0,0,0.5);
  transition: transform 0.3s var(--ease);
}
.brand-logo:hover { transform: scale(1.08); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__inner { text-align: center; max-width: 640px; }
.contact__lead { color: var(--text-muted); margin: 16px 0 30px; white-space: pre-line; }
.contact__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 34px; }
.contact__links a { color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.contact__links a:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer__inner { display: flex; justify-content: center; text-align: center; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 0.88rem; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__photo { order: -1; }
  .hero__cta, .hero__socials { justify-content: center; }
  .hero__tagline { margin-inline: auto; }
  .about__grid { grid-template-columns: 1fr; }
  /* Xếp dọc thì ảnh 3:4 ăn trọn bề ngang -> cao tới 932px ở khổ 760px,
     chiếm hết màn. Chặn bề ngang rồi dồn vào giữa. */
  .about__grid > div:last-child img { max-width: 380px; margin-inline: auto; }

  .nav__link { padding: 14px; border-radius: 10px; }
  .nav__burger { display: flex; }
  }

@media (max-width: 520px) {
  .section { padding: 72px 0; }
  .footer__inner { flex-direction: column; text-align: center; }
}

/* ============================================================
   HIỆU ỨNG / MOTION
   ============================================================ */
/* Thanh tiến trình cuộn trên đỉnh trang */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: var(--gradient); box-shadow: 0 0 12px rgba(22,194,132,.7);
  transition: width .1s linear;
}

/* Smooth inertia scroll (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Hero canvas: mạng lưới dữ liệu tương tác */
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.btn--primary { will-change: transform; }
/* Tên hero: gradient vàng lấp lánh chạy ngang */
.hero__name {
  background: linear-gradient(100deg,#16c284 10%,#b8f0d8 32%,#16c284 56%,#4fe0a6 82%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: nameShine 9s linear infinite;
}
@keyframes nameShine { to { background-position: 220% center; } }

/* Cinematic: film grain + vignette (tĩnh, phủ toàn màn, không chặn click) */
html::after {
  content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  background: radial-gradient(135% 130% at 50% 42%, transparent 50%, rgba(0,0,0,0.58) 100%);
}

/* Nghiêng 3D + vệt sáng theo chuột cho thẻ (JS thêm class .tilt / .is-tilting) */
.tilt { position: relative; transition: transform 0.18s var(--ease), border-color 0.3s var(--ease); transform-style: preserve-3d; will-change: transform; }
/* Trước đây chỉ là một đốm trắng đục rgba(255,255,255,.20), trông như đèn pin
   rọi vào thẻ. Thay bằng hai lớp nhuộm theo màu thương hiệu: quầng rất nhẹ
   trong lòng thẻ, cộng một vệt sáng chạy trên đúng đường viền. */
.tilt::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  background: radial-gradient(320px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(22,194,132,0.16), rgba(79,224,166,0.05) 40%, transparent 66%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.tilt.is-tilting::before { opacity: 1; }
/* Vệt sáng viền: tô kín thẻ rồi khoét ruột bằng mask, chỉ chừa lại vành 1px */
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 6;
  padding: 1px;
  background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 50%),
              rgba(79,224,166,0.85), rgba(22,194,132,0.35) 42%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.tilt.is-tilting::after { opacity: 1; }

/* Nút chính: vệt sáng quét qua khi hover */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::before {
  content: ''; position: absolute; top: 0; left: -130%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .7s ease;
}
.btn--primary:hover::before { left: 130%; }

/* Nav: gạch chân chạy khi hover / active */
.nav__link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
  background: var(--gradient); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.project { transform-style: preserve-3d; }

/* Reveal so le cho lưới kỹ năng & dự án */
.skills__grid .skill-card:nth-child(2) { transition-delay: .08s; }
.skills__grid .skill-card:nth-child(3) { transition-delay: .16s; }
.skills__grid .skill-card:nth-child(4) { transition-delay: .24s; }
.projects__grid .project:nth-child(2) { transition-delay: .10s; }
.projects__grid .project:nth-child(3) { transition-delay: .20s; }
.projects__grid .project:nth-child(4) { transition-delay: .30s; }

/* Ảnh hero nổi nhẹ */
.hero__photo-wrap { animation: photoFloat 6s ease-in-out infinite; }
@keyframes photoFloat { 0%,100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
}
