* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: white;
    --main-color: #4dd0e1;
    --second-text-color: #C1FFF9;
}

html {
    font-size: 60%;
    overflow-x: hidden;
}
body {
    background: var(--bg-color);
    color: var(--text-color);
}
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 4rem 12% 4rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
}

.logo {
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo span {
    text-shadow:0 0 25px var(--main-color);
}

.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
}

section {
    min-height: 100vh;
    padding: 10rem 12% 10rem;
}

.home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
}

.home .content {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: left;
    justify-content: center;
    margin-top: 3rem;
}

span {
    color: var(--main-color);
}

.logo span {
    color: var(--main-color);
}

.home-content h3 {
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3.5rem;
}

.home-content h1 {
    font-size: 7rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
}

.home-content h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-top: 2rem;
    color: var(--second-text-color);
    text-shadow: 0 0 25px var(--main-color);
    font-style: italic;
}

.flicker-text {
  font-size: 3rem;
  font-style: italic;
  font-weight: bold;
  margin-top: 2rem;
  color: var(--second-text-color);
  text-shadow: 0 0 5px #b6faff, 0 0 15px #aaf0ff, 0 0 25px #9ee8ff;
  animation: flicker 2.5s infinite;
}

/* Flicker animation */
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
    text-shadow: 0 0 5px #b6faff, 0 0 15px #aaf0ff, 0 0 25px #9ee8ff;
  }
  20%, 24%, 55% {
    opacity: 0.4;
    text-shadow: none;
  }
  22% {
    opacity: 0.1;
    text-shadow: none;
  }
}


.home-img {
    border-radius: 50%;
}

.home-img img {
    position: relative;
    top: 3rem;
    width: 400px;
    height: 400px;
    border-radius: 15%;
    box-shadow: 0 0 20px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-ou2t;
    object-fit: cover;
    object-position: 60% center;
}

.home-img img:hover {
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color),
                0 0 100px var(--main-color);
}
.home-content p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    max-width: 1200px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background: transparent;
    border: 2px solid var(--main-color);
    font-size: 2.5rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}

.social-icons a:hover {
    background-color: var(--main-color);
    color: var(--text-color);
    transform: scale(1.3)translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
}

.social-icons a img.tableau-icon {
    width: 2.3rem;
    height: 2.3rem;
    filter: brightness(0) saturate(100%) invert(69%) sepia(98%) saturate(999%) hue-rotate(130deg) brightness(105%) contrast(103%);
    transition: 0.3s ease-in-out;
}

.social-icons a img.tableau-icon:hover {
    width: 2.3rem;
    height: 2.3rem;
    filter: brightness(0) saturate(100%) invert(100%);
    transition: 0.3s ease-in-out;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: black;
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-color);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-group a:nth-of-type(2) {
    background-color: black;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 25px transparent;
}

.btn-group a:nth-of-type(2):hover {
    background-color: var(--main-color);
    color: black;
    box-shadow: 0 0 25px var(--main-color);
}

.text-animation {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.text-animation span {
    position: relative;
}

.text-animation span::before {
    content: "Web Developer";
    color: var(--main-color);
    animation: words 20s infinite;
}

.text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
    to {
        border-left: 2px solid var(--main-color);
    }
}

@keyframes words {
  0%, 20% {
    content: "Business Analyst Intern";
  }
  21%, 40% {
    content: "Data Enthusiast";
  }
  41%, 60% {
    content: "Puzzle Solver";
  }
  61%, 80% {
    content: "Actuarial Student";
  }
  81%, 100% {
    content: "Boba Lover";
  }
}


@keyframes typing {
  10%, 15%, 30%, 35%, 50%, 55%, 70%, 75%, 90%, 95% {
    width: 0;
  }

  5%, 20%, 25%, 40%, 45%, 60%, 65%, 80%, 85% {
    width: calc(100% + 8px);
  }
}

/* ABOUT SECTION */
.about-me {
  background-color: var(--second-bg-color);
  padding: 10rem 12% 10rem;
}

.about-me .heading {
  font-size: 8rem;
  text-align: center;
  margin: 5rem 0;
  color: white;
}

.about-me .heading span {
  color: var(--main-color);
}

.about-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8rem;
  flex-wrap: wrap;
  text-align: center;
}

