@import url('https://fonts.googleapis.com/css2?family=Spectral:wght@200&display=swap');

body, html {
    margin: auto;
    padding: 0;
    height: 100%;
    height: -webkit-fill-available;
    background-color: rgb(78, 94, 88);
    color: white;
}

.container {
    overflow: auto;
    display: flex;
    height: -webkit-fill-available;
}

.left-side {
    position: fixed;
    width: 13%;
    height: 100vh;
    height: -webkit-fill-available;
    background-color: rgba(255, 211, 150, 0.902);
    display: flex;
    overflow-x: auto;
    overflow-y: auto;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-sizing: border-box;
}

.right-side {
    margin-left: 14%;
    width: 87%;
    background-color: rgb(78, 94, 88);
    overflow-y: auto;
    padding: 14px;
    box-sizing: border-box;
}

.main-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: inherit;
}

.main-links a {
    text-decoration: none;
    color: black;
    margin: 10% 0;
    font-family: Spectral;
    font-size: large;
    font-weight: normal;
}

.main-links a.active {
    font-weight: bold;
}

.social-links {
    margin-top: auto;
    flex-direction: row;
    justify-content: center;
}

.social-links a {
    text-decoration: none;
    margin: 0 8px;
}

.profile-image {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    overflow: hidden;
    margin: 10px 0;
}

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

/* Hamburger menu toggle button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2000;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    /* Show hamburger */
    .menu-toggle {
        display: flex;
    }

    /* Sidebar fullscreen, fixed so it follows viewport */
    .left-side {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 50%;       /* full mobile width */
        height: 100vh;     /* full viewport height */
        background-color: rgba(255, 211, 150, 0.902);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding-top: 60px;
        z-index: 1999;
    }

    /* Show sidebar when open */
    .left-side.open {
        display: flex;
    }

    /* Hide profile image */
    .profile-image {
        display: none;
    }

    /* Center links vertically and horizontally */
    .main-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
        margin-top: 20px;
    }

    .main-links a {
        text-align: center;
        width: 100%;
        padding: 12px 0;
        margin: 0;
        font-family: Spectral;
        font-size: medium;
        color: black;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .right-side {
        margin-left: 0;
        width: 100%;
        padding-top: 60px;   /* push below hamburger */
        padding-right: 20px;
        overflow-y: auto;
    }

    .home table, .interests table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

/* Additional styles for sections */
.home, .project, .teaching, .research, .interests, .tips {
    background-color: rgb(78, 94, 88);
    font-family: Spectral;
    text-align: justify;
    margin: 6px;
}

.home h2, .project h2, .teaching h2, .research h2, .interests h2, .tips h2 {
    font-family: Spectral;
    color: white;
    text-decoration: underline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.home h3, .project h3, .teaching h3, .research h3, .interests h3 {
    text-align: justify;
    color: rgba(255, 211, 150, 0.902);
    text-decoration: underline;
}

.home ul, .research ul, .project ul, .teaching ul, .interests ul, .tips ul {
    text-align: justify;
    list-style: none;
    color: white;
}

.research ol, .teaching ol, .project ol, .interests ol, .tips ol {
    padding-left: 20px;
}

.home ol li, .research ol li, .project ol li, .teaching ol li, .interests ol li, .tips ol li {
    margin-right: 5px;
    padding: 2px 0;
    text-align: justify;
    color: white;
}

.home a, .research a, .teaching a, .project a, .interests a, .tips a {
    color: rgba(255, 211, 150, 0.902);
    text-decoration: none;
}

.tips h3 {
    color: rgba(255, 211, 150, 0.902);
}

table {
    font-family: Spectral;
    border-collapse: collapse;
    width: 100%;
    text-align: justify;
    caption-side: bottom;
}

td, th {
    border: 1px solid #dddddd;
    text-align: center;
    word-wrap: break-word;
    padding: 8px;
}

.centering {
    text-align: justify;
}

.highlight {
    color: rgba(255, 211, 150, 0.902);
}

.footer {
    text-align: center;
    padding: 10px;
    background-color: rgb(54, 69, 79);
    color: rgba(255, 211, 150, 0.902);
    font-size: small;
    position: fixed;
    bottom: 0;
    width: 100%;
}
