/* ===== CSS VARIABLES ===== */
:root {
    /* Default Dark Theme Colors */
    --bg-primary: rgba(18, 18, 18, 0.95);
    --bg-secondary: rgba(30, 30, 30, 0.9);
    --bg-tertiary: rgba(45, 45, 45, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b3b3b3;
    --accent-primary: #ff7b7b;
    --accent-secondary: #5ee6dd;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(45deg, #ff7b7b, #5ee6dd);
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.6);
    --border-color: rgba(61, 61, 61, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent-primary: #ff6b6b;
    --accent-secondary: #4ecdc4;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --border-color: #e9ecef;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: rgba(18, 18, 18, 0.95);
    --bg-secondary: rgba(30, 30, 30, 0.9);
    --bg-tertiary: rgba(45, 45, 45, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b3b3b3;
    --accent-primary: #ff7b7b;
    --accent-secondary: #5ee6dd;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(45deg, #ff7b7b, #5ee6dd);
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.6);
    --border-color: rgba(61, 61, 61, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    cursor: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.cursor.active {
    transform: translate(-50%, -50%) scale(1.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(25px);
}

.glass-nav .nav-logo .logo-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

.glass-nav .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
}

.glass-nav .logo-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 8px;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.glass-nav .logo-link:hover .logo-glow {
    opacity: 0.3;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

.nav-logo a:hover {
    color: white;
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Home Section */
.home-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7bc4f5 0%, #775698 100%);
    position: relative;
    overflow: hidden;
}

/* Particles Animation */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#particles-canvas {
    width: 100%;
    height: 100%;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

[data-theme="dark"] .shape {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 40px;
    height: 40px;
    top: 30%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {

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

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

.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

[data-theme="dark"] .home-section::before {
    opacity: 0.1;
}

.home-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    margin-top: 80px;
}

.profile-image {
    margin-bottom: 2rem;
    margin-top: 3rem;
}

.image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 6px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    overflow: visible;
    position: relative;
}

.image-placeholder:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 5;
    position: relative;
}

/* Avatar Glow Effect */
.avatar-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(20px);
    animation: glow-pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Orbit Rings */
.orbit-ring {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 250px;
    height: 250px;
    animation: rotate 10s linear infinite;
}

.ring-2 {
    width: 300px;
    height: 300px;
    animation: rotate 15s linear infinite reverse;
}

.ring-3 {
    width: 350px;
    height: 350px;
    animation: rotate 20s linear infinite;
    border-style: dashed;
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.home-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 10;
}

/* Glitch Effect */
.glitch-effect {
    position: relative;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.glitch-effect::before,
.glitch-effect::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-effect::before {
    animation: glitch-1 2s infinite;
    color: #ff6b6b;
    z-index: -1;
}

.glitch-effect::after {
    animation: glitch-2 2s infinite;
    color: #4ecdc4;
    z-index: -2;
}

@keyframes glitch-1 {

    0%,
    14%,
    15%,
    49%,
    50%,
    99%,
    100% {
        opacity: 0;
        transform: translateX(0);
    }

    15%,
    49% {
        opacity: 1;
        transform: translateX(-2px);
    }
}

@keyframes glitch-2 {

    0%,
    19%,
    20%,
    44%,
    45%,
    99%,
    100% {
        opacity: 0;
        transform: translateX(0);
    }

    20%,
    44% {
        opacity: 1;
        transform: translateX(2px);
    }
}

/* Highlight Text */
.highlight-text {
    background: linear-gradient(45deg, #ffd700, #ff9a9a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.home-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.home-specialization {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
    animation: fadeInUp 1s ease 0.3s both;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.home-gpa {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.home-university {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.7;
    animation: fadeInUp 1s ease 0.6s both;
}

.home-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #8B5CF6, #06B6D4);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #06B6D4, #10B981);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #10B981, #F59E0B);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

/* Magnetic Button Effect */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s ease;
}

.magnetic-btn:hover {
    transform: translateY(-5px) scale(1.05);
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.magnetic-btn:hover .btn-ripple {
    transform: scale(1);
}

/* Social Links Home */
.social-links-home {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    z-index: 10;
    position: relative;
}

.social-links-home .social-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-links-home .social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.social-links-home .social-icon:hover::before {
    transform: scale(1);
}

.social-links-home .social-icon i {
    z-index: 2;
    position: relative;
    font-size: 1.2rem;
}

.social-links-home .social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Tooltip */
.social-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 25%, #10B981 50%, #F59E0B 75%, #EF4444 100%);
    border-radius: 2px;
}

/* About Section */
.about-section {
    background: var(--bg-secondary);
    padding: 100px 0;
    transition: background-color 0.3s ease;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3,
.achievements h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-text p {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.personal-info {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

[data-theme="light"] .info-item {
    background: white;
    border: none;
}

[data-theme="dark"] .info-item {
    background: #1a1a1a;
    border: 1px solid #333333;
}

.info-item:hover {
    transform: translateY(-5px);
}

[data-theme="dark"] .info-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.info-item i {
    background: linear-gradient(45deg, #8B5CF6, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    width: 20px;
}

.info-item span {
    color: var(--text-primary);
    font-weight: 500;
}

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

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

[data-theme="light"] .achievement-item {
    background: white;
}

[data-theme="dark"] .achievement-item {
    background: #1a1a1a;
    border-color: #333333;
}

.achievement-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .achievement-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.achievement-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.achievement-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* Skills Section */
.skills-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 100px 0;
    transition: background 0.3s ease;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skills-category {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    border-radius: 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    opacity: 0;
    transform: translateY(20px);
}

[data-theme="light"] .skill-item {
    background: #f8f9fa;
    border-color: #e9ecef;
}

[data-theme="dark"] .skill-item {
    background: #2d2d2d;
    border-color: #404040;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .skill-item:hover {
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .skill-item:hover {
    background: #404040;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-info {
    flex: 1;
}

.skill-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.skill-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}



/* Projects Section */
.projects-section {
    background: var(--bg-secondary);
    padding: 100px 0;
    transition: background-color 0.3s ease;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: #f0f0f0;
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    background: linear-gradient(45deg, #8B5CF6, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: linear-gradient(45deg, #10B981, #F59E0B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    background: var(--bg-primary);
    padding: 100px 0;
    transition: background-color 0.3s ease;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

[data-theme="light"] .contact-item {
    background: #f8f9fa;
    border-color: #e9ecef;
}

[data-theme="dark"] .contact-item {
    background: #1a1a1a;
    border-color: #333333;
}

.contact-item:hover {
    transform: translateX(10px);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.contact-item i {
    background: linear-gradient(45deg, #8B5CF6, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    width: 20px;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

.social-links {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

[data-theme="light"] .social-links {
    background: #f8f9fa;
    border-color: #e9ecef;
}

[data-theme="dark"] .social-links {
    background: #1a1a1a;
    border-color: #333333;
}

.social-links:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

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

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: linear-gradient(135deg, #10B981 0%, #F59E0B 50%, #EF4444 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

[data-theme="light"] .contact-form {
    background: #f8f9fa;
    border-color: #e9ecef;
}

[data-theme="dark"] .contact-form {
    background: #1a1a1a;
    border-color: #333333;
}

.contact-form:hover {
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
    color: var(--text-primary);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: white;
    border-color: #e0e0e0;
    color: #333333;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #121212;
    border-color: #333333;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

[data-theme="dark"] .footer {
    background: #0a0a0a;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .home-title {
        font-size: 2rem;
    }

    .home-subtitle {
        font-size: 1rem;
    }

    .home-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .home-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .skill-card,
    .project-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #10B981 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #0891B2 50%, #059669 100%);
}

/* ===== SPARKLES BACKGROUND ===== */
.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle-twinkle 3s infinite;
    box-shadow: 0 0 6px #ffd700;
}

.sparkle:nth-child(2n) {
    animation-delay: 0.5s;
    background: #ff6b6b;
    box-shadow: 0 0 6px #ff6b6b;
}

.sparkle:nth-child(3n) {
    animation-delay: 1s;
    background: #4ecdc4;
    box-shadow: 0 0 6px #4ecdc4;
    width: 3px;
    height: 3px;
}

.sparkle:nth-child(4n) {
    animation-delay: 1.5s;
    background: #8B5CF6;
    box-shadow: 0 0 6px #8B5CF6;
    width: 5px;
    height: 5px;
}

.sparkle:nth-child(5n) {
    animation-delay: 2s;
    background: #10B981;
    box-shadow: 0 0 6px #10B981;
}

@keyframes sparkle-twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 0.9;
        transform: scale(1);
    }
}

[data-theme="dark"] .sparkle {
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700;
}

[data-theme="dark"] .sparkle:nth-child(2n) {
    background: #ff7b7b;
    box-shadow: 0 0 10px #ff7b7b, 0 0 20px #ff7b7b;
}

[data-theme="dark"] .sparkle:nth-child(3n) {
    background: #5ee6dd;
    box-shadow: 0 0 10px #5ee6dd, 0 0 20px #5ee6dd;
}

[data-theme="dark"] .sparkle:nth-child(4n) {
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7, 0 0 20px #a855f7;
}

[data-theme="dark"] .sparkle:nth-child(5n) {
    background: #10b981;
    box-shadow: 0 0 10px #10b981, 0 0 20px #10b981;
}

/* Enhanced animation for dark mode sparkles */
[data-theme="dark"] .sparkle {
    animation: sparkle-twinkle-dark 3s infinite;
}

@keyframes sparkle-twinkle-dark {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: relative;
    width: 50px;
    height: 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px;
    margin-right: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px var(--shadow-light);
}

.theme-toggle i {
    font-size: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: var(--gradient-accent);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
}

[data-theme="dark"] .theme-toggle::before {
    transform: translateX(25px);
}

.theme-toggle .fa-sun {
    opacity: 1;
}

.theme-toggle .fa-moon {
    opacity: 0.5;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 0.5;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 1;
}