/* Clean Editorial Utility Styles & Animation Tokens */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  overflow-x: clip;
  overscroll-behavior-y: none;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* ============================================================
   NAVIGATION — compact-on-scroll + accessible mobile drawer
   ============================================================ */
.site-header {
  --nav-height: 4rem;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  margin-inline: auto;
  transform: translateY(0);
  border: 1px solid transparent;
  border-bottom-color: rgba(231, 229, 228, 0.72);
  border-radius: 0;
  background: rgba(255, 251, 245, 0.96);
  box-shadow: 0 1px 0 rgba(41, 37, 36, 0.02);
  transition:
    width 280ms cubic-bezier(0.16, 1, 0.3, 1),
    max-width 280ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 280ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
  width: calc(100% - 1rem);
  max-width: 76rem;
  transform: translateY(0.5rem);
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.72);
  box-shadow:
    0 18px 45px rgba(20, 47, 74, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.site-header__inner {
  height: var(--nav-height);
  transition: height 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-brand__logo {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), width 220ms ease, height 220ms ease;
}

.site-brand:hover .site-brand__logo {
  transform: scale(1.06);
}

.site-nav-link {
  position: relative;
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  align-items: center;
  color: #292524;
  border-radius: 0.75rem;
  transition: color 180ms ease, background-color 180ms ease;
}

.site-nav-link::after {
  position: absolute;
  right: 1rem;
  bottom: 0.38rem;
  left: 1rem;
  height: 2px;
  border-radius: 999px;
  background: #007bff;
  content: '';
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav-link:hover,
.site-nav-link:focus-visible,
.site-nav-link.nav-link-active {
  color: #007bff;
}

.site-nav-link:hover::after,
.site-nav-link:focus-visible::after,
.site-nav-link.nav-link-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.site-nav-link:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.mobile-menu-toggle {
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  color: #292524;
  box-shadow: 0 4px 14px rgba(41, 37, 36, 0.06);
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible,
.mobile-menu-toggle.is-open {
  border-color: rgba(0, 123, 255, 0.45);
  background: #fff;
  color: #007bff;
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.mobile-menu-toggle__line {
  position: absolute;
  width: 1.15rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 140ms ease;
}

.mobile-menu-toggle__line--top { transform: translateY(-6px); }
.mobile-menu-toggle__line--bottom { transform: translateY(6px); }
.mobile-menu-toggle.is-open .mobile-menu-toggle__line--top { transform: rotate(45deg); }
.mobile-menu-toggle.is-open .mobile-menu-toggle__line--middle { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.is-open .mobile-menu-toggle__line--bottom { transform: rotate(-45deg); }

.mobile-menu-scrim {
  position: absolute;
  z-index: 60;
  top: 100%;
  left: 50%;
  width: 100vw;
  height: calc(100svh - var(--nav-height));
  border: 0;
  background: rgba(20, 47, 74, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: opacity 220ms ease;
}

.mobile-menu-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0.75rem;
  left: 0.75rem;
  z-index: 70;
  max-height: calc(100svh - var(--nav-height) - 1.5rem);
  padding: 0.65rem;
  overflow-y: auto;
  border: 1px solid rgba(231, 229, 228, 0.88);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(20, 47, 74, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px) scale(0.985);
  transform-origin: top center;
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 220ms;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.mobile-menu__nav {
  display: grid;
  gap: 0.2rem;
}

.mobile-nav-link {
  display: flex;
  min-height: 3.2rem;
  padding: 0.7rem 0.9rem;
  align-items: center;
  gap: 0.8rem;
  border-radius: 0.85rem;
  color: #292524;
  font-size: 1rem;
  font-weight: 700;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.mobile-nav-link span {
  color: #a8a29e;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible,
.mobile-nav-link.nav-link-active {
  background: #dbeafe;
  color: #007bff;
  transform: translateX(3px);
}

.mobile-nav-link:focus-visible,
.mobile-menu__github:focus-visible,
.mobile-menu__cta:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.mobile-menu__footer {
  display: flex;
  margin-top: 0.65rem;
  padding: 0.75rem 0.25rem 0.15rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid #e7e5e4;
}

.mobile-menu__github {
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.75rem;
  color: #57534e;
  font-size: 0.875rem;
  font-weight: 700;
}

.mobile-menu__cta {
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: #007bff;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.22);
}

@media (min-width: 1024px) {
  .site-header { --nav-height: 5rem; }
  .site-header.is-scrolled {
    --nav-height: 4rem;
    width: calc(100% - 2rem);
    transform: translateY(0.625rem);
    border-radius: 999px;
  }
  .site-header.is-scrolled .site-brand__logo { width: 2rem; height: 2rem; }
  .mobile-menu,
  .mobile-menu-scrim,
  .mobile-menu-toggle { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__inner,
  .site-brand__logo,
  .site-nav-link,
  .site-nav-link::after,
  .mobile-menu-toggle,
  .mobile-menu-toggle__line,
  .mobile-menu,
  .mobile-menu-scrim,
  .mobile-nav-link {
    transition-duration: 0.01ms !important;
  }
}

/* Ghim cả slot được section-loader tạo ra; sticky trên header con sẽ bị giới hạn
   bởi chiều cao của chính slot và biến mất ngay khi cuộn qua navbar. */
[data-section="01-navbar"] {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

::selection {
  background-color: #007BFF;
  color: #FFFFFF;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #007BFF, #F59E0B, #007BFF);
  background-size: 200% 100%;
  z-index: 100;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Ambient portrait float */
@keyframes ambientFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-9px);
  }
}
.animate-ambient-float {
  animation: ambientFloat 6s ease-in-out infinite;
}

/* Neo nhẹ chân dung xuống dải xanh ở đáy hero mà không làm cụm hero quá cao. */
.hero-portrait-stage {
  transform: translateY(1.5rem);
}

.hero-section {
  background-color: #fffcf8;
  background-image: radial-gradient(rgba(0, 123, 255, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-hello-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid #292524;
  background: rgba(255, 255, 255, 0.88);
  color: #292524;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: rotate(-1.5deg);
  box-shadow: 3px 3px 0 rgba(0, 123, 255, 0.18);
}

.hero-hello-badge span {
  width: 0.45rem;
  height: 0.45rem;
  background: #007bff;
  transform: rotate(45deg);
}

.hero-name-accent {
  position: relative;
  color: #007bff;
  white-space: nowrap;
}

.hero-name-accent::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -0.12em;
  left: 0;
  height: 0.12em;
  border-radius: 999px;
  background: #007bff;
  transform: rotate(-1deg);
  opacity: 0.8;
}

.hero-portrait-blob {
  position: absolute;
  inset: 15% 2% 5% 4%;
  z-index: 1;
  border-radius: 43% 57% 48% 52% / 54% 40% 60% 46%;
  background: linear-gradient(145deg, #1687ff 0%, #006be6 58%, #004fae 100%);
  box-shadow: 0 28px 70px rgba(0, 105, 230, 0.26);
  transform: rotate(-5deg);
}

.hero-portrait-ring {
  position: absolute;
  inset: 9% -3% 1% 8%;
  z-index: 0;
  border: 2px solid rgba(0, 123, 255, 0.32);
  border-radius: 48% 52% 44% 56% / 55% 46% 54% 45%;
  transform: rotate(8deg);
}

.hero-portrait-spark {
  position: absolute;
  top: 16%;
  left: -9%;
  z-index: 15;
  width: 2rem;
  color: #007bff;
  transform: rotate(-12deg);
  filter: drop-shadow(0 6px 10px rgba(0, 123, 255, 0.2));
}

.hero-floating-badge {
  position: absolute;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: #007bff;
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 91, 204, 0.26);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1;
  white-space: nowrap;
}

.hero-badge-role {
  top: 24%;
  left: -13%;
  transform: rotate(-7deg);
}

.hero-badge-status {
  right: -13%;
  bottom: 14%;
  transform: rotate(7deg);
}

.hero-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.2);
}

.hero-skill-strip {
  min-height: 3.25rem;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(90deg, #005dcc 0%, #087cff 46%, #0069e6 100%);
  box-shadow: 0 -10px 30px rgba(0, 123, 255, 0.2);
  color: #fff;
}

.hero-skill-strip__inner {
  display: flex;
  min-height: 3.25rem;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  white-space: nowrap;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(0.72rem, 1.15vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.055em;
}

.hero-skill-strip__inner i {
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 auto;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
}

/* Ở desktop, cho vùng nội dung chiếm trọn chiều cao khả dụng để cột ảnh có
   thể neo xuống đáy thay vì bị căn giữa theo chiều cao màn hình. */
@media (min-width: 1024px) {
  .hero-section {
    min-height: calc(100svh - 5rem);
  }

  .hero-portrait-stage {
    max-width: min(26.25rem, calc((100svh - 7rem) * 0.75));
  }

  .hero-inner {
    align-self: stretch;
    display: flex;
  }

  .hero-inner > .grid {
    flex: 1;
  }
}

@media (max-width: 767px) {
  .hero-name-accent {
    white-space: normal;
  }

  .hero-badge-role {
    left: -2%;
  }

  .hero-badge-status {
    right: -2%;
  }

  .hero-floating-badge {
    min-height: 2.15rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.62rem;
  }

  .hero-skill-strip__inner {
    width: max-content;
    min-width: 100%;
    justify-content: flex-start;
  }
}

/* Soft organic blob — gentle morphing + float */
@keyframes blobBreathe {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(6px, -8px) scale(1.03) rotate(1.2deg);
  }
  66% {
    transform: translate(-5px, 5px) scale(0.98) rotate(-1deg);
  }
}
.blob-breathe {
  transform-origin: center;
  animation: blobBreathe 14s ease-in-out infinite;
}

@keyframes orbDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  25%  { transform: translate3d(40px, -30px, 0) scale(1.08); }
  50%  { transform: translate3d(-20px, -50px, 0) scale(0.96); }
  75%  { transform: translate3d(-50px, 20px, 0) scale(1.04); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}
.orb-drift {
  animation: orbDrift 12s ease-in-out infinite !important;
  will-change: transform;
}
.orb-drift-slow {
  animation: orbDrift 18s ease-in-out infinite !important;
  will-change: transform;
}

/* Hero decorative typography behind the portrait.
   Acts as a visual "ground" so the image looks anchored, not cropped mid-body. */
.hero-type-bg {
  font-family: 'Hanken Grotesk', 'Montserrat', 'Poppins', 'Be Vietnam Pro', sans-serif;
  text-align: center;
  max-width: 100%;
  /* Soft fade at the edges so the text reads as background, not as a hard label */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  animation: heroTypeFadeIn 0.9s ease-out 0.15s both;
}
@keyframes heroTypeFadeIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to   { opacity: 0.10; transform: translate(-50%, 0); }
}
/* On mobile, hide the giant background typography so it never feels cramped. */
@media (max-width: 480px) {
  .hero-type-bg {
    display: none;
  }
}

/* Ground shadow ellipse — DISABLED: no longer used per design direction.
   Kept here commented so it can be re-enabled easily if needed. */
/* .hero-ground-shadow { ... } */

/* Ground band / ribbon under the figure. — DISABLED: removed per request. */
/* .hero-ground-band { ... } */

/* Floating card at the figure's feet. — DISABLED: removed per request. */
/* .hero-foot-card { ... } */

/* Ground shadow ellipse under the figure. */
.hero-ground-shadow {
  animation: heroShadowPulse 6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes heroShadowPulse {
  0%, 100% { transform: translate(-50%, 0) scaleX(1);   opacity: 0.85; }
  50%      { transform: translate(-50%, 0) scaleX(1.05); opacity: 1;    }
}

/* Floating "Open to Internship" status card. */
.hero-status-card {
  animation: heroCardRise 0.7s ease-out 0.35s both;
}
@keyframes heroCardRise {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-type-bg,
  .hero-ground-shadow,
  .hero-status-card { animation: none !important; }
}

/* Shimmer Effect for Buttons */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  /* Đồng nhất font cho mọi button trên site: dùng Be Vietnam Pro (sans),
     không bị ảnh hưởng bởi font-mono từ class cha nào đó. */
  font-family: "Be Vietnam Pro", "Hanken Grotesk", sans-serif;
}
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(25deg);
  transition: all 0.6s ease;
  opacity: 0;
}
.btn-shimmer:hover::after {
  left: 140%;
  opacity: 1;
}

/* Gradient Text Animation */
.animated-text-gradient {
  background: linear-gradient(135deg, #007BFF 0%, #3B82F6 50%, #007BFF 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   COMPACT PROJECT GALLERY — image-based, 3-up desktop / snap mobile
   ============================================================ */
.project-gallery {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.25rem, 5vw, 4.75rem);
  border-bottom: 1px solid #e7e5e4;
  background:
    radial-gradient(circle at 10% 5%, rgba(0, 123, 255, 0.075), transparent 24rem),
    #fffdf9;
}

.project-gallery__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.65fr);
  align-items: end;
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto 2rem;
  padding-bottom: 1.15rem;
  border-bottom: 2px solid #292524;
}

.project-gallery__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  color: #007bff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.project-gallery__eyebrow i {
  width: 0.5rem;
  height: 0.5rem;
  background: #007bff;
  transform: rotate(45deg);
}

.project-gallery__header h2 {
  color: #292524;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(2.6rem, 4.8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.project-gallery__header h2 span { color: #007bff; }

.project-gallery__header p {
  max-width: 34rem;
  color: #57534e;
  font-size: 0.95rem;
  line-height: 1.65;
}

.project-gallery__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  max-width: 80rem;
  margin-inline: auto;
}

.project-tile {
  display: flex;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #dedbd7;
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 20px 45px rgba(41, 37, 36, 0.075);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 123, 255, 0.45);
  box-shadow: 0 26px 55px rgba(0, 80, 175, 0.14);
}

.project-tile--blue {
  border-color: #acd2ff;
  background: #eaf4ff;
}

.project-tile--dark {
  border-color: #203d58;
  background: #0d2237;
  color: #fff;
}

.project-tile__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0;
  background: #dbeafe;
}

.project-tile__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 24, 45, 0.34), transparent 55%);
  pointer-events: none;
}

