/* ==========================================================================
   Academic Pages-style theme — shared stylesheet for all pages
   Layout: top masthead nav + left author sidebar + content column
   ========================================================================== */

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

:root {
    --primary: #2d3237;      /* headings */
    --accent: #337ab7;       /* links */
    --accent-dark: #23527c;
    --light-bg: #f8f9fa;
    --border: #f2f3f3;       /* hairline */
    --border-strong: #e1e4e8;
    --text-dark: #494e52;
    --text-muted: #7a8288;
    --success: #10b981;
    --accent-light: #eef3f8;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: white;
    line-height: 1.65;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Masthead (top navigation)
   -------------------------------------------------------------------------- */
nav.masthead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-strong);
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    max-width: 100%;
}

nav.masthead .masthead-inner {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav.masthead .logo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

nav.masthead .logo:hover {
    text-decoration: none;
    color: var(--accent);
}

nav.masthead ul {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    margin: 0;
}

nav.masthead ul li {
    margin: 0;
}

nav.masthead ul a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

nav.masthead ul a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.drop-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.drop-btn i {
    font-size: 0.65rem;
    transition: transform 0.3s;
}

.dropdown:hover .drop-btn,
.dropdown:focus-within .drop-btn {
    color: var(--accent);
}

.dropdown:hover .drop-btn i,
.dropdown:focus-within .drop-btn i {
    transform: rotate(180deg);
}

.drop-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    list-style: none;
    z-index: 200;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.4rem 0;
    min-width: 150px;
    margin: 0;
}

.drop-menu::before {
    content: "";
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.6rem;
}

.dropdown:hover .drop-menu,
.dropdown:focus-within .drop-menu {
    display: block;
}

nav.masthead .drop-menu li {
    margin: 0;
}

