/* css/style.css */

/* =========================================================
   1. CẤU HÌNH MÀU SẮC
   ========================================================= */
:root {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --text-sub: #94a3b8;
  --neon-primary: #00e5ff;
  --neon-secondary: #bb86fc;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --footer-bg: #050914;
  --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --btn-text: #0f172a;
  --chat-bg: rgba(15, 23, 42, 0.6);
  --chat-input-bg: rgba(15, 23, 42, 0.95);
  --chat-incoming-bg: rgba(255, 255, 255, 0.1);
  --chat-text: #e2e8f0;
  --chat-border: rgba(255, 255, 255, 0.1);
  --chip-bg: rgba(255, 255, 255, 0.05);
}

body.light-mode {
  --bg-color: #f0f4f8;
  --text-color: #1e293b;
  --text-sub: #475569;
  --neon-primary: #00d2ff;
  --neon-secondary: #9d4edd;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 210, 255, 0.3);
  --footer-bg: #fff;
  --card-shadow: 0 10px 30px -5px rgba(0, 210, 255, 0.15);
  --btn-text: #fff;
  --chat-bg: rgba(255, 255, 255, 0.85);
  --chat-input-bg: #f1f5f9;
  --chat-incoming-bg: rgba(0, 210, 255, 0.1);
  --chat-text: #1e293b;
  --chat-border: rgba(0, 210, 255, 0.4);
  --chip-bg: rgba(0, 210, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Be Vietnam Pro", sans-serif;
  scroll-behavior: smooth;
}
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body:not(.light-mode) {
  background-image: radial-gradient(
      circle at 10% 20%,
      rgba(187, 134, 252, 0.1) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(0, 229, 255, 0.1) 0%,
      transparent 20%
    );
}
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(0, 229, 255, 0.08),
    transparent 40%
  );
  transition: opacity 0.3s;
}
body.light-mode .cursor-glow {
  opacity: 1;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(0, 168, 255, 0.15),
    transparent 40%
  );
}

/* =========================================================
   2. NAVIGATION BAR (LUÔN HIỆN HAMBURGER)
   ========================================================= */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--neon-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Luôn hiện nút Hamburger */
.hamburger {
  display: block; /* QUAN TRỌNG */
  cursor: pointer;
  font-size: 24px;
  color: var(--text-color);
  transition: 0.3s;
}
.hamburger:hover {
  color: var(--neon-primary);
  transform: scale(1.1);
}

/* --- SIDEBAR MENU (Đã fix lỗi bị cụt) --- */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  backdrop-filter: blur(3px);
}
.side-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-color);
  border-right: 1px solid var(--glass-border);
  z-index: 1002;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
}
.side-menu.active {
  left: 0;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--glass-border);
}
.menu-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neon-primary);
  text-transform: uppercase;
}
.close-menu {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
  transition: 0.3s;
}
.close-menu:hover {
  color: var(--neon-secondary);
  transform: rotate(90deg);
}

/* Links trong Menu */
.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  display: block;
  padding: 10px 15px;
  border-radius: 10px;
  transition: 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(128, 128, 128, 0.1);
  color: var(--neon-primary);
  padding-left: 25px;
}

/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}
.theme-switch {
  display: inline-block;
  height: 30px;
  position: relative;
  width: 60px;
}
.theme-switch input {
  display: none;
}
.slider {
  background-color: #1e293b;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}
.slider .fa-sun {
  color: #94a3b8;
  font-size: 14px;
  z-index: 1;
}
.slider .fa-moon {
  color: #ff7e67;
  font-size: 14px;
  z-index: 1;
}
.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 22px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 22px;
  border-radius: 50%;
  z-index: 2;
}
input:checked + .slider {
  background-color: #cbd5e1;
}
input:checked + .slider:before {
  transform: translateX(30px);
  background-color: #ff9f43;
}
input:checked + .slider .sun-icon {
  color: #fff;
}

/* =========================================================
   3. MAIN CONTENT & FOOTER
   ========================================================= */
.container {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.profile-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 450px;
  width: 100%;
  box-shadow: var(--card-shadow);
}
.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--neon-primary);
  margin-bottom: 20px;
  object-fit: cover;
  transition: transform 0.3s;
}
body:not(.light-mode) .avatar {
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.3);
}
.avatar:hover {
  transform: scale(1.05) rotate(5deg);
}
.name {
  font-size: 2.2rem;
  margin-bottom: 5px;
  font-weight: 700;
  color: var(--neon-primary);
}
.username {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: block;
}
.bio {
  color: var(--text-color);
  margin-bottom: 30px;
  line-height: 1.6;
}
.buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 35px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  transition: 0.3s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--neon-primary);
  color: var(--btn-text);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--neon-secondary);
  color: var(--neon-secondary);
}
.btn-secondary:hover {
  background: var(--neon-secondary);
  color: #fff;
  transform: translateY(-3px);
}
.btn-fb {
  background: rgba(24, 119, 242, 0.1);
  border-color: #1877f2;
  color: #1877f2;
}
.btn-fb:hover {
  background: #1877f2;
  color: white;
  transform: translateY(-3px);
}
.btn-gh {
  background: rgba(128, 128, 128, 0.1);
  border-color: var(--text-color);
  color: var(--text-color);
}
.btn-gh:hover {
  background: var(--text-color);
  color: var(--bg-color);
  transform: translateY(-3px);
}
.btn-mail {
  background: rgba(234, 67, 53, 0.1);
  border-color: #ea4335;
  color: #ea4335;
}
.btn-mail:hover {
  background: #ea4335;
  color: white;
  transform: translateY(-3px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
}
.project-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 25px;
  border-radius: 15px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}
.project-item:hover {
  transform: translateY(-10px);
  border-color: var(--neon-primary);
}
.project-title {
  color: var(--neon-primary);
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.project-item p {
  text-align: justify;
  margin-bottom: 15px;
  line-height: 1.5;
}
.tech-stack {
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tech-stack span {
  font-size: 12px;
  background: rgba(128, 128, 128, 0.15);
  padding: 4px 10px;
  border-radius: 5px;
  color: var(--text-color);
  font-weight: 500;
  white-space: nowrap;
}
.project-item .btn {
  margin-top: auto;
  width: 100%;
}

footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--glass-border);
  padding-top: 60px;
  margin-top: auto;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}
.footer-col h4 {
  font-size: 18px;
  color: var(--neon-primary);
  margin-bottom: 25px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}
.footer-logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
}
.footer-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  color: var(--text-sub);
  text-decoration: none;
  transition: 0.3s;
  display: inline-block;
}
.footer-col ul li a:hover {
  color: var(--neon-primary);
  transform: translateX(5px);
}
.contact-info li {
  color: var(--text-sub);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.contact-info i {
  color: var(--neon-secondary);
  width: 20px;
  text-align: center;
}
.footer-socials {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.footer-socials a {
  width: 40px;
  height: 40px;
  background: rgba(128, 128, 128, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid var(--glass-border);
  transition: 0.3s;
}
.footer-socials a:hover {
  background: var(--neon-primary);
  color: #fff;
  transform: translateY(-3px);
}
.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-sub);
  font-size: 13px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .side-menu {
    width: 80%;
    max-width: 300px;
  }
  .profile-card {
    width: 90%;
    margin-top: 20px;
    padding: 30px 15px;
  }
  .name {
    font-size: 1.8rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 20px 40px;
  }
  .footer-socials,
  .contact-info li {
    justify-content: center;
  }
  .footer-logo {
    margin-bottom: 10px;
  }
}
