/********** Template CSS **********/
:root {
    --primary: #6244C5;
    --secondary: #FFC448;
    --light: #FAFAFB;
    --dark: #12141D;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar.fixed-top {
    display: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    padding: 20px 15px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        padding: 10px 0;
    }
}
.navbar.navbar-sticky {
  display: flex !important;
}
.navbar-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1045;
  transition: transform .25s ease, opacity .25s ease;
}

.topbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ===== MAIN NAVBAR ===== */
#mainNavbar {
  transition:
    transform .25s ease,
    opacity .25s ease,
    box-shadow .25s ease;
  will-change: transform, opacity;
}

/* trạng thái ban đầu (chưa sticky) */
#mainNavbar:not(.navbar-sticky) {
  transform: translateY(0);
  opacity: 1;
}

/* khi sticky */
.navbar-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;

  /* hiệu ứng mượt */
  transform: translateY(-100%);
  opacity: 0;

  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* khi sticky + show */
.navbar-sticky.navbar-visible {
  transform: translateY(0);
  opacity: 1;
}

/* spacer chống nhảy layout */
.nav-spacer {
  height: 0;
}


/*** Header ***/
#home {
    margin-bottom: 6rem;
    background: url(../img/bg-header.png) left top no-repeat;
}

.typed-cursor {
    font-size: 30px;
    color: var(--dark);
}

.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--primary);
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--primary);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}


/*** About ***/
#about .years .display-1 {
    font-size: 10rem;
    line-height: 9rem;
}

#about .years h5 {
    letter-spacing: 30px;
    margin-right: -30px;
}


/*** Skills ***/
#skill .progress {
    height: 5px;
    border-radius: 5px;
}

#skill .progress .progress-bar {
    width: 0px;
    border-radius: 5px;
    transition: 3s;
}

#skill .nav-pills .nav-link {
    color: var(--dark);
}

#skill .nav-pills .nav-link.active {
    color: #FFFFFF;
}

#skill .tab-content hr {
    width: 30px;
}


/*** Service ***/
.service-item .bg-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(../img/bg-icon.png) center center no-repeat;
    background-size: cover;
}


/*** Project Portfolio ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-img {
    position: relative;
}

.portfolio-btn {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(98, 68, 197, .9);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 30px;
    padding-bottom: 100px !important;
    opacity: 0;
    transition: .5s;
}

.portfolio-item:hover .portfolio-btn {
    opacity: 1;
    padding-bottom: 30px !important;
}


/*** Team ***/
/* .team-item img {
    transition: .5s;
}

.team-item:hover img {
    opacity: .7;
}

.team-item .team-text {
    position: absolute;
    left: 0;
    right: 60px;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text {
    right: 30px;
    opacity: 1;
}

.team-item .team-text div {
    transition: .5s;
}

.team-item:hover .team-text div {
    margin-left: 30px;
} */


/*** Testimonial ***/
.testimonial-left,
.testimonial-right {
    position: relative;
}

.testimonial-left img,
.testimonial-right img {
    position: absolute;
    padding: 5px;
    border: 1px solid var(--secondary);
    border-radius: 70px;
}

.testimonial-left img:nth-child(1),
.testimonial-right img:nth-child(3) {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-left img:nth-child(2),
.testimonial-right img:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.testimonial-left img:nth-child(3),
.testimonial-right img:nth-child(1) {
    width: 50px;
    height: 50px;
    bottom: 10%;
    right: 10%;
}

.testimonial-carousel .owl-item img {
    width: 120px;
    height: 120px;
}

.testimonial-carousel .testimonial-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid var(--secondary);
    border-radius: 60px;
}

.testimonial-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 2px solid var(--secondary);
    border-radius: 30px;
    transition: .5s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 5px;
    left: 5px;
    border-radius: 16px;
    background: var(--secondary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--primary);
}


/* ===== Experience list (no tabs) ===== */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exp-item {
  padding: 16px 20px;
  border-left: 4px solid #0d6efd;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 16px;
}

