:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #17a2b8;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
}

/* Dark Mode */
body.dark-mode {
    --bg-primary: #1a1a2e;
    --bg-secondary: #0f0f1e;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
}

body.dark-mode {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.dark-mode section {
    background-color: var(--bg-primary) !important;
}

body.dark-mode .bg-light {
    background-color: var(--bg-secondary) !important;
}

body.dark-mode .skill-category,
body.dark-mode .education-card,
body.dark-mode .project-card,
body.dark-mode .award-card,
body.dark-mode .publication-card {
    background-color: var(--bg-secondary) !important;
}

body.dark-mode .skill-category,
body.dark-mode .education-card,
body.dark-mode .project-card,
body.dark-mode .award-card,
body.dark-mode .publication-card,
body.dark-mode .skill-category p,
body.dark-mode .education-card p,
body.dark-mode .project-card p,
body.dark-mode .award-card p,
body.dark-mode .publication-card p {
    color: var(--text-primary) !important;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode .publication-description {
    color: var(--text-primary) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .section-title {
    color: var(--text-primary) !important;
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary {
    color: var(--text-secondary) !important;
}

body.dark-mode footer {
    background-color: var(--bg-secondary) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .navbar {
    background-color: var(--bg-secondary) !important;
}

body.dark-mode .section-title::after {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

#theme-toggle {
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(20deg);
}

/* Dark mode specific card styling */
body.dark-mode .award-card,
body.dark-mode .publication-card {
    background-color: var(--bg-secondary) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .award-card h6,
body.dark-mode .publication-card h6,
body.dark-mode .award-card h5,
body.dark-mode .publication-card h5 {
    color: var(--text-primary) !important;
}

body.dark-mode .award-card p,
body.dark-mode .publication-card p {
    color: var(--text-secondary) !important;
}

body.dark-mode .award-image {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .tech-stack,
body.dark-mode .publication-tags {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .tech-badge {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .pub-tag {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .education-card {
    background-color: var(--bg-secondary) !important;
}

body.dark-mode .education-card strong {
    color: var(--text-primary) !important;
}

body.dark-mode .education-card p {
    color: var(--text-secondary) !important;
}

body.dark-mode .publication-link:hover h6 {
    color: #64b5f6 !important;
}

body.dark-mode .publication-header h6 {
    color: var(--text-primary) !important;
}

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

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a2e 100%);
    color: white;
    min-height: auto;
    padding: 3rem 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    animation: fadeInDown 0.8s ease-out;
    margin-bottom: 0.5rem !important;
}

.hero-section .lead {
    font-size: 1.1rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    margin-bottom: 0.5rem !important;
}

.hero-section .text-secondary {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    font-size: 0.95rem;
    margin-bottom: 1rem !important;
}

.social-links {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.social-links a {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section Styling */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

section {
    scroll-margin-top: 80px;
}

/* About Section */
#about {
    background-color: var(--light-color);
}

#about p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

#about ul {
    padding-left: 1.5rem;
}

#about li {
    margin-bottom: 0.75rem;
    color: #444;
    line-height: 1.7;
}

.education-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.education-card strong {
    font-size: 1.1rem;
    color: var(--dark-color);
}

/* Skills Section */
.skill-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.skill-category h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-category h5 i {
    margin-right: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Projects Section */
#projects {
    background-color: var(--light-color);
}

.project-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: all 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h5 {
    color: var(--dark-color);
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.project-header a {
    white-space: nowrap;
    margin-left: 1rem;
}

.project-card p {
    color: #555;
    line-height: 1.7;
}

.project-card ul {
    padding-left: 1.5rem;
    color: #666;
}

.project-card ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.tech-badge {
    display: inline-block;
    background: #e9ecef;
    color: var(--dark-color);
    padding: 0.35rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Achievements Section */
#achievements {
    background: white;
}

.award-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.award-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.award-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
}

.award-card h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 1rem;
}

.award-card .text-muted {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.award-card p {
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
}

.publication-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.publication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.publication-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    margin-right: 1rem;
}

.publication-link:hover h6 {
    color: var(--primary-color);
    cursor: pointer;
}

.publication-header h6 {
    color: var(--dark-color);
    font-weight: 700;
    margin: 0;
    transition: color 0.3s ease;
}

.publication-year {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.publication-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.publication-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.pub-tag {
    display: inline-block;
    background: #f0f0f0;
    color: var(--primary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pub-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Experience Section */
#experience {
    background-color: var(--light-color);
}

.experience-timeline {
    position: relative;
}

.experience-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.experience-card h5 {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.experience-card h6 {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1rem;
}

.experience-card p {
    color: #555;
    line-height: 1.7;
}

.experience-card ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #555;
}

.experience-card ul li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.experience-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.highlight-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Dark mode experience card styling */
body.dark-mode .experience-card {
    background-color: var(--bg-secondary) !important;
}

body.dark-mode .experience-card h5,
body.dark-mode .experience-card h6 {
    color: var(--text-primary) !important;
}

body.dark-mode .experience-card p,
body.dark-mode .experience-card ul,
body.dark-mode .experience-card li {
    color: var(--text-secondary) !important;
}

/* Contact Section */
#contact {
    background: white;
}

.contact-links {
    animation: fadeInUp 0.6s ease-out;
}

.contact-links a {
    transition: all 0.3s ease;
}

.contact-links a:hover {
    transform: translateY(-3px);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

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

    .project-header {
        flex-direction: column;
    }

    .project-header a {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .skill-tag {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .tech-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .contact-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-links a {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 400px;
    }

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

    .hero-section .lead {
        font-size: 1rem;
    }

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

    .project-card {
        padding: 1.5rem;
    }

    .education-card {
        margin-bottom: 1rem;
    }

    .skill-category {
        padding: 1rem;
    }
}

/* Navbar customization */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    margin-left: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .contact-links {
        display: none;
    }

    body {
        background: white;
    }

    .project-card,
    .education-card,
    .skill-category {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
