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

html {
    scroll-behavior: smooth;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #d2d2d7;
    --link-color: #0071e3;
    --link-hover: #0077ed;
    --border-color: #d2d2d7;
    --tag-bg: #f5f5f7;
    --tag-hover: #e8e8ed;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
        "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 80px 60px 60px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.header {
    display: flex;
    gap: 60px;
    margin-bottom: 0;
    align-items: flex-start;
    padding-bottom: 0;
    border-bottom: none;
}

.header-left {
    flex: 0 0 240px;
    min-width: 0;
}

.headshot {
    width: 100%;
    max-width: 260px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 5%;
    object-fit: cover;
    border: none;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.headshot:hover {
    box-shadow: var(--shadow-lg);
}

.header-left h2 {
    margin-bottom: 8px;
    margin-top: 0;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-links {
    margin-top: 16px;
}

.header-left .title {
    margin-bottom: 8px;
    margin-top: 0;
}

.header-left .email {
    margin-bottom: 12px;
    margin-top: 0;
}

.header-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 0;
}

.header-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.link-separator {
    margin: 0 10px;
    color: var(--text-tertiary);
}

.header-nav {
    margin-top: 18px;
}

.header-nav-label {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.header-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-nav-links a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.92em;
    transition: color 0.2s ease;
}

.header-nav-links a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.header .bio {
    flex: 1;
    min-width: 0;
    line-height: 1.6;
    text-align: left;
}

.header .bio p {
    margin: 0 0 16px 0;
    font-size: 1.05em;
    color: var(--text-primary);
    font-weight: 400;
}

.header .bio p:last-child {
    margin-bottom: 0;
}

h1 {
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    font-size: 3em;
    margin-bottom: 8px;
    color: var(--text-primary);
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.title {
    font-size: 1.25em;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 400;
    line-height: 1.4;
}

.email {
    font-size: 1em;
    color: var(--text-primary);
    font-style: normal;
    font-weight: 400;
}

.bio {
    margin-bottom: 40px;
    line-height: 1.6;
}

.bio p {
    margin-bottom: 16px;
    text-align: left;
}

section {
    margin-bottom: 0;
}

section:last-of-type {
    margin-bottom: 0;
}

h2 {
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    font-size: 2.5em;
    margin-bottom: 32px;
    margin-top: 80px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
}

.header h2 {
    font-size: 2em;
    margin-top: 0;
}

h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Publication Cards ── */
.pub-card {
    background: var(--bg-primary);
    border: none;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.pub-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}
.pub-card.expanded {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.pub-card-static {
    cursor: default;
}
.pub-card-static:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.pub-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 22px;
    gap: 16px;
    cursor: inherit;
    -webkit-user-select: none;
    user-select: none;
}
.pub-card-header-content {
    flex: 1;
    min-width: 0;
    transition:
        opacity 0.15s ease,
        max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 200px;
}
.pub-card.expanded .pub-card-header-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}
.pub-card.expanded .pub-card-header {
    padding-bottom: 0;
}

.pub-card-title {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.35;
    color: var(--text-primary);
}
.pub-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.pub-card-title a:hover {
    color: var(--link-color);
}
.pub-card-authors-preview {
    margin: 1px 0;
    color: var(--text-secondary);
    font-size: 0.88em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pub-card-header .journal {
    margin: 1px 0;
    font-size: 0.85em;
}

.pub-card-chevron {
    flex-shrink: 0;
    color: var(--text-primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 4px;
}
.pub-card.expanded .pub-card-chevron {
    transform: rotate(180deg);
}

.pub-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.pub-card-body-inner {
    display: flex;
    gap: 28px;
    padding: 0 28px 28px;
}
.pub-card-thumbnail {
    flex: 0 0 220px;
    align-self: flex-start;
}
.pub-card-thumbnail a {
    display: block;
}
.pub-card-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}
.pub-card-thumbnail img:hover {
    box-shadow: var(--shadow-md);
}
.pub-card-details {
    flex: 1;
    min-width: 0;
}
.pub-card-expanded-header {
    margin-bottom: 18px;
}
.pub-card-expanded-header .pub-card-title {
    font-size: 1.1em;
    margin-bottom: 4px;
}
.pub-card-expanded-header .journal {
    margin: 2px 0;
    font-size: 0.9em;
}
.pub-card-detail-block {
    margin-bottom: 18px;
}
.pub-card-detail-block:last-child {
    margin-bottom: 0;
}
.pub-card-detail-block h4 {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}
.pub-card-detail-block p {
    font-size: 0.92em;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}
.pub-card-abstract {
    color: var(--text-secondary) !important;
}

.research-interests {
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--tag-bg);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.9em;
    color: var(--text-primary);
    border: none;
    transition: all 0.2s ease;
    cursor: default;
    font-weight: 400;
}

.tag:hover {
    background: var(--tag-hover);
}

.authors {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 400;
}

.authors strong {
    color: var(--text-primary);
    font-weight: 600;
}

.journal {
    margin: 4px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 400;
}

.journal strong {
    color: var(--text-primary);
    font-weight: 600;
}

.links {
    margin-top: 6px;
    font-size: 0.9em;
}

.link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.teaching-service ul {
    list-style: none;
    margin-bottom: 28px;
}

.teaching-service li {
    margin-bottom: 10px;
    padding-left: 0;
    position: relative;
    color: var(--text-primary);
    font-weight: 400;
}

.teaching-service li::before {
    content: "";
}

.teaching-service h3 {
    margin-top: 48px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5em;
}

.teaching-service h3:first-child {
    margin-top: 0;
}

.media-coverage {
    margin-bottom: 0;
}

.media-item {
    margin-bottom: 56px;
    padding: 0;
    border-bottom: none;
    border-radius: 0;
    background: transparent;
}

.media-item:last-child {
    border-bottom: none;
}

.media-item h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 600;
}

.media-item p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 400;
}

.media-outlets {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.media-images {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
}

.media-images a {
    flex: 0 0 calc(33.333% - 11px);
    display: block;
}

.media-img {
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: block;
}

.media-img:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.footer {
    text-align: center;
    padding-top: 80px;
    padding-bottom: 40px;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    color: var(--text-secondary);
    font-size: 0.85em;
}

.footer a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 40px 24px;
        margin: 0 auto;
    }

    .header {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .header-left {
        flex: 1;
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }

    .header-left h1,
    .header-left .title,
    .header-left .email {
        text-align: center;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 2em;
        margin-top: 56px;
    }

    .headshot {
        max-width: 200px;
        margin: 0 auto 20px;
    }

    .header .bio {
        flex: 1;
        width: 100%;
        text-align: left;
    }

    .header .bio p {
        text-align: left;
    }

    .interests {
        justify-content: center;
    }

    .media-images {
        justify-content: center;
    }

    .media-images a {
        flex: 0 0 100%;
        max-width: 300px;
    }

    .media-img {
        width: 100%;
        max-width: 100%;
    }

    .pub-card-header {
        padding: 12px 16px;
    }
    .pub-card-body-inner {
        flex-direction: column;
        padding: 0 18px 20px;
        gap: 18px;
    }
    .pub-card-thumbnail {
        flex: 0 0 auto;
        max-width: 180px;
    }

    .media-item {
        padding: 20px;
    }
}

.media-img-large {
    max-width: 100%;
}

.media-images a:has(.media-img-large) {
    flex: 0 0 calc(66.666% - 5px);
}
