:root {
    /* Cyberpunk / Gaming Dark Theme */
    --bg-main: #0a0a0e;
    /* Deep dark blue/black */
    --bg-card: #13131c;
    /* Slightly lighter dark */
    --text-title: #F8FAFC;
    --text-body: #94a3b8;
    --border-color: #1e293b;
    --primary-color: #06b6d4;
    /* Neon Cyan */
    --primary-hover: #22d3ee;
    --bg-glass: rgba(19, 19, 28, 0.4);

    /* Cyberpunk Neon Glow */
    --neon-cyan: #0ff;
    --neon-magenta: #f0f;
    --neon-orange: #f97316;

    /* Additional variables for design system */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.4);
    --shadow-glow-hover: 0 0 25px rgba(6, 182, 212, 0.8), 0 0 10px rgba(255, 0, 255, 0.4);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --font-main: 'Outfit', sans-serif;
    --font-code: 'Fira Code', monospace;
}

body.light-mode {
    /* Light Theme Variables */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-title: #0F172A;
    --text-body: #334155;
    --border-color: #E2E8F0;
    --primary-color: #0284C7;
    --primary-hover: #0369A1;
    --bg-glass: rgba(255, 255, 255, 0.4);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.2);
    --shadow-glow-hover: 0 10px 20px rgba(2, 132, 199, 0.3);
}

body.light-mode {
    /* Background Cổng Trường (Màu Sáng) */
    background-image: 
        linear-gradient(rgba(248, 250, 252, 0.75), rgba(248, 250, 252, 0.95)),
        url('/gate/gatelight_.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.light-mode::before {
    background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, transparent 60%);
}

body.light-mode::after {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 60%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* Background Cổng Trường (Màu Tối) */
    background-image:
        linear-gradient(rgba(10, 10, 14, 0.6), rgba(10, 10, 14, 0.85)),
        url('/gate/gatedark.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Hiệu ứng Ambient Glow cho background bớt trống */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.3;
    animation: ambientFloat 20s infinite alternate ease-in-out;
    pointer-events: none;
}

body::before {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 60%);
    animation-delay: -5s;
}

/* ================= Matrix Background ================= */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Hiển thị phía trên grid nhưng dưới nội dung */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    filter: blur(2px);
}

#matrix-canvas.visible {
    opacity: 0.15;
}

body.light-mode #matrix-canvas.visible {
    opacity: 0.2; /* Tăng hiển thị một chút ở chế độ sáng */
}

body::after {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.8) 0%, transparent 60%); /* Sky blue */
    animation-duration: 25s;
}

@keyframes gridPan {
    from { background-position: 0 0; }
    to { background-position: 60px 60px; }
}

@keyframes ambientFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 10%) scale(1.1); }
    66% { transform: translate(-5%, 5%) scale(0.9); }
    100% { transform: translate(10%, -5%) scale(1.05); }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-title);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= Navbar ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(10, 10, 14, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.8rem 5%;
    background-color: rgba(10, 10, 14, 0.5);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: var(--shadow-glow);
}

body.light-mode .navbar {
    background-color: rgba(248, 250, 252, 0.3);
    border-bottom: 1px solid transparent;
}

body.light-mode .navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.theme-toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-title);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
    transform: rotate(30deg);
    background-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .theme-toggle-btn {
    background-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-title);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin-left: auto;
    margin-right: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-title);
    cursor: pointer;
}

/* ================= Hero Section ================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 60px;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 8s ease-in-out infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -5%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, rgba(248, 250, 252, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(-20px, 20px);
    }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--primary-color);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--neon-cyan), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.3));
}

body.light-mode .hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: var(--text-body);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.39);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--neon-cyan));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5), 0 0 15px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-title);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hero-graphic {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.code-block {
    background-color: #0F172A;
    /* Dark code block matches the text-title */
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1), 0 0 40px rgba(2, 132, 199, 0.2);
    position: relative;
    z-index: 2;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: var(--transition);
    text-align: left;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
}

