/* =====================================================
   PORTFOLIO — Main Stylesheet
   Author: Trần Chấn Hưng
   Style: Glassmorphism / Modern
   ===================================================== */

/* ============ CSS CUSTOM PROPERTIES ============ */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0c0;
    --text-muted: #6b6b8d;
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-tertiary: #ec4899;
    --gradient-1: #667eea;
    --gradient-2: #764ba2;
    --gradient-3: #f093fb;
    --gradient-4: #f5576c;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --nav-height: 72px;
}

[data-theme="light"] {
    --bg-primary: #e8e4f0;
    --bg-secondary: #f0ecf5;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a9a;
    --accent-primary: #7c3aed;
    --accent-secondary: #4f46e5;
    --accent-tertiary: #db2777;
    --gradient-1: #a78bfa;
    --gradient-2: #8b5cf6;
    --gradient-3: #f0abfc;
    --gradient-4: #fb7185;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

::selection {
    background: var(--accent-primary);
    color: #fff;
}

/* ============ SCROLL PROGRESS BAR ============ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary), var(--gradient-1));
    z-index: 10001;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ============ CURSOR GLOW ============ */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

/* ============ ANIMATED BACKGROUND ============ */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg,
            var(--bg-primary),
            var(--bg-secondary),
            #1a0533,
            #0d1b3e,
            var(--bg-primary));
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

[data-theme="light"] .bg-gradient {
    background: linear-gradient(-45deg,
            var(--bg-primary),
            var(--bg-secondary),
            #d4c5f9,
            #c7d2fe,
            var(--bg-primary));
    background-size: 400% 400%;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bg-particles .particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ============ CONTAINER ============ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

/* ============ NAVIGATION ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    padding: 0;
    transition: all 0.4s ease;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar.scrolled {
    background: rgba(10, 10, 26, 0.85);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(232, 228, 240, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.3));
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.1) rotate(-3deg);
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.nav-link.active {
    color: var(--accent-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

.theme-icon {
    transition: transform 0.5s ease;
    display: inline-block;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(30deg);
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============ SECTIONS COMMON ============ */
.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    margin-bottom: 16px;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-top: 12px;
    line-height: 1.2;
}

.section-subtitle {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ HERO SECTION ============ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 48px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 80px;
}

.hero-badge {
    margin-bottom: 24px;
    font-size: 0.82rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.hero-name {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.hero-nickname {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
    font-style: italic;
    opacity: 0.85;
}

.hero-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    min-height: 28px;
}

.typing-cursor {
    animation: blink 1s infinite;
    color: var(--accent-primary);
    font-weight: 300;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 540px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hero Avatar */
.hero-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.avatar-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
}

.avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-primary), var(--accent-tertiary), var(--gradient-1), var(--accent-primary));
    animation: ringRotate 8s linear infinite;
    opacity: 0.6;
}

@keyframes ringRotate {
    100% {
        transform: rotate(360deg);
    }
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 4px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-secondary);
}

.avatar-status {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 3;
    background: var(--bg-primary);
    border-radius: 50%;
    padding: 4px;
}

