:root {
    --maroon: #800000;
    --maroon: #007bff;
    --navy-blue: #1d3f58;
    --navy-blue: #000105;
    /* --blue: #4b09c4; */
    --blue: #0906b8;
    --dark-grey: #242323;
    --black: black;
    --light-grey: #f0f0f0;
    --white: #ffffff;
    --bright-blue: #007bff;
    --maroon: #0fb11a;
    --btn-grey: #0374ee;
    /* --bright-blue: #00ff11; */
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--black);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--white);
}

/* Header and Navigation Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

/* Nav bar container */
nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

/* Nav bar list item styling */
nav ul li {
    margin-left: 1rem;
}

/* Nav bar link styling */
nav ul li a {
    color: var(--blue);
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth transitions for color, pop effect, and shadow */
}

/* Underline effect */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--maroon);
    transition: width 0.3s ease;
}

/* Hover effect for link */
nav ul li a:hover {
    color: var(--bright-blue); /* Changes to bright blue */
    transform: scale(1.3); /* Pop-up effect */
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); Adds subtle shadow effect */
}

/* Underline expansion on hover */
nav ul li a:hover::after {
    width: 100%; /* Full-width underline */
}

/* Home Link Styles */
#home-link {
    color: var(--blue);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth transitions for color and pop effect*/
}

/* Underline effect */
#home-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--maroon); /* Underline color */
    transition: width 0.3s ease; /* Smooth width animation */
}

/* Hover effect for home link */
#home-link:hover {
    color: var(--bright-blue); /* Changes to bright blue on hover */
    transform: scale(1.2); /* Pop-up effect on hover */
}

/* Underline expansion on hover */
#home-link:hover::after {
    width: 100%; /* Full-width underline on hover */
}

/* Section Styles */
section {
    border: none; /* Remove any borders */
    background: none; /* Remove background color */
    padding: 0; /* Adjust padding if needed */
    margin: 0 0 2rem 0; /* Optionally, control the space between sections */
    border-bottom: 2px solid rgb(53, 27, 27); /* Thin grey line */
    padding-bottom: 3rem; /* Add space between content and line */
    margin-bottom: 2rem; /* Space between sections */
}

/* section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
} */

/* About Me Section Styles */
#about {
    display: flex;
    align-items: flex-start;
}

.profile-container {
    position: relative;
    margin-right: 2rem;
    width: 25%; /* Set to 30% of the section's width */
}

.profile-pic-container {
    display: flex;
    margin-right: 1rem;
    justify-content: center;  /* Horizontally centers the picture */
    /* align-items: center;      Vertically centers the picture */
    width: 30%;               /* Set the width of the container to 30% */
    /* height: auto;             Adjust height based on the image */
    margin: 0 auto;           /* Center the container horizontally */
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: popOut 2s ease-out;
}

@keyframes popOut {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.about-content {
    flex: 1;
}

/* Social Links Container */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Social Links Styling */
.social-links a {
    color: var(--bright-blue);
    text-decoration: none;
    font-size: 1.75rem;
    position: relative;
    transition: color 0.3s ease; /* Smooth transitions for hover effects */
}

/* Underline effect */
.social-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--maroon); /* Underline color */
    transition: width 0.3s ease; /* Smooth width animation */
}

/* Hover effect for social links */
.social-links a:hover {
    transform: scale(1.1); /* Pop-up effect on hover */
}

/* Underline expansion on hover */
.social-links a:hover::after {
    width: 100%; /* Full-width underline on hover */
}


/* Publication Styles */
.publication {
    margin-bottom: 0rem;
    padding-bottom: 1rem;
    /* border-bottom: 1.5px solid var(--light-grey); */
}

.publication h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem; /* Reduced space below title */
    line-height: 1; /* Adjust line-height for compactness */
}

.publication .authors, .publication .journal {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem; /* Reduced space between authors and journal */
    line-height: 0.77; /* Reduced line-height for compactness */
}

.publication .pub-buttons {
    margin-top: 0.5rem; /* Reduced space above buttons */
    display: flex;
    gap: 0.5rem; /* Adjusted spacing between buttons */
}

.publication .btn {
    padding: 0.2rem 0.7rem; /* Reduced button padding */
    font-size: 0.8rem; /* Smaller button text size */
}