.code-block:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02);
    box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.15), 0 0 60px rgba(2, 132, 199, 0.3);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: #EF4444;
}

.dot.yellow {
    background-color: #F59E0B;
}

.dot.green {
    background-color: #10B981;
}

.code-block pre {
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: #E2E8F0;
    overflow-x: auto;
}

.keyword {
    color: #C678DD;
}

.variable {
    color: #E5C07B;
}

.property {
    color: #E06C75;
}

.string {
    color: #98C379;
}

.number {
    color: #D19A66;
}

.method {
    color: #61AFEF;
}

.shape {
    position: absolute;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    opacity: 0.15;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 180px;
    height: 180px;
    top: -30px;
    right: 10px;
    transform: rotate(45deg);
}

.shape-2 {
    width: 120px;
    height: 120px;
    bottom: -20px;
    left: 10px;
    border-radius: 50%;
    animation-delay: -3s;
    background: linear-gradient(135deg, #10B981, #059669);
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* ================= Stats Section ================= */
.stats {
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4rem 5%;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-title);
}

/* ================= Common Section Styles ================= */
section {
    padding: 100px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header p {
    color: var(--text-body);
    font-size: 1.15rem;
}

/* ================= About Section ================= */
.about {
    background-color: transparent;
}

.about-description {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    text-align: justify;
    line-height: 1.8;
    color: var(--text-body);
    font-size: 1.05rem;
    padding: 0 20px;
}

.about-description p {
    margin-bottom: 1.5rem;
}

.about-quote {
    position: relative;
    padding: 2rem 2rem 2rem 3rem;
    margin: 2rem 0;
    background: rgba(6, 182, 212, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-weight: 500;
    color: var(--text-title);
    font-size: 1.1rem;
}

.about-quote::before {
    content: "\201C";
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

.about-quote .quote-author {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    text-align: right;
}

body.light-mode .about-quote {
    background: rgba(2, 132, 199, 0.05);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.about-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.light-mode .about-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card .icon {
    width: 72px;
    height: 72px;
    background-color: rgba(2, 132, 199, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.about-card:hover .icon {
    background-color: var(--primary-color);
    color: #fff;
    transform: rotate(10deg) scale(1.1);
}

.about-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* ================= Projects Section ================= */
.projects {
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

body.light-mode .project-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#mc-project-img {
    background-image: url('/mc_background/dark.webp');
    background-size: cover;
    background-position: center;
    transition: background-image 0.3s ease;
}

body.light-mode #mc-project-img {
    background-image: url('/mc_background/white.webp');
}

#web-project-img {
    background-image: url('/index/dark.webp');
    background-size: cover;
    background-position: top center;
    transition: background-image 0.3s ease;
}

body.light-mode #web-project-img {
    background-image: url('/index/white.webp');
}

#ai-project-img {
    background-image: url('/AI_images_post/dark.webp');
    background-size: cover;
    background-position: center;
    transition: background-image 0.3s ease;
}

body.light-mode #ai-project-img {
    background-image: url('/AI_images_post/white.webp');
}

.project-info {
    padding: 2rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-title);
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.project-info p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-body);
}

.btn-text {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-text:hover {
    gap: 0.8rem;
    color: var(--primary-hover);
}

/* ================= Achievements Section ================= */
.achievements {
    background-color: transparent;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.achievement-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.light-mode .achievement-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.achievement-card .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.achievement-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.achievement-card.gold .icon {
    color: #FBBF24;
    /* Amber 400 */
}

.achievement-card.gold:hover {
    box-shadow: 0 10px 25px -5px rgba(251, 191, 36, 0.4);
}

.achievement-card.silver .icon {
    color: #94A3B8;
    /* Slate 400 */
}

.achievement-card.silver:hover {
    box-shadow: 0 10px 25px -5px rgba(148, 163, 184, 0.4);
}

.achievement-card.bronze .icon {
    color: #D97706;
    /* Amber 600 */
}

.achievement-card.bronze:hover {
    box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.4);
}

.achievement-info h3 {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-title);
    font-weight: 800;
}

