/* Global styles and reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #7e6af7;
  --text-color: #333;
  --light-text: #777;
  --bg-color: #e0f7fa;
  --light-bg: #ffffff;
  --border-color: #eaeaea;
  --sidebar-width: 350px;
  --border-radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #EBEBEB 0%, #D3DAD9 50%, #e1f5fe 100%);
  color: var(--text-color);
  line-height: 1.6;
  padding: 40px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.sidebar a {
  color: #7e6af7;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sidebar a:hover {
  color: #6a57e0;
}

.zalo-icon {
  color: #0068ff;
  font-size: 14px;
}

a:hover {
  opacity: 0.8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Container layout */
.cv-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 30px;
  background-color: var(--light-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Animations for smooth loading */
[data-aos] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Sidebar styling */
.sidebar {
  background: #F3F2EC;
  padding: 0;
  /* border-right: 1px solid var(--border-color); */
  color: #333;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

#sidebar-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.profile-header {
  height: 220px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.profile-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.5s ease;
}

.profile-header:hover img {
  transform: scale(1.05);
}

.profile-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(243, 242, 236, 0.8));
  z-index: 1;
}

.profile-section {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 20px 30px 20px;
  position: relative;
  z-index: 1;
}


.name {
  font-size: 28px;
  margin-bottom: 5px;
  color: #2d3748;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.title {
  color: #7e6af7;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.about-me {
  margin: 20px 0;
  padding: 0 5px;
}

.sidebar-heading {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #2d3748;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.about-me p {
  font-size: 14px;
  line-height: 1.6;
  color: #4a5568;
  text-align: left;
}

/* Contact info styling */
.contact-info,
.socials,
.languages {
  margin-bottom: 30px;
  padding: 0 30px;
  position: relative;
  z-index: 1;
}

.contact-item,
.social-item,
.language-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: #2d3748;
}

.icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  margin-right: 15px;
  color: #7e6af7;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.detail {
  flex-grow: 1;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #718096;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}

/* Social icons customization */
.github {
  background: #24292e;
  color: white;
  transition: transform 0.3s ease;
}

.social-item:hover .icon {
  transform: scale(1.1);
}

.facebook {
  background-color: #1877f2;
  color: white;
}

.linkedin {
  background-color: #0077b5;
  color: white;
}

/* Social section */
.socials .sidebar-heading {
  margin-bottom: 20px;
  font-size: 16px;
  color: #2d3748;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Main content styling */
.content {
  padding: 40px;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 22px;
  margin-bottom: 25px;
  color: var(--text-color);
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
  margin-right: 15px;
  display: inline-block;
}

/* Experience section */
.experience,
.skills,
.education,
.projects {
  margin-bottom: 50px;
}

.job {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  margin-bottom: 25px;
  /* padding-bottom: 20px; */
  border-bottom: 1px solid var(--border-color);
}

.job:last-child {
  border-bottom: none;
}

.company-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f8f9fa;
}

.company-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.alphagroup {
  background-color: #f0f8ff;
}

.job-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.company-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--light-text);
}

.job-description {
  font-size: 14px;
  color: var(--light-text);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 100%;
}

.job-header {
  margin-bottom: 15px;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.date {
  font-size: 14px;
  color: var(--light-text);
}

.location {
  font-size: 14px;
  color: var(--light-text);
  display: flex;
  align-items: center;
}

.location i {
  font-size: 14px;
  margin-right: 5px;
}

/* Skills section */
.skill-category {
  margin-bottom: 25px;
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}

.category-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  color: var(--primary-color);
  flex-shrink: 0;
}

.frontend {
  background-color: #e8ffef;
}

.mobile {
  background-color: #f1ecff;
}

.protocols {
  background-color: #fff0e8;
}

.backend {
  background-color: #e8f4ff;
}

.sdk {
  background-color: #ffece8;
}

.tools {
  background-color: #f5f5f5;
}

.category-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  margin: 0;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 44px;
}

.skill-item {
  background-color: #f5f5f5;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  white-space: nowrap;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.skill-item.bullet {
  padding-left: 15px;
  position: relative;
  background-color: transparent;
  padding: 0;
  margin-bottom: 3px;
}

.skill-item.bullet::before {
  content: "•";
  position: relative;
  margin-right: 5px;
  color: var(--primary-color);
  font-size: 18px;
}

/* Education section */
.education-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.education-item {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.education-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.school-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  flex-shrink: 0;
}