.drop-menu a {
    display: block;
    padding: 0.45rem 1.1rem;
    white-space: nowrap;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.drop-menu a:hover {
    background: var(--light-bg);
    color: var(--accent);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Page layout: sidebar + content
   -------------------------------------------------------------------------- */
.page-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

/* Author sidebar */
.author-sidebar {
    position: sticky;
    top: 5rem;
    text-align: left;
    font-size: 0.9rem;
}

.author-sidebar img.author-photo {
    width: 100%;
    max-width: 175px;
    border-radius: 6px;
    display: block;
    margin-bottom: 0.9rem;
}

.author-sidebar .author-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.author-sidebar .author-role {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.author-sidebar ul.author-links {
    list-style: none;
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.author-sidebar ul.author-links li {
    margin-bottom: 0.55rem;
}

.author-sidebar ul.author-links a {
    color: var(--text-dark);
    font-size: 0.88rem;
    text-decoration: none;
}

.author-sidebar ul.author-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.author-sidebar ul.author-links i {
    width: 1.3rem;
    color: var(--text-muted);
    text-align: center;
    margin-right: 0.3rem;
}

/* Content column */
main.content {
    min-width: 0;
}

main.content > *:first-child {
    margin-top: 0;
}

h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    margin-bottom: 1rem;
}

h2, .section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-strong);
}

h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

main.content ul {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.75;
}

main.content li {
    margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------------
   Home page (hero, news feature, skills)
   -------------------------------------------------------------------------- */
.hero {
    padding: 0;
    max-width: none;
    margin: 0 0 2rem;
}

.hero-content {
    display: block;
}

.hero-image {
    display: none; /* photo lives in the author sidebar in this layout */
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: 400;
}

.hero p {
    font-size: 1rem;
    color: var(--text-dark);
    max-width: 44rem;
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.cta-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: white;
    color: var(--accent);
}

.btn-secondary:hover {
    background: var(--light-bg);
    text-decoration: none;
}

/* In the News feature card */
.news-feature {
    padding: 0;
    max-width: none;
    margin: 0 0 2rem;
}

.news-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.news-feature-card {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
}

.news-feature-card img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.news-feature-text {
    min-width: 0;
}

.news-feature-text .news-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.news-feature-text h3 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.news-feature-text p {
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.news-feature-text a {
    font-size: 0.88rem;
    font-weight: 600;
}

/* Skills */
.skills {
    padding: 0;
    max-width: none;
    margin: 0;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.skill-category {
    border: 1px solid var(--border-strong);
    padding: 1.1rem 1.25rem;
    border-radius: 6px;
    background: white;
}

.skill-category h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.skill-category p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.skill-category p strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   About / CV page
   -------------------------------------------------------------------------- */
.container {
    max-width: none;
    margin: 0;
    padding: 0;
}

.about-intro {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.75;
    margin-bottom: 2rem;
    padding: 0 0 1.5rem;
    background: none;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid var(--border-strong);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.edu-card {
    border: 1px solid var(--border-strong);
    padding: 1.1rem 1.25rem;
    border-radius: 6px;
    background: white;
}

.edu-degree {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
}

.edu-school {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.edu-year {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.role-item {
    margin-bottom: 1.5rem;
    padding: 0 0 1.25rem;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.role-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.role-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.role-org {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.skill-box {
    border: 1px solid var(--border-strong);
    padding: 1.1rem 1.25rem;
    border-radius: 6px;
    background: white;
}

.skill-box h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.skill-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.awards-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.award-item {
    padding: 0.8rem 0;
    background: none;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid var(--border);
}

.award-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.award-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Projects page
   -------------------------------------------------------------------------- */
.intro-text {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 44rem;
    margin-bottom: 2rem;
    line-height: 1.75;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-header {
    padding: 1.25rem 1.5rem 0.5rem;
    border-bottom: none;
}

.project-type {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    border: 1px solid var(--border-strong);
}

.project-title {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.project-body {
    padding: 0 1.5rem;
    flex-grow: 1;
}

.project-description {
    color: var(--text-dark);
    font-size: 0.93rem;
    line-height: 1.7;
    margin: 0.5rem 0 1rem;
}

.project-impact {
    background: none;
    border-left: 3px solid var(--border-strong);
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 0.75rem 0;
    border-radius: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 1rem;
}

.tech-tag {
    background: var(--light-bg);
    color: var(--text-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.78rem;
    border: 1px solid var(--border-strong);
}

.project-footer {
    padding: 0.9rem 1.5rem;
    background: var(--light-bg);
    border-top: 1px solid var(--border-strong);
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.88rem;
}

.publications-section {
    margin-top: 2.5rem;
}

.publications-list {
    display: grid;
    gap: 0;
}

.publication-item {
    padding: 1.1rem 0;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.pub-status {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.4rem;
}

.pub-published {
    background: rgba(16, 185, 129, 0.1);
    color: #0b7a5c;
}

.pub-submitted {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.pub-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.98rem;
    margin: 0.3rem 0;
    line-height: 1.5;
}

.pub-citation {
    color: var(--text-muted);
    font-size: 0.87rem;
    font-style: italic;
    margin: 0.4rem 0;
}

.pub-link {
    font-size: 0.87rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Impact / Talks page
   -------------------------------------------------------------------------- */
.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.15rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.87rem;
}

.talk-item {
    padding: 1.1rem 0;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin-bottom: 0;
}

.talk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.talk-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
    flex: 1;
}

.talk-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.talk-venue {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-style: italic;
    margin-bottom: 0.35rem;
}

.talk-description {
    color: var(--text-dark);
    font-size: 0.92rem;
    line-height: 1.65;
}

.talk-type {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.5rem;
    border: 1px solid var(--border-strong);
}

/* --------------------------------------------------------------------------
   News page
   -------------------------------------------------------------------------- */
.page-header {
    padding: 0;
    max-width: none;
    margin: 0 0 1.5rem;
}

.page-header p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 44rem;
}

.news-list {
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-card {
    display: flex;
    gap: 1.25rem;
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 1.4rem 1.5rem;
}

.news-card.featured {
    border-left: 3px solid var(--accent);
    background: white;
}

.news-image {
    flex-shrink: 0;
    width: 200px;
}

.news-image img {
    width: 100%;
    height: 135px;
    object-fit: cover;
    border-radius: 4px;
}

.news-body {
    min-width: 0;
}

.news-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.news-meta .outlet {
    color: var(--text-dark);
    font-weight: 600;
}

.news-card h2 {
    font-size: 1.1rem;
    color: var(--primary);
    line-height: 1.4;
    margin: 0 0 0.45rem;
    padding-bottom: 0;
    border-bottom: none;
}

.news-card h2 a {
    color: inherit;
}

.news-card h2 a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.news-card p {
    font-size: 0.93rem;
    color: var(--text-dark);
    margin-bottom: 0.7rem;
}

.news-card blockquote {
    border-left: 3px solid var(--border-strong);
    padding-left: 1rem;
    margin: 0 0 0.7rem;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.read-link {
    font-size: 0.88rem;
    font-weight: 600;
}

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: var(--accent-light);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Connect section + footer
   -------------------------------------------------------------------------- */
.connect {
    background: var(--light-bg);
    color: var(--text-dark);
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-strong);
}

.connect h2 {
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--primary);
}

.connect-links {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.connect-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
}

.connect-links a:hover {
    text-decoration: underline;
}

footer {
    padding: 1.25rem 1.5rem;
    text-align: center;
    background: var(--light-bg);
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .page-wrap {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .author-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 0 1.25rem;
        align-items: center;
    }

    .author-sidebar img.author-photo {
        grid-row: 1 / 4;
        max-width: 110px;
        margin-bottom: 0;
    }

    .author-sidebar ul.author-links {
        border-top: none;
        padding-top: 0;
        display: flex;
        gap: 1.25rem;
        flex-wrap: wrap;
    }

    .author-sidebar ul.author-links li {
        margin-bottom: 0;
    }

    nav.masthead .masthead-inner {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }

    nav.masthead ul {
        gap: 1.1rem;
        flex-wrap: wrap;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .news-feature-card,
    .news-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-feature-card img {
        width: 100%;
        height: 160px;
    }

    .news-image {
        width: 100%;
    }

    .role-header,
    .talk-header {
        flex-direction: column;
        gap: 0.15rem;
    }
}