.achievement-info p {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-body);
}

/* ================= Members Page ================= */
.members-hero {
    padding-top: 150px;
    padding-bottom: 50px;
    text-align: center;
    background-color: transparent;
}

.members-grid-container {
    background-color: transparent;
    padding-bottom: 100px;
}

.members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 0 5%;
}

.members-grid .member-card-link {
    width: 260px;
}

.member-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    transition: var(--transition);
    /* Set for vanilla tilt / 3D effect */
    transform-style: preserve-3d;
    will-change: transform;
    opacity: 0;
    /* Cho IntersectionObserver */
    transform: translateY(40px);
}

.member-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
    text-align: center;
    padding-bottom: 1.5rem;
    height: 100%;
    position: relative;
    transform: translateZ(20px);
    /* 3D layer for card content */
    transform-style: preserve-3d;
}

body.light-mode .member-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.member-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(45deg, var(--neon-cyan), transparent, var(--neon-magenta));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.light-mode .member-card::before {
    display: none;
    /* Bỏ viền neon trong chế độ sáng */
}

.member-card-link:hover .member-card {
    box-shadow: var(--shadow-glow-hover);
    border-color: transparent;
}

.member-card-link:hover .member-card::before {
    opacity: 1;
}

.member-avatar {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background-color: var(--border-color);
    transition: var(--transition);
}

.member-card-link:hover .member-avatar {
    transform: scale(1.05);
}

.member-info {
    padding: 1.5rem 1.5rem 0;
    position: relative;
    background-color: var(--bg-card);
    z-index: 2;
}

.member-name {
    font-size: 1.4rem;
    color: var(--text-title);
    margin-bottom: 0.8rem;
}

.member-quote {
    font-size: 1.05rem;
    color: var(--text-body);
    font-style: italic;
    line-height: 1.5;
}

.member-quote::before {
    content: '"';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
}

.member-quote::after {
    content: '"';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* ================= Profile Page ================= */
.profile-section {
    padding: 120px 5% 80px;
    background-color: var(--bg-main);
    min-height: 100vh;
}

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-hover);
    transform: translateX(-5px);
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    background-color: var(--bg-card);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.profile-avatar-container {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 4px solid var(--bg-main);
}

.profile-avatar {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.profile-name {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.profile-quote-box {
    background-color: rgba(2, 132, 199, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 2.5rem;
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 2rem;
    color: rgba(2, 132, 199, 0.2);
}

.profile-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-body);
    position: relative;
    z-index: 1;
}

.profile-details h2,
.profile-achievements h2 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--text-title);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.details-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.details-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.detail-icon {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.details-list strong {
    color: var(--text-title);
    min-width: 90px;
}

.profile-details h2 i,
.profile-achievements h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.no-data {
    color: var(--text-body);
    font-style: italic;
    padding: 1rem;
    background-color: rgba(2, 132, 199, 0.05);
    border-radius: 12px;
}

.achievement-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.timeline-icon.gold {
    background-color: #FBBF24;
}

.timeline-icon.silver {
    background-color: #94A3B8;
}

.timeline-icon.bronze {
    background-color: #D97706;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.timeline-content p {
    color: var(--text-body);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .profile-avatar-container {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ================= Footer ================= */
footer {
    background-color: #0F172A;
    /* Fixed dark background for footer */
    color: #F8FAFC;
    padding: 5rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.footer-logo span {
    color: #38BDF8;
    /* Sky 400 for dark mode */
}

.footer-col p {
    color: #94A3B8;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    color: #fff;
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul a {
    color: #94A3B8;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: #38BDF8;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    color: #64748B;
}

/* ================= Responsive Design ================= */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
        gap: 3rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-graphic {
        width: 100%;
    }

    .code-block {
        transform: none;
    }

    .code-block:hover {
        transform: translateY(-5px);
    }

    .section-header h2 {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .theme-toggle-btn {
        margin-left: auto;
        margin-right: 15px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    section {
        padding: 60px 5%;
    }
}