/* Variable definitions - Base theme (light mode) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f0f0;
    --text-primary: #222222;
    --text-secondary: #333444;
    --accent-pink: #eb008b;
    --accent-purple: #8f33c4;
    --accent-color: var(--accent-purple);
    --gradient: linear-gradient(90deg, #eb008b, #8f33c4);
    --error-color: #ff4444;
    --success-color: #00C851;
    --opacity: 0.5;

    --bg-primary-rgb: 255, 255, 255;
    --bg-secondary-rgb: 240, 240, 240;
    --orb-primary: 0.5;
}

/* Dark theme variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: var(--accent-pink);
    --gradient: linear-gradient(-90deg, #eb008b, #8f33c4);
    --opacity: 0.3;

    --bg-primary-rgb: 26, 26, 26;
    --bg-secondary-rgb: 45, 45, 45;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segue UI', Roboto, Oxygen, Ubuntu, Cantrell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    position: relative;
    overflow-x: hidden;
}

/* Keyframes for orb animations */
@keyframes floatOrb1 {
    0% { transform: translate(30vw, 5vw); }
    25% { transform: translate(60vw, 10vw); }
    50% { transform: translate(55vw, 5vw); }
    75% { transform: translate(5vw, 10vw); }
    100% { transform: translate(30vw, 5vw); }
}

@keyframes floatOrb2 {
    0% { transform: translate(55vw, 1vw); }
    25% { transform: translate(30vw, 9vw); }
    50% { transform: translate(5vw, 5vw); }
    75% { transform: translate(60vw, 8vw); }
    100% { transform: translate(55vw, 1vw); }
}

@keyframes floatOrb3 {
    0% { transform: translate(0vw, 2vw); }
    25% { transform: translate(23vw, 11vw); }
    50% { transform: translate(55vw, 2vw); }
    75% { transform: translate(32vw, 3vw); }
    100% { transform: translate(0vw, 2vw); }
}

@keyframes floatOrb4 {
    0% { transform: translate(70vw, 16vw); }
    25% { transform: translate(0vw, 0vw); }
    50% { transform: translate(70vw, 16vw); }
    75% { transform: translate(0vw, 0vw); }
    100% { transform: translate(70vw, 16vw); }
}

/* Individual orbs with animations */
.orb-1, .orb-2, .orb-3, .orb-4 {
    content: '';
    position: fixed;
    border-radius: 45%;
    z-index: -1;
    opacity: 0.9;
    pointer-events: none;
    filter: blur(80px);
}

.orb-1 {
    background-color: rgba(235, 0, 139, var(--orb-primary));
    width: 40vw;
    height: 40vw;
    animation: floatOrb1 40s ease-in-out infinite;
}

.orb-2 {
    background-color: rgba(235, 0, 139, var(--orb-primary));
    width: 35vw;
    height: 35vw;
    animation: floatOrb2 65s ease-in-out infinite;
}

.orb-3 {
    background-color: rgba(143, 51, 196, var(--orb-primary));
    width: 45vw;
    height: 45vw;
    animation: floatOrb3 55s ease-in-out infinite;
}

.orb-4 {
    background-color: rgba(143, 51, 196, var(--orb-primary));
    width: 30vw;
    height: 30vw;
    animation: floatOrb4 70s ease-in-out infinite;
}

/* Sidebar styles */
.sidebar {
    width: 80px;
    height: 100vh;
    position: fixed;
    background-color: rgba(var(--bg-secondary-rgb), var(--opacity));
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    overflow-y: auto;

}

.nav-links {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--gradient);
    color: white;
}

.nav-links i {
    font-size: 1.5rem;
}

.bottom-controls {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 0;
    position: absolute;
    bottom: 0;
    background-color: transparent;
}

.lang-toggle, .theme-toggle {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-toggle:hover, .theme-toggle:hover {
    background: var(--gradient);
    color: white;
}

/* Main content layout */
.main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
}

section {
    min-height: 100vh;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-align: center;
}

/* Presentation Section */
#presentation {
    justify-content: center;
    text-align: center;
}

.logo-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 3px solid var(--accent-color);
}

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

.name {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-primary);
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* About Section - Made translucent */
#about {
    background-color: rgba(var(--bg-secondary-rgb), var(--opacity));
    backdrop-filter: blur(8px);
    padding: 1.5rem 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 2fr;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.about-image {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgb(0, 0, 0);
}

.tech-stack {
    background: rgb(var(--bg-primary-rgb));
    padding: 1rem;
    border-radius: 20px;
   }

.tech-stack h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-align: center;
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.tech-icons i {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-icons i:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bio {
    background: rgb(var(--bg-primary-rgb));
    padding: 2rem;
    line-height: 172%;
    border-radius: 20px;
    text-align: justify;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
}

.service-card {
    background-color: rgb(var(--bg-secondary-rgb));
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
}

.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.service-card:hover i {
    color: white;
}

/* Projects Section - Made translucent */
#projects {
    background-color: rgba(var(--bg-secondary-rgb), var(--opacity));
    backdrop-filter: blur(8px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.project-card {
    background-color: rgb(var(--bg-primary-rgb));
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: justify;
}

.project-card:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
                0 0 calc(200px) rgb(143, 51, 196);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    width: 100%;
    color: var(--text-secondary)
    background-color: rgb(var(--bg-primary-rgb));
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--text-secondary);
    border-radius: 5px;
    background-color: rgba(var(--bg-primary-rgb), calc(var(--opacity)*1.5));
    color: var(--text-primary);
}

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

.submit-btn {
    background: var(--gradient);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Form validation styles */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error-color);
}

/* Success message styles */
.success-message {
    background-color: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}


/* Mobile-first responsive design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        position: fixed;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: row;  /* Changed to row */
        justify-content: center;
        align-items: center;
        background-color: rgba(var(--bg-secondary-rgb), 0.8);
        backdrop-filter: blur(8px);
        z-index: 1000;
        padding: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 70%;  /* Adjusted width */
        position: static;
        transform: none;
        gap: 5%;  /* Use percentage for consistent spacing */
    }

    .nav-links a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .bottom-controls {
        position: static;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        width: 20%;  /* Give it a specific width */
        justify-content: flex-end;
        padding-right: 1rem;
    }

    .main-content {
        margin-left: 0;
        margin-bottom: 60px;
        width: 100%;
    }

    /* Sections */
    section {
        padding: 1rem;
        min-height: auto;
        max-height: none;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-image {
        position: static;
    }

    /* Services Grid */
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Project Cards */
    .project-card {
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
        transition: transform 0.3s ease;
    }

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

    /* Contact Form */
    .contact-form {
        width: 100%;
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 0.5rem;
    }

    /* Typography */
    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1.2rem;
    }

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

    /* Social Links */
    .social-links {
        gap: 1rem;
    }

    .social-links a {
        font-size: 1.5rem;
    }
}

/* Additional mobile-specific tweaks */
@media (max-width: 480px) {
    .logo-container {
        width: 150px;
        height: 150px;
    }

    .tech-icons {
        grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
        gap: 1rem;
    }

    .tech-icons i {
        font-size: 1.5rem;
    }
}

/* Ensure touch targets are large enough */
@media (pointer: coarse) {
    .nav-links a,
    .bottom-controls button,
    .social-links a,
    .project-card,
    .submit-btn {
        min-height: 48px;
        min-width: 48px;
    }
}