:root {
    color-scheme: light;

    /* General */
    --color-background: #fdfdfd;
    --color-text: #1f2933;
    --color-link: #0d68d1;
    --color-text-muted: #4a5568;

    /* Table */
    --color-table-border: #d7dde5;
    --color-table-header-bg: #f4f7fb;

    /* Summary */
    --color-summary-bg: #f0f8ff;
    --color-summary-border: #1e90ff;

    /* Card */
    --color-card-background: #fff;
    --color-card-border: #e2e8f0;
    --color-card-border-hover: #cbd5e0;
    --color-card-heading: #2d3748;
    --color-card-accent: #3182ce;
    --color-card-link-hover: #2c5282;
    --shadow-card-hover: 0 12px 24px rgb(0 0 0 / 8%);
}

body {
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, -apple-system, sans-serif;
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text);
}

.article-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 20px 64px;
    line-height: 1.8;
}

.article-content.lectures-layout {
    max-width: min(1200px, 94vw);
}

.article-content h1 {
    font-size: 2.2rem;
    text-align: center;
    margin: 0 0 2rem;
}

.article-content h2 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-size: 1.35rem;
    margin: 2rem 0 0.75rem;
}

.article-content h4 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem;
}

.article-content p {
    margin: 0.75rem 0;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.article-content li {
    margin: 0.5rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    border: 1px solid var(--color-table-border);
    padding: 0.75rem;
    text-align: center;
}

.article-content th {
    background-color: var(--color-table-header-bg);
    font-weight: 600;
}

.article-content a {
    color: var(--color-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-skip-ink: auto;
}

.article-content a:hover,
.article-content a:focus {
    text-decoration-thickness: 2px;
}

.author-info {
    text-align: right;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.summary {
    background-color: var(--color-summary-bg);
    border-left: 4px solid var(--color-summary-border);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin: 2.5rem 0;
}

.summary h2,
.summary h3,
.summary h4 {
    margin-top: 0;
}

.reference-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

.reference-list li {
    margin: 0.6rem 0;
}

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

.highlight,
.emphasis {
    font-weight: 600;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem auto;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgb(17 24 39 / 8%);
}

.article-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

@media (width <= 640px) {
    .article-content {
        padding: 32px 16px 48px;
    }

    .article-content h1 {
        font-size: 1.8rem;
    }

    .article-content h2 {
        font-size: 1.4rem;
    }
}

/* New Card Layout Styles */
.lectures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lecture-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.lecture-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgb(0 0 0 / 8%);
    border-color: #cbd5e0;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h2 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.lecture-card .card-content h2 a {
    color: #2d3748;
    text-decoration: none;
    display: block;
}

.card-content h2 a:hover {
    color: #3182ce;
}

.card-content p {
    font-size: 0.95rem;
    color: #4a5568;
    margin: 0 0 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: #3182ce;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: auto;
    align-self: flex-start;
}

.read-more:hover {
    text-decoration: underline;
    color: #2c5282;
}
