body {
    background-color: #F5F5F5;
    color: #333333;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    padding-top: 60px; /* Matches nav height exactly */
}

.nav {
    background-color: #4A628A;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 1160px; /* 1200px - 20px padding left - 20px padding right */
    width: calc(100% - 40px);
    box-sizing: border-box;
    /* border-radius: 0 0 8px 8px; */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex: 1;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    color: #F5F5F5;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav-menu a:hover {
    color: #D4A017;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #F5F5F5;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle span {
    display: block;
    transition: transform 0.3s ease;
}

.header {
    background-color: #4A628A;
    color: #F5F5F5;
    padding: 30px;
    text-align: center;
    /* border-radius: 8px 8px 0 0; */
}

.header img.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    /*object-fit: cover;*/
    margin-bottom: 15px;
    border: 3px solid #D4A017;
}

.header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    margin: 0;
}

.header p {
    font-size: 18px;
    margin: 10px 0;
}

.header p a.email-link {
    color: #D4A017;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.header p a.email-link:hover {
    color: #468C8C;
}

.social-icons {
    margin: 20px 0;
}

.social-icons a {
    color: #D4A017;
    font-size: 24px;
    margin: 0 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-icons img {
    width: 50px;
    height: 50px;
    vertical-align: middle;
}

.research-list {
    list-style: none;
    padding: 0;
}

.research-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.research-list li::before {
    content: "•";
    color: #468C8C;
    position: absolute;
    left: 0;
    font-size: 20px;
}

.research-list a.research-link {
    color: #D4A017;
    text-decoration: underline;
    font-size: 16px;
    transition: color 0.3s ease;
    display: inline-block;
    line-height: 1.4;
    word-break: break-word;
    hyphens: auto;
}

.research-list a.research-link:hover {
    color: #468C8C;
}

.research-list p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #333333;
}

.section {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* margin-bottom: 20px; */
    scroll-margin-top: 60px; /* Matches nav height exactly */
}

.section:nth-child(even) {
    background-color: #E8ECEF;
}

.section h2 {
    color: #4A628A;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    margin-bottom: 15px;
    border-bottom: 2px solid #468C8C;
    padding-bottom: 5px;
}

.section p, .section li {
    font-size: 16px;
    color: #333333;
}

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

.section ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.section ul li::before {
    content: "•";
    color: #468C8C;
    position: absolute;
    left: 0;
    font-size: 20px;
}

.education-item, .membership-item, .work-item {
    margin-bottom: 20px;
}

.education-item h3, .membership-item h3, .work-item h3 {
    color: #4A628A;
    font-size: 18px;
    margin: 5px 0;
}






/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-text {
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

/* Gallery Modal Styles */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.gallery-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.gallery-close:hover {
    color: #D4A017;
}

.gallery-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 18px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.gallery-prev,
.gallery-next {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    color: #333;
    font-size: 24px;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    pointer-events: all;
}

.gallery-prev:hover,
.gallery-next:hover {
    background-color: #D4A017;
    color: white;
}



/* Tablet Styles */
@media (max-width: 1024px) {
    .nav {
        width: calc(100% - 30px);
        max-width: none;
        padding: 15px;
    }

    .container {
        padding: 15px;
        padding-top: 60px; /* Matches nav height exactly */
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        padding-top: 60px; /* Matches nav height exactly */
    }

    .nav {
        padding: 10px 15px;
        width: calc(100% - 20px);
        height: 60px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        background-color: #4A628A;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-menu.nav-open {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 0;
        text-align: left;
    }

    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .header {
        padding: 20px;
        /* border-radius: 8px; */
    }

    .header img.profile-img {
        width: 120px;
        height: 120px;
    }

    .header h1 {
        font-size: 26px;
    }

    .header p {
        font-size: 16px;
    }

    .section {
        padding: 15px;
        scroll-margin-top: 60px; /* Matches nav height exactly */
    }

    .section h2 {
        font-size: 22px;
    }

    .section p, .section li {
        font-size: 15px;
    }



    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-text {
        font-size: 14px;
    }

    .gallery-modal-content {
        max-width: 95%;
        max-height: 70%;
    }

    .gallery-caption {
        font-size: 16px;
        padding: 5px 0;
    }

    .gallery-close {
        font-size: 30px;
        top: 10px;
        right: 25px;
    }

    .gallery-prev,
    .gallery-next {
        font-size: 20px;
        padding: 12px 15px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .nav {
        padding: 8px 10px;
        width: calc(100% - 10px);
    }

    .container {
        padding: 5px;
        padding-top: 60px; /* Matches nav height exactly */
    }

    .nav-menu a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .header {
        padding: 15px;
    }

    .header img.profile-img {
        width: 100px;
        height: 100px;
    }

    .header h1 {
        font-size: 22px;
    }

    .header p {
        font-size: 14px;
    }

    .section {
        padding: 12px;
    }

    .section h2 {
        font-size: 20px;
    }

    .section p, .section li {
        font-size: 14px;
    }

    .research-list a.research-link {
        font-size: 14px;
        line-height: 1.3;
    }

    .research-list p {
        font-size: 12px;
    }

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

    .gallery-text {
        font-size: 12px;
    }

    .gallery-modal-content {
        max-width: 98%;
        max-height: 60%;
    }

    .gallery-caption {
        font-size: 14px;
    }

    .gallery-nav {
        padding: 0 10px;
    }

    .gallery-prev,
    .gallery-next {
        font-size: 18px;
        padding: 10px 12px;
    }

}