/* ── Blog page layout ── */

.notes-header {
    padding: 8rem 0 5rem;
    border-bottom: 1px solid var(--border);
}

.notes-header .container {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 4rem;
    align-items: start;
}

.notes-header-left {
    animation: slideUp 0.8s ease 0.4s both;
}

.notes-header-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.notes-header-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.notes-header-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.notes-header-title em {
    font-style: italic;
    color: var(--accent);
}

.notes-header-right {
    animation: slideUp 0.8s ease 0.6s both;
    padding-bottom: 0.4rem;
}

.notes-header-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

/* ── Page-level TOC ── */

.notes-toc {
    margin-top: 2rem;
}

.notes-toc-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.75rem;
}

.notes-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-toc-item {
    margin-bottom: 0.4rem;
}

.notes-toc-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.notes-toc-title {
    flex: 1;
}

.notes-toc-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.03em;
}

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

.notes-toc-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--border);
    flex-shrink: 0;
}

/* ── Main content ── */

.notes-main {
    padding: 5rem 0 6rem;
}

/* ── Post entry ── */

.notes-post {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 4rem;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
    animation: slideUp 0.8s ease 0.8s both;
}

.notes-post:last-child {
    border-bottom: none;
}

.post-sidebar {
    position: sticky;
    top: 6rem;
    align-self: start;
}

.post-index {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 300;
    line-height: 1;
    color: var(--border);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.post-tag {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.3rem 0.75rem;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.post-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.post-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ── Expand / collapse ── */

.post-collapsed {
    max-height: 810px;
    overflow: hidden;
    position: relative;
}

.post-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8rem;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

.post-expand-btn {
    display: block;
    margin-top: 1.5rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.post-expand-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Reading list ── */

.reading-list {
    display: flex;
    flex-direction: column;
}

.reading-item {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 1.25rem;
    padding: 1.375rem 0;
    border-bottom: 1px solid rgba(28, 25, 23, 0.07);
    align-items: start;
}

.reading-item:first-child {
    padding-top: 0;
}

.reading-item:last-child {
    border-bottom: none;
}

.reading-num {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
    padding-top: 0.1rem;
    text-align: right;
    opacity: 0.5;
}

.reading-body {
    display: flex;
    flex-direction: column;
}

.reading-body h3 {
    order: 1;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.55;
    margin-bottom: 0.3rem;
}

.reading-body h3 a {
    color: var(--text-primary);
    transition: color 0.2s;
}

.reading-body h3 a:hover {
    color: var(--accent);
}

.reading-authors {
    order: 2;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 0.35rem;
}

.reading-venue {
    order: 3;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.reading-labels {
    order: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.reading-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.15rem 0.55rem;
    border-radius: 0;
}

.reading-desc {
    order: 5;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 0.6rem;
    font-weight: 300;
}

/* ── Footer ── */

.notes-footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
}

.notes-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-footer-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-muted);
}

.notes-footer-back {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-footer-back:hover {
    color: var(--text-primary) !important;
}

/* ── Responsive ── */

@media (max-width: 960px) {
    .notes-header .container,
    .notes-post {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .post-sidebar {
        position: static;
    }

    .post-index {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .notes-header {
        padding: 6rem 0 3rem;
    }

    .notes-header-title {
        font-size: 2.5rem;
    }
}
