@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@300;500;700&family=Spline+Sans:wght@300;400;600&display=swap");

:root {
    --bg: #f3efe7;
    --ink: #14120f;
    --muted: #6b655a;
    --accent: #b15a2b;
    --accent-2: #1f6f8b;
    --card: rgba(255, 255, 255, 0.76);
    --border: rgba(20, 18, 15, 0.12);
    --shadow: 0 18px 40px rgba(20, 18, 15, 0.08);
}

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

body {
    font-family: "Spline Sans", "Noto Sans", sans-serif;
    background:
        radial-gradient(1200px 600px at 10% -10%, #fff6dd 0%, transparent 60%),
        radial-gradient(900px 500px at 100% 0%, #f2d8c5 0%, transparent 55%),
        linear-gradient(180deg, #f3efe7 0%, #eee6d8 100%);
    color: var(--ink);
    line-height: 1.7;
    padding: 48px 20px 64px;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 40px 42px 44px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: page-in 480ms ease-out both;
}

.login-wrap {
    min-height: calc(100vh - 96px);
    display: grid;
    place-items: center;
    padding: 24px 0;
}

.login-card {
    width: min(520px, 100%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 36px 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: page-in 480ms ease-out both;
}

.login-header {
    margin-bottom: 26px;
}

.login-kicker {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}

.login-title {
    font-family: "Fraunces", "Noto Serif", serif;
    font-size: 26px;
    font-weight: 600;
    margin: 8px 0 6px;
    color: var(--ink);
}

.login-subtitle {
    color: var(--muted);
    font-size: 14px;
}

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

.login-label {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.login-input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: "Spline Sans", "Noto Sans", sans-serif;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.18);
}

.login-button {
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: linear-gradient(120deg, #1f6f8b 0%, #2e8f83 100%);
    color: #fff;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(31, 111, 139, 0.18);
}

.login-hint {
    margin-top: 16px;
    font-size: 12px;
    color: var(--muted);
}

.header {
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

h1 {
    font-family: "Fraunces", "Noto Serif", serif;
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    color: var(--ink);
}

.subtitle {
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.categories {
    margin: 34px 0 30px;
    display: grid;
    gap: 26px;
}

.category {
    padding: 18px 20px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    animation: rise-in 520ms ease-out both;
}

.category:nth-child(2) { animation-delay: 60ms; }
.category:nth-child(3) { animation-delay: 120ms; }
.category:nth-child(4) { animation-delay: 180ms; }

.category-title {
    font-family: "Fraunces", "Noto Serif", serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}

.category-desc {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.article-list {
    list-style: none;
    margin-left: 0;
    display: grid;
    grid-template-columns: 1fr 64px 40px;
    column-gap: 6px;
    row-gap: 8px;
    align-items: baseline;
}

.article-item {
    margin-bottom: 0;
    display: contents;
}

.time-col {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.4px;
    justify-self: end;
}

.time-col.year {
    padding-left: 10px;
    position: sticky;
    top: 8px;
    background: var(--card);
    z-index: 1;
}

.time-col.is-empty {
    color: transparent;
}

.article-link {
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 180ms ease, border-color 180ms ease;
}

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

.pagination {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.page-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
    color: var(--ink);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.page-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 14px rgba(20, 18, 15, 0.12);
    transform: translateY(-1px);
}

.page-btn.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.footer {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: none;
}

.article {
    max-width: 760px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 40px 42px 44px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: page-in 480ms ease-out both;
}

.article-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.article-title {
    font-family: "Fraunces", "Noto Serif", serif;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}

.article-meta {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.3px;
}

.article-content {
    color: var(--ink);
    font-size: 15px;
}

.article-content h2 {
    font-family: "Fraunces", "Noto Serif", serif;
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 10px 0;
    color: var(--ink);
}

.article-content h3 {
    font-family: "Fraunces", "Noto Serif", serif;
    font-size: 17px;
    font-weight: 600;
    margin: 20px 0 8px 0;
    color: var(--ink);
}

.article-content p {
    margin-bottom: 12px;
}

.article-content ul, .article-content ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.article-content li {
    margin-bottom: 6px;
}

.article-content code {
    background: rgba(31, 111, 139, 0.12);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: "SFMono-Regular", "Menlo", monospace;
    font-size: 13px;
    color: var(--accent-2);
}

.article-content pre {
    background: rgba(20, 18, 15, 0.06);
    padding: 14px 16px;
    overflow-x: auto;
    margin: 14px 0;
    border-left: 3px solid var(--accent-2);
    border-radius: 10px;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.back-link {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.back-link a {
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 180ms ease, border-color 180ms ease;
}

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

@keyframes page-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    body {
        padding: 24px 16px 40px;
    }

    .container,
    .article {
        padding: 28px 22px 32px;
    }

    .login-card {
        padding: 28px 22px 26px;
    }
    
    h1, .article-title {
        font-size: 22px;
    }

    .article-list {
        grid-template-columns: 1fr 56px 36px;
        column-gap: 6px;
    }

    .time-col {
        font-size: 11px;
    }
}
