* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: #111827;
    background-color: #f5f5f4;
}

header {
    background: #ffffff;
    color: #111827;
    padding: 60px 0 40px;
    margin-bottom: 60px;
    border-bottom: 1px solid #e5e7eb;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.header-text {
    flex: 1;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    flex-shrink: 0;
}

.profile-pic-mobile {
    display: none;
    width: 160px;
    height: 160px;
    border-radius: 0;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    margin: 0 auto 24px;
    flex-shrink: 0;
}

.about-intro-wrapper {
    display: block;
}
header h1 {
    font-size: 3em;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

header .subtitle {
    font-size: 1.2em;
    color: #6b7280;
    margin-bottom: 40px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

nav {
    border-top: 1px solid #e5e7eb;
    padding-top: 25px;
    margin-top: 30px;
}

nav a {
    color: #6b7280;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 1em;
    transition: all 0.3s;
    margin-right: 15px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    display: inline-block;
}

nav a:hover, nav a.active {
    color: #2563eb;
}

.mobile-menu-toggle {
    display: none;
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    padding: 10px 14px;
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    cursor: pointer;
}

.mobile-menu-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    background: #ffffff;
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding: 28px 24px;
    border-radius: 0;
    box-shadow: none;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.mobile-menu.is-open .mobile-menu-panel {
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu-panel nav {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    display: grid;
    gap: 12px;
}

.mobile-menu-panel nav a {
    color: #111827;
    padding: 8px 0;
    margin: 0;
    font-size: 1.05em;
}

.mobile-menu-close {
    border: none;
    background: transparent;
    font-size: 1.4em;
    cursor: pointer;
    margin-left: auto;
    display: block;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

section {
    margin-bottom: 80px;
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-size: 2.2em;
    font-weight: 400;
    margin-bottom: 30px;
    color: #111827;
    letter-spacing: 0.5px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.intro {
    font-size: 1.3em;
    line-height: 1.9;
    color: #374151;
    margin-bottom: 25px;
    font-style: italic;
}

.bio p {
    margin-bottom: 20px;
    font-size: 1.05em;
}

.research-areas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 30px;
}

.research-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
    transition: all 0.3s;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.research-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    position: relative;
}

.research-card-link:hover h3 {
    background: rgba(37, 99, 235, 0.9);
}

.research-card:hover {
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
    transform: translateY(-2px);
}

.research-card h3 {
    font-size: 1.15em;
    font-weight: 600;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
    line-height: 1.4;
    height: 80px;
    display: flex;
    align-items: center;
}

.research-card-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.project-hero {
    margin-bottom: 30px;
}

.project-hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    color: #6b7280;
    margin: 16px 0 32px;
}

.project-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    color: #2563eb;
    margin-bottom: 16px;
}

.project-back:hover {
    color: #1d4ed8;
}

.project-section {
    margin-bottom: 32px;
}

.project-section h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.project-section h4 {
    font-size: 1.05em;
    font-weight: 600;
    margin: 12px 0 6px;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.project-section p + p {
    margin-top: 8px;
}

.project-figure {
    margin: 16px 0 0;
}

.project-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
}

.project-figure figcaption {
    margin-top: 8px;
    font-size: 0.9em;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.project-section ul,
.project-section ol {
    padding-left: 1.25em;
    margin-left: 0;
    list-style-position: outside;
}

.project-gallery {
    position: relative;
    margin-top: 12px;
    height: 220px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #f3f4f6;
    padding: 8px;
    --gallery-gap: 10px;
}

.project-gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease;
    gap: var(--gallery-gap);
}

.project-gallery img {
    flex: 0 0 calc((100% - (2 * var(--gallery-gap))) / 3);
    width: calc((100% - (2 * var(--gallery-gap))) / 3);
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.project-gallery-controls {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-gallery-button {
    pointer-events: auto;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 1.4em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-gallery:hover .project-gallery-controls {
    opacity: 1;
}

.project-gallery-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.16);
}

@media (max-width: 768px) {
    .project-gallery img {
        flex: 0 0 100%;
        width: 100%;
    }

    .project-gallery-controls {
        opacity: 1;
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 1000;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: min(1100px, 90vw);
    max-height: 85vh;
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.lightbox-caption {
    margin-top: 12px;
    color: #e5e7eb;
    font-size: 0.95em;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.3);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        background: rgba(255, 255, 255, 0.9);
    }
}

.project-links {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.project-links a {
    color: #2563eb;
}

.publication {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    margin-bottom: 1.5em;
    transition: background-color 0.2s;

}

.publication:hover {
    background: #f9fafb; /* subtle hover highlight */
}

.publication:last-child {
    border-bottom: none;
}

.abstract {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.abstract.show {
    opacity: 1;
    margin-top: 0.5em;
}
.publication h3 {
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.5;
}

.publication .authors {
    color: #6b7280;
    font-size: 0.95em;
    font-style: italic;
    margin-bottom: 5px;
}

.publication .venue {
    color: #9ca3af;
    font-size: 0.9em;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.course {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
    transition: all 0.3s;
}

.course:hover {
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.course h3 {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.course .term {
    color: #6b7280;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.course p {
    color: #6b7280;
    font-size: 0.95em;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-item {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
}

.contact-item strong {
    display: block;
    font-size: 0.85em;
    color: #9ca3af;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.contact-item a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #1d4ed8;
}

footer {
    background: #ffffff;
    color: #6b7280;
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9em;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    border-top: 1px solid #e5e7eb;
}


/* Minimal but still recognizable links */
a {
    color: #374151; /* muted but noticeable */
  text-decoration: none;
  transition: color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
}

/* Hover / focus: subtle emphasis */
a:hover,
a:focus {
    color: #2563eb; /* soft accent color */
  transform: translateY(-1px); /* tiny lift to indicate interactivity */
}

/* Active state: subtle feedback */
a:active {
    color: #1d4ed8;
  transform: translateY(0);
}

/* Optional: visited links understated */
/* a:visited {
  color: #4a4a4a;
} */

.pagination {
    text-align: center;
    margin: 2em 0;
    font-family: sans-serif;
}

.pagination ul {
    list-style: none;
    padding: 0;
    display: inline-flex;
    gap: 0.5em;
}

.pagination a {
    display: inline-block;
    padding: 0.4em 0.8em;
    text-decoration: none;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.pagination a:hover {
    background: #f3f4f6;
}

.pagination a.active {
    background: #111827;
    color: #fff;
    pointer-events: none;
}




@media (max-width: 768px) {
    header {
        padding: 16px 0 12px;
        margin-bottom: 24px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        transition: opacity 0.3s ease;
        opacity: 1;
    }

    header.header-hidden {
        opacity: 0;
        pointer-events: none;
    }

    body {
        padding-top: 85px;
    }

    header h1 {
        font-size: 1.6em;
        margin-bottom: 1px;
    }

    header .subtitle {
        font-size: 0.95em;
        margin-bottom: 12px;
        display: none;
    }

    .header-content {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .header-text {
        width: 100%;
        padding-right: 52px;
    }

    .profile-pic {
        display: none;
    }

    .profile-pic-mobile {
        display: block;
    }

    .header-content, .container {
        padding: 0 20px;
    }

    nav a {
        display: block;
        margin: 10px 0;
    }

    nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 10px 12px;
        border-radius: 12px;
        margin-top: 0;
        position: absolute;
        top: 8px;
        right: 20px;
        border: none;
    }

    .header-content {
        position: relative;
    }

    h2 {
        font-size: 1.8em;
    }

    .intro {
        font-size: 1.1em;
    }

    .research-areas {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .research-card-image {
        height: 200px;
    }

    .research-card h3 {
        font-size: 1.05em;
        line-height: 1.4;
        padding: 16px;
        height: 75px;
    }

    .project-hero img {
        height: 220px;
    }

    .pagination {
        display: block !important;
    }
}