html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: sans-serif;
    margin: 0;
    background-color: #333;
    color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

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

header {
    background-color: #222; /* Darker background for header */
    padding: 15px 0;
    border-bottom: 1px solid #444;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* More prominent shadow for dark theme */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Increased max-width for header content */
    margin: 0 auto; /* Center the header content */
    padding: 0 40px;
}

header h1 {
    font-size: 2.8em;
    margin: 0;
    color: #f4f4f4;
}

header p {
    font-size: 1.3em;
    margin: 5px 0 0;
    color: #ccc;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 40px;
}

nav ul li a {
    text-decoration: none;
    color: #f4f4f4;
    font-weight: bold;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease, color 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
    border-bottom: 2px solid #007bff;
    color: #007bff;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #f4f4f4;
    margin: 5px 0;
}

.tab-content {
    display: none;
    padding: 20px 0;
    flex-grow: 1; /* Allow content to grow and push footer down */
}

.tab-content.active {
    display: block;
    animation: fadeInSlideUp 0.5s ease-in-out;
}

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

.intro-section {
    padding: 0 0 30px;
}

.intro-section .full-name {
    font-family: 'Georgia', serif;
    font-size: 6em;
    margin-bottom: 10px;
    font-weight: normal;
    letter-spacing: 1px;
    color: #f4f4f4;
    text-align: left;
}

.intro-section .full-name span {
    font-weight: bold;
}

.intro-section .occupation-title {
    font-size: 1.8em;
    color: #ccc;
    font-style: italic;
    text-align: left;
    margin-left: 5px;
}

section {
    margin-bottom: 30px;
}

.full-name {
    font-size: 2em;
    text-align: center;
    margin-bottom: 20px;
    color: #f4f4f4;
}

h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #f4f4f4;
    border-bottom: 2px solid transparent; /* Make border transparent */
    padding-bottom: 5px;
    background-image: linear-gradient(to right, #8a2be2, #007bff); /* Gradient background */
    background-repeat: no-repeat; /* Do not repeat the background */
    background-size: 100% 2px; /* Set background size to cover the bottom 2px */
    background-position: 0 100%; /* Position background at the bottom */
}

.about-wrapper {
    display: flex;
    align-items: flex-start; /* Align items to the start to move image up */
    justify-content: space-between;
}

.bio-details {
    flex: 1;
    margin-right: 40px;
    max-width: 65ch; /* Set max-width for readability */
}

.profile-img {
    width: 220px;
    height: 400px;
    border-radius: 15px;
    object-fit: cover; /* Ensure image is not distorted */
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
    margin-top: -50px; /* Move image up */
}

#about h2 {
    width: 200px; /* Reduced width for about section h2 */
    margin-left: 0; /* Align to left for about section h2 */
}

.job, .education-item, .publication-item {
    margin-bottom: 20px;
}

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

.skill-category h3 {
    font-size: 1.2em;
    color: #66b3ff;
}

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

.skill-category ul li {
    margin-bottom: 5px;
}

/* Contact Page Specific Styles */
.contact-section {
    text-align: center;
    padding: 40px 20px;
    background-color: #222;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(255,255,255,0.1);
}

.contact-section h2 {
    color: #66b3ff; /* Lighter blue for dark theme */
    border-bottom: 2px solid #66b3ff;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 30px;
}

.contact-details p {
    margin: 10px 0;
    font-size: 1.1em;
    line-height: 1.6;
}

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

.social-links-contact img {
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.social-links-contact img:hover {
    transform: translateY(-7px);
    filter: brightness(1.5);
}


/* Footer Styles */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    box-shadow: 0 -4px 10px rgba(255,255,255,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-left p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
}

.social-links img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.social-links img:hover {
    transform: scale(1.2);
}
.job ul {
    padding-left: 20px; /* Add some padding to the list */
}

.job ul li {
    margin-bottom: 10px; /* Space out the list items */
    line-height: 1.6; /* Improve readability */
}
#achievements ul {
    padding-left: 20px; /* Add some padding to the list */
}

#achievements ul li {
    margin-bottom: 10px; /* Space out the list items */
    line-height: 1.6; /* Improve readability */
}
.job h3 {
    font-size: 1.5em;
    color: #66b3ff; /* A lighter blue for job titles in dark theme */
    margin-bottom: 5px;
}

.job p strong {
    font-weight: bold;
    color: #f4f4f4;
}
/* General list styling */
ul {
    list-style-type: disc; /* Use disc for unordered lists */
    padding-left: 40px; /* Adjust left padding for all lists */
}

li {
    margin-bottom: 10px; /* Add space between list items */
    line-height: 1.6; /* Improve readability */
}
h2 {
    font-size: 2.5em; /* Increase font size for h2 */
    margin-bottom: 20px; /* Add more space below h2 */
}

section {
    margin-bottom: 40px; /* Increase space between sections */
}
.container {
    max-width: 1200px; /* Increase max-width for the main content */
    padding: 20px 40px; /* Adjust padding */
}
.bio-details p {
    text-align: justify; /* Justify the text for a cleaner look */
    line-height: 1.8; /* Increase line height for better readability */
    margin-bottom: 20px; /* Add space between paragraphs */
}
#research p {
    text-align: justify; /* Justify the text */
    line-height: 1.8; /* Increase line height */
}
.job ul {
    columns: 2; /* Create two columns for the list items */
    column-gap: 40px; /* Add space between the columns */
}
.job ul li {
    break-inside: avoid-column; /* Prevent list items from breaking across columns */
}

/* Media Query for Mobile Responsiveness */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .header-left {
        margin-bottom: 0;
    }

    .hamburger {
        display: block;
    }

    nav {
        position: absolute;
        top: 70px; /* Adjust as needed */
        left: 0;
        width: 100%;
        background-color: #222;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }

    nav ul li {
        margin: 0;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #444;
    }

    nav ul li a.active,
    nav ul li a:hover {
        background-color: #0056b3;
        color: #fff;
        border-bottom: 1px solid #0056b3;
    }

    .about-wrapper {
        flex-direction: column;
    }

    .profile-img {
        margin-top: 20px;
        width: 100%;
        height: auto;
    }

    .job ul {
        columns: 1;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-left {
        margin-bottom: 10px;
    }
}