:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --dark: #1e293b;
  --light: #f8fafc;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
}

/* Navbar */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
  padding: 8rem 0 6rem;
  margin-top: 76px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: white;
  font-weight: 800;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  font-weight: 500;
}

.avatar-container {
  position: relative;
  display: inline-block;
}

.avatar-container img {
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-xl);
  transition: transform 0.3s ease;
}

.avatar-container:hover img {
  transform: scale(1.05);
}

/* Sections */
section {
  padding: 5rem 0;
}

section h2 {
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.bg-light {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

/* Cards */
.card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  background: white;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 1.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: var(--shadow-sm);
}

/* Skills */
.skill-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  background: var(--gradient-accent);
  color: white;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.skill-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Contact */
.contact-info {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.contact-info i {
  color: var(--primary);
  margin-right: 0.5rem;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  text-align: center;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero {
    padding: 6rem 0 4rem;
  }
  
  section {
    padding: 3rem 0;
  }
}

/* Loading animation */
.loading {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Print styles - Giữ nguyên màu sắc và responsive khi in/PDF */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
    -webkit-filter: none !important;
    filter: none !important;
  }
  
  html, body {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000 !important;
  }
  
  .hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    color: white !important;
    padding: 2rem 0 !important;
    margin-top: 0 !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  .hero h1, .hero h2, .hero p {
    color: white !important;
  }
  
  .hero a {
    color: white !important;
  }
  
  .navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1) !important;
  }
  
  .navbar-brand {
    color: #667eea !important;
  }
  
  .nav-link {
    color: #333 !important;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    border: none !important;
    color: white !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  .card {
    border: 1px solid #ddd !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    page-break-inside: avoid;
  }
  
  .skill-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: #667eea !important;
    color: white !important;
    border: none !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  .bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  }
  
  .contact-info {
    background: white !important;
    border: 1px solid #ddd !important;
  }
  
  footer {
    background: #333 !important;
    color: white !important;
  }
  
  footer a {
    color: white !important;
  }
  
  /* Đảm bảo responsive khi in */
  .container {
    max-width: 100% !important;
    padding: 0 15px !important;
  }
  
  .row {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  
  .col-lg-4, .col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  
  .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  
  .col-lg-8 {
    flex: 0 0 66.666667% !important;
    max-width: 66.666667% !important;
  }
  
  .col-lg-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  
  /* Ẩn các phần không cần thiết khi in */
  .btn {
    display: none !important;
  }
  
  /* Đảm bảo text có thể đọc được */
  h1, h2, h3, h4, h5, h6 {
    color: #333 !important;
    page-break-after: avoid;
  }
  
  /* Thêm margin cho các section quan trọng */
  #vision {
    margin-bottom: 5rem !important;
    padding-bottom: 4rem !important;
  }
  
  #services {
    margin-bottom: 5rem !important;
    padding-bottom: 4rem !important;
  }
  
  #projects {
    margin-bottom: 3rem !important;
    padding-bottom: 2rem !important;
  }
  
  #contact {
    margin-bottom: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Thêm khoảng cách giữa các card */
  .card {
    margin-bottom: 3rem !important;
  }
  
  /* Đảm bảo section có khoảng cách đủ */
  section {
    margin-bottom: 4rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Thêm khoảng cách cho container */
  .container {
    margin-bottom: 2rem !important;
  }
  
  /* Thêm khoảng cách cho row */
  .row {
    margin-bottom: 2rem !important;
  }
  
  p {
    color: #666 !important;
  }
  
  /* Đảm bảo logo hiển thị */
  img, svg {
    max-width: 100% !important;
    height: auto !important;
  }
}



/* Contact Section Background */
#contact {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%), 
              url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') center/cover;
  color: white;
  position: relative;
  padding: 6rem 0;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
  z-index: 1;
}

#contact .container {
  position: relative;
  z-index: 2;
}

#contact h2,
#contact h5,
#contact p,
#contact a {
  color: white !important;
}

#contact .contact-info {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border-radius: 1.5rem;
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

#contact .contact-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

#contact .contact-info:hover::before {
  transform: translateX(100%);
}

#contact .contact-info p {
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

#contact .contact-info p:hover {
  transform: translateX(10px);
  color: #fff !important;
}

#contact .contact-info i {
  transition: all 0.3s ease;
}

#contact .contact-info p:hover i {
  transform: scale(1.2);
  color: #ffd700 !important;
}

/* Contact Divider */
.contact-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}

.divider-line {
  height: 2px;
  width: 100px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  border-radius: 1px;
}

.contact-divider i {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Floating elements for decoration */
#contact::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 10%;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

#contact::before {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 5%;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
}

.language-switcher .btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.language-switcher .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.language-switcher img {
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.language-switcher .btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}

.language-switcher .btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.language-switcher .btn-outline-secondary {
  border-color: var(--secondary);
  color: var(--secondary);
}

.language-switcher .btn-outline-secondary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: white;
}