/* Left side */
.about-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.top-boxes {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.about-box {
  background: #000;
  border: 2px solid var(--main-color);
  border-radius: 2rem;
  padding: 2.5rem;
  box-shadow: 0 0 15px rgba(0, 255, 238, 0.4);
  text-align: center;
  transition: all 0.3s ease;
  
}

.about-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 25px var(--main-color);
  cursor: pointer;
}

.about-box.rectangle1 {
  width: 270px;
  height: 200px;
}

.about-box.rectangle {
  width: 560px;
  height: auto;
}

.about-box i {
  font-size: 3.8rem;
  color: var(--second-text-color);
  margin-bottom: 0.8rem;
}

.about-box h3 {
  font-size: 3.4rem;
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.about-box p {
  font-size: 2.2rem;
  color: white;
  line-height: 1.5;
}

/* Right side */
.about-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-right img {
  width: 450px;
  border-radius: 15%;
  box-shadow: 0 0 25px var(--main-color),
            0 0 50px var(--main-color),
            0 0 100px var(--main-color);
  transition: transform 0.3s ease;
}

/* EXPERIENCE SECTION */

.experience .heading {
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
}


.experience {
    padding: 100px 15px;
    background: var(--bg-color);
}

.experience h2 {
    margin-bottom: 5rem;
}

.timeline-items {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.timeline-items::before {
    content: "";
    position:absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1px);;
}

.timeline-item {
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
}

.timeline-dot {
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color);
                
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 10px;
}

.timeline-date {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 6px 0 15px;
}

.timeline-content {
    background-color: var(--bg-color);
    border: 3px solid var(--main-color);
    padding: 30px 50px;
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    cursor: pointer;
    transition: 0.3s ease-in-out;
    position: relative;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-color);;
}

.timeline-content h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--second-text-color);
    margin-bottom: 2rem;
    font-style: italic;
    letter-spacing: 0.7px;
}

.timeline-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--main-color);  /* Màu nổi bật */
    margin-bottom: 2rem;
}

.timeline-content p {
    font-size: 16px;
    color: white;
    font-weight: 300;
    line-height: 22px;
    margin-bottom: 0.4rem;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--main-color);
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
    width: 50px;
}


/* SKILLS SECTION */

.skills {
  background-color:var(--second-bg-color);
  padding: 10rem ;
}

.skills h2 {
  text-align: center;
  font-size: 8rem;
  color: white;
  margin-bottom: 10rem;
}

.skills h2 span {
  color: var(--main-color);
}

.skills-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10rem;
  margin-top: 5rem;
}

.skills-column {
  flex: 1 1 45%;
}

.skills-column .title {
  font-size: 3.75rem;
  font-weight: 600;
  color: var(--second-text-color);
  margin-bottom: 8rem;
  text-shadow: 0 0 25px var(--main-color);
}

.skills-box .progress {
  margin-bottom: 4rem;
}

.skills-box .progress h3 {
  display: flex;
  justify-content: space-between;
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.5rem;
}

.skills-box .bar {
  height: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 255, 238, 0.2);
}

.skills-box .bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--main-color);
  animation: progressLoop 10s ease-in-out infinite;
  border-radius: 1rem;
    position: relative;
}

/* Animation: lặp từ 0 → % → 0 */
@keyframes progressLoop {
  0% {
    width: 0%;
  }
  50% {
    width: var(--target);
  }
  75% {
    width: var(--target); /* Giữ nguyên width tại target để tạo hiệu ứng dừng */
  }
  100% {
    width: 0%;
  }
}

/* Responsive tablet */
@media (max-width: 768px) {
  .skills {
    padding: 50px 5%;
  }

  .skills h2 {
    font-size: 2rem;
  }

  .skills-column .title {
    font-size: 1.5rem;
  }

  .progress h3 {
    font-size: 1rem;
  }

  .bar {
    height: 20px;
  }
}

/* Responsive mobile */
@media (max-width: 480px) {
  .skills {
    padding: 30px 3%;
  }

  .skills h2 {
    font-size: 1.5rem;
  }

  .skills-column {
    min-width: 100%;
  }
}

/* PROJECTS SECTION */
.projects {
  background: var(--bg-color);
  padding: 4rem 0;
  overflow-x: hidden;
}

