/* ==============================
   Global Styles
============================== */
body {
    font-family: 'Inter', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: #111;
    margin-top: 0;
}

h2 {
    border-bottom: 2px solid #6b4e71;
    padding-bottom: 0.2rem;
    margin-bottom: 1.2rem;
}

p {
    color: #444;
    margin-bottom: 1rem;
}

/* ==============================
     Links
============================== */
a {
    color: #857e7e;
    text-decoration: underline;
}

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

/* ==============================
     Header + Navigation
============================== */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: lowercase;
    position: relative;
    padding-bottom: 0.25rem;
}

nav a:hover {
    color: #333;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 1px;
    background-color: #333;
    transition: width 0.2s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* ==============================
     Bio Section
============================== */
.bio {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.bio-photo {
    flex: 0 0 240px;
}

.bio-photo img {
    width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bio-text {
    flex: 1;
}

.bio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.bio-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #111;
}

.bio-text h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.2rem 0;
    color: #111;
}

.bio-text h2 {
    font-size: 1rem;
    font-weight: 400;
    color: #8a6d95;
    margin: 0 0 0.8rem 0;
}

.bio-text p {
    color: #444;
    line-height: 1.6;
}

/* ==============================
     Social Links
============================== */
.social-links {
    margin: 0.4rem 0 1rem 0;
}

.social-links a {
    margin-right: 0.8rem;
    font-size: 1.1rem;
    color: #888;
    text-decoration: none;
}

.social-links a:hover {
    color: #000;
}

.social-links img {
    vertical-align: middle;
}

/* Header icons + email under them */
.social-inline {
    margin: 0.5rem 0 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.social-icons {
    display: inline-flex;
    align-items: center;
}

.social-icons a {
    margin-right: 0.8rem;
    font-size: 1.2rem;
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-icons a:last-child {
    margin-right: 0;
}

.social-icons a:hover {
    color: #8a6d95;
}

.email-row {
    padding: 0.18rem 0.55rem;
    border: 1px solid #eee;
    border-radius: 999px;
    background: #faf7fb;
    color: #6b4e71;
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
}

/* ==============================
     News Section
============================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.news-card {
    position: relative;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 0.2rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.news-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: #6b4e71;
    opacity: 0.9;
}

/* Each dated line (original or update) */
.news-updates {
    margin: 0;
    padding: 0.6rem 0;
    list-style: none;
    display: grid;
    gap: 0.65rem;
}

/* Put a divider between lines */
.news-update + .news-update {
    border-top: 1px solid #eee;
    padding-top: 0.65rem;
}

/* Date column + text column (same for original + update) */
.news-update {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    align-items: start;
}

.update-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #eee;
    background: #faf7fb;
    color: #6b4e71;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
}

.update-text {
    color: #444;
}

/* Mobile */
@media (max-width: 600px) {
    .news-update {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .update-date {
        justify-content: flex-start;
        width: fit-content;
    }
}

/* ==============================
     Publications
============================== */
.pub-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    margin-top: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.pub-card {
    flex: 0 0 280px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.pub-img {
    width: 100%;
    height: 190px;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}

.pub-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pub-img canvas.pub-pdf {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.pub-img.pub-pdf-fallback::after {
    content: "View paper";
    color: #555;
}

.pub-img.pub-pdf-fallback canvas {
    display: none;
}

.pub-info {
    padding: 0.8rem;
}

.pub-title {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 10px 0;
    color: #000;
}

.pub-title:hover {
    color: #000;
    text-decoration: none;
    cursor: default;
}

.pub-authors {
    font-size: 0.8rem;
    color: #444;
    margin: 0.2rem 0;
}

.pub-desc {
    font-size: 0.8rem;
    color: #555;
}

/* ==============================
     Videos
============================== */
.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.video-card {
    flex: 1 1 400px;
    max-width: 500px;
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
}

.video-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 4px;
}

/* ==============================
     Albums
============================== */
.album-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.album-card {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    height: 230px;
}

.album-card:hover {
    transform: scale(1.02);
}

.album-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.album-title {
    padding: 0.5rem;
    text-align: center;
    color: #6b4e71;
    font-size: 0.95rem;
}

/* ==============================
     Horizontal auto-scroll tracks
============================== */
.scroll-track {
    cursor: grab;
    scrollbar-width: thin;
}

.scroll-track:active {
    cursor: grabbing;
}

.scroll-track::-webkit-scrollbar {
    height: 6px;
}

.scroll-track::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.scroll-track::-webkit-scrollbar-track {
    background: transparent;
}

/* ==============================
     Modal (Album Viewer)
============================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.modal img {
    max-width: 90vw;
    max-height: 85vh;
    margin: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    padding-top: 2rem;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    color: #fff;
    font-weight: bold;
    font-size: 2rem;
    user-select: none;
    transition: 0.3s;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* ==============================
     Courses
============================== */
.courses-container {
    display: flex;
    max-width: 1100px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 1rem;
}

.sidebar {
    flex: 0 0 220px;
    background-color: #f8f8f8;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar img {
    width: 160px;
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    object-fit: cover;
}

.course-content {
    flex: 1;
}

.course-content h2 {
    border-bottom: 2px solid #6b4e71;
    color: #222;
}

.course-content p,
.course-content ul {
    color: #444;
}

.course-content ul {
    padding-left: 1.5rem;
}

.course-content li {
    margin-bottom: 0.5rem;
}

/* ==============================
     Sections
============================== */
section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

section+section {
    border-top: 1px solid #eee;
    padding-top: 2rem;
}
