:root {
    --bg: #ffffff;
    --bg-alt: #f3f4f6;
    --text: #111827;
    --accent: #2563eb;
}

[data-theme="dark"] {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --text: #e6edf3;
    --accent: #58a6ff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

/* ========== NAVBAR ========== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: var(--bg-alt);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

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

nav a:hover {
    color: var(--accent);
}

/* ========== HERO SECTION ========== */
.hero {
    padding: 80px 8%;
    background: linear-gradient(-45deg, var(--accent), #1e3a8a, #0d1117);
    background-size: 300% 300%;
    animation: gradient 12s infinite;
    color: white;
    min-height: 600px;
    display: flex;
    align-items: center;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero h1 .highlight {
    color: #79c0ff;
}

.hero h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    height: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn.primary {
    background: var(--accent);
    color: white;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn.secondary {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

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

/* ========== SECTIONS ========== */
.section {
    padding: 80px 8%;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text);
}

.alt-bg {
    background: var(--bg-alt);
}

/* ========== SKILLS SECTION ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.skill-card {
    padding: 25px;
    border-radius: 12px;
    background: var(--bg-alt);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.skill-card span {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

.progress {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 1.5s ease;
    border-radius: 10px;
}

.internship-card {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: var(--bg-alt);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-align: left;
}

.internship-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}
.internship-card ul {
    margin-top: 15px;
    padding-left: 20px;
    line-height: 1.7;
}

.internship-card li {
    margin-bottom: 8px;
}
.section, .internship-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* ========== PROJECTS SECTION ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    padding: 30px;
    border-radius: 12px;
    background: var(--bg-alt);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text);
}

.project-card p {
    color: var(--text);
    opacity: 0.7;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-btn {
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.project-btn.secondary {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.project-btn.secondary:hover {
    background: var(--accent);
    color: white;
}

/* ========== CONTACT SECTION ========== */
.contact-form {
    max-width: 500px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-extra {
    margin: 30px 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-icons a {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 22px;
}

.social-icons a:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* ========== SCROLL TO TOP ========== */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

#scrollToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

#scrollToTop.show {
    display: flex;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 30px;
    background: var(--bg-alt);
    border-top: 1px solid var(--accent);
}

/* ========== THEME TOGGLE ========== */
#themeToggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

#themeToggle:hover {
    color: var(--accent);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero {
        min-height: auto;
        padding: 60px 8%;
    }

    .hero-image img {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    nav a {
        font-size: 14px;
    }

    .hero {
        padding: 40px 8%;
        min-height: auto;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero h2 {
        font-size: 20px;
        height: auto;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section {
        padding: 60px 8%;
    }

    .section h2 {
        font-size: 28px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-form {
        max-width: 100%;
    }

    .social-icons {
        gap: 15px;
    }

    .social-icons a {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
