:root {
    /* Cosmic Space Theme (Default/Dark) */
    --cosmic-bg: #050508;
    --cosmic-accent: #e41f1f;
    --cosmic-primary: #e41f1f;
    --cosmic-secondary: #6c1609;
    --cosmic-text: #f2f1ed;
    --cosmic-text-muted: #f2f1ed;
    --cosmic-glow: rgba(76, 74, 159, 0.4);

    /* Cloudy Weather Theme (Light) */
    --cloudy-bg: #f0f4f8;
    --cloudy-accent: #0077b6;
    --cloudy-primary: #00b4d8;
    --cloudy-secondary: #caf0f8;
    --cloudy-text: #1b263b;
    --cloudy-text-muted: #415a77;
    --cloudy-glow: rgba(0, 180, 216, 0.2);

    /* Current Theme Variables (Controlled by JS) */
    --bg-color: var(--cosmic-bg);
    --accent-color: var(--cosmic-accent);
    --primary-color: var(--cosmic-primary);
    --secondary-color: var(--cosmic-secondary);
    --text-color: var(--cosmic-text);
    --text-muted: var(--cosmic-text-muted);
    --glow-color: var(--cosmic-glow);
    --border-color: #af5f5f;
    /* Clear cosmic border */

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg-color: var(--cloudy-bg);
    --accent-color: var(--cloudy-accent);
    --primary-color: var(--cloudy-primary);
    --secondary-color: var(--cloudy-secondary);
    --text-color: var(--cloudy-text);
    --text-muted: var(--cloudy-text-muted);
    --glow-color: var(--cloudy-glow);
    --border-color: rgba(0, 119, 182, 0.4);
    /* Clear cloudy border */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--light-theme-card, rgba(20, 20, 25, 0.7));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--border-color);
    /* Increased thickness and using variable */
    border-radius: 16px;
    padding: 1.5rem;
    /* Reduced padding */
    transition: var(--transition);
}

.light-theme .glass-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.05);
}

.glass-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 0;
    /* Reduced padding */
    background: var(--light-theme-nav, rgba(10, 10, 12, 0.8));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.light-theme .navbar {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    /* Reduced logo size */
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    /* Smaller font */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

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

.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-color);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.theme-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    background: transparent;
    /* Reveal global stars */
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 10;
    max-width: 100%;
    width: 100%;
    margin-top: 0;
}

.hero-content {
    width: 100%;
}

@keyframes animStar {
    from {
        transform: translateY(0px);
    }

    to {
        transform: translateY(-2000px);
    }
}

#stars,
#stars2,
#stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: transparent;
    transition: opacity 0.5s ease;
}

.light-theme #stars,
.light-theme #stars2,
.light-theme #stars3 {
    opacity: 0;
}

/* Cloudy Background for Light Mode */
#cloudy-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #cae9ff, #ffffff);
    z-index: -2;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.light-theme #cloudy-background {
    opacity: 1;
}

.cloud {
    position: absolute;
    background: white;
    filter: blur(60px);
    border-radius: 50%;
    opacity: 0.8;
    animation: drift 20s infinite alternate linear;
}

.cloud1 {
    width: 400px;
    height: 300px;
    top: 10%;
    left: -10%;
}

.cloud2 {
    width: 500px;
    height: 350px;
    top: 40%;
    right: -15%;
    animation-duration: 30s;
}

.cloud3 {
    width: 350px;
    height: 250px;
    bottom: 10%;
    left: 20%;
    animation-duration: 25s;
}

@keyframes drift {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100px);
    }
}

#stars {
    width: 1px;
    height: 1px;
    box-shadow: 104px 127px #FFF, 249px 767px #FFF, 1342px 1475px #FFF, 175px 1234px #FFF, 1234px 175px #FFF, 600px 800px #FFF, 200px 300px #FFF, 1500px 100px #FFF, 450px 1800px #FFF, 1900px 1200px #FFF, 765px 432px #FFF, 123px 567px #FFF, 890px 123px #FFF, 432px 1980px #FFF, 1765px 432px #FFF, 12px 1876px #FFF, 1543px 234px #FFF, 987px 1567px #FFF, 345px 876px #FFF, 1234px 567px #FFF;
    animation: animStar 50s linear infinite;
}

#stars:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 104px 127px #FFF, 249px 767px #FFF, 1342px 1475px #FFF, 175px 1234px #FFF, 1234px 175px #FFF, 600px 800px #FFF, 200px 300px #FFF, 1500px 100px #FFF, 450px 1800px #FFF, 1900px 1200px #FFF, 765px 432px #FFF, 123px 567px #FFF, 890px 123px #FFF, 432px 1980px #FFF, 1765px 432px #FFF, 12px 1876px #FFF, 1543px 234px #FFF, 987px 1567px #FFF, 345px 876px #FFF, 1234px 567px #FFF;
}

#stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 234px 456px #FFF, 123px 890px #FFF, 1567px 345px #FFF, 789px 1234px #FFF, 456px 234px #FFF, 1890px 789px #FFF, 345px 1567px #FFF, 90px 123px #FFF, 1100px 1800px #FFF, 1600px 500px #FFF, 234px 1567px #FFF, 678px 123px #FFF, 1234px 90px #FFF, 890px 1100px #FFF, 500px 1600px #FFF, 123px 678px #FFF, 1567px 234px #FFF, 789px 1890px #FFF, 456px 345px #FFF, 1890px 90px #FFF;
    animation: animStar 100s linear infinite;
}

#stars2:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 234px 456px #FFF, 123px 890px #FFF, 1567px 345px #FFF, 789px 1234px #FFF, 456px 234px #FFF, 1890px 789px #FFF, 345px 1567px #FFF, 90px 123px #FFF, 1100px 1800px #FFF, 1600px 500px #FFF, 234px 1567px #FFF, 678px 123px #FFF, 1234px 90px #FFF, 890px 1100px #FFF, 500px 1600px #FFF, 123px 678px #FFF, 1567px 234px #FFF, 789px 1890px #FFF, 456px 345px #FFF, 1890px 90px #FFF;
}

#stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 567px 123px #FFF, 890px 456px #FFF, 345px 789px #FFF, 1234px 1567px #FFF, 234px 1890px #FFF, 789px 345px #FFF, 1567px 90px #FFF, 123px 1100px #FFF, 1800px 1600px #FFF, 500px 234px #FFF, 567px 890px #FFF, 890px 345px #FFF, 345px 1234px #FFF, 1234px 234px #FFF, 234px 789px #FFF, 789px 1567px #FFF, 1567px 1890px #FFF, 123px 789px #FFF, 1100px 1567px #FFF, 1600px 123px #FFF;
    animation: animStar 150s linear infinite;
}

#stars3:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 567px 123px #FFF, 890px 456px #FFF, 345px 789px #FFF, 1234px 1567px #FFF, 234px 1890px #FFF, 789px 345px #FFF, 1567px 90px #FFF, 123px 1100px #FFF, 1800px 1600px #FFF, 500px 234px #FFF, 567px 890px #FFF, 890px 345px #FFF, 345px 1234px #FFF, 1234px 234px #FFF, 234px 789px #FFF, 789px 1567px #FFF, 1567px 1890px #FFF, 123px 789px #FFF, 1100px 1567px #FFF, 1600px 123px #FFF;
}

.hero-content h2 {
    font-size: 1.2rem;
    /* Smaller */
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 0.5rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    /* Reduced Hero text */
    font-family: 'Dancing Script', cursive;
    /* Apply cursive font */
    background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin: 0;
    font-weight: 700;
}

.alias {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: -5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

.tagline {
    font-size: 1.8rem;
    /* Slightly larger for cursive visibility */
    font-family: 'Dancing Script', cursive;
    /* Apply cursive font */
    color: var(--text-color);
    max-width: 700px;
    margin: 1.2rem auto 2.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.8rem;
    /* Reduced padding */
    border-radius: 50px;
    font-size: 0.9rem;
    /* Smaller font */
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px var(--glow-color);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: var(--glow-color);
}

/* About Section Refinement */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.about-image .image-wrapper {
    width: 300px;
    height: 400px;
    border-radius: 20px;
    position: relative;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 0 30px var(--primary-glow);
}

.about-image .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    opacity: 0.8;
    /* Increased visibility */
    box-shadow: 0 0 10px var(--glow-color);
    /* Added glow for consistency */
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    position: absolute;
    background: var(--primary);
    border: 4px solid var(--bg-dark);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    position: relative;
    border-radius: 16px;
}

.timeline-date {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Projects Grid Refined to 2xN */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.project-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    /* Added clear border */
}

.project-img {
    height: 250px;
    background: linear-gradient(45deg, var(--secondary), var(--bg-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

/* Skills Categories Refined to 2xN */
.skills-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.skill-category {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    /* Increased thickness and using variable */
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
    border-bottom: 1px solid rgba(157, 78, 221, 0.2);
    padding-bottom: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.skill-tag i {
    font-size: 0.9rem;
    color: var(--primary);
}

@media (max-width: 992px) {

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

/* Redesigned Contact Section */
.contact-content-simple {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.contact-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 150px;
    text-decoration: none;
    color: var(--text-main);
}

.contact-icon-card i {
    font-size: 2.5rem;
    color: var(--primary);
}

.contact-icon-card:hover i {
    color: var(--accent);
}

.social-links-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icon {
    font-size: 1.4rem;
    /* Reduced social icons */
    color: var(--text-muted);
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .timeline-dot {
        left: 21px !important;
    }
}

/* Meteor Cursor */
.cursor-glow {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #fff 0%, #00d2ff 50%, #3a7bd5 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #00d2ff, 0 0 30px #3a7bd5;
    transition: width 0.3s, height 0.3s, transform 0.1s ease-out;
}

.cursor-glow.hover {
    width: 40px;
    height: 40px;
    background: white;
    box-shadow: 0 0 20px #fff;
}

.meteor-particle {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #fff 0%, #00d2ff 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    filter: blur(2px);
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

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

/* Media Queries */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

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

    .nav-links {
        display: none;
    }
}
