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

:root {
    --bg: #0b0f14;
    --surface: #111827;
    --accent: #4fd1ff;
    --accent-2: #1b6ca8;
    --text: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --header-offset: 180px;
    --social-icon-filter: invert(1);
}

body.light-mode {
    --bg: #f7fafc;
    --surface: #ffffff;
    --accent: #4fd1ff;
    --accent-2: #1b6ca8;
    --text: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --social-icon-filter: invert(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--bg);
    border-bottom: 1px solid rgba(27, 108, 168, 0.45);
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    color: var(--text);
    font-size: 2.5em;
    font-weight: 600;
    z-index: 10;
    padding: 20px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 520px;
}

.site-title {
    font-size: 0.6em;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.site-tagline {
    font-size: 0.35em;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
}

.logo {
    display: inline-block;
    letter-spacing: -0.5px;
}

.logo,
.logo:visited {
    color: inherit;
    text-decoration: none;
}

.logo img {
    display: block;
    height: 96px;
    width: auto;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(79, 209, 255, 0.4);
    border-radius: 999px;
    padding: 10px 28px;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(79, 209, 255, 0.4);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.35em;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.menu-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.menu-icon {
    width: 22px;
    height: 14px;
    position: relative;
    display: inline-block;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.menu-icon::before {
    top: 0;
}

.menu-icon::after {
    bottom: 0;
}

.menu-icon span {
    display: none;
}

.mobile-menu {
    border-top: 1px solid rgba(27, 108, 168, 0.3);
    background: var(--bg);
}

.mobile-menu-inner {
    padding: 20px 40px 30px;
    display: grid;
    gap: 18px;
}

.mobile-section ul {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.mobile-section a {
    color: var(--text);
    text-decoration: none;
}

.mobile-section a:hover {
    color: var(--accent);
}

.mobile-title {
    font-size: 0.4em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
}

header nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.45em;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

header nav a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    padding: 160px 40px 60px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 1.25em;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--header-offset) 40px 60px;
}

main.home-layout-report {
    max-width: 780px;
}

main.home-layout-report .home-sections {
    grid-template-columns: 1fr;
}
.home-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    align-items: start;
}

.home-intro {
    max-width: 100%;
    margin: 0 0 30px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.home-sections .topics-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin: 0;
}

.page-content {
    max-width: 100%;
    margin: 0;
    padding: var(--header-offset) 40px 60px;
}

.article-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 32px 36px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.page-content h1,
.page-title {
    font-size: 2.4em;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5em;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(27, 108, 168, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-date {
    color: var(--text-muted);
    font-size: 0.35em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0;
    font-weight: 400;
}

.page-content h2,
.page-body h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 1.6em 0 0.6em;
}

.page-content h3,
.page-body h3 {
    font-size: 1.35em;
    font-weight: 600;
    margin: 1.4em 0 0.5em;
}

.page-content p,
.page-body p {
    margin: 0 0 1.1em;
    line-height: 1.75;
}

.page-content p:last-child,
.page-body p:last-child {
    margin-bottom: 0;
}

.page-content a,
.page-body a {
    color: var(--accent);
    text-decoration: none;
}

.page-content a:hover,
.page-body a:hover {
    color: var(--accent-2);
    text-decoration: underline;
}

.page-content ul,
.page-content ol,
.page-body ul,
.page-body ol {
    margin: 0 0 1.1em 1.2em;
    padding: 0;
    line-height: 1.7;
}

.page-content li,
.page-body li {
    margin: 0.35em 0;
}

.page-content blockquote,
.page-body blockquote {
    margin: 1.4em 0;
    padding: 0.3em 1.2em;
    border-left: 3px solid var(--accent-2);
    background: rgba(27, 108, 168, 0.08);
    color: var(--text-secondary);
}

.page-content code,
.page-body code {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.95em;
    padding: 0.1em 0.3em;
    background: rgba(79, 209, 255, 0.12);
    border-radius: 6px;
}

.page-content pre,
.page-body pre {
    margin: 1.2em 0;
    padding: 1.1em 1.2em;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid rgba(79, 209, 255, 0.25);
    overflow-x: auto;
    line-height: 1.6;
}

.page-content pre code,
.page-body pre code {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 0.95em;
}

.page-content hr,
.page-body hr {
    margin: 2em 0;
    border: none;
    border-top: 1px solid rgba(79, 209, 255, 0.3);
}

.embed {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    margin: 1.4em 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0b0f14;
    border: 1px solid rgba(79, 209, 255, 0.25);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1200px) {
    .embed {
        max-width: 720px;
    }
}

.embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.page-body {
    column-count: 1;
    column-gap: 32px;
}

.page-template-article .page-body h2,
.page-template-article .page-body h3,
.page-template-article .page-body blockquote {
    break-inside: avoid;
}

.page-template-article .page-body {
    column-count: 1;
}

@media (min-width: 900px) {
    .page-template-article .page-body {
        column-count: 2;
    }
}

@media (min-width: 1200px) {
    .page-template-article .page-body {
        column-count: 3;
    }
}

.page-template-report .page-body {
    column-count: 1;
    max-width: 100%;
    margin: 0;
}

.page-body-contact {
    margin-bottom: 20px;
}

.contact-form {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.contact-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-field {
    display: grid;
    gap: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.contact-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(79, 209, 255, 0.2);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text);
    font-size: 1em;
    font-weight: 500;
}

body.light-mode .contact-input {
    background: #f8fafc;
    border-color: rgba(27, 108, 168, 0.3);
}

.contact-input:focus {
    outline: 2px solid rgba(79, 209, 255, 0.5);
    border-color: transparent;
}

.contact-textarea {
    resize: vertical;
    min-height: 180px;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-submit {
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #0b0f14;
}

.contact-submit:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.contact-status {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-secondary);
}

.contact-status[data-state="error"] {
    color: #fca5a5;
}

.contact-status[data-state="success"] {
    color: #86efac;
}

.contact-status[data-state="pending"] {
    color: #fde68a;
}

.page-template-gallery .article-card {
    padding: 28px;
}

.gallery {
    display: grid;
    gap: 28px;
}

.gallery-row {
    display: grid;
    gap: 14px;
}

.gallery-commentary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.gallery-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(79, 209, 255, 0.25);
    background: var(--surface);
}

.page-content .media-frame {
    width: 33%;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 14px;
    border: 1px solid rgba(79, 209, 255, 0.45);
    overflow: hidden;
    position: relative;
    background: var(--surface);
}

.page-content .media-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/shg-badge-180.png");
    background-repeat: no-repeat;
    background-position: right 16px bottom 16px;
    background-size: 120px auto;
    opacity: 0.18;
    pointer-events: none;
}

