/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #ddd;
    --accent-color: #e74c3c;
}

:root.dark-theme {
    --primary-color: #ecf0f1;
    --secondary-color: #3498db;
    --text-color: #ecf0f1;
    --light-bg: #2c3e50;
    --border-color: #444;
    --accent-color: #e74c3c;
    --bg-color: #1a1a1a;
    --card-bg: #2c3e50;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #e8f4f8;
    transition: background-color 0.3s ease, color 0.3s ease;
}

:root.dark-theme body {
    background-color: var(--bg-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

:root.dark-theme .navbar {
    background-color: #1a1a1a;
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.navbar li {
    margin: 0 1.5rem;
    transition: all 0.3s ease;
}

.navbar li:hover {
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

:root.dark-theme .hamburger span {
    background-color: var(--text-color);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-menu {
    transition: all 0.3s ease;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

:root.dark-theme .navbar a {
    color: var(--text-color);
}

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

.theme-toggle {
    position: absolute;
    right: 20px;
    background: none;
    border: 2px solid white;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

:root.dark-theme .theme-toggle {
    border-color: var(--text-color);
    color: var(--text-color);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #87CEEB 0%, #87CEEB 50%, #ADD8E6 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

:root.dark-theme .hero {
    background: linear-gradient(135deg, #4a7c8c 0%, #2c5f7a 100%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

:root.dark-theme .profile-pic {
    border-color: var(--text-color);
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.tagline {
    font-size: 1rem;
    opacity: 0.95;
    letter-spacing: 1px;
}

/* Section Styles */
section {
    margin-bottom: 4rem;
    padding: 2rem 0;
    transition: background-color 0.3s ease;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    transition: color 0.3s ease;
}

/* About Section */
.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
}

.about-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.interests {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    list-style: none;
}

.interests li {
    padding: 0.7rem 1rem;
    background-color: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

:root.dark-theme .interests li {
    background-color: var(--card-bg);
}

.interests li:before {
    content: "→ ";
    color: var(--secondary-color);
    font-weight: bold;
}

.interests li:hover {
    transform: translateX(3px);
}

/* Research Section */
.research-item {
    background-color: var(--light-bg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

:root.dark-theme .research-item {
    background-color: var(--card-bg);
}

.research-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.research-item h3 {
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.publication-detail {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.publication-detail a {
    color: var(--secondary-color);
    text-decoration: none;
}

.publication-detail a:hover {
    text-decoration: underline;
}

/* Education Section */
.education-item {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

:root.dark-theme .education-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.education-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.degree {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.institution {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.affiliation {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

:root.dark-theme .affiliation {
    color: #aaa;
}

.period {
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

:root.dark-theme .period {
    color: #777;
}

.cgpa {
    font-weight: 500;
    color: var(--accent-color);
    font-size: 0.95rem;
}

/* Experience Section */
.experience-item {
    background-color: var(--light-bg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--accent-color);
    transition: background-color 0.3s ease;
}

:root.dark-theme .experience-item {
    background-color: var(--card-bg);
}

.experience-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.role {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.experience-item .institution {
    margin-bottom: 0.5rem;
}

.instructor {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    transition: color 0.3s ease;
}

:root.dark-theme .instructor {
    color: #aaa;
}

/* Achievements Section */
.achievements-category {
    margin-bottom: 2rem;
}

.achievements-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

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

.achievements-category li {
    padding: 0.7rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.achievements-category li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Contact Section */
.contact-content {
    text-align: center;
}

.contact-info {
    font-size: 1.1rem;
    margin: 1rem 0;
    transition: color 0.3s ease;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
}

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

.social-link {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

:root.dark-theme .footer {
    background-color: #0a0a0a;
    border-top: 1px solid var(--border-color);
}

.last-updated {
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-wrapper {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
        position: relative;
    }

    .nav-menu {
        display: none !important;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        width: calc(100% - 2rem);
        background-color: var(--primary-color);
        padding: 1rem;
        border-radius: 4px;
        list-style: none;
        margin: 1rem;
        z-index: 999;
    }

    .nav-menu.active {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }

    :root.dark-theme .nav-menu {
        background-color: #1f2a36;
        border: 1px solid #32485f;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    }

    :root.dark-theme .nav-menu a {
        color: #ecf0f1;
    }

    :root.dark-theme .nav-menu a:hover {
        color: #8ecdf5;
        background-color: rgba(255, 255, 255, 0.08);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .navbar li {
        margin: 0.8rem 0;
        width: 100%;
    }

    .navbar a {
        display: block;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    .navbar a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .theme-toggle {
        position: relative;
        right: auto;
        align-self: flex-end;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

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

    .subtitle {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

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

    .social-links {
        flex-direction: column;
    }

    .social-link {
        width: 100%;
    }
}

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

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

    .subtitle {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .navbar li {
        margin: 0.3rem 0;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .navbar {
        position: static;
    }

    section {
        page-break-inside: avoid;
    }
}