:root {
  --primary: #6c63ff;
  --secondary: #ff6584;
  --dark: #0e0e0e;
  --light: #f7fafc;
  --success: #0cce6b;
  --text: #4a5568;
  --card-bg: hsla(0, 0%, 100%, .03);
  --card-border: hsla(0, 0%, 100%, .1);

  --gradient-1: linear-gradient(45deg, #6c63ff, #764ba2);
  --gradient-2: linear-gradient(45deg, #ff6584, #ff8c69);
  --gradient-3: linear-gradient(45deg, #0cce6b, #00b4d8);
  --gradient-4: linear-gradient(45deg, #ffb700, #ff6b00);
}

* {
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--dark);
  color: var(--light);
  min-height: 100vh;
  overflow-x: hidden;
}
.auth-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.btn-3d {
  position: relative;
  display: inline-block;
  padding: 14px 38px;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(145deg, #6c63ff, #5a4ae3);
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 0 #4b3cc3, 0 0 20px rgba(108, 99, 255, 0.6);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-3d:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(108, 99, 255, 0.6),
              0 0 25px #6c63ff,
              0 0 50px #6c63ff;
}

.btn-3d:active {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #4b3cc3;
}

.login-btn {
  background: linear-gradient(145deg, #00b4ff, #0072ff);
  box-shadow: 0 8px 0 #004fc3, 0 0 20px rgba(0, 114, 255, 0.6);
}

.login-btn:hover {
  box-shadow: 0 12px 20px rgba(0, 114, 255, 0.7),
              0 0 30px #0072ff,
              0 0 50px #00b4ff;
}

.register-btn {
  background: linear-gradient(145deg, #ff4b8a, #ff0066);
  box-shadow: 0 8px 0 #c3004f, 0 0 20px rgba(255, 0, 102, 0.6);
}

.register-btn:hover {
  box-shadow: 0 12px 20px rgba(255, 0, 102, 0.7),
              0 0 30px #ff0066,
              0 0 50px #ff4b8a;
}

/* Noise & Particles */
.noise {
  background-image: url(https://grainy-gradients.vercel.app/noise.svg);
  left: 0;
  opacity: .03;
  pointer-events: none;
  top: 0;
  z-index: 1;
  height: 100%;
  position: fixed;
  width: 100%;
}

#particles-js {
  height: 100%;
  position: fixed;
  width: 100%;
  z-index: 0;
}

/* Container */
.container {
  margin: 0 auto;
  max-width: 1400px;
  padding: 3rem 20px;
  position: relative;
  z-index: 2;
}

/* Header */
.header {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 4rem;
  text-align: center;
}

.logo-container {
  margin-bottom: 2rem;
}

.logo {
  filter: drop-shadow(0 0 10px rgba(108, 99, 255, .5));
  max-width: 250px;
}

.title {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.subtitle {
  color: hsla(0, 0%, 100%, .8);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
}

.typed-text {
  color: var(--secondary);
  font-weight: 600;
}

/* Section Title */
.section-title {
  display: inline-block;
  font-size: 2rem;
  font-weight: 700;
  left: 50%;
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
  transform: translateX(-50%) !important;
}

.section-title2 {
  left: unset;
  text-align: center;
  transform: unset !important;
}

.section-title:after {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 3px;
  bottom: -10px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  width: 100%;
}

/* Projects Section */
.projects-section {
  margin-top: 3rem;
}

.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-top: 3rem;
}

.project-card {
  backdrop-filter: blur(10px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 2rem;
  position: relative;
  transition: all .3s ease;
}

.project-card:hover {
  border-color: hsla(0, 0%, 100%, .2);
  box-shadow: 0 20px 30px rgba(0, 0, 0, .2);
  transform: translateY(-10px);
}

.project-card:before {
  background: var(--gradient-1);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.project-card:nth-child(2):before {
  background: var(--gradient-2);
}

.project-card:nth-child(3):before {
  background: var(--gradient-3);
}

.project-card:nth-child(4):before {
  background: var(--gradient-4);
}

/* Project Icon */
.project-icon {
  align-items: center;
  background: var(--gradient-1);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(108, 99, 255, .3);
  display: flex;
  font-size: 1.8rem;
  height: 60px;
  justify-content: center;
  margin-bottom: 1.5rem;
  width: 60px;
}

.project-card:nth-child(2) .project-icon {
  background: var(--gradient-2);
  box-shadow: 0 10px 20px rgba(255, 101, 132, .3);
}

.project-card:nth-child(3) .project-icon {
  background: var(--gradient-3);
  box-shadow: 0 10px 20px rgba(12, 206, 107, .3);
}

.project-card:nth-child(4) .project-icon {
  background: var(--gradient-4);
  box-shadow: 0 10px 20px rgba(255, 183, 0, .3);
}

/* Project Content */
.project-title {
  color: var(--light);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.project-description {
  color: hsla(0, 0%, 100%, .7);
  flex-grow: 1;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-features {
  margin-top: 1.5rem;
}

.project-feature {
  align-items: center;
  display: flex;
  margin-bottom: .8rem;
}

.project-feature i {
  color: var(--primary);
  font-size: .9rem;
  margin-right: .8rem;
}

.project-card:nth-child(2) .project-feature i {
  color: var(--secondary);
}

.project-card:nth-child(3) .project-feature i {
  color: var(--success);
}

.project-card:nth-child(4) .project-feature i {
  color: #ffb700;
}

.project-feature-text {
  color: hsla(0, 0%, 100%, .8);
  font-size: .9rem;
}

.project-status {
  background: rgba(108, 99, 255, .2);
  border: 1px solid rgba(108, 99, 255, .3);
  border-radius: 50px;
  color: var(--primary);
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  margin-top: 1.5rem;
  padding: .5rem 1rem;
}

.project-card:nth-child(2) .project-status {
  background: rgba(255, 101, 132, .2);
  border: 1px solid rgba(255, 101, 132, .3);
  color: var(--secondary);
}

.project-card:nth-child(3) .project-status {
  background: rgba(12, 206, 107, .2);
  border: 1px solid rgba(12, 206, 107, .3);
  color: var(--success);
}

.project-card:nth-child(4) .project-status {
  background: rgba(255, 183, 0, .2);
  border: 1px solid rgba(255, 183, 0, .3);
  color: #ffb700;
}

/* Tech Stack */
.tech-stack {
  margin-top: 5rem;
  text-align: center;
}

.tech-title {
  color: hsla(0, 0%, 100%, .9);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.tech-item {
  align-items: center;
  display: flex;
  flex-direction: column;
  transition: all .3s ease;
}

.tech-item:hover {
  transform: translateY(-5px);
}

.tech-icon {
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  font-size: 2rem;
  height: 50px;       /* chỉnh nhỏ lại */
  width: 50px;        /* chỉnh nhỏ lại */
  justify-content: center;
  margin-bottom: 1rem;
  transition: all .3s ease;
  overflow: hidden;   /* tránh ảnh tràn ra ngoài */
}

.tech-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* giữ tỉ lệ logo */
  border-radius: 8px;  /* tuỳ chọn: bo góc logo */
}


.tech-item:hover .tech-icon {
  background: var(--gradient-1);
  border-color: transparent;
}

.tech-item:nth-child(2):hover .tech-icon {
  background: var(--gradient-2);
}

.tech-item:nth-child(3):hover .tech-icon {
  background: var(--gradient-3);
}

.tech-item:nth-child(4):hover .tech-icon {
  background: var(--gradient-4);
}

.tech-item:nth-child(5):hover .tech-icon {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
}

.tech-item:nth-child(6):hover .tech-icon {
  background: linear-gradient(45deg, #f857a6, #ff5858);
}

.tech-name {
  color: hsla(0, 0%, 100%, .8);
  font-size: .9rem;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 5rem;
}

.social-link {
  align-items: center;
  backdrop-filter: blur(10px);
  background: hsla(0, 0%, 100%, .05);
  border: 1px solid hsla(0, 0%, 100%, .1);
  border-radius: 50%;
  color: var(--light);
  display: inline-flex;
  font-size: 1.2rem;
  height: 45px;
  justify-content: center;
  text-decoration: none;
  transition: all .3s ease;
  width: 45px;
}

.social-link:hover {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  transform: translateY(-5px);
}

.footer {
  border-top: 1px solid hsla(0, 0%, 100%, .1);
  margin-top: 5rem;
  padding: 2rem 0;
  text-align: center;
}

.footer-text {
  color: hsla(0, 0%, 100%, .6);
  font-size: .9rem;
}

.footer_link {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer_link:hover {
  opacity: 0.8;
  text-shadow: 0 0 10px rgba(108, 99, 255, 0.7);
}


/* Glow Effects */
.glow {
  animation: pulse 8s infinite alternate;
  background: radial-gradient(circle, var(--primary) 0, rgba(108, 99, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(50px);
  height: 300px;
  opacity: .3;
  position: fixed;
  width: 300px;
  z-index: -1;
}

.glow:first-child {
  left: 10%;
  top: 20%;
}

.glow:nth-child(2) {
  animation-delay: 2s;
  background: radial-gradient(circle, var(--secondary) 0, rgba(255, 101, 132, 0) 70%);
  right: 10%;
  top: 20%;
}

.glow:nth-child(3) {
  animation-delay: 4s;
  background: radial-gradient(circle, var(--success) 0, rgba(12, 206, 107, 0) 70%);
  bottom: 20%;
  left: 30%;
}

@keyframes pulse {
  0% {
    opacity: .2;
    transform: scale(.8);
  }
  100% {
    opacity: .4;
    transform: scale(1.2);
  }
}

/* Cursor */
.custom-cursor {
  background: var(--primary);
  border-radius: 50%;
  height: 20px;
  mix-blend-mode: difference;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: width .3s, height .3s, background .3s;
  width: 20px;
  z-index: 9999;
}

.cursor-dot {
  background: #fff;
  border-radius: 50%;
  height: 5px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, -50%);
  transition: transform .1s;
  width: 5px;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 992px) {
  .title {
    font-size: 3rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .tech-grid {
    gap: 1.5rem;
  }
  .tech-icon {
    font-size: 1.5rem;
    height: 50px;
    width: 50px;
  }
}

@media (max-width: 576px) {
  .title {
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .tech-grid {
    gap: 1rem;
  }
  .tech-icon {
    font-size: 1.3rem;
    height: 45px;
    width: 45px;
  }
}
