:root {
  /* Color Palette */
  --blue-dark: #001233;
  --blue-medium: #002b66;
  --blue-light: #0048ff;
  --sky-blue: #87CEEB;
  --accent-yellow: #ffd700;
  
  --bg-light: #f8fafc;
  --text-dark: #0f172a;
  --text-muted-dark: #64748b;
  
  --white: #ffffff;
  --text-light: #f8fafc;
  --text-muted: #a0aec0;
  --panel: #001f4d;
  --line: rgba(255, 255, 255, 0.1);
  --line-dark-theme: rgba(226, 232, 240, 1);

  /* UI Styles */
  --radius: 18px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.12);
  
  /* Font Family */
  --font-heading: 'Be Vietnam Pro', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  height:100%; margin:0; font-family:var(--font-body);
  background:var(--blue-dark); color:var(--text-light);
  transition: background-color 0.3s ease;
}

/* ========== THEME SECTIONS (Light/Dark Alternation) ========== */
.light-section { background-color: var(--bg-light); color: var(--text-dark); }
.dark-section { background-color: var(--blue-dark); color: var(--text-light); }

/* ========== HEADER ========== */
.header-main{
  position:sticky; top:0; z-index:1000;
  background:rgba(255, 255, 255, 0.8);
  backdrop-filter:blur(12px);
  border-bottom: 1px solid var(--line-dark-theme);
  transition: background 0.3s ease, border-bottom 0.3s ease;
}
body.scrolled .header-main {
    background: rgba(0, 18, 51, 0.85);
    border-bottom: 1px solid var(--line);
}
.nav-main{
  display:flex; justify-content:space-between; align-items:center;
  max-width:1200px; margin:auto; padding:0.8rem 1.5rem;
}
.nav-main__logo{font-family: var(--font-heading); font-weight:700; font-size:1.4rem; color:var(--text-dark);}
.nav-main__list{display:flex; gap:2.8rem; list-style:none; margin:0;}
.nav-main__link{
  font-weight:600; color:var(--text-muted-dark); position:relative; padding:.3rem 0;
  transition:color .25s ease; text-decoration:none;
}
body.scrolled .nav-main__logo, body.scrolled .nav-main__toggle { color: var(--white); }
body.scrolled .nav-main__link { color: var(--text-muted); }
.nav-main__link::after{
  content:""; position:absolute; left:50%; transform: translateX(-50%); bottom:-.3rem; height:3px;
  background:var(--blue-light); width:0;
  transition:width .3s ease; border-radius:999px;
}
.nav-main__link:hover{color:var(--blue-light);}
body.scrolled .nav-main__link:hover {color: var(--accent-yellow);}
body.scrolled .nav-main__link:hover::after { background: var(--accent-yellow); }
.nav-main__link:hover::after{width:100%;}
.nav-main__toggle{display:none;font-size:28px;cursor:pointer;color:var(--text-dark);}

@media(max-width:900px){
  .nav-main__toggle{display:block;}
  .nav-main__list{
    position:absolute; top:100%; right:1.5rem; flex-direction:column; gap: 0.5rem;
    background:var(--white); border:1px solid var(--line-dark-theme);
    border-radius:var(--radius); padding:1rem; box-shadow:var(--shadow-lg);
    transform:scale(0.95); opacity:0; pointer-events:none; transition:.25s ease;
  }
  .nav-main__list li { width: 100%; }
  .nav-main__list li a { display: block; padding: 0.5rem; }
  body.scrolled .nav-main__list { background: var(--panel); border-color: var(--line); }
  .nav-main__list.open{opacity:1; pointer-events:auto; transform:scale(1);}
}


