:root {
    --badger-red: #C5050C;
    --text-dark: #222;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    color: #222;
    background: #fff;
}

header {
    border-bottom: 3px solid var(--badger-red);
    padding: 1rem 2rem;
}

.site-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--badger-red);
    text-decoration: none;
}

.nav-right a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--badger-red);
    font-weight: 500;
}

.nav-right a:hover {
    text-decoration: underline;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-weight: 600;
    text-decoration: none;

}

.nav-right a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: #222;
}

main {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
}

main h1 {
    color: var(--badger-red);
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-weight: 600;
    color: var(--badger-red);
}

footer {
    border-top: 1px solid #e5e5e5;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* Hero Section */
    .hero {
        display: flex;
        align-items: center;
        gap: 3rem;
        margin-top: 3rem;
    }

    .hero-text {
        flex: 2;
    }

    .hero-text h1 {
        margin-bottom: 0.3rem;
        color: var(--badger-red);
    }

    .hero-text h3 {
        margin-top: 0;
        font-weight: 500;
    }

    .hero-image {
        flex: 1;
        text-align: right;
    }

    .hero-image img {
        max-width: 220px;
        border-radius: 6px;
    }

@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-image {
        text-align: center;
    }
}

/* Blog Section */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 1rem;
    background: #fff;
}

.blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
}

.blog-card h2 {
    font-size: 1.1rem;
    margin: 0.8rem 0 0.3rem;
}

.blog-meta {
    font-size: 0.85rem;
    color: #666;
}

.blog-excerpt {
    font-size: 0.95rem;
    line-height: 1.4;
}

.blog-card a {
    text-decoration: none;
    color: inherit;
}

.blog-card a:hover h2 {
    text-decoration: underline;
}

/* Video on Blog Page */

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-thumb {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.video-thumb img {
    width: 100%;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    width: 64px;
    height: 64px;
    line-height: 64px;
    text-align: center;
    border-radius: 50%;
    pointer-events: none;
}

.video-link {
    text-decoration: none;
    color: inherit;
}

/* Blogs and Podcasts Tabs */

.content-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
}

.tab-button {
    padding: 0.5rem 1.2rem;
    border: 1px solid #C5050C;
    background: white;
    color: #C5050C;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
}

.tab-button.active {
    background: #C5050C;
    color: white;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Podcast specific */

.podcast-links {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.6rem;
    align-items: center;
}

.podcast-links a img {
    width: 18px;
    height: 18px;
    opacity: 0.75;
}

.podcast-links a:hover img {
    opacity: 1;
}

.language-flag {
    font-size: 1rem;
    margin-left: 0.4rem;
}

/* News */

/* News – Filters */

.media-filters {
    display: flex;
    align-items: center;
    gap: 1.2rem;                /* tighter horizontal spacing */
    margin: 1.2rem 0 1.8rem;    /* tighter vertical spacing */
    padding: 0.7rem 1rem;       /* slimmer bar */
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fafafa;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--badger-red);
}

.filter-group label {
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-actions {
    margin-left: 0.8rem; /* NOT auto */
}

#clear-filters {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    border: 1px solid var(--badger-red);
    background: white;
    color: var(--badger-red);
    border-radius: 4px;
    cursor: pointer;
}

#clear-filters:hover {
    background: var(--badger-red);
    color: white;
}

.filter-group input[type="checkbox"] {
    accent-color: var(--badger-red);
}

@media (max-width: 600px) {
    .media-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-actions {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}


/* News – Media Items */

.media-year {
    margin-top: 2.5rem;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 0.3rem;
}

.media-item {
    margin: 1.4rem 0;
}

.media-item a {
    font-weight: 500;
    text-decoration: none;
    color: #222;
}

.media-item a:hover {
    text-decoration: underline;
}

.media-meta {
    font-size: 0.85rem;
    color: #666;
}

/* ===================== */
/* Teaching Page Styles */
/* ===================== */

.teaching-block {
    margin-bottom: 1.5rem;
}

.teaching-meta {
    font-size: 0.9rem;
    color: #666;
}

.teaching-links {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.6rem;
}

.teaching-button {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    border: 1px solid var(--badger-red);
    color: var(--badger-red);
    background: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.teaching-button:hover {
    background: var(--badger-red);
    color: white;
}

/* Teaching image layout */

.teaching-with-image {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

.teaching-image img {
    width: 180px;
    max-width: 100%;
    border-radius: 6px;
}

/* Mobile: stack image below text */
@media (max-width: 768px) {
    .teaching-with-image {
        grid-template-columns: 1fr;
    }

    .teaching-image {
        margin-top: 1rem;
    }
}

/* Teaching page heading spacing */

main h2 {
    margin-top: 2.2rem;
    margin-bottom: 1.2rem;
}

main h3 {
    margin-top: 1.6rem;
    margin-bottom: 0.8rem;
}

/* ===================== */
/* Research Page Styles */
/* ===================== */

.research-item {
    margin-bottom: 3rem;
}

.research-content {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 1.5rem;
    align-items: center;
}

.research-meta {
    font-size: 0.95rem;
    color: #666;
}

.research-abstract {
    margin-top: 0.6rem;
    max-width: 650px;
}

.research-media ul {
    margin: 0.4rem 0 0.8rem 1.2rem;
}

.research-media {
    max-width: 650px;
}

.research-figure img {
    width: 100%;
}

/* Mobile: stack figure below text */
@media (max-width: 768px) {
    .research-content {
        grid-template-columns: 1fr;
    }

    .research-figure {
        margin-top: 1rem;
    }
}

/* Contact icons */

.contact-icons {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    margin-top: 0.6rem;
}

.contact-icons img {
    width: 22px;
    height: 22px;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.contact-icons a:hover img {
    opacity: 1;
}