.exp-year {
  font-weight: 700;
  color: #0d6efd;
  display: block;
  margin-bottom: 6px;
}
.exp-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

.exp-card ul {
  padding-left: 18px;
}

@media (max-width: 576px) {
  .exp-item {
    grid-template-columns: 1fr;
  }
  .exp-year {
    text-align: left;
    padding-top: 0;
  }
}

/* ===== Education Roadmap (reuse) ===== */
.edu-roadmap {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px 40px;
  padding: 30px 10px 10px;
}

.edu-roadmap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent 48%,
    rgba(0,0,0,.2) 50%,
    transparent 52%
  );
  pointer-events: none;
}

.edu-item { text-align: center; position: relative; }
.edu-step {
  width: 42px; height: 42px; line-height: 42px;
  border-radius: 50%;
  display: inline-block;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.edu-item h6 { font-weight: 700; margin-bottom: 6px; }
.edu-item p { font-size: 14px; opacity: .8; line-height: 1.4; }

/* colors */
.color-1 .edu-step { background: #ff5722; }
.color-2 .edu-step { background: #ff9800; }
.color-3 .edu-step { background: #ffc107; }
.color-4 .edu-step { background: #4caf50; }
.color-5 .edu-step { background: #66bb6a; }
.color-6 .edu-step { background: #26a69a; }
.color-7 .edu-step { background: #29b6f6; }

@media (max-width: 992px) {
  .edu-roadmap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .edu-roadmap { grid-template-columns: 1fr; }
}


/* ===== Snake Timeline ===== */
.snake-timeline{
  position: relative;
  height: 560px;
  border-radius: 18px;
  background: #f6f7fb;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.snake-svg{
  position:absolute;
  inset: 0;
  width:100%;
  height:100%;
}

.tl-item{
  position:absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display:flex;
  align-items:center;
  gap: 12px;
  z-index: 2;
  max-width: 340px;
}

.tl-badge{
  width:58px;
  height:58px;
  border-radius:999px;
  background:#fff;
  border: 4px solid rgba(13,110,253,.15);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  color:#0d6efd;
  flex: 0 0 auto;
}

.tl-content{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.tl-year{ font-weight: 900; color:#111; line-height:1.1; }
.tl-title{ font-weight: 800; margin-top: 2px; }
.tl-desc{
  font-size: 14px;
  opacity: .75;
  line-height: 1.35;
  margin-top: 2px;
}

.snake-timeline,
.tl-badge, .tl-content { will-change: transform, opacity; }

/* Mobile: fallback sang dạng list */
@media (max-width: 992px){
  .snake-timeline{
    height:auto;
    padding: 18px;
  }
  .snake-svg{ display:none; }
  .tl-item{
    position: relative;
    left:auto; top:auto;
    transform:none;
    max-width: 100%;
    margin: 12px 0;
  }
}

/* ===== Dual Navbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1045;
  transition: transform .2s ease, opacity .2s ease;
}

.topbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.navbar-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.nav-spacer { height: 0; }


/* ===== Primary Color: Fire Red (C0392B) ===== */
.text-primary {
  color: #C0392B !important;
}
.btn-primary {
  color: #fff;
  background-color: #C0392B !important;
  border-color: #C0392B !important;
}

/* Hover */
.btn-primary:hover,
.btn-primary:focus {
  color: #fff;
  background-color: #A93226 !important;   /* đậm hơn */
  border-color: #A93226 !important;
}

/* Active / Pressed */
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: #922B21 !important;   /* đậm nhất */
  border-color: #922B21 !important;
}

/* Disabled */
.btn-primary:disabled,
.btn-primary.disabled {
  background-color: #C0392B !important;
  border-color: #C0392B !important;
  opacity: 0.65;
}
/* ===== Outline Primary Button ===== */
/* ===== Outline Primary (Fire + Wood) ===== */
.btn-outline-primary {
  color: #C0392B;                 /* đỏ trầm */
  border-color: #C0392B;
  background-color: transparent;
  font-weight: 600;
  transition: all .25s ease;
}

/* Hover: chuyển sang xanh */
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff;
  background-color: #2E7D32;      /* xanh rêu */
  border-color: #2E7D32;
}

/* Active */
.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: #1B5E20;      /* xanh đậm hơn */
  border-color: #1B5E20;
  color: #fff;
}

/* Disabled */
.btn-outline-primary:disabled {
  color: #C0392B;
  border-color: #C0392B;
  opacity: 0.5;
}
/* Hover */
.navbar .navbar-nav .nav-link:hover {
  color: #2E7D32; /* xanh rêu */
}

/* Active */
.navbar .navbar-nav .nav-link.active {
  color: #C0392B; /* đỏ trầm */
}
.navbar .navbar-nav .nav-link {
  position: relative;
}

.navbar .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: all .25s ease;
  transform: translateX(-50%);
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
  width: 60%;
}
.text-secondary {
  color: #4F7F52 !important; /* xanh rêu nhạt */
}
.navbar-sticky .text-secondary {
  color: #5A5A5A !important;
}

.t-media{
  margin: 8px 0 14px;
}
.t-media img{
  width: 66%;
  /* max-height: 180px; */
  /* object-fit: cover; */
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,.05);
}

.exp-card.is-link { cursor: pointer; }
.exp-card.is-link:hover {
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.08);
}
.exp-card a.card-link {
  color: inherit;
  text-decoration: none;
}
.exp-card a.card-link:hover {
  text-decoration: underline;
}

/* ===== Project Grid ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 991.98px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* ===== Card ===== */
.pj-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
  transition: .25s ease;
  height: 100%;
}
.pj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,.10);
}

/* ===== Thumbnail (fixed ratio) ===== */
.pj-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;   /* đồng nhất */
  background: linear-gradient(135deg, rgba(13,110,253,.12), rgba(220,53,69,.10));
  overflow: hidden;
}
.pj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* không méo */
  display: block;
}

