/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* --- CSS VARIABLES --- */
:root {
  --bg-color: #050505;      /* Nền đen sâu thẳm */
  --text-color: #f0f0f0;
  --main-color: #00eeff;    /* Xanh Neon */
  --gradient-color: linear-gradient(135deg, #00eeff, #b600ff); /* Gradient cực ngầu */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* --- GLOBAL STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; text-decoration: none; border: none; outline: none; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg-color); color: var(--text-color); overflow-x: hidden; cursor: none; /* Ẩn chuột mặc định */ }

/* CUSTOM CURSOR */
.cursor-dot { width: 8px; height: 8px; background: var(--main-color); border-radius: 50%; position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); z-index: 9999; pointer-events: none; box-shadow: 0 0 10px var(--main-color); transition: width 0.2s, height 0.2s; }
.cursor-outline { width: 40px; height: 40px; border: 1px solid rgba(0, 238, 255, 0.5); border-radius: 50%; position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); z-index: 9998; pointer-events: none; transition: top 0.1s, left 0.1s, width 0.2s, height 0.2s, background 0.2s; }

/* AMBIENT BG BLOBS (Ánh sáng mờ nghệ thuật) */
.ambient-blob { position: fixed; width: 40vw; height: 40vw; border-radius: 50%; filter: blur(150px); z-index: -2; pointer-events: none; opacity: 0.6; animation: blobMove 20s infinite alternate ease-in-out;}
.blob-1 { top: -10%; left: -10%; background: rgba(0, 238, 255, 0.15); }
.blob-2 { bottom: -10%; right: -10%; background: rgba(182, 0, 255, 0.15); animation-direction: alternate-reverse;}
@keyframes blobMove { 0% { transform: scale(1) translate(0, 0); } 100% { transform: scale(1.2) translate(100px, 50px); } }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--main-color), #b600ff); border-radius: 10px; }

/* Particles Background */
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; }

/* REVEAL ANIMATIONS ON SCROLL */
.reveal { opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.2s; }
.reveal.delay-2 { transition-delay: 0.4s; }

/* Reusable Classes */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; position: relative;}
section { padding: 120px 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column;}
.heading { text-align: center; font-size: 3.5rem; margin-bottom: 70px; width: 100%; font-weight: 700; letter-spacing: -1px;}
.heading span { background: var(--gradient-color); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Glassmorphism Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 35px; background: var(--gradient-color); border-radius: 40px; font-size: 1.1rem; color: #fff; letter-spacing: 1px; font-weight: 600; transition: .4s; position: relative; overflow: hidden; z-index: 1; cursor: none;}
.btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: -1; transition: .4s; opacity: 0; }
.btn:hover::before { opacity: 0.2; }
.btn:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(182, 0, 255, 0.4); }

.btn-outline { background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid rgba(0, 238, 255, 0.4); color: var(--text-color); }
.btn-outline::before { background: var(--gradient-color); }
.btn-outline:hover { border-color: transparent; }
.btn-outline:hover::before { opacity: 1; }

/* --- NAVBAR --- */
header { position: fixed; top: 0; left: 0; width: 100%; padding: 30px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 100; transition: .4s; }
header.sticky { background: rgba(5, 5, 5, 0.8); border-bottom: 1px solid var(--glass-border); backdrop-filter: blur(15px); padding: 15px 5%; }
.logo { font-size: 2rem; color: var(--text-color); font-weight: 800; letter-spacing: -1px; cursor: none;}
.logo span { background: var(--gradient-color); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar a { font-size: 1.05rem; color: #ccc; font-weight: 500; margin-left: 40px; transition: .3s; position: relative; cursor: none;}
.navbar a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0%; height: 2px; background: var(--gradient-color); transition: .3s; }
.navbar a:hover, .navbar a.active { color: #fff; }
.navbar a:hover::after, .navbar a.active::after { width: 100%; }

/* --- HERO SECTION --- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 50px; width: 100%; }
.hero-content { flex: 1; }
.hero-content h3 { font-size: 1.5rem; font-weight: 500; margin-bottom: 10px; color: #aaa;}
.hero-content h1 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 15px; letter-spacing: -2px;}
.hero-content h3.id-tag { color: var(--text-color); font-size: 1.3rem; margin-bottom: 20px;}
.hero-content h3.id-tag span { background: var(--gradient-color); padding: 5px 15px; border-radius: 8px; color: #fff; font-size: 1rem; font-weight: 600;}
.hero-content .subtitle { font-size: 2rem; font-weight: 600; margin-bottom: 25px; min-height: 45px; }
.auto-type { background: var(--gradient-color); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-style: italic;}
.hero-content p { font-size: 1.15rem; line-height: 1.8; color: #bbb; margin-bottom: 45px; max-width: 600px;}
.btn-group { display: flex; gap: 20px; }

/* Hero Image with Glass Card */
.hero-img { flex: 1; display: flex; justify-content: center; position: relative; }
.glass-avatar-card { padding: 25px; background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform-style: preserve-3d; transition: transform 0.1s;}
.img-box { width: 350px; height: 350px; position: relative; border-radius: 20px; overflow: hidden; transform: translateZ(50px); box-shadow: 0 10px 30px rgba(0,238,255,0.2);}
.img-box img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) contrast(1.1);}

