:root {
    --bg-gradient-1: #1a1a2e;
    --bg-gradient-2: #16213e;
    --bg-gradient-3: #0f3460;
    --text-color: #ffffff;
    --tagline-color: #a0a0a0;
    --name-gradient-1: #00d2ff;
    --name-gradient-2: #3a7bd5;
    --nav-height: 90px;
    --footer-height: 90px;
}

[data-theme="light"] {
    --bg-gradient-1: #e8f4f8;
    --bg-gradient-2: #d4e5ed;
    --bg-gradient-3: #b8d4e3;
    --text-color: #1a1a2e;
    --tagline-color: #555555;
    --name-gradient-1: #0077b6;
    --name-gradient-2: #023e8a;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    min-height: 100vh;
    height: 100vh;
    display: block;
    color: var(--text-color);
    transition: color 0.5s ease;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    z-index: -1;
    transition: background 0.5s ease;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.page-scroll {
    position: fixed;
    top: var(--nav-height);
    bottom: var(--footer-height);
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    -webkit-overflow-scrolling: touch;
}

.page-scroll > main {
    min-height: 100%;
    width: 100%;
}

/* Top Navigation - Center */
.top-nav-center {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
    max-width: calc(100% - 140px);
}

[data-theme="light"] .top-nav-center {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Top Navigation - Right (Theme Toggle) */
.top-nav-right {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
}

.nav-btn {
    background: transparent;
    border: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 25px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

[data-theme="light"] .nav-btn {
    color: var(--text-color);
}

[data-theme="light"] .nav-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Theme Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 36px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3e 50%, #1a1a2e 100%);
    border: 2px solid rgba(255, 107, 53, 0.5);
    border-radius: 36px;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3),
                0 0 20px rgba(255, 140, 66, 0.15),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.slider::before {
    content: '🌙';
    position: absolute;
    height: 28px;
    width: 28px;
    left: 4px;
    bottom: 2px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.5);
}

.slider-icon {
    font-size: 16px;
    z-index: 1;
    transition: all 0.3s ease;
}

.slider-icon.moon {
    opacity: 0.4;
    transform: scale(0.9);
}

.slider-icon.sun {
    opacity: 1;
    transform: scale(1);
}

/* When checked (light mode) */
input:checked + .slider {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d6 50%, #ffd4b8 100%);
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4),
                0 0 25px rgba(255, 140, 66, 0.2),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

input:checked + .slider::before {
    content: '☀️';
    transform: translateX(34px);
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.6);
}

input:checked + .slider .moon {
    opacity: 1;
    transform: scale(1);
}

input:checked + .slider .sun {
    opacity: 0.4;
    transform: scale(0.9);
}

.theme-switch:hover .slider {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5),
                0 0 30px rgba(255, 140, 66, 0.25),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-switch:hover .slider {
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5),
                0 0 30px rgba(255, 140, 66, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.theme-transition-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
    transform: translate(50%, -50%);
    transition: none;
    opacity: 1;
}

.theme-transition-overlay.expanding {
    transition: width 1s ease-in-out, height 1s ease-in-out;
}

.theme-transition-overlay.fading {
    transition: opacity 0.5s ease-out;
    opacity: 0;
}

.theme-transition-overlay.to-light {
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e5ed 50%, #b8d4e3 100%);
}

.theme-transition-overlay.to-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero {
    text-align: center;
    padding: 100px 2rem 150px;
    position: relative;
    z-index: 60;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-picture-container {
    width: 450px !important;
    height: 450px !important;
    min-width: 450px;
    min-height: 450px;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 3rem auto;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(0, 208, 255, 0.392), rgba(58, 123, 213, 0.3));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture-container:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.profile-picture {
    width: 430px !important;
    height: 430px !important;
    min-width: 430px;
    min-height: 430px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

[data-theme="light"] .profile-picture-container {
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.3), rgba(2, 62, 138, 0.3));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .profile-picture {
    background: linear-gradient(135deg, #b8d4e3, #d4e5ed);
}

.greeting {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.name {
    font-weight: 700;
    background: linear-gradient(90deg, var(--name-gradient-1), var(--name-gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.8;
    transition: all 0.5s ease;
    max-width: 33.33%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 25px 35px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .tagline {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.tagline .highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

[data-theme="light"] .tagline .highlight {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.email-link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.email-link:hover {
    color: #ff8555;
    text-decoration: underline;
}

[data-theme="light"] .email-link {
    color: #e55a2b;
}

[data-theme="light"] .email-link:hover {
    color: #cc4a1b;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 80px;
        --footer-height: 80px;
    }

    .top-nav-center {
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 15px;
        gap: 8px;
        max-width: calc(100% - 120px);
    }
    
    .nav-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .top-nav-right {
        top: 15px;
        right: 15px;
    }
    
    .greeting {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
        max-width: 90%;
        padding: 15px 20px;
    }
    
    .profile-picture-container {
        width: 200px !important;
        height: 200px !important;
        min-width: 200px;
        min-height: 200px;
    }
    
    .profile-picture {
        width: 180px !important;
        height: 180px !important;
        min-width: 180px;
        min-height: 180px;
    }
    
    .hero {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        padding: 100px 1rem 120px;
        min-height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        padding-bottom: 20px;
    }
    
    .social-links {
        bottom: 15px;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
}

.social-links {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 60;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .social-links {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.social-link svg {
    width: 26px;
    height: 26px;
}

/* Email */
.social-link[aria-label="Email"] {
    color: #ea4335;
}
.social-link[aria-label="Email"]:hover {
    background: rgba(234, 67, 53, 0.15);
    border-color: #ea4335;
    transform: translateY(-5px) scale(1.1);
}

/* GitHub */
.social-link[aria-label="GitHub"] {
    color: #f0f0f0;
}
[data-theme="light"] .social-link[aria-label="GitHub"] {
    color: #333;
}
.social-link[aria-label="GitHub"]:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #f0f0f0;
    transform: translateY(-5px) scale(1.1);
}
[data-theme="light"] .social-link[aria-label="GitHub"]:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #333;
}

/* LinkedIn */
.social-link[aria-label="LinkedIn"] {
    color: #0077b5;
}
.social-link[aria-label="LinkedIn"]:hover {
    background: rgba(0, 119, 181, 0.15);
    border-color: #0077b5;
    transform: translateY(-5px) scale(1.1);
}

/* LeetCode */
.social-link[aria-label="LeetCode"] {
    color: #ffa116;
}
.social-link[aria-label="LeetCode"]:hover {
    background: rgba(255, 161, 22, 0.15);
    border-color: #ffa116;
    transform: translateY(-5px) scale(1.1);
}

/* Stack Overflow */
.social-link[aria-label="Stack Overflow"] {
    color: #f48024;
}
.social-link[aria-label="Stack Overflow"]:hover {
    background: rgba(244, 128, 36, 0.15);
    border-color: #f48024;
    transform: translateY(-5px) scale(1.1);
}

@media (max-width: 768px) {
    .social-links {
        bottom: 20px;
        gap: 15px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
}
