/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  background: radial-gradient(circle at 50% 30%, #0a0f1c 0%, #000 100%);
  overflow-x: hidden;
}

/* === LIGHT TRAIL BACKGROUND === */
#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 20% 20%, #0a1328, #000);
}

/* === HEADER === */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(0,180,255,0.2);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 10px rgba(0,180,255,0.15);
}

.header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  color: #00b4ff;
  font-size: 1rem;
  font-weight: 800;
  text-shadow: 0 0 12px #00b4ff80;
}
.logo .dot {
  color: #a855f7;
}

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

.nav a {
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
  transition: all 0.3s ease;
}
.nav a:hover {
  color: #00b4ff;
  text-shadow: 0 0 10px #00b4ff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #00b4ff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* === MOBILE MENU === */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 60px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0,180,255,0.25);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,180,255,0.3);
    flex-direction: column;
    padding: 1rem 1.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    margin: 0.5rem 0;
    font-size: 1rem;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* tránh hero bị che */
body {
  padding-top: 70px;
}

/* === HERO SECTION === */
.hero {
  padding: 1rem 1rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .hero-text {
    flex: 1;
    text-align: left;
  }
  .hero-img {
    flex: 1;
    display: flex;
    justify-content: center;
    transform: rotate(6deg);
  }
}

.hero-text h1 {
  font-size: 2.3rem;
  color: #aaa;
}
.hero-text h2 {
  font-size: 1.6rem;
  margin-top: .3rem;
  color: #00b4ff;
  text-shadow: 0 0 15px #00b4ff;
}
.hero-text p {
  margin-top: 1rem;
  max-width: 420px;
  color: #bbb;
  line-height: 1.4;
  font-size: 0.95rem;
}
.highlight {
  background: linear-gradient(90deg, #00b4ff, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-primary, .btn-outline {
  text-decoration: none;
  font-weight: 600;
  padding: .8rem 1.8rem;
  border-radius: 8px;
  transition: .25s;
}
.btn-primary {
  background: linear-gradient(90deg, #00b4ff, #a855f7);
  color: #fff;
  box-shadow: 0 0 12px #00b4ff80;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 18px #00b4ffb0; }
.btn-outline {
  border: 2px solid #00b4ff;
  color: #00b4ff;
}
.btn-outline:hover {
  background: #00b4ff;
  color: #000;
  box-shadow: 0 0 18px #00b4ff;
}

/* === AVATAR === */
.hero-img { position: relative; }

.hero-img img {
  width: 230px;
  height: 230px;
  border-radius: 16px;
  border: 3px solid #00b4ff;
  box-shadow: 0 0 30px #00b4ff80;
  object-fit: cover;
  transform: rotate(5deg);
  transition: 0.4s ease;
}
.hero-img img:hover {
  transform: rotate(0deg) scale(1.05);
}
.avatar-glow {
  position: absolute;
  top: 0; left: 50%;
  width: 240px; height: 240px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0,255,255,0.35), transparent 80%);
  border-radius: 18px;
  filter: blur(45px);
  animation: glowPulse 6s infinite ease-in-out;
}
@keyframes glowPulse {
  0%,100% {opacity: 0.3; transform: translateX(-50%) scale(1);}
  50% {opacity: 0.7; transform: translateX(-50%) scale(1.2);}
}

/* === SECTION TITLES === */
.section-title {
  position: relative;
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: #00b4ff;
  text-shadow: 0 0 15px #00b4ff;
  letter-spacing: 1px;
  text-align: left;
  width: fit-content;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #00b4ff, #a855f7);
  border-radius: 2px;
  box-shadow: 0 0 8px #00b4ff80;
}

/* === PROJECTS === */
.projects {
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
}
.projects-inner {
  max-width: 900px;
  width: 100%;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,180,255,0.25);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 0 10px transparent;
  backdrop-filter: blur(4px);
}
.card:hover {
  box-shadow: 0 0 18px rgba(0,180,255,0.5);
  transform: translateY(-3px) scale(1.02);
}
.card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 0.7rem;
  height: 150px;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}
.card:hover img { opacity: 1; }
.card h3 {
  color: #00b4ff;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 8px #00b4ff70;
}
.card p {
  color: #b9b9b9;
  font-size: 0.85rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.btn-primary.small {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
}

/* === CONTACT === */
.contact {
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-inner {
  max-width: 900px;
  width: 100%;
}

.contact .section-title {
  text-align: left;
  margin-bottom: 2.5rem;
}

/* Container chính */
.contact-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,180,255,0.3);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0,180,255,0.15);
  backdrop-filter: blur(5px);
}

/* Avatar + info */
.contact-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-info {
  text-align: center;
  color: #ccc;
  font-size: 0.9rem;
}

.contact-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #00b4ff;
  box-shadow: 0 0 20px rgba(0,180,255,0.5);
  object-fit: cover;
  margin-bottom: 1rem;
}

.contact-info i {
  color: #00b4ff;
  margin-right: 8px;
}

.socials {
  margin-top: 1rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  font-size: 1.5rem;
}
.socials a {
  color: #fff;
  transition: .25s;
}
.socials a:hover {
  color: #00b4ff;
  text-shadow: 0 0 10px #00b4ff;
}

/* Gạch dọc */
.divider {
  display: none;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0,180,255,0.5), transparent);
  margin: 0 2rem;
}

/* Form */
.contact-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(0,180,255,0.2);
  border-radius: 8px;
  color: #fff;
  padding: 0.8rem;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
}
.contact-form button {
  align-self: flex-start;
  margin-top: 1rem;
}

/* === RESPONSIVE === */
@media (min-width: 768px) {
  .contact-container {
    flex-direction: row;
    align-items: stretch;
  }

  .divider {
    display: block;
    height: auto;
  }

  .contact-left, .contact-right {
    flex: 1;
  }

  .contact-info {
    text-align: center;
  }
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 2rem;
  color: #777;
  font-size: .85rem;
}

/* === RESPONSIVE === */
@media (min-width: 768px) {
  .hero-content { flex-direction: row; }
  .contact-container { flex-direction: row; align-items: flex-start; }
  .contact-info, .contact-form { flex: 1; }
}