.page-content .media-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.page-content img {
    max-width: 100%;
}

.page-content img,
.page-body img {
    cursor: zoom-in;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 12, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 30;
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox img {
    max-width: min(96vw, 1200px);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    border: 1px solid rgba(79, 209, 255, 0.5);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-open {
    overflow: hidden;
}

/* Section Titles */
.section-title {
    font-size: 1.75em;
    font-weight: 600;
    color: var(--accent);
    margin: 60px 0 30px;
    text-align: center;
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(27, 108, 168, 0.45);
}

.section-title::after {
    content: none;
}

/* Featured Section */
.featured-section {
    margin-bottom: 40px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0 auto;
}

.topic.featured {
    min-height: 400px;
}

.topic.featured h3 {
    font-size: 24px;
    padding: 24px 30px;
}

/* Topics Grid */
.topics-section {
    margin-bottom: 50px;
}

.latest-section .topics-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin: 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 30px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.latest-section .topics-grid {
    max-width: 100%;
    margin: 0;
}

.latest-section .topic {
    width: 100%;
    max-width: none;
}

body .latest-section .topic {
    max-width: none;
}

/* Topic Cards */
.topic {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 300px;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.home-sections .topic {
    max-width: none;
    width: 100%;
}

.topic:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
}

.topic.featured:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.15);
}

.topic img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.topic:hover img {
    transform: scale(1.05);
}


.topic-row {
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

.topic-row .item-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(27, 108, 168, 0.12);
    flex: 0 0 auto;
    margin-left: 16px;
}

.topic-row .item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.topic-row .item-content {
    flex: 1;
    min-width: 0;
    padding: 16px 20px 16px 0;
}

.topic-row h3 {
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(27, 108, 168, 0.45);
}

.topic-row .item-description {
    padding-left: 0;
    padding-right: 0;
}

.page-content .topic-row h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0 0 10px;
}

.page-content .topic-row .item-description {
    margin: 0;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: left;
    color: var(--text);
    padding: 16px 20px;
    text-transform: none;
    margin: 0;
    transition: color 0.3s ease;
    border-bottom: 1px solid rgba(27, 108, 168, 0.45);
}

.topic h3 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.topic .item-description {
    margin: 0;
    padding: 0 20px 0;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding-bottom 0.25s ease;
}

.topic:hover .item-description,
.topic:focus-visible .item-description {
    max-height: 160px;
    opacity: 1;
    padding-bottom: 18px;
}

.topic:hover h3 {
    color: var(--accent);
}