/* ========== ADVANCED ANIMATION ON SCROLL ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.skill-card, .project-card, .about-column {
    transition-delay: calc(0.1s * var(--i));
}

/* ========== ARTISTIC HERO SECTION ========== */
.hero-section {
    min-height: 100vh; display: flex; align-items: center;
    padding: 6rem 2rem 4rem; position: relative; overflow: hidden;
    background: var(--bg-light);
}
#particles-js {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.hero-container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 3rem; max-width: 1200px; width: 100%; margin: 0 auto;
    position: relative; z-index: 1;
}
.hero-content h1 {
    font-family: var(--font-heading); font-size: clamp(3.2rem, 6vw, 5.2rem);
    font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem;
}
.hero-content h1 .name-highlight {
    background: linear-gradient(90deg, #0048ff, #002b66, #87CEEB);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textGradient 5s linear infinite;
}
@keyframes textGradient {
    to { background-position: 200% center; }
}
.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 500;
    margin-bottom: 2rem; color: var(--text-muted-dark);
}
.typing-text {
    font-weight: 700; color: var(--blue-light);
    border-right: 3px solid var(--blue-light);
    animation: blinkCursor 0.8s step-end infinite;
}
@keyframes blinkCursor { 50% { border-color: transparent; } }
.hero-description {
    font-size: 1.1rem; line-height: 1.8; color: var(--text-muted-dark);
    max-width: 500px; margin-bottom: 2.5rem;
}
.btn-hero {
    padding: 1rem 2.8rem; border-radius: 50px; font-weight: 600;
    border: none; cursor: pointer; font-size: 1.1rem;
    background: var(--blue-dark); color: var(--white);
    position: relative; overflow: hidden; z-index: 1;
    transition: transform 0.3s ease;
}
.btn-hero:hover { transform: translateY(-3px); }
.btn-hero::before { /* Shimmer effect */
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}
.btn-hero:hover::before { left: 100%; }
.hero-image-wrapper {
    position: relative; width: 380px; height: 380px;
    display: flex; justify-content: center; align-items: center;
}
.hero-image-wrapper::before {
    content: ''; position: absolute; inset: -5px;
    background: conic-gradient(from 90deg, var(--blue-light), var(--sky-blue), transparent);
    border-radius: 50%; animation: rotate 4s linear infinite;
}
.hero-image-wrapper::after { /* Pulsing glow */
    content: ''; position: absolute; inset: -15px;
    background: var(--sky-blue);
    border-radius: 50%; z-index: -1;
    filter: blur(40px);
    animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
}
.hero-image-container {
    width: 100%; height: 100%; background: dark blue;
    border-radius: 50%; position: relative; z-index: 2; padding: 10px;
}
.hero-image { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
@keyframes rotate { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .hero-section { text-align: center; }
    .hero-container { flex-direction: column-reverse; gap: 2rem; }
    .hero-image-wrapper { width: 280px; height: 280px; margin-bottom: 2rem; }
    .hero-subtitle { justify-content: center; }
}

/* ========== HERO BLUE SECTION ========== */
.heroBlue-section {
  background: linear-gradient(145deg, #001233, #002b66, #003fa1);
  color: #fff; padding: 5rem 2rem; text-align: center;
  position: relative; overflow: hidden;
}
.heroBlue-inner { max-width: 750px; margin: 0 auto; z-index: 2; }
.heroBlue-title {
  font-family: var(--font-heading); font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700;
  margin-bottom: 1rem; text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  min-height: 80px;
}
#heroBlue-typewriter {
  border-right: 3px solid var(--accent-yellow); white-space: nowrap;
  overflow: hidden; animation: heroBlue-cursorBlink 0.75s step-end infinite;
}
@keyframes heroBlue-cursorBlink { 50% { border-color: transparent; } }

/* ========== SECTION DIVIDER ========== */
.section-divider { position: relative; height: 100px; width: 100%; overflow: hidden; line-height: 0; }
.section-divider svg { position: absolute; bottom: 0; left: 0; width: 100%; height: auto; }
.fill-blue-dark { fill: var(--blue-dark); }
.fill-light { fill: var(--bg-light); }


/* ========== ABOUT ME SECTION ========== */
#about-me { padding: 0; height: 90vh; }
.about-me-section {
  width: 100%; height: 100%; overflow: hidden; position: relative; display:flex;
}
.about-column {
  flex:1; height:100%; position:relative; transition:all .6s ease; cursor:pointer;
  border-right:1px solid rgba(0,0,0,0.2);
  display: flex; justify-content: center; align-items: center; text-align: center;
}
.about-column:last-child{border-right:none;}
.about-bg{
  position:absolute;top:0;left:0;width:100%;height:100%;
  background-size:cover;background-position:center;
  filter:brightness(0.6);transition: all 0.5s;
}
.about-column:hover .about-bg { transform: scale(1.05); }
.about-column .about-overlay{
  position:absolute;top:0;left:0;width:100%;height:100%;
  background:linear-gradient(to top, rgba(0,18,51,0.8), rgba(0,18,51,0.2));
}
.about-column.active .about-bg{filter:brightness(0.9);}
.about-box{
  color:#fff;width:80%;opacity:0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease; z-index: 2;
}
.about-column.active .about-box{ opacity:1; transform: translateY(0); }
.about-box h2{font-family: var(--font-heading); font-size:clamp(1.5rem, 2.2vw, 2.2rem);margin:0 0 15px;font-weight:700; text-shadow: 0 2px 10px rgba(0,0,0,0.5);}
.about-box p{font-size:clamp(0.9rem, 1.2vw, 1rem);line-height:1.7; font-weight: 400;}
.about-column:hover{flex:1.6;}
.about-bg1{background-image:url('image/about/family.jpg');}
.about-bg2{background-image:url('image/nckh/IMG_8901.JPG');}
.about-bg3{background-image:url('image/FZ/IMG_5952.JPG');}
.about-bg4{background-image:url('image/tinhoctre/IMG_2185.JPG');}


/* ========== COMMON SECTION STYLES ========== */
.section-container { padding: 80px 2rem; max-width: 1200px; margin: auto; }
.section-title {
  text-align: center; font-family:var(--font-heading); font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800; margin-bottom: 1rem;
}
.light-section .section-title { color: var(--text-dark); }
.dark-section .section-title { color: var(--white); }
.section-title span { color: var(--blue-light); }
.dark-section .section-title span { color: var(--accent-yellow); }
.section-subtitle {
  text-align: center; font-size: 1.1rem; max-width: 600px;
  margin: 0 auto 4rem; font-weight: 400;
}
.light-section .section-subtitle { color: var(--text-muted-dark); }
.dark-section .section-subtitle { color: var(--text-muted); }

/* ========== SKILLS SECTION (Light) ========== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.8rem; }
.skill-card {
  background: var(--white); border: 1px solid var(--line-dark-theme);
  padding: 2.5rem 2rem; border-radius: var(--radius); text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative; overflow: hidden;
}
.skill-card:hover {
  transform: translateY(-10px); box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}
.skill-card .icon {
  font-size: 3.8rem; color: var(--blue-light); margin-bottom: 1rem;
  transition: transform 0.3s ease;
}
.skill-card:hover .icon { transform: scale(1.1); }
.skill-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-dark); }
.skill-card p { font-size: 0.95rem; color: var(--text-muted-dark); line-height: 1.6; }

/* ========== PROJECTS SECTION (Dark) ========== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card {
  background: var(--panel); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 40px rgba(135, 206, 235, 0.25);
  border-color: var(--sky-blue);
}
.project-image { overflow: hidden; }
.project-image img {
  width: 100%; height: 220px; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.project-card:hover .project-image img { transform: scale(1.05); }
.project-content { padding: 1.5rem; }
.project-content h3 { font-family: var(--font-heading); font-size: 1.5rem; margin: 0 0 0.5rem 0; color: var(--white); }
.project-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.2rem; }
.project-tags { margin-bottom: 1.2rem; }
.project-tags span {
  display: inline-block; background: var(--blue-medium); color: var(--sky-blue);
  padding: 5px 12px; border-radius: 50px; font-size: 0.8rem;
  font-weight: 600; margin: 0 5px 5px 0;
}
.project-links a { color: var(--accent-yellow); text-decoration: none; font-weight: 600;
  margin-right: 1.5rem; transition: color 0.3s ease;
}
.project-links a:hover { color: var(--white); }
.project-links a i { margin-right: 8px; vertical-align: middle; }

/* ========== CONTACT SECTION (Dark) ========== */
.contact-form-container {
  background: var(--panel); padding: 3rem; border-radius: var(--radius);
  border: 1px solid var(--line); max-width: 700px; margin: 0 auto;
}
.form-group { margin-bottom: 1.5rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--blue-medium); color: var(--text-light);
  font-size: 1rem; font-family: var(--font-body);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--sky-blue);
  box-shadow: 0 0 15px rgba(135, 206, 235, 0.2);
}
.form-group textarea { resize: vertical; min-height: 150px; }
.btn-submit {
  width: 100%; padding: 1rem; border-radius: 10px; border: none;
  background: var(--blue-light); color: var(--white); font-size: 1.1rem;
  font-weight: 700; cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.btn-submit:hover { background: #2b6fff; transform: translateY(-3px); }


/* ========== FOOTER ========== */
.footer-main{ text-align:center; padding:40px 2rem; border-top:1px solid var(--line); }
.social-links{ display:flex; justify-content:center; gap:1rem; margin-bottom:1rem; }
.social-links a{
  display:grid; place-items:center; width:48px; height:48px;
  border-radius:50%; border:1px solid var(--line); background:var(--panel);
  color: var(--text-muted); font-size: 1.4rem; text-decoration: none;
  transition:.3s ease;
}
.social-links a:hover{
  transform:translateY(-5px); box-shadow: 0 0 20px rgba(135, 206, 235, 0.2);
  color: var(--sky-blue); border-color: var(--sky-blue);
}

/* ========== CV MODAL ========== */
.cv-modal {
  position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 18, 51, 0.8); backdrop-filter: blur(5px);
  display: none; justify-content: center; align-items: center;
  opacity: 0; transition: opacity 0.4s ease;
}
.cv-modal.show { display: flex; opacity: 1; }
.cv-modal-content {
  background-color: var(--white); padding: 20px; border-radius: var(--radius);
  width: 90%; max-width: 800px; height: 90vh; box-shadow: var(--shadow-lg);
  position: relative; transform: scale(0.9); transition: transform 0.4s ease;
}
.cv-modal.show .cv-modal-content { transform: scale(1); }
.cv-modal-close {
  position: absolute; top: 15px; right: 20px; color: #aaa;
  font-size: 32px; font-weight: bold; cursor: pointer;
}
.cv-modal-close:hover, .cv-modal-close:focus { color: var(--blue-dark); }
.cv-modal-body { width: 100%; height: calc(100% - 30px); margin-top: 15px; }
.cv-modal-body iframe { width: 100%; height: 100%; border: none; border-radius: 10px; }
/* ===== UNIFIED NAVIGATION CSS ===== */
/* ===== UNIVERSAL ATTRACTIVE MENU ===== */
/* ===== TINH CHỈNH MENU: NHỎ GỌN & XANH CYAN ===== */
:root {
    --header-height: 4.5rem; /* Giảm chiều cao xuống cho gọn */
    --brand-blue: #00adef;   /* Màu xanh chính xác từ ảnh bạn gửi */
    --text-dark: #1e293b;
    --text-gray: #64748b;
}

.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
}

