:root {
    --color-bg: #0B0D17;
    --color-bg-alt: #120A21;
    --color-accent-pink: #D63384;
    --color-accent-gold: #FFD700;
    --color-accent-blue: #4D96FF;
    --color-text: #E0E0E0;
    --font-heading: 'Cinzel Decorative', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    /* Improved readability */
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .cta-button {
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0;
}

body.rtl h1,
body.rtl h2,
body.rtl h3 {
    font-family: 'Cairo', sans-serif;
}

body.rtl .subtitle {
    letter-spacing: 0;
}

/* Noise Overlay - Subtler */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.04;
    /* Reduced from 0.07 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 3D Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Use the generated galaxy background as base */
    background: url('assets/bg-galaxy.png') no-repeat center center fixed;
    background-size: cover;
}

/* Scroll Rocket Removed */

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent-gold);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-accent-pink);
    transition: width 0.2s, height 0.2s;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.shimmer-text {
    font-size: 4rem;
    background: linear-gradient(to right, var(--color-accent-gold) 20%, #fff 50%, var(--color-accent-gold) 80%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 5s linear infinite;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(11, 13, 23, 0.9), transparent);
}

.butterfly-icon {
    width: 50px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.butterfly-icon:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--color-accent-pink));
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    padding: 5px 10px;
    font-family: var(--font-body);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: var(--color-accent-gold);
    color: var(--color-bg);
}

nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--color-accent-pink);
    text-shadow: 0 0 10px var(--color-accent-pink);
}

/* Sections */
section {
    min-height: 100vh;
    padding: 100px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    /* JS will fade in */
    transform: translateY(20px);
    transition: all 1s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-container {
    max-width: 1200px;
    width: 100%;
}

/* Hero */
.hero-content {
    text-align: center;
    background: rgba(11, 13, 23, 0.4);
    /* Semi-transparent dark bg */
    backdrop-filter: blur(8px);
    /* Blur the bright background behind it */
    padding: 40px 60px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    /* Limit width */
    margin: 0 auto;
    /* Center it */
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1.5rem;
    color: var(--color-accent-blue);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-heading);
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    margin: 20px 10px;
    transition: all 0.3s ease;
    background: rgba(11, 13, 23, 0.6);
    backdrop-filter: blur(5px);
}

.cta-button:hover {
    background: var(--color-accent-gold);
    color: var(--color-bg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

/* About & Skills */
/* About & Skills - Refined Glassmorphism */
.about-grid,
.skills-grid {
    display: grid;
    gap: 40px;
    background: rgba(11, 13, 23, 0.7);
    /* Darker, more pro */
    padding: 50px;
    border-radius: 4px;
    /* Sharper corners */
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Thinner border */
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Slightly wider cards */
}

.skill-category h3 {
    color: var(--color-accent-pink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.skill-category li::before {
    content: '✦';
    color: var(--color-accent-gold);
    margin-right: 10px;
}

/* Projects (Planets) */
.projects-orbit {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.planet-card {
    width: 250px;
    height: 350px;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Individual Planet Textures */
.planet-card:nth-child(1) .planet-visual {
    background-image: url('assets/planet-blue.png');
}

.planet-card:nth-child(2) .planet-visual {
    background-image: url('assets/planet-magenta.png');
}

.planet-card:nth-child(3) .planet-visual {
    background-image: url('assets/planet-gold.png');
}

.planet-visual {
    width: 180px;
    /* Larger planets */
    height: 180px;
    border-radius: 50%;
    position: relative;
    margin-bottom: 20px;
    transition: transform 0.5s ease;
    background-size: cover !important;
    background-position: center !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    /* Shadow to make them pop */
}

/* Hide old procedural rings, we adhere to the art now */
.planet-ring {
    display: none;
}

.planet-card:hover .planet-visual {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 60px var(--color-accent-gold);
    /* Intense glow */
}

.project-info {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.planet-card:hover .project-info {
    opacity: 1;
}

/* Loading Screen */
.loader-sun {
    width: 50px;
    height: 50px;
    background: var(--color-accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--color-accent-gold);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(0.8);
        opacity: 0.5;
    }

    to {
        transform: scale(1.2);
        opacity: 1;
    }
}

@media (max-width: 768px) {

    /* Mobile Polish */
    .shimmer-text {
        font-size: 2.2rem;
    }

    header {
        padding: 15px 20px;
        background: rgba(11, 13, 23, 0.95);
    }

    /* Make nav scrollable horizontally on mobile instead of hiding */
    nav {
        overflow-x: auto;
        margin-left: 10px;
    }

    nav ul {
        display: flex;
        gap: 15px;
    }

    nav a {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    .scroll-rocket-container {
        display: none;
    }

    .about-grid,
    .skills-grid {
        padding: 25px;
    }

    section {
        padding: 80px 20px;
    }

    .planet-card {
        width: 100%;
        max-width: 320px;
    }

    /* Ensure Everything is scrollable and readable */
    * {
        cursor: auto !important;
    }
}