/* Reset và Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #fff;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between; /* logo trái, menu phải */
  align-items: center;
  width: 100%; /* full chiều ngang */
  padding: 0 5%; /* tạo khoảng cách lề trái/phải */
  box-sizing: border-box;
  position: relative; /* đảm bảo flex hoạt động ổn định */
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d4ff;
  flex-shrink: 0; /* tránh logo bị co nhỏ khi thu hẹp màn hình */
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem; /* khoảng cách giữa các mục menu */
  margin: 0;
  padding: 0;
  flex-wrap: wrap; /* để menu tự xuống hàng nếu quá hẹp */
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #00d4ff;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 100px 20px 50px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%2300d4ff20" points="0,1000 1000,0 1000,1000"/></svg>')
    no-repeat center/cover;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: 2.8rem; /* trước đây bạn dùng 3.5rem */
  line-height: 1.2; /* thu nhỏ khoảng cách giữa các dòng */
}

.highlight {
  font-size: 2.8rem; /* đồng bộ với tiêu đề chính */
  background: linear-gradient(45deg, #00d4ff, #ff00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline; /* đảm bảo nằm cùng dòng */
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.8;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.btn {
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(45deg, #00d4ff, #0099cc);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #00d4ff;
  border: 2px solid #00d4ff;
}

.btn-secondary:hover {
  background: #00d4ff;
  color: #0a0a0a;
}

.hero-image {
  flex: 1;
  text-align: center;
  animation: fadeInRight 1s ease 0.6s both;
}

.hero-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.05) rotate(5deg);
}

/* About Section */
.about {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.05);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  width: 50px;
  height: 3px;
  background: #00d4ff;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.skills h3 {
  margin-bottom: 1rem;
  color: #00d4ff;
}

.skills ul {
  list-style: none;
}

.skills li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.skills li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #00d4ff;
}

.about-image {
  display: flex;
  justify-content: center; /* căn giữa ảnh trong cột */
}

.about-image img {
  width: 80%; /* giảm kích thước tổng thể (từ 100% xuống 80%) */
  max-width: 320px; /* đảm bảo ảnh không vượt quá 320px */
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  object-fit: cover; /* tránh méo ảnh */
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.03); /* hiệu ứng nhẹ khi hover */
}
/* Projects Section */
.projects {
  padding: 100px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  color: #00d4ff;
}

.project-info p {
  margin-bottom: 1rem;
  opacity: 0.8;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-links a:hover {
  color: #ff00ff;
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.05);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #00d4ff;
  background: rgba(255, 255, 255, 0.15);
}

.contact-info h3 {
  margin-bottom: 1rem;
  color: #00d4ff;
}

.contact-info p {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

/* === Link Styling (đồng bộ toàn trang) === */
a {
  color: #00d4ff;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: #ff00ff;
  opacity: 0.9;
}

a:visited {
  color: #00a6cc;
}

/* Footer */
.footer {
  padding: 2rem 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.95);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 150px 20px 50px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }
}
@media (max-width: 768px) {
  .about-image img {
    width: 70%;
    max-width: 250px;
  }
}