.projects-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.projects .heading {
  margin-bottom: 3rem;
  text-align: center;
  width: 100%;
  font-size: 8rem;
}

/* Cuộn ngang wrapper */
.wrapper {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 2rem 3vw;
  box-sizing: border-box;
  min-height: 620px;
  scroll-snap-type: x mandatory;
}

.wrapper::-webkit-scrollbar {
  height: 6px; /* shorten height */
  background: #1a1a1a; /* dark background to show contrast */
  border-radius: 10px;
}

.wrapper::-webkit-scrollbar-thumb {
  background: var(--main-color); /* aqua/cyan thumb */
  border-radius: 10px;
}

.wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.6); /* more visible on hover */
}

.wrapper::-webkit-scrollbar-track {
  background: #1a1a1a; /* match the dark theme */
  margin: 0 100px;
}

.project-card {
  flex: 0 0 auto;
  width: 360px;              /* increased from 300px */
  height: 500px;         /* increased from 520px */
  background: rgba(0, 0, 0, 0.7);
  border: 3px solid rgba(238, 238, 238, 0.2);
  border-radius: 2rem;
  padding: 30px 40px;        /* slightly more spacious */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  color: white;
  transition: 0.4s ease-in-out;
  scroll-snap-align: start;
    margin-top: 2rem;

}


.project-card:hover {
  border: 3px solid var(--main-color);
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 0 25px var(--main-color);
}

.project-card img {
  width: 100%;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  object-fit: cover;
}

.project-card .btn {
  display: inline-block;
  padding: 1rem 2.2rem;
  background: black;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  border-radius: 4rem;
  font-size: 1.5rem;
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.3s ease-in-out;
  cursor: pointer;
  box-shadow: 0 0 25px transparent;
}

.project-card .btn:hover {
  background: var(--main-color);
  color: black;
  box-shadow: 0 0 25px var(--main-color);
}

.project-card h2 {
  font-size: 2.6rem;
  margin-bottom: 1.2rem;
  color: var(--second-text-color);
  text-shadow: 0 0 25px var(--main-color);
}

.project-card p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

/* PROJECT FILTER BUTTONS SECTION */

.filter-buttons {
  margin-top: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.filter-btn {
  background: none;
  border: 2px solid var(--main-color);
  color: var(--main-color);
  padding: 0.6rem 1.2rem;
  margin: 0 0.5rem;
  border-radius: 2rem;
  font-size: 2rem;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
  font-weight: 400;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--main-color);
  color: black;
}



/* PROJECT DETAILES SECTION */
.project-detail {
  display: none;
  background-color: var(--second-bg-color);
  padding: 4rem 2rem;
  margin: 2rem auto;
  max-width: 100vw;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(0, 224, 255, 0.25);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.project-detail.active {
  display: block;
}

.project-detail h3 {
  font-size: 6rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--main-color);
  padding-bottom: 0.5rem;
}

.project-detail h4 {
  font-size: 3rem;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-left: 5px solid var(--main-color);
  padding-left: 1rem;
}

