/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

body {
    color: #2c3e50;
    background-color: #fafafa;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
}

/* Header */
.site-header {
    padding: 3rem 1.5rem 1.5rem;
    background: #fff;
    text-align: center;
}

.site-header h1 {
    color: #1a1a1a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.4rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.subtitle {
    margin-top: 0.4rem;
    color: #6c757d;
    font-size: 1.05rem;
    font-weight: 400;
}

/* Navigation */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    text-align: center;
}

.site-nav a {
    display: inline-block;
    margin: 0 1.1rem;
    padding: 0.3rem 0;
    color: #002147;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: #1a4a7a;
}

/* Main container and sections */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 3rem 0;
    border-bottom: 1px solid #e8e8e8;
}

.section:last-child {
    border-bottom: 0;
}

.section h2 {
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 400;
}

.about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-image {
    display: block;
    width: 220px;
    height: auto;
    flex-shrink: 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
}

.about-text {
    min-width: 0;
    flex: 1;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.85;
}

.research-questions {
    margin: -0.15rem 0 1.25rem 1.25rem;
    padding-left: 0.75rem;
}

.research-questions li {
    margin-bottom: 0.35rem;
    padding-left: 0.25rem;
    line-height: 1.55;
}

.research-questions li::marker {
    color: #002147;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.2rem;
    margin-top: 1.5rem;
    color: #777;
    font-size: 0.95rem;
}

.social-links a {
    color: inherit;
    text-decoration-color: rgb(119 119 119 / 35%);
}

.social-links a:hover,
.social-links a:focus-visible {
    color: #4f4f4f;
    text-decoration-color: #4f4f4f;
}

.research-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 4rem;
    max-width: 952px;
    margin: 0 auto;
}

.research-column h3 {
    margin: 0 0 1.15rem;
    color: #343a40;
    font-size: 1.2rem;
    font-weight: 600;
}

.research-placeholder {
    margin: 0;
    color: #777;
    font-style: italic;
}

.research-list {
    margin-left: 1.1rem;
    padding-left: 0.85rem;
}

.research-entry {
    margin: 0 0 1.15rem;
    padding-left: 0.2rem;
}

.research-entry::marker {
    color: #4c5155;
}

.research-title,
.research-authors,
.research-meta,
.research-resource {
    display: block;
}

.research-title {
    color: #1a1a1a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04rem;
    font-weight: 400;
    line-height: 1.35;
}

.research-authors {
    color: #3d4b57;
    font-size: 0.94rem;
    line-height: 1.4;
}

.research-meta,
.research-resource {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.35;
}

.research-resource a {
    color: #777;
    text-decoration-color: rgb(119 119 119 / 35%);
}

.research-resource a:hover,
.research-resource a:focus-visible {
    color: #4f4f4f;
    text-decoration-color: #4f4f4f;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
    column-gap: 2.5rem;
    row-gap: 0.8rem;
    max-width: 952px;
    margin: 0 auto;
    padding-left: 0;
    list-style: none;
}

.blog-entry {
    margin: 0;
    padding-left: 0.2rem;
    color: #1a1a1a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04rem;
    line-height: 1.4;
    white-space: nowrap;
}

.blog-entry a {
    color: #777;
    text-decoration-color: rgb(119 119 119 / 35%);
}

.blog-entry a:hover,
.blog-entry a:focus-visible {
    color: #4f4f4f;
    text-decoration-color: #4f4f4f;
}

.speaking-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 300px));
    align-items: start;
    justify-content: space-between;
    column-gap: 1.625rem;
    max-width: 952px;
    margin: 0 auto;
}

.speaking-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.speaking-item {
    max-width: 390px;
    margin: 0;
}

@media (min-width: 769px) {
    .speaking-column:nth-child(1) {
        margin-top: 0.35rem;
    }

    .speaking-column:nth-child(2) {
        align-items: center;
    }

    .speaking-column:nth-child(3) {
        align-items: flex-end;
        margin-top: 1rem;
    }

    .talk-elab,
    .talk-ellis {
        width: min(100%, 300px);
    }

    .talk-union {
        width: min(100%, 225px);
    }

    .talk-india {
        width: min(100%, 220px);
        max-width: 220px;
        margin-left: 1.25rem;
    }

    .talk-madfest {
        width: min(100%, 292px);
    }

    .talk-fox {
        width: min(100%, 284px);
    }
}

.speaking-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

.speaking-item figcaption {
    margin: 0.55rem 0.05rem 0;
    color: #333;
    font-size: 0.88rem;
    line-height: 1.45;
}

.gallery-meta {
    display: block;
    margin-top: 0.1rem;
    color: #777;
}

/* Links */
a {
    color: #002147;
    text-decoration: underline;
    text-decoration-color: rgb(0 33 71 / 30%);
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
    color: #1a4a7a;
    text-decoration-color: #1a4a7a;
}

a:focus-visible {
    outline: 2px solid #1a4a7a;
    outline-offset: 3px;
}

/* Footer */
.site-footer {
    margin-top: 1rem;
    padding: 2rem 1rem;
    border-top: 1px solid #e8e8e8;
    color: #6c757d;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive layout */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.8rem;
    }

    .site-nav a {
        margin: 0 0.7rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
    }

    .profile-image {
        width: 200px;
        margin-bottom: 0.5rem;
    }

    .research-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-list {
        grid-template-columns: 1fr;
        justify-content: stretch;
        row-gap: 0.8rem;
    }

    .blog-entry {
        white-space: normal;
    }

    .speaking-gallery {
        display: flex;
        flex-direction: column;
        row-gap: 2rem;
    }

    .speaking-column {
        display: contents;
    }

    .talk-elab { order: 1; }
    .talk-union { order: 2; }
    .talk-madfest { order: 3; }
    .talk-ellis { order: 4; }
    .talk-india { order: 5; }
    .talk-fox { order: 6; }

    .talk-union,
    .talk-india {
        width: min(82%, 320px);
        align-self: center;
    }

    .talk-india {
        margin-left: 0;
    }

    .future-section {
        min-height: 7rem;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 2rem 1rem 1rem;
    }

    .site-header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .site-nav {
        padding-inline: 0.35rem;
    }

    .site-nav a {
        margin: 0 0.4rem;
        font-size: 0.84rem;
    }

    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 1.75rem 0;
    }

    .research-questions {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }

    .profile-image {
        width: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
