body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

main {
    display: flex;
    align-items: flex-start; /* align content to the top so text sits higher than the image */
    justify-content: space-between; /* push items apart horizontally */
    gap: 20px; /* space between text and image */
    width: 60%;
    margin: 30px auto; /* reduce top margin so content appears higher on the page */
    box-sizing: border-box;
}

.masonry {
    column-width: 300px;     /* each column ~300px wide */
    column-gap: 16px;        /* space between columns */
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
}

.masonry figure {
    margin: 0 0 16px;
    break-inside: avoid;     /* prevent split across columns */
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.masonry img {
    width: 100%;
    height: auto;
    display: block;
}

.masonry figcaption {
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #444;
    background: #fff;
    text-align: center;
}


research-main {
    display: flex;
    align-items: flex-start; /* align content to top so side-nav doesn't vertically center */
    justify-content: flex-start; /* stack side-nav and content */
    gap: 20px; /* space between nav and content */
    width: 90%;
    margin: 30px auto;
    box-sizing: border-box;
}

/* Smooth scrolling for in-page jumps */
html {
    scroll-behavior: smooth;
}

/* Left side navigation for research page */
.side-nav {
    width: 260px;
    position: sticky;
    top: 100px; /* sit below header */
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 12px 16px;
    box-sizing: border-box;
    /* background-color:#c2a0c832; */
    border-right: #5a2b63 2px solid;
}

.side-nav nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-nav a {
    color: #413f3f;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 8px;
    border-radius: 6px;
    display: inline-block;
}

.side-nav a:hover,
.side-nav a:focus {
    color: #ab1602;
}

.side-nav a:active {
    color: #ab1602;
}

/* On small screens hide the side-nav and let content take full width */
@media (max-width: 900px) {
    .side-nav { display: none; }
    .container { width: 100%; padding: 0 16px; }
    research-main { width: 100%; margin: 10px auto; }
}

header {
    background: #c2a0c8;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style: none;       /* removes bullet points */
    margin: 0;
    padding: 0;
    display: flex;          /* lays out list items in a row */
    justify-content: center; /* evenly centers them across the top */
    gap: 20px;              /* adds spacing between links */
}

nav li {
    display: inline;        /* not strictly needed with flexbox, but fine */
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
}

nav a:hover {
    /* background: #ead4ee; */
    color: #ab1602; 
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

footer {
    background: #c2a0c8;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

h1, h2, h3 {
    color: #753580;
}

p {
    margin: 15px 0;

}

.card {
    background: #ffffff;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.photo {
        text-align: center;
}

.photo img {
        width: var(--gallery-col-width, 260px); /* force fixed width equal to column width */
        height: auto;
        object-fit: cover;
        border-radius: 10px; /* optional: rounded corners */
        display: inline-block;
}

/* Caption spacing */
.photo .caption { margin-top: 8px; font-size: 0.95rem; color: #413f3f; }

/* Responsive: on smaller screens switch to 2 columns or 1 column */
@media (max-width: 820px) {
    .art-page main { grid-template-columns: repeat(2, min(48%, var(--gallery-col-width, 260px))); width: 94%; }
    .photo img { width: 100%; max-width: var(--gallery-col-width, 260px); }
}

@media (max-width: 480px) {
    .art-page main { grid-template-columns: 1fr; gap: 14px; }
    .photo img { width: 100%; max-width: none; }
}

/* Research page layout */
.research-section {
    margin-bottom: 1.5rem;
}

.research-section p {
    margin-bottom: 1rem;
}

.project {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 12px 0;
}

.project .photo {
    flex: 0 0 200px; /* fixed-ish column for images */
}

.project .details {
    flex: 1 1 auto;
}

.project h3 { margin-top: 0; color: #5a2b63; }

@media (max-width: 720px) {
  main { width: 100%; margin: 10px auto; }
  .project { flex-direction: column; }
  .project .photo { flex: 0 0 auto; max-width: 100%; }
}



header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background-color: #f5f5f5;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: black;
}

.social-icons a {
    color: black;
    margin-left: 15px;
    font-size: 1.5em;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #ab1602; /* e.g., LinkedIn blue highlight */
    
}


.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: max-content;
    /* background-color: #ead4ee; */
    color: black;
    text-align: center;
    padding: 2px 4px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 100%; /* Position above the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.5em;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


#publication-section { max-width: 900px; margin: 2.5rem auto; padding: 0 1rem;  }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;  margin-bottom: .5rem;}
.pub-item { background: #ead4ee1c; border: 1px solid rgba(0,0,0,0.06); padding: .75rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.04); margin-bottom: .5rem;}
.pub-title { font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 600; color: #753580; }
.pub-authors { margin: 0 0 .5rem; color: #413f3f; font-size: 1rem; }
.pub-meta { font-size: 1rem; color: #413f3f; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.pub-venue {  color: #413f3f; font-style: italic; }
pub-doi { 
        background: #e2ecf8; 
        color: #df380e; 
        padding: .08rem .45rem;
        border-radius: 999px;
        display: inline-block; 
        margin-left: .25rem; 
        font-weight: 600;
        font-size: .85rem;  }
time[datetime] { 
        background: #e2ecf8;
        color: #1a235d;
        padding: .08rem .45rem;
        border-radius: 999px;
        display: inline-block; 
        margin-left: .25rem; 
        font-weight: 600;
        font-size: .85rem; }

@media (max-width: 520px) {
  .pub-title { font-size: 1rem; }
}

/* --- Mobile-friendly additions (appended) --- */
:root {
    --max-content-width: 1200px;
    --container-pad: 16px;
    --base-font-size: 16px;
}

html { font-size: 100%; }

/* Make layout containers fluid and centered */
.container,
main,
.research-main {
    width: min(100%, var(--max-content-width));
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Improve touch targets and spacing for small screens */
a, button, .side-nav a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0.08);
}

/* Allow nav to wrap on narrow screens */
nav ul { flex-wrap: wrap; gap: 12px; }

/* Responsive typography */
body { font-size: 1rem; }
h1 { font-size: clamp(1.3rem, 2.2vw, 2rem); }
h2 { font-size: clamp(1.1rem, 1.8vw, 1.6rem); }
h3 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

/* Make media elements fluid */
img, video, iframe { max-width: 100%; height: auto; display: block; }

/* Tweak masonry for smaller devices,cap at
.masonry { column-width: 220px; 
} */

.photo img { width: 100%; height: auto; max-width: 100%; object-fit: cover; }

/* Mobile-first breakpoints */
@media (max-width: 520px) {
    header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    nav ul { justify-content: flex-start; gap: 10px; }

    main { display: block; width: 100%; margin: 12px auto; padding: 10px; }

    .art-page main { grid-template-columns: 1fr; gap: 12px; width: 100%; }

    .project { flex-direction: column; gap: 8px; }

    .side-nav { display: none; }

    .tooltip-text { font-size: 0.65rem; white-space: nowrap; }

    .social-icons a { font-size: 1.25rem; margin-left: 10px; }
}

@media (min-width: 521px) and (max-width: 900px) {
    main { width: 80%; margin: 14px auto; }
    .masonry { column-width: 260px; }
    .side-nav { position: static; width: 100%; border-right: none; border-bottom: 2px solid rgba(90,43,99,0.08); top: auto; height: auto; padding-bottom: 12px; margin-bottom: 12px; }
}

/* Focus outlines for accessibility */
a:focus, button:focus { outline: 3px solid rgba(117,53,128,0.18); outline-offset: 3px; }

@media (max-width: 520px) {
    .card, .masonry figure, .pub-item { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
}

/* End mobile-friendly additions */

