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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

header {
    background: linear-gradient(135deg, #082567 0%, #1565c0 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.4em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 20px;
}

.resume-btn {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.resume-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.header-contact {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.header-contact a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.header-contact a:hover {
    color: white;
    transform: translateY(-2px);
}

.header-contact i {
    font-size: 1.1em;
}

nav {
    background-color: #333;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-toggle {
    display: none;
}

nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    transition: background-color 0.3s;
    font-weight: 600;
}

nav a:hover {
    background-color: #082567;
}

.dark-mode-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    cursor: pointer;
    padding: 15px 25px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    line-height: 1.6;
}

.dark-mode-btn:hover {
    background-color: #082567;
}

.mode-label {
    font-size: 0.95em;
    font-weight: 500;
}

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

.skill-category h3 {
    color: #082567;
    margin-bottom: 15px;
    font-size: 1.1em;
}

body.dark-mode .skill-category h3 {
    color: #4fc3f7;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: #082567;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 500;
    transition: transform 0.2s;
}

.skill-tag:hover {
    transform: scale(1.05);
}

body.dark-mode .skill-tag {
    background-color: #0a2850;
    color: #4fc3f7;
}

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

section {
    background: white;
    margin-bottom: 40px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body.dark-mode section {
    background: #1e1e1e;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

section h2 {
    color: #082567;
    font-size: 2em;
    margin-bottom: 30px;
    border-bottom: 3px solid #082567;
    padding-bottom: 10px;
}

body.dark-mode section h2 {
    color: #4fc3f7;
    border-bottom-color: #4fc3f7;
}

.project-card, .publication-card {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

body.dark-mode .project-card,
body.dark-mode .publication-card {
    border-bottom: 1px solid #333;
}

.project-card:last-child, .publication-card:last-child {
    border-bottom: none;
}

.project-image {
    margin: 20px 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f0f0f0;
}

body.dark-mode .project-image {
    background-color: #2a2a2a;
}

.project-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.project-image figcaption,
.project-video figcaption {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.5;
}

body.dark-mode .project-image figcaption,
body.dark-mode .project-video figcaption {
    color: #a0a0a0;
}

body.dark-mode .project-card h3,
body.dark-mode .publication-card h3 {
    color: #e0e0e0;
}
.project-card h3, .publication-card h3 {
 

body.dark-mode .project-meta {
    color: #a0a0a0;
}   color: #333;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.project-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-style: italic;
}

.project-description {
    margin-bottom: 15px;
    line-height: 1.8;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.tag {
    background-color: #e8f0ff;
    color: #082567;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

body.dark-mode .tag {
    background-color: #0a2850;
    color: #4fc3f7;
}

.project-links {
    margin-top: 15px;
}

.project-links a {
    display: inline-block;
    margin-right: 15px;
    color: #082567;
    text-decoration: none;
    font-weight: 500;
}

body.dark-mode .award {
    background-color: #2a2817;
    border-left-color: #ffa500;
}

body.dark-mode .award-title {
    color: #e0e0e0;
}

body.dark-mode .award-details {
    color: #a0a0a0;
}

.project-links a {
    color: #082567;
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s;
}

body.dark-mode .project-links a {
    color: #4fc3f7;
}

.project-links a:hover {
    color: #1565c0;
    text-decoration: underline;
}

body.dark-mode .project-links a:hover {
    color: #82d4ff;
    text-decoration: underline;
}

/* Centered, smaller project video */
.project-video {
    max-width: 520px;
    margin: 12px auto 18px;
}
.project-video video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
body.dark-mode .project-video video {
    border-color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.video-modal.active { display: flex; }
.video-modal-content {
    background: #000;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    position: relative;
}
.video-modal-content video { width: 100%; height: auto; display: block; }
.video-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
}

.award {
    background-color: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.award-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.award-details {
    color: #666;
    font-size: 0.95em;
}

/* Education card styling */
.edu-card {
    background-color: #f7f7fb;
    border: 1px solid #e0e0ef;
    padding: 16px;
    border-radius: 6px;
    margin-top: 10px;
}

.edu-card h3 {
    margin-bottom: 8px;
    color: #1f1f2e;
}

.edu-line {
    color: #333;
    margin: 6px 0;
    font-size: 0.97em;
}

body.dark-mode .edu-card {
    background-color: #1c1c24;
    border-color: #2f2f3a;
}

body.dark-mode .edu-card h3 {
    color: #e4e4f5;
}

body.dark-mode .edu-line {
    color: #d8d8e5;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer a {
    color: #4fc3f7;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Icon styling */
nav a i,
nav a i + span {
    margin-right: 8px;
}

.dark-mode-btn i {
    margin-right: 8px;
}

section h2 i {
    margin-right: 10px;
    color: #082567;
}

body.dark-mode section h2 i {
    color: #4fc3f7;
}

.skill-category h3 i {
    margin-right: 8px;
    color: #082567;
}

body.dark-mode .skill-category h3 i {
    color: #4fc3f7;
}

/* In Progress heading dark mode */
body.dark-mode h3[style*="color: #082567"] {
    color: #4fc3f7 !important;
    border-bottom-color: #4fc3f7 !important;
}

/* Contact section styling */
.contact-links {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 4px solid #082567;
    border-radius: 4px;
}

body.dark-mode .contact-links {
    background-color: #1e1e1e;
}

.contact-links p {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.contact-links i {
    margin-right: 12px;
    color: #4fc3f7;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.contact-links a {
    color: #4fc3f7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    text-decoration: underline;
    color: #1565c0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    nav {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    nav ul {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #333;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        width: 100%;
    }

    nav ul li {
        width: 100%;
    }

    nav ul.active {
        max-height: 500px;
    }

    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: white;
        font-size: 1.5em;
        cursor: pointer;
        padding: 15px 20px;
        margin-left: auto;
    }

    nav a {
        padding: 12px 25px;
        font-size: 0.95em;
        border-bottom: 1px solid #555;
    }

    .dark-mode-btn {
        padding: 12px 25px;
        order: 3;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        text-align: left;
        border-bottom: 1px solid #555;
    }

    .mode-label {
        display: inline;
    }

    .container {
        padding: 20px 10px;
    }

    section {
        padding: 20px;
    }
}
