/* Base layout */
.inner-page {
    width: 100%;
    padding-top: 84px;
    background:
        linear-gradient(180deg, #f9f6ef 0%, #ffffff 24%, #f5f8fb 100%);
}

/* Header */
.articles-header {
    padding: 36px 0 36px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(120deg, rgba(13, 40, 89, 0.06), transparent 46%),
        radial-gradient(circle at top right, rgba(225, 180, 81, 0.22), transparent 26%);
}

.articles-header-inner {
    text-align: center;
}

.articles-kicker {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--accent-strong);
}

.articles-header h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.02;
    color: var(--color3);
}

.articles-intro {
    width: min(760px, 100%);
    margin: 16px auto 0;
    line-height: 1.75;
    color: var(--muted);
}

/* Featured article */
.articles-featured {
    padding: 28px 0 18px;
}

.feature-shell {
    display: grid;
    grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
    gap: 0;
    border: 1px solid rgba(13, 40, 89, 0.1);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(13, 40, 89, 0.09);
}

.feature-media {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(13, 40, 89, 0.1), rgba(225, 180, 81, 0.16)),
        #f8fbff;
}

.feature-media img {
    width: 100%;
    height: 100%;
    max-height: 330px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    display: block;
    cursor: zoom-in;
}

.feature-copy {
    display: grid;
    gap: 14px;
    padding: 34px;
    align-content: center;
    background:
        radial-gradient(circle at top right, rgba(225, 180, 81, 0.14), transparent 28%),
        #fffdf8;
}

.feature-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--accent-strong);
}

.feature-date,
.article-date {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--color4);
}

.feature-copy h2 {
    margin: 0;
    max-width: 920px;
    font-size: clamp(1.65rem, 2.8vw, 2.75rem);
    line-height: 1.08;
    color: var(--color3);
}

.feature-copy .article-doi {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(13, 40, 89, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
}

.feature-copy .article-doi span {
    font-size: 0.72rem;
}

.feature-copy .article-doi strong {
    font-size: 0.95rem;
}

.feature-copy {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-label,
.feature-date,
.feature-copy h2,
.feature-copy .article-doi:first-of-type,
.feature-copy .article-card-links {
    grid-column: 1 / -1;
}

.feature-copy .article-card-links {
    gap: 8px;
    padding-top: 2px;
}

.feature-copy .article-link-primary,
.feature-copy .article-link-secondary,
.feature-copy .article-btn {
    min-height: 32px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.feature-excerpt,
.article-excerpt {
    margin: 0;
    line-height: 1.75;
    color: #3d5778;
    text-align: justify;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.feature-meta,
.article-doi {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid rgba(13, 40, 89, 0.1);
    background: transparent;
    font-size: 0.8rem;
    color: var(--color3);
    overflow-wrap: break-word;
    word-break: normal;
}

.doi-label,
.article-doi span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding-top: 2px;
    background: transparent;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--accent-strong);
}

.doi-value {
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-doi strong {
    min-width: 0;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color3);
    overflow-wrap: break-word;
    word-break: normal;
}

.article-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 118px;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid var(--color3);
    background: var(--color3);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.article-btn:hover {
    transform: translateY(-2px);
    background: #173766;
    box-shadow: 0 14px 28px rgba(13, 40, 89, 0.16);
}

/* Archive section */
.articles-archive {
    padding: 12px 0 88px;
}

/* Secondary card section */
.articles-cards-section {
    padding: 14px 0 64px;
}

/* Shared headings */
.archive-heading {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.archive-heading-top {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.archive-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    color: var(--color3);
}

.archive-heading p {
    margin: 0;
    max-width: 760px;
    line-height: 1.7;
    color: var(--muted);
}

.articles-search {
    width: min(380px, 100%);
}

.articles-search-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--accent-strong);
}

.articles-search-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid rgba(13, 40, 89, 0.12);
    border-radius: 999px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(13, 40, 89, 0.05);
}

.articles-search-shell input {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--color3);
    font-size: 0.95rem;
}

.articles-search-shell input::placeholder {
    color: #7589a3;
}