.status-dot-lg {
    display: block;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.float-item {
    position: absolute;
    animation: floatBounce 6s ease-in-out infinite;
    font-size: 0.75rem;
    z-index: 1;
}

.float-1 {
    top: 5%;
    left: -10%;
    animation-delay: 0s;
}

.float-2 {
    top: 10%;
    right: -15%;
    animation-delay: 1.5s;
}

.float-3 {
    bottom: 15%;
    left: -5%;
    animation-delay: 3s;
}

.float-4 {
    bottom: 5%;
    right: -10%;
    animation-delay: 4.5s;
}

@keyframes floatBounce {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    animation: fadeInUp 1s ease 1.5s both;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.mouse-wheel {
    width: 3px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    animation: mouseScroll 2s ease-in-out infinite;
}

@keyframes mouseScroll {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* ============ ABOUT SECTION ============ */
.about-grid {
    display: grid;
    gap: 40px;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

.about-text p {
    margin-bottom: 16px;
}

.about-text strong {
    color: var(--text-primary);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.info-icon {
    font-size: 1.2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
    border-radius: 14px;
    flex-shrink: 0;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.info-card:hover .info-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.18));
    transform: scale(1.08);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.reveal-btn {
    color: var(--accent-primary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reveal-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.reveal-btn.revealed {
    background: transparent;
    border-color: transparent;
    color: var(--text-primary);
    cursor: default;
    padding: 0;
}

/* ============ SKILLS SECTION ============ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.skill-category {
    padding: 28px;
}

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.section-tag i {
    font-size: 0.8em;
    margin-right: 2px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-size: 0.82rem;
    padding: 6px 14px;
    cursor: default;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.skill-tag.learning {
    border-color: rgba(236, 72, 153, 0.3);
    background: rgba(236, 72, 153, 0.08);
}

.skill-tag.learning:hover {
    background: rgba(236, 72, 153, 0.15);
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

/* ============ PROJECTS SECTION ============ */
.projects-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.project-featured .project-thumbnail {
    min-height: 260px;
}

.project-thumbnail {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
}

.project-thumb-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f6f2 0%, #ede8e0 50%, #f0ece5 100%);
    padding: 30px;
}

.project-logo-img {
    max-width: 80%;
    max-height: 220px;
    object-fit: contain;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
}

.project-card:hover .project-logo-img {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 30px rgba(139, 92, 246, 0.3));
}

[data-theme="light"] .project-thumb-logo {
    background: linear-gradient(135deg, #f5f0ff 0%, #ece5ff 50%, #f8f5ff 100%);
}

.project-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    min-height: inherit;
}

.project-placeholder-icon {
    font-size: 3rem;
    color: var(--accent-primary);
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: rgba(10, 10, 26, 0.6) !important;
    border: none !important;
    border-radius: 0 !important;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link-btn {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.9rem;
}

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.15));
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-primary);
    width: fit-content;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.project-desc strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.project-features {
    list-style: none;
    padding: 0;
    margin: 4px 0 2px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.project-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-features li i {
    width: 18px;
    text-align: center;
    color: var(--accent-primary);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.project-features li strong {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tech-tag {
    padding: 3px 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-primary);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.88rem;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--accent-tertiary);
    gap: 10px;
}

/* ============ SOCIAL SECTION ============ */
#social {
    position: relative;
    overflow: hidden;
}

#social::before,
#social::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    opacity: 0.045;
    pointer-events: none;
    filter: blur(90px);
}

#social::before {
    top: 8%;
    left: -100px;
    background: var(--accent-primary);
}

#social::after {
    bottom: 8%;
    right: -100px;
    background: var(--accent-tertiary);
}

.social-section-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.social-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 40px);
}

.social-sidebar .section-header {
    text-align: left;
    margin-bottom: 20px;
}

.social-sidebar .section-title {
    font-size: 1.7rem;
}

.social-sidebar .section-tag {
    margin: 0 0 12px;
}

.social-sidebar-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 28px;
}

.social-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: #fff;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}

.social-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
    color: #fff;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.social-icon img {
    border-radius: 4px;
}

.social-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.social-card:hover::before {
    transform: scaleY(1);
}

.social-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.social-card:hover .social-icon {
    transform: scale(1.1);
}

.social-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.social-name {
    font-weight: 700;
    font-size: 1rem;
}

.social-handle {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.social-arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-card:hover .social-arrow {
    color: var(--accent-primary);
    transform: translateX(4px);
}

/* Social Card Color Effects — Default + Hover */

/* Facebook #1877F2 */
.social-card[data-color="#1877F2"] .social-icon {
    background: rgba(24, 119, 242, 0.12);
    color: #1877F2;
}

.social-card[data-color="#1877F2"]:hover {
    border-color: rgba(24, 119, 242, 0.4);
}

.social-card[data-color="#1877F2"]:hover .social-icon {
    background: rgba(24, 119, 242, 0.25);
    color: #1877F2;
}

.social-card[data-color="#1877F2"]:hover::before {
    background: #1877F2;
}

/* Zalo #0068FF */
.social-card[data-color="#0068FF"] .social-icon {
    background: rgba(0, 104, 255, 0.12);
}

.social-card[data-color="#0068FF"]:hover {
    border-color: rgba(0, 104, 255, 0.4);
}

.social-card[data-color="#0068FF"]:hover .social-icon {
    background: rgba(0, 104, 255, 0.25);
}

.social-card[data-color="#0068FF"]:hover::before {
    background: #0068FF;
}

/* TikTok #EE1D52 */
.social-card[data-color="#EE1D52"] .social-icon {
    background: rgba(238, 29, 82, 0.12);
    color: #EE1D52;
}

.social-card[data-color="#EE1D52"]:hover {
    border-color: rgba(238, 29, 82, 0.4);
}

.social-card[data-color="#EE1D52"]:hover .social-icon {
    background: rgba(238, 29, 82, 0.25);
    color: #EE1D52;
}

.social-card[data-color="#EE1D52"]:hover::before {
    background: #EE1D52;
}

/* Instagram gradient #E1306C → #F77737 → #FCAF45 → #833AB4 */
.social-card[data-color="#E1306C"] .social-icon {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.15), rgba(253, 29, 29, 0.15), rgba(252, 176, 69, 0.15));
    color: #E1306C;
}