/* Category Pages */
.category-list {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.category-list .topic {
    width: 100%;
    max-width: none;
}

.category-list .topic-row .item-thumb {
    margin-left: 12px;
}

.category-list .topic-row .item-content {
    padding: 12px 18px 12px 0;
}

.category-list .topic-row h3 {
    padding-bottom: 8px;
}

.category-description {
    margin: 12px 0 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.category-list-item {
    list-style: none;
}


.item-date {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Footer */
footer {
    background: var(--bg);
    padding: 0 20px;
    margin-top: auto;
}

.footer-top,
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.footer-top {
    padding: 20px 0;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(27, 108, 168, 0.3);
    grid-template-columns: 1fr auto;
    gap: 24px;
}

.footer-note {
    color: var(--text-muted);
    font-size: 0.675em;
    margin-top: 6px;
}

.page-subtitle {
    font-style: italic;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(27, 108, 168, 0.15);
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text);
    border: 1px solid rgba(79, 209, 255, 0.3);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.social-link img {
    width: 16px;
    height: 16px;
    display: block;
    filter: var(--social-icon-filter);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9em;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom .theme-toggle {
    justify-self: end;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    border-top: 1px solid rgba(27, 108, 168, 0.4);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
    padding: 18px 20px 20px;
    z-index: 20;
}

.cookie-banner-inner,
.cookie-banner-settings {
    max-width: 1400px;
    margin: 0 auto;
}

.cookie-banner-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.cookie-banner-text strong {
    display: block;
    font-size: 1em;
    margin-bottom: 6px;
}

.cookie-banner-text p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(79, 209, 255, 0.4);
    background: transparent;
    color: var(--text);
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #0b0f14;
    border: none;
}

.cookie-btn-secondary:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.cookie-banner-settings {
    margin-top: 16px;
    border-top: 1px solid rgba(27, 108, 168, 0.2);
    padding-top: 14px;
    color: var(--text);
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.cookie-option input {
    accent-color: var(--accent);
}

.cookie-option-note {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

@media (max-width: 900px) {
    .cookie-banner-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cookie-banner-actions {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    :root {
        --header-offset: 170px;
    }
    header {
        font-size: 2em;
        padding: 18px 30px;
    }
    
    header nav ul {
        gap: 12px;
    }
    
    header nav a {
        font-size: 0.5em;
    }
    
    .hero {
        padding: 140px 30px 50px;
    }
    
    .hero-content h1 {
        font-size: 2.5em;
    }
    
    .hero-content p {
        font-size: 1.1em;
    }
    
    main {
        padding: var(--header-offset) 30px 50px;
    }

    .page-content {
        padding: var(--header-offset) 30px 50px;
    }

    .page-content .media-frame {
        width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    
    .featured-grid {
        grid-template-columns: 1fr;
        grid-gap: 25px;
    }
    
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 25px;
    }
    
    .section-title {
        font-size: 1.5em;
        margin: 50px 0 25px;
    }

    .home-sections {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topic .item-description {
        max-height: none;
        opacity: 1;
        padding-bottom: 18px;
    }

    .footer-top,
    .footer-bottom {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }


    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-bottom .theme-toggle {
        justify-self: center;
    }
}

@media (max-width: 600px) {
    :root {
        --header-offset: 210px;
    }
    header {
        font-size: 1.75em;
        padding: 15px 20px;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav {
        display: none;
    }

    .mobile-menu-inner {
        padding: 18px 20px 24px;
    }

    header nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    header nav a {
        font-size: 0.6em;
    }
    
    .hero {
        padding: 120px 20px 40px;
    }
    
    .hero-content h1 {
        font-size: 2em;
    }
    
    .hero-content p {
        font-size: 1em;
    }
    
    main {
        padding: var(--header-offset) 20px 40px;
    }

    .page-content {
        padding: var(--header-offset) 20px 40px;
    }

    .page-content .media-frame {
        width: 100%;
    }
    
    .featured-grid {
        grid-gap: 20px;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
        grid-gap: 20px;
        max-width: 300px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .topic {
        max-width: 100%;
    }
    
    .topic.featured {
        min-height: 350px;
    }
    
    .section-title {
        font-size: 1.35em;
        margin: 40px 0 20px;
    }
}

@media (max-width: 400px) {
    :root {
        --header-offset: 230px;
    }
    header {
        font-size: 1.5em;
        padding: 12px 15px;
    }
    
    .hero {
        padding: 110px 15px 30px;
    }
    
    .hero-content h1 {
        font-size: 1.75em;
    }
    
    main {
        padding: var(--header-offset) 15px 30px;
    }

    .page-content {
        padding: var(--header-offset) 15px 30px;
    }

    .page-content .media-frame {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.2em;
    }
}
.topic-featured .item-thumb,
.featured-grid .item-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(27, 108, 168, 0.12);
}

.topic-featured .item-thumb img,
.featured-grid .item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-featured .item-content,
.featured-grid .item-content {
    padding: 0 20px 18px;
}

.topic-featured .item-content h3,
.featured-grid .item-content h3 {
    padding: 16px 0 12px;
}
