:root {
    --ink: #1c1a1f;
    --ink-soft: #3b3640;
    --ink-muted: #6d6670;
    --paper: #faf8f4;
    --paper-strong: #f1ece4;
    --accent: #f05a3d;
    --accent-dark: #c8432b;
    --sea: #1f6f78;
    --shadow: 0 16px 40px rgba(27, 24, 31, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, #fff4ea 0%, #fdf7ef 35%, #f6f0e7 100%);
    min-height: 100vh;
    line-height: 1.6;
}

main,
header,
footer {
    width: 100%;
}

.site-header,
.site-footer {
    padding: 24px 20px;
}

.site-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

h1,
h2,
h3,
h4 {
    font-family: "Spectral", "Georgia", serif;
    letter-spacing: -0.01em;
    color: var(--ink);
}

a {
    color: var(--sea);
    text-decoration: none;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 20px rgba(240, 90, 61, 0.25);
}

.btn:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    border: 1px solid #d5cbbf;
}

.btn--ghost:hover {
    background: var(--paper-strong);
}

.btn--danger {
    background: #b63a2b;
    box-shadow: 0 10px 20px rgba(182, 58, 43, 0.25);
}

.btn--danger:hover {
    background: #8f2c21;
}

.notice {
    padding: 12px 16px;
    border-radius: 12px;
    background: #eaf7ee;
    color: #1d5b33;
    border: 1px solid #bfe6cb;
    font-weight: 600;
}

.page-enter {
    animation: page-rise 0.65s ease-out both;
}

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

@media (max-width: 720px) {
    .site-main {
        padding: 20px 16px 48px;
    }
}

/* About Page Sections */
.about-section {
    margin-bottom: 48px;
}

.about-section h1 {
    font-size: 2rem;
    margin: 0 0 16px;
}

.about-section h2 {
    font-size: 1.5rem;
    margin: 0 0 16px;
}

.about-section h3 {
    font-size: 1.1rem;
    margin: 0 0 16px;
    color: var(--ink-soft);
}

/* Reading Columns Layout */
.reading-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 24px;
}

.reading-column {
    min-width: 0;
}

.reading-column h3 {
    margin-top: 0;
}

@media (max-width: 720px) {
    .reading-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.about-section p {
    margin: 0 0 16px;
    max-width: 640px;
}

/* Book List */
.book-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    margin: -8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.book-item:hover {
    background: var(--paper-strong);
    color: inherit;
}

.book-thumb {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(27, 24, 31, 0.12);
    flex-shrink: 0;
}

.book-thumb--placeholder {
    background: var(--paper-strong);
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.book-title {
    font-family: "Spectral", "Georgia", serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-meta {
    font-size: 0.8rem;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.book-rating {
    color: var(--accent);
    letter-spacing: -1px;
}

.book-review {
    font-size: 0.8rem;
    color: var(--ink-soft);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* GitHub Activity */
.github-graph {
    margin-top: 16px;
    overflow-x: auto;
}

.github-graph img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Pages */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    margin: 0 0 8px;
}

.page-updated {
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin: 0;
}

.page-content {
    line-height: 1.7;
}

.page-actions {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--paper-strong);
    display: flex;
    gap: 12px;
}

/* Pages List (admin) */
.pages-list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}

.pages-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--paper-strong);
}

.pages-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pages-list-slug {
    font-size: 0.85rem;
    color: var(--ink-muted);
    font-family: monospace;
}

.pages-list-actions {
    display: flex;
    gap: 8px;
}

/* Form enhancements */
.form-hint {
    font-size: 0.8rem;
    color: var(--ink-muted);
    margin: 4px 0 0;
}

.form-links {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}