.social-card[data-color="#E1306C"] .social-icon i {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-card[data-color="#E1306C"]:hover {
    border-color: rgba(225, 48, 108, 0.4);
}

.social-card[data-color="#E1306C"]:hover .social-icon {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.3), rgba(253, 29, 29, 0.3), rgba(252, 176, 69, 0.3));
}

.social-card[data-color="#E1306C"]:hover::before {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* Locket #FFFC00 */
.social-card[data-color="#FFFC00"] .social-icon {
    background: rgba(255, 252, 0, 0.12);
    color: #FFFC00;
}

.social-card[data-color="#FFFC00"]:hover {
    border-color: rgba(255, 252, 0, 0.35);
}

.social-card[data-color="#FFFC00"]:hover .social-icon {
    background: rgba(255, 252, 0, 0.2);
    color: #FFFC00;
}

.social-card[data-color="#FFFC00"]:hover::before {
    background: #FFFC00;
}

/* Discord #5865F2 */
.social-card[data-color="#5865F2"] .social-icon {
    background: rgba(88, 101, 242, 0.12);
    color: #5865F2;
}

.social-card[data-color="#5865F2"]:hover {
    border-color: rgba(88, 101, 242, 0.4);
}

.social-card[data-color="#5865F2"]:hover .social-icon {
    background: rgba(88, 101, 242, 0.25);
    color: #5865F2;
}

.social-card[data-color="#5865F2"]:hover::before {
    background: #5865F2;
}

/* ============ PAYMENT SECTION ============ */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.payment-card {
    padding: 28px;
    text-align: center;
}

.payment-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0.95);
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.08);
}

[data-theme="light"] .brand-logo {
    filter: brightness(1);
}

.payment-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.payment-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* QR Code */
.payment-qr {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-image {
    width: 180px;
    height: 180px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px;
    transition: transform 0.3s ease;
}

.qr-image:hover {
    transform: scale(1.05);
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.05);
    border: 2px dashed rgba(139, 92, 246, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 16px;
}

.qr-placeholder-hidden {
    display: none;
}

.qr-placeholder i {
    font-size: 2rem;
    color: var(--accent-primary);
    opacity: 0.5;
}

[data-theme="light"] .qr-image {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.payment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.payment-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    min-width: 110px;
    font-weight: 500;
}

.payment-value {
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
    margin-left: auto;
}

/* ============ FOOTER ============ */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 40px 0;
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.02) !important;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-logo-img {
    height: 28px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-heart-icon {
    color: var(--accent-primary);
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

/* ============ TOAST NOTIFICATION ============ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(34, 197, 94, 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 100000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* ============ SCROLL ANIMATIONS ============ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ PRELOADER ============ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0a0a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-terminal {
    width: 480px;
    max-width: 90vw;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dots span:nth-child(1) {
    background: #ff5f57;
}

.terminal-dots span:nth-child(2) {
    background: #ffbd2e;
}

.terminal-dots span:nth-child(3) {
    background: #28c840;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 2;
    background: #0d0d1f;
}

.terminal-line {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.terminal-line.visible {
    opacity: 1;
    transform: translateX(0);
}

.terminal-prompt {
    color: #22c55e;
    margin-right: 8px;
}

.terminal-text {
    color: #e2e8f0;
}

.terminal-success {
    color: #22c55e;
}

.terminal-final {
    color: #8b5cf6;
    font-weight: 600;
}

/* ============ STATS SECTION ============ */
.stats-section {
    padding: 50px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.stat-card:hover::after {
    width: 80px;
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    display: inline;
}

.stat-suffix {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

.stat-infinity {
    font-size: 3.5rem;
    animation: infinityPulse 2s ease-in-out infinite;
}

@keyframes infinityPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.7;
    }
}

.stat-label {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============ TIMELINE ============ */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
            transparent,
            rgba(139, 92, 246, 0.4) 15%,
            rgba(139, 92, 246, 0.4) 85%,
            transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 50px;
}

.timeline-left {
    left: 0;
    text-align: right;
    padding-right: 50px;
}

.timeline-right {
    left: 50%;
    padding-left: 50px;
}

.timeline-dot {
    position: absolute;
    top: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
    border: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 0.85rem;
    z-index: 2;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    transform: scale(1.15);
}

.timeline-left .timeline-dot {
    right: -20px;
}

.timeline-right .timeline-dot {
    left: -20px;
}

.timeline-content {
    padding: 24px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
}

.timeline-date {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.12));
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ============ 3D TILT EFFECT ============ */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease;
}

