@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a202c;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
}

body.light-theme {
    --bg-primary: #f7fafc;
    --bg-secondary: #edf2f7;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.8);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Canvas and Background */
#planetsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

body.light-theme #planetsCanvas {
    opacity: 0.2;
}

#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

body.light-theme #stars {
    opacity: 0.3;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

body.light-theme .star {
    background: var(--accent-blue);
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#meteors {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

body.light-theme #meteors {
    display: none;
}

.meteor {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, white, transparent);
    animation: meteor 2s linear;
}

@keyframes meteor {
    0% {
        transform: translateY(0) translateX(0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) translateX(300px) rotate(45deg);
        opacity: 0;
    }
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 1rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-blue);
}

.sun-icon {
    display: none;
}

body.light-theme .sun-icon {
    display: block;
}

body.light-theme .moon-icon {
    display: none;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.desktop-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--accent-blue);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.desktop-nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.mobile-nav.active {
    max-height: 300px;
}

.mobile-nav ul {
    list-style: none;
    padding: 1.5rem 2rem;
}

.mobile-nav li {
    margin: 1rem 0;
}

.mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 10;
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 0.8s ease-out;
}

.hero-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
    animation: fadeInRight 0.8s ease-out;
}

.image-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: pulse 3s infinite;
}

body.light-theme .image-glow {
    opacity: 0.2;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.profile-image {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profile-image:hover {
    transform: scale(1.05);
}

/* Sections */
.about-section, .certification-section, .contact-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1400px;
    width: 100%;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Certifications */
.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.cert-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.cert-image {
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border-radius: 1rem;
    overflow: hidden;
}

.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cert-card:hover .cert-image img {
    transform: scale(1.1);
}

.placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Contact */
.contact-email {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.email-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.email-link:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

.email-icon {
    background: var(--accent-blue);
    padding: 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-btn {
    padding: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.social-btn.linkedin {
    background: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.social-btn.github {
    background: var(--accent-purple);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    position: relative;
    z-index: 10;
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-name {
        font-size: 3.5rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

@media (max-width: 767px) {
    .header-container {
        padding: 1rem;
    }
    
    .hero {
        padding: 6rem 1rem 2rem;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .profile-image {
        width: 220px;
        height: 220px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .certification-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .hero-content {
        order: 2;
    }
    .hero-image {
        order: 1;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 1.8rem;
    }
    .about-text {
        font-size: 1rem;
        padding: 0 10px;
    }
    .email-link {
        padding: 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    .cert-card {
        margin: 0 10px;
    }
    .profile-image {
        width: 180px;
        height: 180px;
    }
}

#planetsCanvas {
    z-index: 0; 
}

section {
    scroll-margin-top: 80px;
}

body.light-theme #header {
    background: rgba(255, 255, 255, 0.8); 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); 
}

body.light-theme .desktop-nav a {
    color: #1a202c;
}

body.light-theme .desktop-nav a:hover {
    color: var(--accent-blue); 
}

body.light-theme .mobile-menu-btn span {
    background: #1a202c; 
}

body.light-theme .logo {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
}



@media (min-width: 992px) {
    .hero-container {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr; 
        align-items: center;
        gap: 2rem;
        text-align: left; 
    }

    .hero-image {
        display: flex;
        justify-content: flex-end; 
        padding-right: 50px;
    }

    .profile-image {
        width: 380px;
        height: 380px;
    }

    .hero-buttons {
        justify-content: flex-start; 
    }
}
@media (max-width: 991px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image {
        justify-content: center;
        margin-bottom: 20px;
    }
    .hero-buttons {
        justify-content: center;
    }
}