/* ===== Base Styles ===== */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --light: #f8f9fa;
    --dark: #343a40;
    --text: #333;
    --text-light: #6c757d;
    --white: #ffffff;
    --border: #e9ecef;
}

body {
    font-family: 'Lora', Georgia, serif;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    padding: 0;
    background-color: var(--white);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.intro-text {
    padding: 20px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 40px; /* only bottom margin */
}
a:hover {
    color: var(--primary);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== Header ===== */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    min-height: 80px; /* Consistent header height */
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.logo .subtitle {
    margin: 0.3rem 0 0;
    font-size: 1rem;
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
}

/* ===== Navigation - Desktop ===== */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--primary);
}

.main-nav a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary);
}

/* ===== Mobile Navigation ===== */

.menu-toggle {
    display: none;
}


.menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    padding: 0.5rem;
    order: 1;
    font-family: 'Montserrat', sans-serif; /* Added matching font */
    font-weight: 500; /* Added matching font weight */
    /*text-transform: uppercase; /* Optional: matches typical menu button style */
    letter-spacing: 0.5px; /* Optional: improves readability */
}

/* ===== Main Content ===== */
.main-content {
    padding: 3rem 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.profile-image {
    text-align: center;
}

.profile-image img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-text .lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--primary);
    margin-bottom: 2rem;
}

.research-list {
    padding-left: 1.2rem;
    margin: 1.5rem 0;
}

.research-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.research-list li:before {
    content: "•";
    color: var(--secondary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -3px;
}

/* ===== Button ===== */
.button {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--white);
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.button:hover {
    background-color: #2980b9;
    color: var(--white);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--light);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (min-width: 768px) {
    .profile-grid {
        grid-template-columns: 250px 1fr;
        align-items: flex-start;
    }
    
    /* Keep profile image container fixed width */
    .profile-image {
        max-width: 250px;
        margin: 0; /* Reset margin for desktop */
    }
    
    .header-content {
        padding: 2rem 0;
        flex-wrap: wrap;
    }
   
}

@media (max-width: 767px) {
    /* Mobile Navigation Styles */
    .menu-button {
        display: block;
    }
    
    
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 1rem 0;
        gap: 0;
    }
    
    .main-nav li {
        padding: 0.5rem 1.5rem;
        border-bottom: 1px solid var(--border);
    }
    
    .main-nav a {
        display: block;
        padding: 0.5rem 0;
    }
    
    .main-nav a.active:after {
        display: none;
    }
    
    /* Show menu when toggle is checked */
    .menu-toggle:checked ~ .main-nav ul {
        display: flex;
    }
    
    /* Keep header height consistent */
    .header-content {
        padding: 1rem 0;
        flex-wrap: wrap;
    }
    .course-list td {
        display: block;
        width: 100%;
        padding: 5px 0;
    }
    
    .course-date {
        text-align: left;
        padding-left: 25px;
        color: #666;
        font-size: 0.9em;
    }

    .gallery-container {
        flex-direction: column;
    }
    
    .painting-info {
        width: 100%;
        padding: 15px;
        text-align: center;
    }
    
    .painting-title {
        font-size: 1.4em;
    }
    
    .current-painting-container {
        max-width: 95%;
    }
    
    .nav-arrow {
        font-size: 2em;
        width: 40px;
        height: 40px;
    }
}

/* ===== Publications Page Specific ===== */
/* Publications List */
.publication {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  
.publication h3 {
font-size: 1.1rem;
margin-bottom: 0.3rem;
color: var(--primary);
}

.publication .authors {
font-style: italic;
margin-bottom: 0.3rem;
}

.publication .journal {
font-weight: 500;
color: var(--secondary);
}

.publication .year {
color: var(--text-light);
font-size: 0.9rem;
}

.publication .links a {
margin-right: 1rem;
font-size: 0.9rem;
padding: 0.2rem 0.5rem;
background: var(--light);
border-radius: 3px;
}


/* ===== Teaching Page Specific ===== */

.position {
    margin-bottom: 30px;
}

.position-title {
    font-weight: bold;
    font-size: 1.2em;
    color: #3498db;
    margin-bottom: 5px;
}

.institution {
    font-style: italic;
    margin-bottom: 15px;
}

.course-list {
    width: 100%;
    border-collapse: collapse;
}

.course-list tr {
    border-bottom: 1px solid #eee;
}

.course-list tr:last-child {
    border-bottom: none;
}

.course-list td {
    padding: 8px 5px;
    vertical-align: top;
}

.course-name {
    width: 60%;
}

.course-date {
    width: 40%;
    text-align: right;
    white-space: nowrap;
}

.bullet {
    color: #3498db;
    padding-right: 10px;
}


/* ===== Painting Page Specific ===== */
/* Base styles */



.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.thumbnail {
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: none; /*0 2px 5px rgb(255, 255, 255); */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1 / 1; /* Ensures all thumbnails are square */
}


.thumbnail:hover {
    transform: scale(1.03);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* This is crucial to fill the thumbnail box */
    display: block;    /* Removes bottom whitespace caused by inline images */
}

/* Gallery overlay */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.gallery-container {
    display: flex;
    height: 100vh;
}

.painting-info {
    width: 250px;
    padding: 30px;
    background: #222;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.painting-title {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #fff;
}

.painting-viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.current-painting-container {
    max-height: 90vh;
    max-width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-painting {
    max-height: 90vh;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s;
}

/* Navigation controls */
.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 10;
    transform: translateY(-50%);
}

.nav-arrow {
    color: white;
    font-size: 3em;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    user-select: none;
}

.close-gallery {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2em;
    cursor: pointer;
    z-index: 20;
}

.zoom-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.zoom-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