.tilt-card .tilt-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 80%);
}

.tilt-card:hover .tilt-glare {
    opacity: 1;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .hero-name {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .social-section-layout {
        grid-template-columns: 260px 1fr;
        gap: 32px;
    }

    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 26, 0.95);
        -webkit-backdrop-filter: blur(30px);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 100px 30px 30px;
        gap: 4px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }

    [data-theme="light"] .nav-menu {
        background: rgba(232, 228, 240, 0.95);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-link {
        font-size: 1rem;
        padding: 14px 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 20px 24px;
    }

    .hero-content {
        order: 2;
    }

    .hero-avatar {
        order: 1;
    }

    .hero-name {
        font-size: 2.3rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .avatar-wrapper {
        width: 220px;
        height: 220px;
    }

    .floating-elements {
        display: none;
    }

    .projects-bento {
        grid-template-columns: 1fr;
    }

    .project-featured {
        grid-template-columns: 1fr;
    }

    .social-section-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .social-sidebar {
        position: static;
        text-align: center;
    }

    .social-sidebar .section-header {
        text-align: center;
    }

    .social-sidebar-desc {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-grid {
        grid-template-columns: 1fr;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 20px;
    }

    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-number {
        font-size: 2.4rem;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 16px;
        text-align: left;
    }

    .timeline-left,
    .timeline-right {
        left: 0;
    }

    .timeline-line {
        left: 15px;
        transform: none;
    }

    .timeline-left .timeline-dot,
    .timeline-right .timeline-dot {
        left: -5px;
        right: auto;
    }

    .preloader-terminal {
        width: 90vw;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 1.9rem;
    }

    .hero-tagline {
        font-size: 0.85rem;
    }

    .hero-desc {
        font-size: 0.9rem;
    }

    .btn {
        padding: 12px 22px;
        font-size: 0.88rem;
    }

    .avatar-wrapper {
        width: 180px;
        height: 180px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 16px;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px 12px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .timeline-dot {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* ============ HACKER MODE (Konami Code Easter Egg) ============ */
.hacker-mode {
    --bg-primary: #0a0a0a !important;
    --bg-secondary: #0d1117 !important;
    --text-primary: #00ff41 !important;
    --text-secondary: #00cc33 !important;
    --accent: #00ff41 !important;
    --accent-secondary: #00cc33 !important;
}

.hacker-mode * {
    font-family: 'JetBrains Mono', monospace !important;
    border-color: rgba(0, 255, 65, 0.2) !important;
}

.hacker-mode body {
    background: #0a0a0a !important;
}

.hacker-mode .bg-gradient {
    background: linear-gradient(-45deg, #000000, #001a00, #000a00, #001100) !important;
}

.hacker-mode .highlight {
    color: #00ff41 !important;
    -webkit-text-fill-color: #00ff41 !important;
}

.hacker-mode .glass-card,
.hacker-mode .glass,
.hacker-mode .glass-pill,
.hacker-mode .glass-btn {
    background: rgba(0, 255, 65, 0.05) !important;
    border-color: rgba(0, 255, 65, 0.15) !important;
    backdrop-filter: blur(20px) !important;
}

.hacker-mode .navbar {
    background: rgba(0, 10, 0, 0.85) !important;
    border-bottom: 1px solid rgba(0, 255, 65, 0.1) !important;
}

.hacker-mode .scroll-progress {
    background: #00ff41 !important;
}

.hacker-mode .particle {
    background: #00ff41 !important;
}

.hacker-mode .avatar-ring {
    background: conic-gradient(#00ff41, #003300, #00ff41) !important;
}

.hacker-mode .cursor-glow.active {
    background: radial-gradient(circle, rgba(0, 255, 65, 0.08) 0%, transparent 70%) !important;
}

.hacker-mode .stat-number {
    background: linear-gradient(135deg, #00ff41, #00cc33) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.hacker-mode .skill-tag,
.hacker-mode .tech-tag {
    color: #00ff41 !important;
    border-color: rgba(0, 255, 65, 0.3) !important;
}

.hacker-mode .section-tag {
    color: #00ff41 !important;
}

.hacker-mode .social-card:hover {
    border-color: rgba(0, 255, 65, 0.4) !important;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1) !important;
}

.hacker-mode .footer {
    background: rgba(0, 10, 0, 0.85) !important;
    border-top: 1px solid rgba(0, 255, 65, 0.1) !important;
}

.hacker-mode::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 65, 0.02) 0px,
        rgba(0, 255, 65, 0.02) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* ============ ANTI-SELECT SENSITIVE INFO ============ */
.payment-value,
.reveal-btn.revealed {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}