.articles-search-shell button {
    padding: 0 18px;
    border: 0;
    background: var(--color3);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.articles-state {
    padding: 28px;
    border: 1px solid rgba(13, 40, 89, 0.12);
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    box-shadow: 0 12px 24px rgba(13, 40, 89, 0.05);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Grid of recent articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.article-card {
    display: grid;
    grid-template-rows: 220px 1fr;
    height: 100%;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(13, 40, 89, 0.06);
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card-body {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.article-card-body h3 {
    margin: 0;
    font-size: 1.38rem;
    line-height: 1.2;
    color: var(--color3);
}

.articles-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.article-info-card {
    display: grid;
    grid-template-rows: 145px 1fr;
    min-width: 0;
    height: 100%;
    border: 1px solid rgba(13, 40, 89, 0.12);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(13, 40, 89, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-info-card:hover {
    transform: translateY(-2px);
    border-color: rgba(13, 40, 89, 0.2);
    box-shadow: 0 14px 28px rgba(13, 40, 89, 0.1);
}

.article-info-media {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 145px;
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(13, 40, 89, 0.12), rgba(225, 180, 81, 0.16)),
        #f7fafc;
}

.article-info-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

.article-cover-image {
    cursor: zoom-in;
}

.article-cover-placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(13, 40, 89, 0.25);
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.5);
}

.article-cover-preview[hidden] {
    display: none;
}

.article-cover-preview {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.article-cover-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 40, 89, 0.45);
    backdrop-filter: blur(3px);
}

.article-cover-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 48px));
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(13, 40, 89, 0.28);
}

.article-cover-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--color3);
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.article-cover-preview-title {
    max-width: calc(100% - 42px);
    margin: 0;
    color: var(--color3);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.article-cover-preview-image {
    width: 100%;
    max-height: calc(100vh - 170px);
    display: block;
    object-fit: contain;
    border-radius: 10px;
    background: #f7fafc;
}

.article-cover-preview-open {
    overflow: hidden;
}

.article-info-card-body {
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    gap: 7px;
    min-width: 0;
    height: 100%;
    padding: 13px 14px 14px;
}

.article-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.article-info-title {
    margin: 0;
    font-size: clamp(0.92rem, 1vw, 1.02rem);
    line-height: 1.2;
    color: var(--color3);
    overflow-wrap: break-word;
    word-break: normal;
}

.article-info-subtitle {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6e8199;
    overflow-wrap: break-word;
    word-break: normal;
}

.article-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 0;
    align-content: start;
    padding-top: 4px;
    border-top: 1px solid rgba(13, 40, 89, 0.1);
}

.article-meta-grid .article-doi:first-child,
.article-meta-grid .article-doi:nth-child(7),
.article-meta-grid .article-doi:nth-child(8) {
    grid-column: 1 / -1;
}

.article-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
    padding-top: 6px;
}

.article-link-primary,
.article-link-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.article-link-primary {
    border: 1px solid var(--color3);
    background: var(--color3);
    color: #ffffff;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-link-secondary {
    border: 1px solid rgba(172, 132, 44, 0.28);
    background: rgba(225, 180, 81, 0.1);
    color: var(--accent-strong);
}

.article-link-primary:hover {
    color: #ffffff;
    background: #173766;
    transform: translateY(-1px);
}

.article-link-secondary:hover {
    color: #ffffff;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1100px) {
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .articles-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .feature-shell {
        grid-template-columns: 1fr;
    }

    .feature-media {
        min-height: 260px;
    }

    .feature-copy {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 28px 24px;
    }

    .archive-heading-top {
        align-items: stretch;
        flex-direction: column;
    }

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

@media (max-width: 768px) {
    .inner-page {
        padding-top: 84px;
    }

    .articles-header {
       padding: 74px 0 48px;
    }

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

    .articles-cards-grid {
        grid-template-columns: 1fr;
    }

    .article-info-card {
        grid-template-rows: 155px 1fr;
        border-radius: 14px;
    }

    .article-info-media {
        min-height: 155px;
    }

    .article-meta-grid {
        grid-template-columns: 1fr;
    }

    .article-doi {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .articles-archive {
        padding-bottom: 64px;
    }

    .articles-cards-section {
        padding-bottom: 64px;
    }

    .articles-cards-section .container {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .article-meta-grid {
        grid-template-columns: 1fr;
    }

    .feature-copy {
        grid-template-columns: 1fr;
    }
}