.publication .abstract {
    margin-top: 0.4rem; /* Reduced space above abstract */
    font-size: 0.9rem;
    color: #444;
}

.publication .abstract p {
    margin: 0; /* Remove margins inside the abstract text */
}

.abstract {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--light-grey);
    border-radius: 5px;
}


.talk {
    margin-bottom: 0rem;
    padding-bottom: 1rem;
    /* border-bottom: 1.5px solid var(--light-grey); */
}
.talk h4 {
    font-size: 1rem;
    margin-bottom: 0rem; /* Reduced space below the title */
    line-height: 1; /* Compact line-height */
}

.talk p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem; /* Reduced space between date/event/location */
    line-height: 1.2; /* Compact line-height */
}

.talk .talk-buttons {
    margin-top: 0.5rem; /* Reduced space above buttons */
    display: flex;
    gap: 0.5rem; /* Adjusted spacing between buttons */
}

.talk .btn {
    padding: 0.2rem 0.7rem; /* Reduced button padding */
    font-size: 0.8rem; /* Smaller button text size */
}


/* Updated Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem; /* Reduced from 0.5rem */
    background-color: var(--btn-grey);
    color: var(--white);
    text-decoration: none;
    padding: 0.3rem 0.8rem; /* Reduced from 0.5rem 1rem */
    border-radius: 16px; /* Reduced from 20px */
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.8rem; /* Reduced from 0.9rem */
    margin-right: 0.4rem; /* Reduced from 0.5rem */
    margin-top: 0.4rem; /* Reduced from 0.5rem */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Reduced shadow */
}

.btn:hover {
    background-color: var(--maroon);
    transform: translateY(-1px); /* Reduced from -2px */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Reduced shadow */
}

.btn.inactive {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Project Grid Styles */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    display: block;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--dark-grey);
    height: 400px;
    border: 1.75px solid var(--light-grey);
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: var(--maroon);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-card h3, .project-card p {
    padding: 0 1rem;
}

.project-card h3 {
    color: var(--navy-blue);
    margin-top: 1rem;
}

/* Blog section styles */
.blog-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.blog-card {
    background-color: white;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    border: 1.75px solid var(--light-grey); /* Changed to bright blue border */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: var(--maroon);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card h3, .blog-card p {
    padding: 0 1rem;
}

.blog-card h3 {
    color: var(--navy-blue); /* Match heading color to project card */
    margin-top: 1rem;
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--dark-grey); /* Match description color to project card */
}


/* News Section Styles */
#news ul {
    list-style-type: none;
    padding: 0;
    margin: 0; /* Remove default margin */
}

#news li {
    margin-bottom: 0.5rem; /* Reduced from 1rem */
    line-height: 1.4; /* Slightly reduced line height */
}

#news li strong {
    color: var(--dark-grey);
}

#news li a {
    color: var(--maroon);
    text-decoration: none;
    transition: color 0.3s ease;
}

#news li a:hover {
    color: var(--bright-blue);
    text-decoration: underline;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--light-grey);
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #about {
        flex-direction: column;
    }

    .profile-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-end;
    }

    nav ul li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }

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

footer {
    background-color: transparent; /* Removed the background shade */
    padding: 0.5rem 0; /* Compact padding */
    text-align: center;
    font-family: 'Roboto', sans-serif; /* Changed font to Roboto */
}

.footer-content {
    max-width: 500px; /* Adjusted width */
    margin: 0 auto;
}

.footer-signature p {
    font-size: 0.85rem; /* Smaller font size */
    color: #666;
    margin-bottom: 0.25rem; /* Reduced margin for compactness */
}

footer .code-tag {
    font-family: monospace;
    font-weight: 2000; /* Extra bold for code brackets */
}

.heart {
    color: #888; /* Greyish heart icon instead of red */
}

.footer-signature .bold {
    font-weight: 900; /* Extra bold for name */
}

.footer-signature .normal {
    font-weight: 400; /* Normal (non-bold) for 'with' and 'by' */
}

.social-icons {
    margin-top: 0.25rem; /* Reduced top margin */
}

.social-icons a {
    color: #666;
    font-size: 1rem; /* Smaller icon size */
    margin: 0 0.3rem; /* Adjusted icon spacing */
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #333;
}

#email-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

#email-button:hover {
    transform: scale(1.05);
}

.email-text {
    font-size: 0.9em;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}