.project-detail p {
  font-size: 1.6rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.project-detail ul {
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.project-detail ul li {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  list-style: disc;
}

.dashboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.project-detail .dashboard-preview {
  width: 100%;
  text-align: center;
  margin: 2rem 0; /* thêm khoảng cách nếu cần */
}

.project-detail .dashboard-preview img {
  max-width: 60%;
  height: auto;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block; /* đảm bảo căn giữa */
}


.project-detail .dashboard-preview img:hover {
  transform: scale(1.01);
   box-shadow: 0 0 50px var(--main-color);
}

.project-detail .btn-view {
  flex: 1 1 30%;
  align-self: flex-start;
  margin-top: 1rem;
  padding: 1.5rem 2.5rem;
  background-color: var(--main-color);
  color: #000;
  font-weight: bold;
  text-decoration: none;
  border-radius: 12px;
  text-align: center;
  font-size: 1.3rem;
  transition: background 0.3s ease, transform 0.2s;
}

.project-detail .btn-view:hover {
  background-color: #00b0cc;
  color: #fff;
  transform: translateY(-2px);
}

.project-detail .btn-close {
  font-size: 1.8rem;                /* To hơn */
  padding: 0.75rem 1.5rem;          /* Ngắn lại */
  background-color: var(--main-color);
  color: black;
  border-radius: 10px;
  cursor: pointer;
  margin: 2rem auto 0 auto;         /* Căn giữa */
  font-weight: 600;
  display: block;                   /* Đảm bảo nó là khối độc lập */
  width: fit-content;               /* Chiều rộng vừa nội dung */
  transition: all 0.3s ease;
}

.project-detail .btn-close:hover {
  background-color: #00b0cc;
  color: white;
}



@media (max-width: 768px) {
  .project-card {
    width: 90%;
  }

  .projects-container {
    flex-direction: column;
    align-items: center;
  }
}




/* CONTACT SECTION */
.contact .heading {
  text-align: center;
  font-size: 8rem;
  color: white;
  margin-bottom: 10rem;
}

.contact {
  background-color: var(--second-bg-color);
}

.contact h2 {
  margin-bottom: 3rem;
  color: white;
}

.contact form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin: 5rem auto;
  text-align: center;
}

.contact form .input-box {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 2.5rem;
  font-size: 1.8rem;
  color: var(--text-color);
  background: var(--second-bg-color);
  border-radius: 2rem;
  border: 2px solid var(--main-color);
  margin: 1.5rem 0;
  resize: none;
}

.contact form .btn {
  margin-top: 2rem;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--second-bg-color);
  color: black;
  padding: 3rem 4rem;
  border-radius: 2.5rem;
  box-shadow: 0 0 30px rgba(0, 255, 238, 0.3);
  font-size: 2rem;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: flex;
  align-items: center;
  gap: 2rem;
  min-width: 40rem;
  justify-content: space-between;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1.05);
}

.toast .toast-message {
  flex: 1;
}

.toast .close-btn {
  background: none;
  border: none;
  font-size: 2.5rem;
  font-weight: bold;
  color: #00ffee;
  cursor: pointer;
  transition: color 0.3s ease;
}

.toast .close-btn:hover {
  text-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color),
                0 0 100px var(--main-color);
}




/* FOOTER SECTION */

.footer {
  position: relative;
  bottom: 0;
  width: 100%;
  padding: 40px 0;
  background-color: var(--second-bg-color);
}

.footer .social-icons {
  text-align: center;
  padding-bottom: 25px;
  color: var(--main-color);
}

.footer .social-icons a {
  font-size: 25px;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  width: 42px;
  height: 42px;
  line-height: 42px;
  display: inline-block;
  text-align: center;
  border-radius: 50%;
  margin: 0 10px;
  transition: 0.3s ease-in-out;
}

.footer .social-icons a:hover {
  transform: scale(1.2) translateY(-10px);
  background-color: var(--main-color);
  color: black;
  box-shadow: 0 0 25px var(--main-color);
}

.footer ul {
  margin-top: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 0;
  text-align: center;
}

.footer ul li a {
  color: white;
  border-bottom: 3px solid transparent;
  transition: 0.3s ease-in-out;
}

.footer ul li a:hover {
  border-bottom: 3px solid var(--main-color);
}

.footer ul li {
  display: inline-block;
  padding: 0 15px;
}

.footer .copyright {
  margin-top: 50px;
  text-align: center;
  font-size: 16px;
  color: white;
}

/* MEDIA QUERIES */

@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }

  .services-container {
    padding-bottom: 7rem;
    grid-template-columns: repeat(2, 1fr);
    margin: 0 5rem;
  }
}

