:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    line-height: 1.7;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1.site-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 50px;
    background: -webkit-linear-gradient(45deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 1s ease-out;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

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

.digest-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.digest-nav-btn {
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.digest-nav-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.digest-nav-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    border-style: dashed;
}

.post, .archive-link {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    animation: slideUp 0.8s ease-out backwards;
    display: block;
    text-decoration: none;
    color: inherit;
}

.post:hover, .archive-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.post:nth-child(1), .archive-link:nth-child(1) { animation-delay: 0.1s; }
.post:nth-child(2), .archive-link:nth-child(2) { animation-delay: 0.2s; }
.post:nth-child(3), .archive-link:nth-child(3) { animation-delay: 0.3s; }
.post:nth-child(4), .archive-link:nth-child(4) { animation-delay: 0.4s; }

.post h2, .archive-link h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.post h2 a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.post h2 a:hover {
    color: var(--accent);
}

.meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.archive-desc {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 8px;
}

.hero-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

.content {
    font-size: 1.05rem;
}

.content h1, .content h2, .content h3 {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    margin-top: 1.5em;
}

.content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.share-buttons a {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-buttons a:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.item-share {
    margin-top: 25px;
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Related Research / Similar Articles Section */
.related-papers {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.related-papers-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-papers-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.related-papers-list li {
    margin-bottom: 8px;
    line-height: 1.5;
    position: relative;
    padding-left: 18px;
}

.related-papers-list li::before {
    content: "↳";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.related-papers-list li a {
    color: var(--accent-hover);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.related-papers-list li a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Recent Digests Footer Widget */
.recent-digests-widget {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px 30px;
    margin-top: 50px;
    margin-bottom: 30px;
}

.recent-digests-widget h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
}

.recent-digests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.recent-digest-chip {
    display: block;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.recent-digest-chip:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.recent-digest-chip .chip-date {
    font-weight: 600;
    color: var(--accent-hover);
    display: block;
    margin-bottom: 2px;
}

.recent-digest-chip .chip-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}
