/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    min-width: 200px;
    max-width: 300px;
    background-color: #2c2c2c;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    margin: 0;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.nav-item a {
    display: block;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background-color: #3a3a3a;
}

.nav-item.active {
    border-left: 4px solid white;
    background-color: #1a1a1a;
}

/* Active navigation based on :target */
#home:target ~ .sidebar .nav-item a[href="#home"],
#news:target ~ .sidebar .nav-item a[href="#news"],
#research:target ~ .sidebar .nav-item a[href="#research"],
#publications:target ~ .sidebar .nav-item a[href="#publications"],
#cv:target ~ .sidebar .nav-item a[href="#cv"],
#experience:target ~ .sidebar .nav-item a[href="#experience"],
#contact:target ~ .sidebar .nav-item a[href="#contact"],
.nav-item a[href="#home"]:focus {
    background-color: #1a1a1a;
    border-left: 4px solid white;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 40px;
    width: 100%;
}

/* Add indentation for content under h2 in other pages */
#news .news-list,
#research .project-list,
#publications .publication-list,
#experience .experience-list {
    margin-left: 40px;
}

/* Breadcrumb */
.breadcrumb {
    display: none;
}

/* Page Navigation - Show only one page at a time */
.page {
    display: none;
}

/* Show home by default when no hash */
.page#home {
    display: block;
}

/* Show only the targeted page */
.page:target {
    display: block;
}

/* Hide all pages when one is targeted */
.page:target ~ .page:not(:target) {
    display: none;
}

/* Specifically hide home when another page is targeted */
#news:target,
#research:target,
#publications:target,
#experience:target {
    display: block;
}

#news:target ~ #home,
#research:target ~ #home,
#publications:target ~ #home,
#experience:target ~ #home {
    display: none !important;
}

