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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    position: relative;
}

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

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s ease;
    font-weight: 500;
}

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

/* Ball Animation Toggle */
.ball-anim-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    user-select: none;
    cursor: pointer;
}

.toggle-input {
    display: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-switch {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-switch::after {
    transform: translateX(24px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content .tagline {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about {
    padding: 4rem 2rem;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 5%;
    right: 5%;
    bottom: 1rem;
    background: var(--bg-light);
    border-radius: 20px;
    z-index: 1;
    opacity: 0.9;
}

.about .container {
    position: relative;
    z-index: 1;
}

.about h2,
.projects h2,
.skills h2,
.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-dark);
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.highlight {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.highlight:hover {
    transform: translateY(-5px);
}

.highlight h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.highlight p {
    color: var(--text-light);
}

/* Projects Section */
.projects {
    padding: 4rem 2rem;
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 5%;
    right: 5%;
    bottom: 1rem;
    background: white;
    border-radius: 20px;
    z-index: 1;
    opacity: 0.9;
}

.projects .container {
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

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

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.3rem;
}

.project-card p {
    padding: 0 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.project-tags span {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* Skills Section */
.skills {
    padding: 4rem 2rem;
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 5%;
    right: 5%;
    bottom: 1rem;
    background: var(--bg-light);
    border-radius: 20px;
    z-index: 1;
    opacity: 0.9;
}

.skills .container {
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.skill-category li:last-child {
    border-bottom: none;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content .subtitle {
        font-size: 1.2rem;
    }

    .about h2,
    .projects h2,
    .skills h2,
    .contact h2 {
        font-size: 1.8rem;
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
    }
}