.school-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.fpt-uni {
  background-color: #f46f22;
  background-image: url('../images/fptu.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.fpt-poly {
  background-color: #f05a29;
}

.zone3 {
  background-color: #1d3557;
  background-image: url('../images/DHCT-khu3-05.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.education-details {
  flex: 1;
}

.course-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.school-date {
  font-size: 14px;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.school-description {
  font-size: 13px;
  color: var(--light-text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.transcript-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--primary-color);
  margin-top: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.transcript-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.transcript-link i {
  margin-right: 6px;
}

/* Projects section */
.project-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-item {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-item:hover .project-banner {
  transform: scale(1.05);
}

.project-banner {
  width: 100%;
  height: 180px;
  background-color: #f5f5f5;
  overflow: hidden;
  position: relative;
  transition: transform 0.5s ease;
}

.project-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f5f5f5;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.project-item:hover .project-banner img {
  opacity: 1;
}

/* Project logo removed as requested */

.draw-project {
  background-color: #FF9800;
}

.project-details {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-right: 15px;
  position: relative;
}

.project-description {
  font-size: 13px;
  color: var(--light-text);
  margin-bottom: 12px;
  flex-grow: 1;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tech-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  background-color: #f0f0f0;
  color: #555;
  display: inline-flex;
  align-items: center;
}

.tech-badge i {
  margin-right: 4px;
  font-size: 9px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}

.published-badge {
  background-color: #4caf50;
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 10px;
  right: 10px;
}

.store-badge {
  height: 24px;
  margin-right: 5px;
  vertical-align: middle;
}

.app-store-links {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.published-app-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.published-app-image {
  width: 100%;
  max-height: 450px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  object-fit: contain;
  background-color: #f5f5f5;
}

.app-store-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.app-badge img {
  height: 40px;
  transition: transform 0.2s ease;
}

.app-badge:hover img {
  transform: translateY(-3px);
}

.dependencies {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid #e9ecef;
  max-height: 120px;
  overflow-y: auto;
}

.dependencies code {
  font-size: 0.8rem;
  color: #333;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

.project-year {
  font-size: 12px;
  color: var(--light-text);
}

.view-project-btn {
  font-size: 11px;
  border-radius: 20px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.view-project-btn i {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.project-item:hover .view-project-btn i {
  transform: translateX(3px);
}

/* Modal styling */
.modal-content {
  border-radius: 15px;
  border: none;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #f9f9f9;
  padding: 20px 25px;
}

.modal-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 22px;
  display: flex;
  align-items: center;
}

.modal-title-icon {
  margin-right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
}

.modal-body {
  padding: 25px;
}

.modal-body h6 {
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #333;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.modal-body h6 i {
  margin-right: 8px;
  color: var(--primary-color);
  font-size: 14px;
  width: 24px;
}

.modal-body p {
  color: #555;
  line-height: 1.5;
  font-size: 13px;
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 15px;
  margin-bottom: 15px;
}

.modal-body li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 5px;
  font-size: 13px;
  line-height: 1.4;
}

.project-carousel {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  background-color: #f5f5f5;
  width: 100%;
}

.carousel-inner {
  border-radius: 10px;
}

.carousel-item {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f5f5f5;
  height: 450px;
  width: 100%;
}

.carousel-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.carousel-item img.mobile-screenshot {
  width: 100%;
  height: 100%;
  max-height: 450px;
  object-fit: contain;
  background-color: #f5f5f5;
}

/* Carousel thumbnails */
.carousel-thumbnails {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f5f5f5;
}

.thumbnail.active {
  opacity: 1;
  border-color: var(--primary-color);
}

.thumbnail:hover {
  opacity: 1;
}

.carousel-control-prev,
.carousel-control-next {
  width: 10%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-carousel:hover .carousel-control-prev,
.project-carousel:hover .carousel-control-next {
  opacity: 0.8;
}

.carousel-indicators {
  margin-bottom: 0.5rem;
}

.carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators .active {
  background-color: white;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
}

.meta-item i {
  margin-right: 8px;
  color: var(--primary-color);
}

.meta-label {
  font-weight: 600;
  margin-right: 5px;
}

.project-links {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.project-links a {
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.project-links a i {
  font-size: 14px;
}

/* Tools section */
.tool-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.tool-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  height: 100%;
}

.tool-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.tool-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.tool-logo img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.tool-details {
  flex-grow: 1;
}

.tool-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 1px;
}

.tool-description {
  font-size: 11px;
  color: var(--light-text);
  line-height: 1.3;
}

/* Responsive design */
@media (max-width: 1024px) {
  .cv-container {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0 auto;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  body {
    padding: 20px;
  }

  /* Improve page load time on mobile by optimizing animations */
  [data-aos] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
  }
}

@media (max-width: 768px) {
  .job {
    grid-template-columns: 50px 1fr;
  }

  .job-location {
    grid-column: span 2;
    text-align: left;
    margin-top: 10px;
  }

  .education-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .school-logo {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .skill-category {
    margin-bottom: 20px;
  }

  .skill-category-header {
    margin-bottom: 10px;
    gap: 8px;
  }

  .category-icon {
    width: 28px;
    height: 28px;
  }

  .category-title {
    font-size: 13px;
  }

  .skill-items {
    padding-left: 36px;
  }

  .content {
    padding: 30px 20px;
  }
}

@media (max-width: 992px) {
  .project-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {

  .education-container,
  .project-container {
    grid-template-columns: 1fr;
  }

  body {
    padding: 10px;
    display: block;
  }

  .cv-container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
  }

  .skill-items {
    gap: 4px;
    display: inline-flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .skill-item {
    padding: 3px 10px;
    font-size: 11px;
    margin: 0;
  }

  /* Improve touch targets for mobile */
  .contact-item,
  .social-item {
    margin-bottom: 20px;
  }

  .icon {
    width: 40px;
    height: 40px;
  }

  /* Better project display on small screens */
  .project-banner {
    height: 160px;
  }

  /* Improve modal display on mobile */
  .modal-body {
    padding: 15px;
  }

  /* Fix font sizes for mobile */
  .project-title {
    font-size: 15px;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  /* Optimize content padding for mobile */
  .content {
    padding: 25px 15px;
  }
}