/* Hero Section */
.hero-section {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-image {
    width: 280px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 50%;
    color: #4285F4;
    text-decoration: none;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.social-links a:hover {
    color: #1a73e8;
    transform: translateY(-3px);
}

/* Social Media Tooltip */
.social-links a::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c2c2c;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.social-links a:hover::after {
    opacity: 1;
}

/* Profile Info */
.profile-info {
    flex: 1;
    min-width: 300px;
}

.profile-info h1 {
    font-size: 36px;
    margin-bottom: 10px;
    margin-top: 0;
    color: #2c2c2c;
}

.profile-info .title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-info .subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.profile-info .info-box {
    margin-top: 20px;
    min-width: 0;
    width: 100%;
}

/* Info Box */
.info-box {
    background: white;
    padding: 0 30px 30px 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    width: 90%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.info-box h2 {
    font-size: 24px;
    margin-bottom: 10px;
    margin-top: 0;
    padding-top: 10px;
    color: #2c2c2c;
}

.info-box p {
    line-height: 1.8;
    color: #444;
}

/* Recent News Section */
.recent-news p {
    margin-bottom: 12px;
}

.recent-news p:last-child {
    margin-bottom: 0;
}

.recent-news a,
.news-list a,
.about-section a,
.publication-list a,
.project-details a {
    color: #4169E1;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.recent-news a:hover,
.news-list a:hover,
.about-section a:hover,
.publication-list a:hover,
.project-details a:hover {
    color: #0D05FD;
    background-color: #DDDCDC;
    text-decoration: underline;
}

/* About Section */
.about-section {
    background: white;
    padding: 0 30px 30px 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.about-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    margin-top: 0;
    padding-top: 10px;
    color: #2c2c2c;
}

.about-section p {
    line-height: 1.8;
    color: #444;
}

/* Contact Footer */
.contact-footer {
    background: #2c2c2c;
    color: #999999;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    width: 90%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.contact-footer h2 {
    font-size: 32px;
    margin-bottom: 20px;
    margin-top: 0;
    padding-top: 0;
    color: #FFFFFF !important;
}

.contact-footer p {
    margin-bottom: 8px;
    color: #999999;
}

.contact-footer a {
    color: #64B5F6;
    text-decoration: underline;
}

.contact-footer a:hover {
    color: #90CAF9;
    text-decoration: underline;
}

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

.footer-social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 50%;
    border: 2px solid #9E9E9E;
    color: #B39DDB;
    text-decoration: none;
    font-size: 22px;
    transition: all 0.3s ease;
    position: relative;
}

.footer-social-links a:hover {
    background-color: rgba(179, 157, 219, 0.1);
    border-color: #B39DDB;
    color: #CE93D8;
    transform: translateY(-3px);
}

/* Footer Social Media Tooltip */
.footer-social-links a::after {
    content: attr(aria-label);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FFFFFF;
    color: #2c2c2c;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.footer-social-links a:hover::after {
    opacity: 1;
}

/* News Page */
.news-list {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-list p {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.news-list p:last-child {
    border-bottom: none;
}

/* Research Page */
.page h1 {
    font-size: 36px;
    /*margin-bottom: 30px;*/
    color: #2c2c2c;
}

.page h2 {
    font-size: 28px;
    margin: 0px 0 10px 0;
    color: #2c2c2c;
}

#publications h2,
#experience h2 {
    margin-top: 30px;
}

.project-list {
    margin-bottom: 40px;
}

/* Project Cards with Checkbox Hack */
.project-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.project-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-left-color: #4285F4;
    transform: translateX(5px);
}

/* Hide the checkbox */
.project-toggle {
    display: none;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    cursor: pointer;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.project-title:hover {
    color: #4285F4;
}

/* Hide details by default */
.project-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
    padding-top: 0;
}

/* Show details when checkbox is checked */
.project-toggle:checked + .project-title + .project-details {
    max-height: 1000px;
    opacity: 1;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}

.project-details p {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* Indent first, third, and fourth paragraphs in project details */
.project-details p:nth-child(1),
.project-details p:nth-child(3),
.project-details p:nth-child(4) {
    margin-left: 40px;
}

/* Publications Page */
.publication-list {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.publication-list p {
    margin-bottom: 20px;
    line-height: 1.8;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.publication-list p:last-child {
    border-bottom: none;
}

.publication-list strong {
    color: #2c2c2c;
}

/* CV Page */
.cv-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.cv-button {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 18px;
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cv-button:hover {
    background-color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Experience Page */
.experience-list {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.experience-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-item h3 {
    font-size: 20px;
    color: #2c2c2c;
    margin-bottom: 10px;
}

.experience-details {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

/* Contact Page */
.contact-container {
    background: white;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-name {
    font-size: 28px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 20px;
}

.contact-container p {
    margin-bottom: 10px;
    font-size: 18px;
}

.contact-container a {
    color: #4285F4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-container a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

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

.contact-social-links a {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    color: #4285F4;
    text-decoration: none;
    font-size: 28px;
    transition: all 0.3s ease;
}

.contact-social-links a:hover {
    background-color: #e8f0fe;
    border-color: #4285F4;
    color: #1a73e8;
    transform: translateY(-5px);
}

/* External Link Icons */
.external-link-icon {
    margin-left: 5px;
    font-size: 0.75em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

a:hover .external-link-icon {
    opacity: 1;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-section {
        width: 95%;
    }

    .info-box,
    .about-section,
    .contact-footer {
        width: 95%;
    }
}

@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 95%;
    }

    .profile-info {
        width: 100%;
        min-width: 0;
    }

    .profile-info .info-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        min-width: 180px;
    }

    .main-content {
        margin-left: 200px;
        padding: 20px;
    }

    .hero-section,
    .info-box,
    .about-section,
    .contact-footer {
        width: 98%;
        padding: 20px;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .profile-placeholder {
        font-size: 60px;
    }

    .profile-info h1 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        min-width: 100%;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }

    .nav-item {
        flex: 1 1 auto;
        border-left: none;
        border-bottom: 3px solid transparent;
        min-width: 120px;
    }

    .nav-item a {
        padding: 10px 15px;
        font-size: 14px;
    }

    .hero-section,
    .info-box,
    .about-section,
    .contact-footer {
        width: 100%;
        padding: 15px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-placeholder {
        font-size: 50px;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