.project-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-tile:hover .project-tile__media img { transform: scale(1.035); }

.project-tile__number {
  position: absolute;
  right: 0.7rem;
  bottom: -0.12em;
  z-index: 2;
  color: rgba(255,255,255,0.92);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(4.5rem, 7vw, 6.75rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.8;
  text-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.project-tile__badges {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 3;
  display: flex;
  gap: 0.35rem;
}

.project-tile__badges span {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.52);
  border-radius: 999px;
  background: rgba(0, 93, 204, 0.88);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.project-tile__body {
  display: flex;
  flex: 0 0 auto;
  padding: 1rem;
  flex-direction: column;
}

.project-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  color: #007bff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.045em;
}

.project-tile__meta span:last-child {
  overflow: hidden;
  color: #78716c;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tile--dark .project-tile__meta { color: #70afff; }
.project-tile--dark .project-tile__meta span:last-child { color: #91a9be; }

.project-tile h3 {
  margin-bottom: 0.65rem;
  color: #292524;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.project-tile--dark h3 { color: #fff; }

.project-tile__body > p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0;
  color: #57534e;
  font-size: 0.84rem;
  line-height: 1.6;
  text-align: justify;
  text-justify: inter-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-tile--dark .project-tile__body > p { color: #b8c9d9; }

.project-tile__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dedbd7;
  color: #78716c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
}

.project-tile--dark .project-tile__footer {
  border-color: #31506b;
  color: #9bb1c4;
}

.project-tile__actions { display: flex; align-items: center; gap: 0.4rem; }

.project-tile__actions a,
.project-tile__soon,
.project-tile__current {
  display: inline-flex;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #007bff;
  color: #fff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.project-tile__actions svg {
  width: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.project-tile__actions .project-tile__icon-link {
  width: 2.75rem;
  padding: 0;
  border: 1px solid #dedbd7;
  background: transparent;
  color: #292524;
}

.project-tile__soon {
  cursor: not-allowed;
  border: 1px solid #d2cec9;
  background: rgba(255,255,255,0.62);
  color: #78716c;
}

.project-tile__current {
  border: 1px solid rgba(0, 123, 255, 0.35);
  background: rgba(0, 123, 255, 0.1);
  color: #0056cc;
}

.project-tile--dark .project-tile__soon {
  border-color: #3d5b74;
  background: transparent;
  color: #a9bfd1;
}

.project-gallery__hint {
  display: none;
  margin-top: 0.85rem;
  color: #78716c;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  text-align: center;
}

.project-gallery__sticky,
.project-gallery__inner {
  position: relative;
}

.project-gallery__viewport {
  min-width: 0;
}

.project-gallery__progress {
  display: none;
}

/* Desktop scroll story: natural vertical scroll drives a pinned horizontal rail. */
@media (min-width: 900px) {
  .project-gallery.is-scroll-ready {
    padding-block: 0;
    /* Sticky cannot pin inside an overflow-hidden ancestor. The sticky viewport
       below owns horizontal clipping instead. */
    overflow: visible;
  }

  .project-gallery.is-scroll-ready .project-gallery__sticky {
    position: sticky;
    /* Navbar luôn ghim trên viewport, nên gallery bắt đầu ngay dưới navbar. */
    top: 5rem;
    height: calc(100svh - 5rem);
    overflow: hidden;
    background:
      radial-gradient(circle at 8% 10%, rgba(0, 123, 255, 0.09), transparent 22rem),
      #fffdf9;
  }

  .project-gallery.is-scroll-ready .project-gallery__inner {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    row-gap: clamp(0.7rem, 1.6vh, 1rem);
    height: 100%;
    padding-block: clamp(1rem, 2vh, 1.35rem);
  }

  .project-gallery.is-scroll-ready .project-gallery__header {
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0.65rem;
  }

  .project-gallery.is-scroll-ready .project-gallery__header h2 {
    font-size: clamp(2.7rem, 4.2vw, 4rem);
  }

  .project-gallery.is-scroll-ready .project-gallery__header p {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .project-gallery.is-scroll-ready .project-gallery__viewport {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .project-gallery.is-scroll-ready .project-gallery__track {
    display: flex;
    width: max-content;
    max-width: none;
    height: 100%;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin: 0;
    align-items: stretch;
    will-change: transform;
  }

  .project-gallery.is-scroll-ready .project-tile,
  .project-gallery.is-scroll-ready .project-tile:last-child {
    display: flex;
    width: min(28vw, 23rem);
    min-width: min(28vw, 23rem);
    /* Ép tất cả card cao = chiều cao viewport (chạm đáy .project-gallery__viewport)
       và bằng nhau. Viewport có `height: 100%` (của 1fr inner), track có
       `height: 100%`, nên `height: 100%` ở tile sẽ kéo card khớp viewport. */
    height: 100%;
    min-height: 32rem;
    align-self: stretch;
    flex: 0 0 min(28vw, 23rem);
    flex-direction: column;
    overflow: hidden;
  }

  .project-gallery.is-scroll-ready .project-tile__media {
    height: 39%;
    flex: 0 0 39%;
    aspect-ratio: auto;
  }

  .project-gallery.is-scroll-ready .project-tile__body {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    padding: clamp(1.1rem, 1.8vw, 1.6rem);
    overflow: hidden;
  }

  .project-gallery.is-scroll-ready .project-tile h3 {
    max-width: none;
    font-size: clamp(1.5rem, 2vw, 1.9rem);
  }

  .project-gallery.is-scroll-ready .project-tile__body > p {
    flex-shrink: 0;
    font-size: 0.88rem;
    -webkit-line-clamp: 4;
  }

  .project-gallery.is-scroll-ready .project-gallery__progress {
    display: grid;
    grid-template-columns: auto minmax(8rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 1rem;
    margin-top: 0;
    color: #78716c;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
  }

  .project-gallery.is-scroll-ready .project-gallery__progress > div {
    overflow: hidden;
    height: 2px;
    background: #d6d3d1;
  }

  .project-gallery.is-scroll-ready .project-gallery__progress i {
    display: block;
    width: 100%;
    height: 100%;
    background: #007bff;
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
  }

  .project-gallery.is-scroll-ready .project-gallery__progress strong {
    color: #292524;
    font-size: 0.72rem;
  }

  .project-gallery.is-scroll-ready .project-gallery__progress b {
    color: #007bff;
  }
}

@media (max-width: 899px) {
  .project-gallery__header { grid-template-columns: 1fr; gap: 0.75rem; }
  .project-gallery__header p { max-width: 40rem; }
  .project-gallery__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-tile:last-child { grid-column: 1 / -1; width: calc(50% - 0.575rem); justify-self: center; }
}

@media (max-width: 639px) {
  .project-gallery { padding-block: 2.75rem; }
  .project-gallery__header { margin-bottom: 1.25rem; }
  .project-gallery__header h2 { font-size: clamp(2.4rem, 12vw, 3.3rem); }
  .project-gallery__header p { font-size: 0.88rem; }
  .project-gallery__track {
    display: flex;
    width: calc(100% + 1rem);
    margin-right: -1rem;
    padding: 0 1rem 0.75rem 0;
    gap: 0.85rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .project-gallery__track::-webkit-scrollbar { display: none; }
  .project-tile,
  .project-tile:last-child {
    width: auto;
    min-width: min(84vw, 22rem);
    min-height: 0;
    flex: 0 0 min(84vw, 22rem);
    scroll-snap-align: start;
  }
  .project-tile__body { padding: 1rem; }
  .project-tile h3 { font-size: 1.55rem; }
  .project-gallery__hint { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .project-tile,
  .project-tile__media img { transition: none !important; transform: none !important; }
}

/* Project autoplay marquee: starts only while the section is in the viewport. */
.project-gallery.is-project-marquee-ready .project-gallery__viewport {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.project-gallery.is-project-marquee-ready .project-gallery__track {
  display: flex;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: clamp(0.85rem, 2vw, 1.5rem);
  overflow: visible;
  align-items: flex-start;
  scroll-snap-type: none;
  animation: project-marquee-scroll var(--project-marquee-duration, 42s) linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.project-gallery.is-project-marquee-playing .project-gallery__track {
  animation-play-state: running;
}

.project-gallery.is-project-marquee-ready .project-gallery__viewport:hover .project-gallery__track,
.project-gallery.is-project-marquee-ready .project-gallery__viewport:focus-within .project-gallery__track {
  animation-play-state: paused;
}

.project-gallery.is-project-marquee-ready .project-tile,
.project-gallery.is-project-marquee-ready .project-tile:last-child {
  width: clamp(18rem, 27vw, 23rem);
  min-width: clamp(18rem, 27vw, 23rem);
  min-height: 0;
  height: auto;
  flex: 0 0 clamp(18rem, 27vw, 23rem);
  grid-column: auto;
  justify-self: auto;
  scroll-snap-align: none;
}

@keyframes project-marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--project-marquee-translate, 0px), 0, 0); }
}

@media (max-width: 639px) {
  .project-gallery.is-project-marquee-ready .project-tile,
  .project-gallery.is-project-marquee-ready .project-tile:last-child {
    width: min(84vw, 22rem);
    min-width: min(84vw, 22rem);
    flex-basis: min(84vw, 22rem);
  }
}

/* ============================================================
   LEGACY PROJECT CASE-STUDY CHAPTERS
   ============================================================ */
.projects-section {
  overflow: hidden;
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
  border-bottom: 1px solid #e7e5e4;
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 123, 255, 0.08), transparent 24rem),
    #fffdf9;
}

.projects-intro {
  max-width: 72rem;
  margin: 0 auto clamp(2rem, 3.5vw, 3rem);
}

.projects-kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  color: #007bff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.projects-kicker span {
  width: 0.55rem;
  height: 0.55rem;
  background: #007bff;
  transform: rotate(45deg);
}

.projects-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(17rem, 0.75fr);
  align-items: end;
  gap: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #292524;
}

.projects-intro h2 {
  max-width: 14ch;
  color: #292524;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(2.6rem, 4.8vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.projects-intro h2 span {
  color: #007bff;
}

.projects-intro p {
  max-width: 37rem;
  color: #57534e;
  font-size: 1rem;
  line-height: 1.75;
}

.project-chapters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
  max-width: 80rem;
  margin-inline: auto;
}

.project-chapters > .case-chapter:first-child {
  grid-column: 1 / -1;
}

.case-chapter {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  padding: clamp(1.75rem, 3.5vw, 3.25rem);
  border: 1px solid #dedbd7;
  border-radius: 2rem;
  background: #fff;
  box-shadow: 0 30px 70px rgba(41, 37, 36, 0.08);
}

.case-chapter--blue {
  border-color: #acd2ff;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,0.95), transparent 22rem),
    linear-gradient(145deg, #e9f4ff, #cfe6ff);
}

.case-chapter--dark {
  border-color: #233d58;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 123, 255, 0.22), transparent 28rem),
    #0d2237;
  box-shadow: 0 34px 80px rgba(13, 34, 55, 0.24);
  color: #fff;
}

.case-number {
  position: absolute;
  top: -0.16em;
  right: 0.02em;
  z-index: -1;
  color: rgba(0, 123, 255, 0.075);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(9rem, 22vw, 19rem);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.8;
  user-select: none;
}

.case-chapter--dark .case-number {
  color: rgba(255, 255, 255, 0.05);
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(20rem, 0.88fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  min-height: 25rem;
}

.case-layout--reverse .case-visual-wrap {
  grid-column: 2;
}

.case-layout--reverse .case-content {
  grid-column: 1;
  grid-row: 1;
}

.case-visual-wrap {
  position: relative;
  min-width: 0;
  padding-block: 1.75rem;
}

.case-visual-accent {
  position: absolute;
  inset: 8% -3% 2% 6%;
  border-radius: 38% 62% 45% 55% / 60% 42% 58% 40%;
  background: linear-gradient(145deg, #1889ff, #0068dd);
  transform: rotate(-4deg);
  opacity: 0.97;
}

.case-browser {
  position: relative;
  z-index: 3;
  overflow: hidden;
  border: 1px solid rgba(41, 37, 36, 0.18);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 28px 55px rgba(0, 66, 145, 0.2);
  transform: rotate(-1.2deg);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.case-chapter--blue .case-browser {
  transform: rotate(1.2deg);
}

.case-chapter--dark .case-browser {
  transform: rotate(-0.8deg);
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.34);
}

.case-chapter:hover .case-browser {
  transform: translateY(-6px) rotate(0);
  box-shadow: 0 34px 70px rgba(0, 76, 165, 0.25);
}

.case-browser__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.65rem;
  padding-inline: 0.85rem;
  border-bottom: 1px solid #e7e5e4;
  background: #fbfaf8;
  color: #78716c;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.5rem, 0.78vw, 0.66rem);
}

.case-browser__dots {
  display: flex;
  gap: 0.3rem;
}

.case-browser__dots i {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: #ff7d76;
}

.case-browser__dots i:nth-child(2) { background: #f7c948; }
.case-browser__dots i:nth-child(3) { background: #58c987; }

.case-browser__status {
  color: #007bff;
  font-weight: 700;
}

.case-browser--dark .case-browser__bar {
  border-color: #243f59;
  background: #102940;
  color: #a9bdd0;
}

.case-float-badge {
  position: absolute;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 999px;
  background: #007bff;
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 89, 198, 0.25);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.case-float-badge--top {
  top: 0.4rem;
  left: 5%;
  transform: rotate(-6deg);
}

.case-float-badge--side {
  right: -1.5rem;
  bottom: 1rem;
  transform: rotate(6deg);
}

.case-chapter--dark .case-float-badge {
  border-color: #3d97ff;
  background: #fff;
  color: #0056cc;
}

.mock-app {
  position: relative;
  height: clamp(15rem, 22vw, 19rem);
  font-family: "Be Vietnam Pro", sans-serif;
}

.mock-app small,
.mock-app em {
  font-style: normal;
}

/* Student management mockup */
.mock-app--student {
  display: flex;
  background: #f5f8fc;
  color: #17324d;
}

.mock-sidebar {
  display: flex;
  width: 13%;
  min-width: 3.4rem;
  padding: 1rem 0.7rem;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  background: #0e4f91;
  color: #fff;
}

.mock-sidebar b { font-size: clamp(0.58rem, 1vw, 0.85rem); }
.mock-sidebar i { width: 54%; height: 0.45rem; border-radius: 1rem; background: rgba(255,255,255,0.3); }
.mock-sidebar i:nth-of-type(1) { width: 70%; background: #fff; }

.mock-main {
  min-width: 0;
  flex: 1;
  padding: clamp(0.7rem, 2.2vw, 1.4rem);
}

.mock-topline,
.mock-logistics-head,
.commerce-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-topline div,
.mock-logistics-head div:first-child,
.commerce-top div {
  display: flex;
  flex-direction: column;
}

.mock-topline small,
.mock-logistics-head small,
.commerce-top small {
  color: #72879a;
  font-size: clamp(0.4rem, 0.7vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.mock-topline strong,
.mock-logistics-head strong,
.commerce-top strong {
  font-size: clamp(0.72rem, 1.35vw, 1.1rem);
}

.mock-topline > i {
  width: 2rem;
  height: 2rem;
  border: 5px solid #dbeafe;
  border-radius: 50%;
  background: #007bff;
}

.mock-stat-grid,
.commerce-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.35rem, 1vw, 0.8rem);
  margin-block: clamp(0.65rem, 1.6vw, 1.1rem);
}

.mock-stat-grid > div,
.commerce-stats > div {
  display: grid;
  min-width: 0;
  padding: clamp(0.45rem, 1.4vw, 0.85rem);
  border: 1px solid #e0e9f2;
  border-radius: 0.65rem;
  background: #fff;
}

.mock-stat-grid small,
.commerce-stats small { color: #7890a5; font-size: clamp(0.36rem, 0.62vw, 0.52rem); }
.mock-stat-grid strong,
.commerce-stats strong { font-size: clamp(0.75rem, 1.5vw, 1.25rem); }
.mock-stat-grid em,
.commerce-stats em { color: #12a56a; font-size: clamp(0.35rem, 0.6vw, 0.5rem); font-weight: 700; }

.mock-data-panel {
  overflow: hidden;
  border: 1px solid #e0e9f2;
  border-radius: 0.65rem;
  background: #fff;
}

.mock-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem;
  border-bottom: 1px solid #edf2f7;
  font-size: clamp(0.46rem, 0.85vw, 0.68rem);
}

.mock-panel-head span { padding: 0.25rem 0.55rem; border-radius: 0.3rem; background: #eef5fb; color: #7b8fa2; }

.mock-table-row {
  display: grid;
  grid-template-columns: 0.55fr 1.3fr 0.85fr 0.8fr;
  gap: 0.35rem;
  padding: clamp(0.45rem, 1vw, 0.65rem) 0.7rem;
  border-bottom: 1px solid #f0f3f6;
  font-size: clamp(0.36rem, 0.7vw, 0.56rem);
}

.mock-table-row i { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.mock-table-row i:last-child { color: #12a56a; font-weight: 700; }
.mock-table-row--head { background: #f8fafc; color: #7890a5; font-weight: 700; }

/* Logistics mockup */
.mock-app--logistics { padding: clamp(0.7rem, 2vw, 1.25rem); background: #f5f9fd; color: #18324c; }
.mock-live-dot { display: flex; align-items: center; gap: 0.35rem; color: #577089; font-size: clamp(0.4rem, 0.7vw, 0.56rem); }
.mock-live-dot i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,0.14); }
.mock-logistics-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(7rem, 0.7fr); gap: 0.75rem; height: calc(100% - 3.2rem); margin-top: 0.9rem; }
.mock-map { position: relative; overflow: hidden; border: 1px solid #d9e7f3; border-radius: 0.7rem; background: linear-gradient(35deg, #e9f1f7, #f7fbff); }
.mock-map::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(116,151,181,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(116,151,181,.12) 1px, transparent 1px); background-size: 24px 24px; transform: rotate(8deg) scale(1.2); }
.mock-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mock-map .map-road { fill: none; stroke: #c6d6e4; stroke-width: 18; }
.mock-map .map-route { fill: none; stroke: #007bff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 10 8; }
.mock-map circle { fill: #fff; stroke: #007bff; stroke-width: 5; }
.mock-map-card { position: absolute; top: 34%; left: 38%; display: grid; padding: 0.5rem 0.65rem; border: 1px solid #d6e6f3; border-radius: 0.5rem; background: rgba(255,255,255,.92); box-shadow: 0 8px 18px rgba(33,75,112,.12); font-size: clamp(.35rem,.65vw,.52rem); }
.mock-map-card small { color: #007bff; font-weight: 800; }
.mock-map-card em { color: #6e8295; }
.mock-fleet-panel { overflow: hidden; padding: 0.75rem; border: 1px solid #d9e7f3; border-radius: 0.7rem; background: #fff; }
.mock-fleet-panel > small { color: #7790a6; font-size: clamp(.36rem,.62vw,.5rem); font-weight: 800; letter-spacing: .1em; }
.mock-fleet-panel > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .45rem; padding-block: clamp(.5rem,1.1vw,.8rem); border-bottom: 1px solid #edf2f6; }
.mock-fleet-panel i { width: .45rem; height: .45rem; border-radius: 50%; background: #10b981; }
.mock-fleet-panel span { display: grid; min-width: 0; }
.mock-fleet-panel b,
.mock-fleet-panel strong { font-size: clamp(.36rem,.68vw,.55rem); }
.mock-fleet-panel em { overflow: hidden; color: #8294a4; font-size: clamp(.3rem,.55vw,.45rem); text-overflow: ellipsis; white-space: nowrap; }
.mock-fleet-panel strong { color: #007bff; }

/* Commerce mockup */
.mock-app--commerce { padding: clamp(.75rem,2vw,1.3rem); background: #0d2237; color: #f4f8fc; }
.commerce-top span { padding: .35rem .55rem; border: 1px solid #2a4863; border-radius: .4rem; color: #a6bad0; font-size: clamp(.38rem,.65vw,.52rem); }
.commerce-stats > div { border-color: #25425c; background: #132d45; }
.commerce-stats small { color: #8ba5bc; }
.commerce-stats em { color: #61e2a7; }
.commerce-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: .75rem; height: calc(100% - 9rem); }
.commerce-chart,
.commerce-orders { overflow: hidden; padding: .75rem; border: 1px solid #25425c; border-radius: .65rem; background: #102940; }
.commerce-chart > div { display: flex; justify-content: space-between; font-size: clamp(.4rem,.75vw,.6rem); }
.commerce-chart span { color: #8fa8be; }
.commerce-chart svg { width: 100%; height: calc(100% - 1.4rem); margin-top: .6rem; overflow: visible; }
.chart-fill { fill: rgba(0,123,255,.17); }
.chart-line { fill: none; stroke: #1687ff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.commerce-orders > small { color: #8fa8be; font-size: clamp(.35rem,.62vw,.5rem); letter-spacing: .09em; }
.commerce-orders > div { display: grid; grid-template-columns: 1fr; gap: .3rem; margin-top: clamp(.55rem,1vw,.8rem); font-size: clamp(.34rem,.62vw,.5rem); }
.commerce-orders > div > span { color: #c7d4df; }
.commerce-orders > div > i { overflow: hidden; height: .32rem; border-radius: 1rem; background: #24435e; }
.commerce-orders > div > i em { display: block; height: 100%; border-radius: inherit; background: #1687ff; }
.commerce-orders > div > b { color: #70afff; text-align: right; }

/* Project content */
.case-content {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.case-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  color: #007bff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.case-label span { color: #292524; font-size: 1rem; }
.case-chapter--dark .case-label { color: #70afff; }
.case-chapter--dark .case-label span { color: #fff; }

.case-content h3 {
  max-width: 12ch;
  margin-bottom: 0.85rem;
  color: #292524;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.case-chapter--dark .case-content h3 { color: #fff; }

.case-problem {
  max-width: 42rem;
  margin-bottom: 1.15rem;
  color: #57534e;
  font-size: 0.98rem;
  line-height: 1.65;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.case-chapter--dark .case-problem { color: #b8c9d9; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 0.9rem;
  border-block: 1px solid #d6d3d1;
}

.case-meta > div { min-width: 0; padding: 0.7rem 0.6rem; border-right: 1px solid #d6d3d1; }
.case-meta > div:first-child { padding-left: 0; }
.case-meta > div:last-child { border-right: 0; }
.case-meta dt { margin-bottom: .25rem; color: #78716c; font-family: "JetBrains Mono", monospace; font-size: .58rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.case-meta dd { color: #292524; font-size: clamp(.68rem,.9vw,.78rem); font-weight: 700; line-height: 1.45; }
.case-chapter--dark .case-meta { border-color: #31506b; }
.case-chapter--dark .case-meta > div { border-color: #31506b; }
.case-chapter--dark .case-meta dt { color: #87a3bb; }
.case-chapter--dark .case-meta dd { color: #edf5fc; }

.case-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.15rem; }
.case-tags span { padding: .38rem .65rem; border: 1px solid #d6d3d1; border-radius: 999px; background: rgba(255,255,255,.72); color: #57534e; font-family: "JetBrains Mono", monospace; font-size: .62rem; font-weight: 700; }
.case-chapter--dark .case-tags span { border-color: #31506b; background: #142f48; color: #bdd0e0; }

.case-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.case-button { display: inline-flex; min-height: 2.85rem; padding: .7rem 1.1rem; align-items: center; justify-content: center; gap: .55rem; border: 1px solid transparent; border-radius: 999px; font-size: .82rem; font-weight: 700; transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease; }
.case-button svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.case-button--primary { background: #007bff; color: #fff; box-shadow: 0 10px 20px rgba(0,123,255,.2); }
.case-button--secondary { border-color: #cfcac5; background: rgba(255,255,255,.72); color: #292524; }
a.case-button:hover { transform: translateY(-2px); }
a.case-button--primary:hover { background: #0056cc; box-shadow: 0 14px 25px rgba(0,91,204,.25); }
.case-chapter--dark .case-button--secondary { border-color: #456681; background: transparent; color: #fff; }
.case-button.is-disabled { cursor: not-allowed; opacity: .58; }

/* Project 02–03 form a compact bento row on desktop. */
.project-chapters > .case-chapter:not(:first-child) {
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
}

.project-chapters > .case-chapter:not(:first-child) .case-layout,
.project-chapters > .case-chapter:not(:first-child) .case-layout--reverse {
  grid-template-columns: 1fr;
  gap: 1.15rem;
  min-height: 0;
}

.project-chapters > .case-chapter:not(:first-child) .case-layout--reverse .case-visual-wrap,
.project-chapters > .case-chapter:not(:first-child) .case-layout--reverse .case-content {
  grid-column: auto;
  grid-row: auto;
}

.project-chapters > .case-chapter:not(:first-child) .case-visual-wrap {
  width: 100%;
  padding-block: 1.35rem 0.85rem;
}

.project-chapters > .case-chapter:not(:first-child) .mock-app {
  height: clamp(12.5rem, 18vw, 15rem);
}

.project-chapters > .case-chapter:not(:first-child) .case-number {
  font-size: clamp(8rem, 16vw, 13rem);
}

.project-chapters > .case-chapter:not(:first-child) .case-content h3 {
  max-width: 15ch;
  font-size: clamp(1.9rem, 2.7vw, 2.65rem);
}

.project-chapters > .case-chapter:not(:first-child) .case-problem {
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-chapters > .case-chapter:not(:first-child) .case-meta dd {
  font-size: 0.66rem;
}

.project-chapters > .case-chapter:not(:first-child) .case-button {
  min-height: 2.65rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.75rem;
}

@media (max-width: 1023px) {
  .project-chapters { grid-template-columns: 1fr; }
  .project-chapters > .case-chapter:first-child { grid-column: auto; }
  .projects-intro__grid { grid-template-columns: 1fr; }
  .projects-intro p { max-width: 42rem; }
  .case-layout { grid-template-columns: 1fr; }
  .case-layout--reverse .case-visual-wrap,
  .case-layout--reverse .case-content { grid-column: auto; grid-row: auto; }
  .case-content h3 { max-width: 16ch; }
  .case-visual-wrap { width: min(100%, 46rem); margin-inline: auto; }
}

@media (max-width: 639px) {
  .projects-section { padding-block: 3rem; }
  .projects-intro__grid { padding-bottom: 1.25rem; }
  .projects-intro h2 { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .case-chapter { min-height: 0; padding: 1.2rem; border-radius: 1.25rem; }
  .case-layout { gap: 1.5rem; }
  .case-visual-wrap { padding-block: 1.75rem 1rem; }
  .case-browser__bar > span:not(.case-browser__status) { display: none; }
  .case-browser__bar { grid-template-columns: 1fr auto; }
  .case-browser__status { font-size: .52rem; }
  .case-float-badge { min-height: 2rem; padding: .42rem .65rem; font-size: .56rem; }
  .case-float-badge--side { right: -.35rem; bottom: .45rem; }
  .mock-app,
  .project-chapters > .case-chapter:not(:first-child) .mock-app { height: 13.75rem; }
  .mock-main { padding: .65rem; }
  .mock-stat-grid { gap: .3rem; }
  .mock-logistics-grid { grid-template-columns: 1fr; }
  .mock-fleet-panel { display: none; }
  .commerce-grid { grid-template-columns: 1fr; height: calc(100% - 8.4rem); }
  .commerce-orders { display: none; }
  .case-content h3,
  .project-chapters > .case-chapter:not(:first-child) .case-content h3 { font-size: clamp(1.85rem, 9vw, 2.55rem); }
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-meta > div,
  .case-meta > div:first-child { padding: .65rem .4rem; border-right: 1px solid #d6d3d1; border-bottom: 1px solid #d6d3d1; }
  .case-meta > div:nth-child(2) { border-right: 0; }
  .case-meta > div:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-right: 0; border-bottom: 0; }
  .case-chapter--dark .case-meta > div { border-color: #31506b; }
  .case-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-button { width: 100%; padding-inline: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .case-browser,
  .case-chapter:hover .case-browser,
  .case-button { transition: none !important; transform: none !important; }
}

/* Legacy project card lift (kept for other components that may reuse it) */
.project-card-interactive {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.project-card-interactive:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(0, 123, 255, 0.12), 0 8px 12px -6px rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 123, 255, 0.45);
}

/* Glow pulse on availability badge */
@keyframes softGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
  }
}
.badge-glow-pulse {
  animation: softGlow 2.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Timeline pulse checkpoints */
@keyframes nodePing {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}
.timeline-node-active {
  animation: nodePing 2s infinite ease-out;
}

/* Reveal on scroll system — DISABLED per request
   (animation khi scroll da tat. Giu comment de de revert.)
   Element .reveal-on-scroll luon o trang thai hien thi, khong fade/slide. */
.reveal-on-scroll,
.reveal-on-scroll.is-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Tat cac hieu ung animate.css (fadeInDown, zoomIn, fadeInUp, ...) khi
   scroll den — DISABLED per request. Class animate__animated van duoc
   them (de khong pha HTML contract) nhung animation bi chan. */
.animate__animated,
.animate__animated.animate__fadeInDown,
.animate__animated.animate__fadeInUp,
.animate__animated.animate__fadeInLeft,
.animate__animated.animate__fadeInRight,
.animate__animated.animate__zoomIn {
  animation: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* Aspect ratio 16:9 (1920x1080) cho ảnh preview trong các project card */
.project-card-interactive > .overflow-hidden {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f5f5f4;
}

/* Ảnh bên trong luôn phủ kín khung, neo lên trên để giữ phần đầu ảnh */
.project-card-interactive > .overflow-hidden > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Căn đều hai bên cho đoạn mô tả dự án */
article p.text-base {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Hero minimalist frame — SVG line draw on scroll */
.hero-frame-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1200ms cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-frame-line.is-drawn {
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero-frame-line {
    transition: none;
    stroke-dashoffset: 0;
  }
}

/* Accessibility reduced motion */
@media (prefers-reduced-motion: reduce) {
  /* Reveal-on-scroll da duoc disable o tren — khoi can reset them o day */
  .animate-ambient-float,
  .badge-glow-pulse,
  .timeline-node-active,
  .animated-text-gradient {
    animation: none !important;
  }
  .project-card-interactive:hover {
    transform: none !important;
  }
}

/* ============================================
   TECH STACK — editorial header + marquee
   ============================================ */
.tech-section {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(circle at 8% 15%, rgba(0, 123, 255, 0.1), transparent 22rem),
    radial-gradient(circle at 92% 85%, rgba(0, 123, 255, 0.06), transparent 19rem),
    #fffbf5;
}

.tech-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  margin-bottom: 2.2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #292524;
}

.tech-section-header > * { margin-inline: auto; max-width: 52rem; width: 100%; }

.tech-section-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  color: #007bff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.tech-section-kicker i {
  width: 0.5rem;
  height: 0.5rem;
  background: #007bff;
  transform: rotate(45deg);
}

.tech-section-heading h2 {
  margin: 0 auto 0.75rem;
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 0.95;
  text-align: center;
  text-wrap: balance;
}

.tech-section-heading h2 span { color: #007bff; }

.tech-section-heading p {
  max-width: 42rem;
  margin: 0 auto;
  color: #57534e;
  font-size: 0.92rem;
  line-height: 1.7;
  text-align: center;
}

.tech-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #244662;
  border-radius: 1.2rem;
  background: #0d2237;
  box-shadow: 0 20px 38px rgba(13, 34, 55, 0.16);
}

.tech-snapshot > div {
  display: flex;
  min-width: 0;
  min-height: 7rem;
  padding: 1rem;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #2d4d68;
}

.tech-snapshot > div:last-child { border-right: 0; }
.tech-snapshot span { color: #5da7ff; font-family: "JetBrains Mono", monospace; font-size: 0.65rem; font-weight: 800; }
.tech-snapshot strong { color: #fff; font-family: "Hanken Grotesk", sans-serif; font-size: 1rem; }
.tech-snapshot small { overflow: hidden; color: #9fb4c7; font-family: "JetBrains Mono", monospace; font-size: 0.56rem; text-overflow: ellipsis; white-space: nowrap; }

.tech-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.65rem;
  font-family: "JetBrains Mono", monospace;
}

.tech-row-heading > div { display: flex; align-items: center; gap: 0.65rem; }
.tech-row-heading span { color: #007bff; font-size: 0.7rem; font-weight: 800; }
.tech-row-heading strong { color: #292524; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.tech-row-heading small { color: #78716c; font-size: 0.55rem; letter-spacing: 0.07em; }

.tech-marquee {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-block: 1px solid rgba(0, 123, 255, 0.14);
  background: rgba(255, 255, 255, 0.55);
}

.tech-marquee .marquee-track {
  padding-block: 0.9rem;
}

.tech-icon-card {
  display: flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 2px rgba(41, 37, 36, 0.04);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.tech-icon-logo {
  display: block;
  width: 2.125rem;
  height: 2.125rem;
  object-fit: contain;
  transition: transform 220ms ease;
}

.tech-icon-label {
  margin-top: 0.625rem;
  color: #292524;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  text-align: center;
  transition: color 220ms ease;
}

@media (hover: hover) {
  .tech-stack-item:hover .tech-icon-card {
    border-color: var(--tech-color, #007bff);
    background: var(--tech-tint, #f5f9ff);
    box-shadow: 0 10px 24px rgba(41, 37, 36, 0.12);
    transform: translateY(-3px);
  }

  .tech-stack-item:hover .tech-icon-logo {
    transform: scale(1.06);
  }

  .tech-stack-item:hover .tech-icon-label {
    color: var(--tech-color, #007bff);
  }
}

@media (max-width: 899px) {
  .tech-section-header { grid-template-columns: 1fr; gap: 1.5rem; }
  .tech-snapshot { max-width: 38rem; }
}

@media (max-width: 639px) {
  .tech-section { padding-block: 3rem; }
  .tech-section-header { margin-bottom: 1.7rem; padding-bottom: 1.2rem; }
  .tech-section-heading h2 { font-size: clamp(2.5rem, 12vw, 3.4rem); }
  .tech-snapshot { grid-template-columns: 1fr; }
  .tech-snapshot > div { min-height: 0; padding: 0.8rem 1rem; display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: 0.5rem; border-right: 0; border-bottom: 1px solid #2d4d68; }
  .tech-snapshot > div:last-child { border-bottom: 0; }
  .tech-row-heading small { display: none; }
  .tech-marquee .marquee-track { padding-block: 0.75rem; }
}

/* ============================================
   TECH STACK — Marquee motion (chạy ngang, loop liền mạch)
   ============================================ */
.marquee-mask {
  /* Tạo gradient mờ ở 2 mép để icon xuất hiện/ biến mất mượt */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  /* Ngăn các item bị flex co lại giữa 2 bản duplicate → gây khoảng trắng khi loop */
  flex-shrink: 0;
  will-change: transform;
}

/* Chỉ chạy sau khi JS đã đo chính xác một chu kỳ và thêm đủ bản sao. */
.marquee-track[data-marquee-ready="true"] {
  /* animation-duration đặt qua inline style để mỗi hàng có thể chạy tốc độ khác nhau */
  animation: marquee-scroll linear infinite;
}

/* Mỗi item trong marquee cũng phải không bị co — đảm bảo 2 bản duplicate ghép liền mạch */
.marquee-track > * {
  flex-shrink: 0;
}

.marquee-track.marquee-track-reverse[data-marquee-ready="true"] {
  animation-name: marquee-scroll-reverse;
}

/* Pause animation on hover — UX tốt hơn khi user muốn xem rõ icon */
.marquee-track:hover,
.marquee-track:focus-within {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(var(--marquee-translate, 0px), 0, 0); }
}

@keyframes marquee-scroll-reverse {
  from { transform: translate3d(var(--marquee-translate, 0px), 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* ============================================================
   CUSTOM ANIMATION LAYER (animate.css + tailwind)
   - Headline "split text" reveal (tu dam mau chu thanh gradient)
   - Gradient border animation cho card
   - Shimmer line running duoi border
   - Magnetic hover cho button
   - Floating badge bobbing nhe
   - Typewriter caret blink (cho section header mono text)
   ============================================================ */

/* Hero headline — fade + slide up voi delay tung cum tu — DISABLED per request
   (animation khi scroll da tat. Giu comment de de revert.) */
.animate-hero-line {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
.animate-hero-line.is-fired {
  animation: none !important;
}

/* Gradient border gradient chay vong quanh card */
@keyframes gradientBorderSpin {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.gradient-border {
  position: relative;
  background-clip: padding-box;
  border: 2px solid transparent !important;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg,
    #007BFF 0%, #38BDF8 25%, #F59E0B 50%, #F97316 75%, #007BFF 100%);
  background-size: 300% 100%;
  animation: gradientBorderSpin 6s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gradient-border:hover::before { opacity: 1; }

/* Shimmer line (vach sang chay ngang) */
@keyframes shimmerLine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.shimmer-line-wrap {
  position: relative;
  overflow: hidden;
  height: 2px;
  background: #E7E5E4;
}
.shimmer-line-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 35%;
  background: linear-gradient(90deg, transparent, #007BFF, #F59E0B, transparent);
  animation: shimmerLine 2.4s ease-in-out infinite;
}

/* Floating badge nhe nhang */
@keyframes softBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.float-bob { animation: softBob 3.6s ease-in-out infinite; }

/* Caret blink (typewriter hint) */
@keyframes caretBlink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
.caret::after {
  content: '▍';
  margin-left: 2px;
  color: #007BFF;
  animation: caretBlink 1s steps(1) infinite;
}

/* Underline reveal — vach ke mo rong tu giua */
@keyframes underlineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.underline-reveal {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.underline-reveal::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.underline-reveal:hover::after,
.underline-reveal.is-fired::after {
  transform: translateX(-50%) scaleX(1);
}

/* Icon rotate-in khi hover */
@keyframes iconSpinIn {
  from { transform: rotate(-180deg) scale(0.4); opacity: 0; }
  to   { transform: rotate(0deg)    scale(1);   opacity: 1; }
}
.icon-pop:hover svg { animation: iconSpinIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Wrapper don gian cho animate.css utility (loai bo mat thoi gian delay mac dinh)
   Dung de ben script.js tuy chinh --animate-duration va --animate-delay */
.animate-booted {
  --animate-duration: 0.9s;
  --animate-delay: 0s;
  opacity: 1; /* hien thi ngay khi animate.css them .animate__animated */
}

/* Stack tilt — card nghieng nhe khi hover (CSS thuan, khong can JS) */
.tilt-card { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tilt-card:hover { transform: perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-4px); }

/* Section divider — vach phan cach sections co animation slide-in */
@keyframes dividerExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.divider-expand {
  display: block;
  transform-origin: left center;
  height: 1px;
  background: linear-gradient(90deg, transparent, #007BFF 30%, #F59E0B 70%, transparent);
  animation: dividerExpand 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulse dot variant — cham tron phat sang lien tuc */
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50%      { box-shadow: 0 0 0 6px transparent; }
}
.dot-pulse { animation: pulseDot 2s ease-in-out infinite; }

/* Accessibility: tat moi custom animation khi user yeu cau */
@media (prefers-reduced-motion: reduce) {
  .animate-hero-line,
  .gradient-border::before,
  .shimmer-line-wrap::after,
  .float-bob,
  .caret::after,
  .underline-reveal::after,
  .divider-expand,
  .dot-pulse {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .tilt-card:hover { transform: none !important; }
}

/* ============================================================
   EXPERIENCE SECTION — Layout mới (compact, horizontal card)
   - Trái: heading + bullets có icon star + tags
   - Phải: ảnh nhỏ bo góc
   - Mobile: ảnh xuống dưới, full-width
   - Bỏ timeline rail cũ (date bên trái + line dọc)
   ============================================================ */

/* Reset: bỏ timeline rail + date bên trái của bản cũ */
.journey-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* giảm khoảng cách giữa các item */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Item không còn margin-left cho rail nữa */
.journey-item {
  position: relative;
}

/* Card mới: flex ngang body + media, gap gọn */
.journey-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: #FFFFFF;
  border: 1px solid #E7E5E4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(40, 37, 36, 0.04);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.journey-card:hover {
  box-shadow: 0 8px 24px rgba(0, 123, 255, 0.08);
  border-color: #DBEAFE;
  transform: translateY(-2px);
}

/* Body bên trái: chiếm phần lớn */
.journey-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Media bên phải: ảnh nhỏ cố định */
.journey-card__media {
  flex: 0 0 180px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #F5F0EB;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.journey-card:hover .journey-card__media img {
  transform: scale(1.04);
}

/* Topline: type pill + date + number — gọn trên 1 dòng */
.journey-card__topline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.journey-card__type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  font-weight: 700;
}

.journey-card__type i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  display: inline-block;
}

.journey-card__date {
  color: #78716C;
  font-weight: 600;
}

.journey-card__number {
  margin-left: auto;
  color: #A8A29E;
  font-variant-numeric: tabular-nums;
}

/* Heading: tiêu đề KHÔNG xuống dòng */
.journey-card__heading h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #292524;
  line-height: 1.35;
  /* Ép 1 dòng, có thể cắt bớt với ellipsis nếu quá dài */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journey-card__heading p {
  margin: 0.15rem 0 0;
  color: #78716C;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bullets: gạch đầu dòng với icon star */
.journey-card__bullets {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.journey-card__bullets li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: #44403C;
  font-size: 0.92rem;
  line-height: 1.55;
}

.journey-card__bullets li::before {
  content: none; /* bỏ bullet mặc định */
}

/* Icon star — dùng inline SVG mask để dễ tô màu */
.journey-card__star {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  background-color: #F59E0B;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m12 2 2.9 6.9L22 10l-5.5 4.8L18.2 22 12 18.3 5.8 22l1.7-7.2L2 10l7.1-1.1L12 2z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m12 2 2.9 6.9L22 10l-5.5 4.8L18.2 22 12 18.3 5.8 22l1.7-7.2L2 10l7.1-1.1L12 2z'/></svg>") no-repeat center / contain;
}

/* Tags: gọn, không chiếm dòng mới */
.journey-card__tags {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.journey-card__tags li {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #44403C;
  background: #F5F0EB;
  border: 1px solid #E7E5E4;
  border-radius: 999px;
}

/* Responsive: tablet → media nhỏ lại */
@media (max-width: 900px) {
  .journey-card__media {
    flex-basis: 140px;
  }
  .journey-card__heading h3 {
    font-size: 1.1rem;
  }
}

/* Responsive: mobile → chuyển sang dọc, ảnh xuống dưới */
@media (max-width: 640px) {
  .journey-card {
    flex-direction: column;
    padding: 1.25rem;
    gap: 1rem;
  }
  .journey-card__media {
    flex-basis: auto;
    width: 100%;
    height: 160px;
    order: 2; /* ảnh xuống dưới */
  }
  .journey-card__body {
    order: 1;
  }
  .journey-card__heading h3,
  .journey-card__heading p {
    white-space: normal; /* mobile cho phép xuống dòng */
  }
  .journey-card__number {
    margin-left: 0;
  }
}