@media (max-width: 1200px) {
  header {
    padding: 2rem 3%;
  }

  section {
    padding: 10rem 3% 2rem;
  }

  .timeline-items::before {
    left: 7px;
  }
  
  .timeline-item:nth-child(odd) {
    padding-right: 0;
    text-align: left;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 37px;
  }
  
  .timeline-dot {
    left: 0;
  }
  
  .services {
    padding-bottom: 7rem;
  }
  
  .testimonials .wrapper {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .contact form {
    flex-direction: column;
  }

  .footer {
    padding: 2rem 3%;
  }
}

@media (max-width: 1200px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    width: 50%;
    padding: 1rem 3%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom-left-radius: 2rem;
    border-left: 2px solid var(--main-color);
    border-bottom: 2px solid var(--main-color);
    display: none;
  }

  .navbar.active {
  display: block;
  }

  .navbar a {
  display: block;
  font-size: 2rem;
  margin: 3rem 0;
  color: white;
  }

  .home {
  flex-direction: column-reverse;
  margin: 5rem 4rem;
  }

  .home-content h3 {
  font-size: 2.6rem;
  }

  .home-content h1 {
  font-size: 8rem;
  margin-top: 3rem;
  }

  .home-content p {
  max-width: 1200px;
  margin: 0 auto;
  }

  .home-img img {
  width: 56vw;
  }

  .services h2 {
  margin-bottom: 3rem;
  }

  .services-container {
  grid-template-columns: repeat(1, 1fr);
  }

  /* Responsive for smaller screens */
@media (max-width: 800px) {
    .about-wrapper {
        flex-direction: column;
        gap: 4rem;
    }

    .top-boxes {
        flex-direction: column;
        gap: 2rem;
    }

    .about-box.square {
        width: 100%;
        height: auto;
    }

    .about-box.rectangle {
        width: 100%;
    }

    .about-right img {
        width: 260px;
    }
}
}

/* ========== 📱 PHONE (max-width: 480px) ========== */
@media (max-width: 480px) {
  .projects-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .project-card {
    width: 95%;
    padding: 2rem 1rem;
  }

  .project-detail h3 {
    font-size: 2rem;
    text-align: center;
  }

  .project-detail .dashboard-row {
    flex-direction: column;
    align-items: center;
  }

  .project-detail .dashboard-preview {
    max-width: 100%;
    margin: 1rem 0;
  }

  .project-detail .dashboard-preview img {
    width: 100%;
  }

  .project-detail .btn-view {
    width: 80%;
    font-size: 1rem;
  }

  .project-detail .btn-close {
    font-size: 1.2rem;
    padding: 0.5rem 1.2rem;
    display: block;
    margin: 2rem auto 0;
  }
}


/* ========== 💻 TABLET (max-width: 768px) ========== */
@media (max-width: 768px) {
  .projects-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .project-card {
    width: 90%;
    padding: 2rem;
  }

  .project-detail h3 {
    font-size: 2.4rem;
    text-align: center;
  }

  .project-detail .dashboard-row {
    flex-direction: column;
    align-items: center;
  }

  .project-detail .dashboard-preview {
    max-width: 100%;
    margin: 1rem 0;
  }

  .project-detail .dashboard-preview img {
    width: 100%;
  }

  .project-detail .btn-view {
    font-size: 1rem;
    padding: 1rem;
  }

  .project-detail .btn-close {
    font-size: 1.3rem;
    padding: 0.6rem 1.5rem;
    display: block;
    margin: 2rem auto 0;
  }
}


/* ========== 💻 LAPTOP (max-width: 1200px) ========== */
@media (max-width: 1200px) {
  .projects-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }

  .project-card {
    width: 45%;
    padding: 2rem;
  }

  .project-detail .dashboard-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .project-detail .dashboard-preview {
    max-width: 65%;
  }

  .project-detail .dashboard-preview img {
    width: 100%;
  }

  .project-detail .btn-view {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
  }

  .project-detail .btn-close {
    font-size: 1.4rem;
    padding: 0.7rem 1.7rem;
    margin-top: 2rem;
  }
}


/* ========== 🖥️ DESKTOP / PC (min-width: 1201px) ========== */
@media (min-width: 1201px) {
.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Căn giữa nội dung */
  gap: 2.5rem;
  margin: 0 auto;           /* Đảm bảo toàn khối được căn giữa */
  max-width: 1300px;        /* Giới hạn chiều rộng để tránh tràn màn hình */
  padding: 0 2rem;          /* Tránh sát mép màn hình */
  box-sizing: border-box;
}



.project-card {
  width: calc((100% - 3 * 2rem) / 4);            /* Chiều rộng cố định cho mỗi card */
  min-height: 600px;
  flex: 0 0 auto;           /* Không co giãn */
}




  .project-detail .dashboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
  }

  .project-detail .dashboard-preview img {
    max-width: 700px;
    width: 100%;
  }

  .project-detail .btn-view {
    font-size: 1.2rem;
    padding: 1rem 2rem;
  }

  .project-detail .btn-close {
    font-size: 1.5rem;
    padding: 0.8rem 2rem;
    margin-top: 2rem;
  }
}