/* fallback icon when no img */
.pj-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0,0,0,.35);
  font-size: 56px;
}

/* top-left category badge */
.pj-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(220,53,69,.92);
  color: #fff;
  box-shadow: 0 8px 18px rgba(220,53,69,.18);
}
.pj-badge.bg-blue { background: rgba(13,110,253,.92); }
.pj-badge.bg-green { background: rgba(25,135,84,.92); }
.pj-badge.bg-dark { background: rgba(33,37,41,.92); }

/* year pill */
.pj-year {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(0,0,0,.08);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

/* ===== Body ===== */
.pj-body { padding: 14px 14px 16px; }

.pj-title {
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 6px 0;
  font-size: 16px;
}
.pj-desc {
  color: rgba(0,0,0,.65);
  font-size: 13.5px;
  line-height: 1.45;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* 2 dòng gọn */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(0,0,0,.55);
  font-size: 12.5px;
}
.pj-meta i { color: rgba(220,53,69,.9); }

/* stack chips */
.pj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.pj-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  color: rgba(0,0,0,.72);
}

/* footer buttons */
.pj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pj-actions .btn {
  border-radius: 999px;
  font-weight: 800;
  padding: 8px 12px;
  font-size: 13px;
}
.pj-actions .btn-outline-danger {
  border-width: 2px;
}

 .team-card{
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    overflow: hidden;
    transition: .2s ease;
    background: #fff;
  }
  .team-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.25rem rgba(0,0,0,.08);
  }
  .team-avatar{
    width: 84px; height: 84px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid rgba(13,110,253,.15);
  }
  .team-role{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border: 1px solid rgba(13,110,253,.2);
    background: rgba(13,110,253,.06);
    color: #0d6efd;
    padding: .28rem .55rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
  }
  .team-tags .badge{
    border: 1px solid rgba(0,0,0,.08);
  }
  .team-links a{
    width: 36px; height: 36px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.08);
    color: inherit;
    text-decoration: none;
    transition: .15s ease;
    background: #fff;
  }
  .team-links a:hover{
    transform: translateY(-1px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.08);
  }