@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ============================================
   GLOBAL RESET & BASE STYLES
============================================ */
html {
  overflow-y: scroll;
}


body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, dl, dd, ol, ul, figure {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Roboto", sans-serif;
    font-size: 1.em;
    line-height: 1.75;
    font-weight: 250;
    color: #111;
    background-color: #fdfdfd;
    -webkit-text-size-adjust: 100%;
    text-align: left;
}

h4, h5, h6 {
    font-weight: 200;
}


h1, h3 {
    font-weight: 600;
}

h2 {
  font-weight: 300;
  color: #059e8f;
}


a {
    color: #000000;
    text-decoration: none;
}

a:hover {
    color: #000000;
    text-decoration: underline;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

strong, b {
    font-weight: 500;
}

/* Wrapper (layout container) */
.wrapper {
    max-width: calc(1250px);
    margin: 0 auto;
    padding: 0 30px;
}
.wrapper:after {
    content: "";
    display: table;
    clear: both;
}

@media screen and (max-width: 1100px) {
    .wrapper {
        max-width: calc(1100px - 30px);
        padding: 0 15px;
    }
}

/* ============================================
   HEADER & NAVIGATION
============================================ */
.site-header {
    height: 90px;
    background: #0F172A;
    min-height: 90px;
}

.site-header .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-title {
    font-size: clamp(20px, 5vw, 40px);
    white-space: nowrap;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: #fff;
    margin: 0;
}

.site-nav {
    margin-left: auto;
}


.site-title:hover {
    color: #059e8f;
}


.site-nav a {
    display: block;
    color: #ffffff;
}

.site-nav ul {
    text-align: right;
    padding-top: 9px;
    font-size: 17px;
    letter-spacing: 1px;
    line-height: 1em;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav ul li {
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;

}

.site-nav .page-link {
    color: #ffffff;
    background: #0F172A;
    line-height: 1.75;
}
.site-nav .page-link:not(:first-child) {
    margin-left: 20px;
}
.site-nav .page-link:hover {
    color: #059e8f;
}

/* Style for current active page link */
.site-nav ul li.current a {
    color: #14B8A6; /* Highlight active page */
    text-decoration: underline;
}

/* Hide menu icon on desktop */
.site-nav .menu-icon {
    display: none;
}

/* Accessibility hidden nav heading */
.site-nav h1 {
    position: absolute;
    left: -999em;
}

/* ============================================
   PAGE CONTENT: General Styles
============================================ */
.page-content {
    padding: 10px 0;
}

.post-header {
    margin-bottom: 30px;
}

.post-content {
    margin-bottom: 30px;
}

h1 {
    letter-spacing: 0px;
    line-height: 1;
    font-family: 'Roboto', sans-serif;
    color: #059e8f;
    margin-bottom: -10px;
}

/* Rounded profile picture (used on index and research pages) */
.rounded-image {
    border-radius: 5px;
}


/* ============================================
   PAGE CONTENT: INDEX.HTML
============================================ */
.home-hero-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    align-items: stretch;
}

.about-me-container {
    background-color: rgba(240, 240, 240, 0.3);
    border-radius: 10px;
    flex: 1;
}

/* Text gets padding */
.about-me-text {
    padding: 15px;
}

.home-profile-photo {
    flex: 0 0 350px;
}

.home-profile-photo img {
    border-radius: 10px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Index.html News Container */
.news-container {
    background-color: rgba(240, 240, 240, 0.3);
    padding: 15px 15px 15px 15px;
    border-radius: 10px;
}


/* ============================================
   PAGE CONTENT: RESEARCH.HTML
============================================ */
/* Main Publications Container */
.pubs-container {
    background-color: #fdfdfd;
    padding: 15px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
}

/* Individual Paper Container (Desktop View) */
.paper-container {
    background-color: rgba(240, 240, 240, 0.8);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    /* Desktop layout: Image and text side-by-side */
    display: flex;
/* align-items: flex-start !important;*/
    position: relative;
}

/* Fix: Remove top margin from the first H4 in the text container to align text with image top */
.paper-container > div:last-child > h4:first-child {
    margin-top: 0;
}

/* Image Container (Desktop View) */
.paper-container > div:first-child {
    flex: 0 0 auto;
    padding-right: 30px;
}

/* Image Styling (Desktop View) */
.paper-container img.rounded-image {
    border-radius: 5px;
    height: 157px;
    width: 231px;
}

/* ============================================
   PAGE CONTENT: RESEARCH.HTML - LINK BUTTONS
============================================ */
.pub-link-button {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    margin-top: 5px;
    margin-right: 6px; /* Space between buttons */
    margin-bottom: 5px; /* Ensure space for wrapping */
    border: 1px solid #000000; /* Black border */
    border-radius: 5px; /* Less round corners */
    color: #000000; /* Black text color */
    background-color: rgba(240, 240, 240, 0.8); /* White background */
    text-decoration: none !important; /* Remove underline on the button */
    font-size: 0.9em;
    font-weight: 400; /* Changed to regular weight */
/* transition: background-color 0.2s, color 0.2s, border-color 0.2s;*/
}

.pub-link-button:hover {
    background-color: #059e8f;
    color: #000000;
    text-decoration: none !important;
    border-color: #555555; /* Slightly darker border on hover */
}

.pub-link-button svg {
    margin-right: 5px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}



/* ============================================
   PAGE CONTENT: TEACHING.HTML
============================================ */
.course-container {
    background-color: #fdfdfd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
}

.uni-container {
    background-color: rgba(240, 240, 240, 0.8);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
}

/* List/Course Styling (No Arrows) */
.uni-container ul {
    margin-left: 0;
    padding-left: 0;
    list-style: none; /* Use default list disk */


}

.uni-container ul li {
    margin-bottom: -10px;
    /* Removed: position: relative; */
    padding-left: 0; /* Removed padding for custom arrow */
    color: #000000;
    font-weight: normal;
    font-size: 18px;
    margin-left: 0px; /* Use margin to indent list items */
}


/* Styling for university heading (was inline in HTML) */
.uni-container h3 div {
    color: #000000;
    font-size: 1.1em;
    text-decoration: none;
    margin-bottom: 5px;
}



.diamond {
    font-size: 1.5em;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: -1.5px; /* Fine-tunes the vertical position */
    margin-right: 6px;
}



.uni-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;              /* space between text and logo */
}

/* Logo scales exactly with text height */
.uni-logo {
    height: 2.2em;           /* SAME height as text */
    width: auto;           /* preserve aspect ratio */
    vertical-align: middle;
    opacity: 1;         /* optional: slightly softer look */
}



/* ============================================
   BLANK BAR FOOTER
============================================ */
/* 1. Ensure the browser window and body cover the full height */
html, body {
    height: 100%;
    margin: 0;
}

/* 2. Turn the body into a flex container that stacks elements vertically */
body {
    display: flex;
    flex-direction: column;
}

/* 3. Tell the content area to grow and fill all available empty space */
/* This is what pushes the footer to the bottom */
.page-content {
    flex: 1 0 auto;
}

/* 4. The blank dark footer */
.site-footer {
    background-color: #0F172A; /* Matches header background */
    height: 20px;              /* Thickness of the line */
    flex-shrink: 0;            /* Prevents the footer from shrinking */
}

/* Keep the wrapper clean */
.site-footer .wrapper {
    display: none; 
}


/* ============================================
   LAB PAGE ADDITIONS (SAFE EXTENSIONS ONLY)
/*============================================ */
.lab-logo {
    flex: 0 0 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lab-logo img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


.lab-site-title,
.lab-site-title:hover {
    text-decoration: none !important;
}


.lab-site-title:hover .title-text {
    text-decoration: underline;
}

.lab-site-title .math {
    font-family: "Times New Roman", "STIX Two Math", "Cambria Math", serif;
    font-style: italic;
    font-size: 1em;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    display: inline-block; /* prevents weird decoration bleed */
}


.lab-site-title .math sup {
    font-size: 0.65em;
    vertical-align: super;
    position: relative;
    top: -0.2em;
}

.lab-site-title {
    font-size: clamp(20px, 5vw, 40px);
    white-space: nowrap;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    color: #fff;
    margin: 0;
}


.lab-site-title:hover {
    color: #059e8f;
}


.lab-section {
    margin-bottom: 50px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 250px);
    justify-content: center;
    gap: 60px;
    margin-top: 20px;
    margin-bottom: 60px;
}

.member-card {
    text-align: center;
}

.member-card img {
    width: 250px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.member-card h4 {
    margin-top: 15px;
}

.member-card p {
    margin: 0;
    font-size: 14px;
    color: #555;
}



/* ============================================
   LAB PAGE: MOBILE OVERRIDES
   (Safe: only affects .members-grid and .member-card used on lab.html)
============================================ */
@media screen and (max-width: 900px) {
    .members-grid {
        grid-template-columns: repeat(2, 200px);
        justify-content: center;
        gap: 40px;
        margin-bottom: 50px;
    }

    .member-card img {
        width: 200px;
        height: 240px;
    }
}

@media screen and (max-width: 600px) {
    .members-grid {
        grid-template-columns: 1fr;
        justify-content: center;
        gap: 25px;
        margin-top: 15px;
        margin-bottom: 45px;
    }

    .member-card {
        text-align: center;
    }

    .member-card img {
        width: min(260px, 85vw);
        height: auto;
        aspect-ratio: 5 / 6;   /* keeps consistent portrait proportions */
        object-fit: cover;
    }

    /* Extra breathing room between sections on small screens */
    .lab-section {
        margin-bottom: 35px;
    }
}




/* ============================================
   MOBILE OVERRIDES (max-width: 600px)
============================================ */
@media screen and (max-width: 600px) {
    /* --- MOBILE NAVIGATION --- */
    .site-nav {
        position: absolute;
        top: 27px;
        right: 30px;
        background-color: #fdfdfd;
        border: 1px solid #e8e8e8;
        border-radius: 5px;
        text-align: right;
        z-index: 10;
    }

    .site-nav .menu-icon {
        display: block;
        float: right;
        width: 36px;
        height: 26px;
        line-height: 0;
        padding-top: 10px;
        text-align: center;
    }
    .site-nav .menu-icon > svg {
        width: 18px;
        height: 15px;
    }
    .site-nav .menu-icon > svg path {
        fill: #424242;
    }

    .site-nav .trigger {
        clear: both;
        display: none;
    }

    .site-nav.active .trigger {
        display: block;
        padding-bottom: 5px;
        padding-right: 20px;
    }

    /* Make list items stack vertically on mobile */
    .site-nav ul li {
        display: block;
        margin-left: 0;
    }

    .site-nav .page-link {
        display: block;
        padding: 5px 10px;
        color: #000000;
        background: none;
        text-align: left;
    }

    /* --- INDEX.HTML LAYOUT FIXES (Image) --- */
    .home-hero-wrapper {
        flex-direction: column; /* Stack image and text vertically */
        align-items: center; /* Center-align content horizontally */
        gap: 15px;
        padding: 0;
    }

    .about-me-container {
        max-width: 100%; /* Text takes full width */
        order: 2; /* Put text content below the image */
        width: 100%;
    }

    .home-profile-photo {
        order: 1; /* Put image content above the text */
        flex: none;
        width: 100%;
        height: auto !important; 
        text-align: center;
        justify-content: center;
    }

    .home-profile-photo img {
        max-width: 80%;
        height: auto;
        width: auto; 
        object-fit: contain; 
    }


    /* --- RESEARCH.HTML LAYOUT FIXES (Publications) --- */
    .paper-container {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .paper-container > div:first-child {
        padding-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }

    .paper-container img.rounded-image {
        width: 286px;
        height: 195px;
    }

    /* Ensure publication text content is left-aligned on mobile */
    .paper-container > div:last-child {
        text-align: left;
    }

    .pub-link-button {
            display: inline-flex; /* Change from 'flex' to 'inline-flex' */
            justify-content: flex-start; /* Change from 'center' to 'flex-start' or remove */
            margin-right: 6px; /* Re-add the space between buttons from the desktop rule */
            margin-bottom: 5px; /* Re-add original margin */
        }

    /* Override the generic mobile text-align: left for the buttons' parent div
       to allow the buttons to start from the left */
    .paper-container > div:last-child {
        text-align: left;
    }


    /* --- TEACHING.HTML LAYOUT FIXES (No Arrows) --- */
    .uni-container h3 div {
        text-align: left; /* Align university heading left */
    }
    .uni-container ul li {
        text-align: left; /* Ensure list items are left aligned */
    }
}