/* --- ABOUT SECTION --- */
.about-content { text-align: center; max-width: 900px; margin: 0 auto; width: 100%; }
.about-content p { font-size: 1.2rem; line-height: 1.9; color: #ccc; margin-bottom: 40px; font-weight: 300; }
.info-boxes { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 40px; }
.i-box { background: var(--glass-bg); backdrop-filter: blur(15px); padding: 35px 40px; border-radius: 20px; border: 1px solid var(--glass-border); min-width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); transition: .4s; position: relative; overflow: hidden;}
/* Hover light effect internal */
.i-box::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%); opacity: 0; transition: .5s; pointer-events: none;}
.i-box:hover::before { opacity: 1; }
.i-box:hover { transform: translateY(-10px); border-color: rgba(0, 238, 255, 0.4); box-shadow: 0 15px 40px rgba(182, 0, 255, 0.2); }
.i-box i { font-size: 2.8rem; background: var(--gradient-color); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px; }
.i-box h4 { font-size: 1.4rem; margin-bottom: 8px; color: #fff;}
.i-box span { color: #888; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;}

/* --- TIMELINE (EDUCATION) --- */
.timeline-wrap { position: relative; max-width: 1000px; margin: 0 auto; width: 100%; }
.timeline-wrap::after { content: ''; position: absolute; width: 4px; background: var(--glass-border); top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 5px;}
.timeline-item { padding: 20px 50px; position: relative; width: 50%; }
.timeline-item.left { left: 0; text-align: right;}
.timeline-item.right { left: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 24px; height: 24px; background: var(--bg-color); border: 4px solid var(--main-color); border-radius: 50%; top: 30px; z-index: 1; box-shadow: 0 0 15px var(--main-color); transition: .3s;}
.timeline-item:hover::after { background: var(--main-color); transform: scale(1.2);}
.left::after { right: -12px; }
.right::after { left: -12px; }

.timeline-content { padding: 35px 40px; background: var(--glass-bg); backdrop-filter: blur(15px); border-radius: 20px; position: relative; border: 1px solid var(--glass-border); transition: .4s; box-shadow: 0 10px 30px rgba(0,0,0,0.5);}
.timeline-content:hover { border-color: rgba(182, 0, 255, 0.5); transform: translateY(-5px); box-shadow: 0 15px 30px rgba(182, 0, 255, 0.15);}
.timeline-content h3 { font-size: 1.6rem; color: #fff; margin-bottom: 8px; font-weight: 600;}
.timeline-content h4 { font-size: 1.1rem; color: var(--main-color); margin-bottom: 20px; font-weight: 500;}
.timeline-content p { color: #bbb; font-size: 1.05rem; line-height: 1.7;}

/* --- SKILLS --- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; width: 100%; max-width: 1100px;}
.skill-col h3 { font-size: 2rem; margin-bottom: 50px; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 15px;}
.skill-col h3 i { background: var(--gradient-color); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.skill-box { margin-bottom: 35px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: 500; font-size: 1.15rem; color: #ddd;}
.skill-bar { width: 100%; height: 12px; background: rgba(255,255,255,0.05); border-radius: 20px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--gradient-color); border-radius: 20px; box-shadow: 0 0 15px rgba(0,238,255,0.5); width: 0; transition: width 2s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* --- PROJECTS --- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 50px; width: 100%; }
.portfolio-box { position: relative; border-radius: 25px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.6); border: 1px solid var(--glass-border); transition: .5s; background: var(--glass-bg); backdrop-filter: blur(15px); }
.portfolio-box:hover { transform: translateY(-15px); border-color: var(--main-color); box-shadow: 0 20px 50px rgba(0,238,255,0.2); }
.portfolio-img { width: 100%; height: 260px; overflow: hidden; position: relative;}
.portfolio-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-color), transparent); opacity: 0.5; transition: .5s;}
.portfolio-box:hover .portfolio-img::after { opacity: 0; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease;}
.portfolio-box:hover .portfolio-img img { transform: scale(1.15); }

.portfolio-layer { padding: 35px 30px; text-align: left; }
.portfolio-layer h4 { font-size: 1.7rem; margin-bottom: 15px; color: #fff; font-weight: 600;}
.portfolio-layer p { font-size: 1.1rem; color: #aaa; line-height: 1.7; margin-bottom: 25px; font-weight: 300;}
.tech-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.tech-stack span { font-size: 0.85rem; background: rgba(255, 255, 255, 0.05); color: #fff; padding: 8px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); transition: .3s;}
.portfolio-box:hover .tech-stack span { border-color: var(--main-color); color: var(--main-color);}

/* --- CONTACT --- */
.contact form { max-width: 900px; margin: 0 auto; text-align: center; width: 100%; padding: 50px; background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);}
.contact form .input-box { display: flex; justify-content: space-between; flex-wrap: wrap; }
.contact form .input-box input, .contact form textarea {
  width: 100%; padding: 20px; font-size: 1.1rem; color: var(--text-color); background: rgba(0,0,0,0.3);
  border-radius: 15px; margin-bottom: 25px; border: 1px solid var(--glass-border); transition: .4s;
}
.contact form .input-box input { width: 48%; }
.contact form .input-box input:focus, .contact form textarea:focus { border-color: var(--main-color); box-shadow: 0 0 20px rgba(0,238,255,0.2); background: rgba(0,0,0,0.5);}
.contact form textarea { resize: none; }
.contact form button { width: 100%; font-size: 1.2rem; padding: 20px; border-radius: 15px;}

/* Scroll to top */
.scroll-top { position: fixed; bottom: 40px; right: 40px; width: 60px; height: 60px; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: var(--main-color); opacity: 0; visibility: hidden; transition: .4s; z-index: 100; cursor: none;}
.scroll-top.active { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-8px); background: var(--gradient-color); color: #fff; box-shadow: 0 10px 20px rgba(182, 0, 255, 0.4); border-color: transparent;}

/* --- FOOTER --- */
footer { padding: 60px 5%; background: rgba(0,0,0,0.8); text-align: center; display: flex; flex-direction: column; align-items: center; border-top: 1px solid var(--glass-border); }
.social-icons { margin-bottom: 30px; }
.social-icons a { display: inline-flex; justify-content: center; align-items: center; width: 50px; height: 50px; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 50%; font-size: 1.3rem; color: #fff; margin: 0 12px; transition: .4s; cursor: none;}
.social-icons a:hover { background: var(--gradient-color); border-color: transparent; box-shadow: 0 10px 25px rgba(0,238,255,0.4); transform: translateY(-8px); color: #fff; }
footer p { color: #888; font-size: 1.05rem; letter-spacing: 1px;}
footer p span { color: var(--main-color); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .cursor-dot, .cursor-outline { display: none; } /* Tắt chuột nhạy trên mobile */
  body { cursor: auto; }
  .btn, .navbar a, .scroll-top, .social-icons a, .logo { cursor: pointer; }
  
  .hero { flex-direction: column-reverse; text-align: center; padding-top: 150px; gap: 50px; }
  .hero-content h1 { font-size: 3.5rem; }
  .btn-group { justify-content: center; }
  .img-box { width: 300px; height: 300px; margin: 0 auto; }
  
  .timeline-wrap::after { left: 40px; }
  .timeline-item { width: 100%; padding-left: 90px; padding-right: 0;}
  .timeline-item.right { left: 0; }
  .timeline-item.left { text-align: left; }
  .timeline-item::after { left: 28px; right: auto;}

  .skills-grid { grid-template-columns: 1fr; gap: 50px;}
  .contact form { padding: 30px 20px; }
  .contact form .input-box input { width: 100%; }

  header { padding: 20px 5%; }
  .navbar { display: none; } 
}