/* Khi cuộn chuột */
.main-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    height: 4rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 100%;
    padding: 0 3rem; /* Khoảng cách lề vừa phải */
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO NHỎ GỌN */
.nav-logo {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.6rem; /* Giảm size logo */
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.brand-blue {
    color: var(--brand-blue);
}

/* MENU LINKS THANH THOÁT */
.nav-list {
    display: flex;
    column-gap: 2.5rem; /* Khoảng cách các mục vừa đủ */
    list-style: none;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; /* Chữ nhỏ lại xíu cho sang */
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
}

.nav-link:hover, .active-link {
    color: var(--brand-blue);
}

/* Hiệu ứng gạch chân đơn giản màu xanh */
.nav-link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .active-link::after {
    width: 100%;
}

/* MOBILE RESPONSIVE */
@media screen and (max-width: 767px) {
    .nav-container { padding: 0 1.5rem; }
    
    .nav-menu {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 4rem 0;
        text-align: center;
        transition: 0.4s;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .nav-list { flex-direction: column; row-gap: 2rem; }
    .nav-toggle { font-size: 1.5rem; color: var(--text-dark); cursor: pointer; }
    .nav-close { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; cursor: pointer; }
    .show-menu { top: 0 !important; }
}

@media screen and (min-width: 768px) {
    .nav-toggle, .nav-close { display: none; }
}

