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

:root {
    --bg: #102030;
    --text: #f0f2f5;
    --text-muted: #8896a8;
    --accent: #c8d0dc;
    --border: #1e2e42;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.container {
    max-width: 620px;
    width: 100%;
    text-align: center;
}

.photo {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.1rem;
    border: 2px solid var(--border);
}

h1 {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.05rem;
    color: #ffffff;
    white-space: nowrap;
}

.title {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
}

.about {
    margin-bottom: 2.2rem;
    text-align: center;
}

.about p {
    font-size: 0.95rem;
    color: var(--accent);
    line-height: 1.75;
    margin-bottom: 1.4rem;
}

.about p:last-child {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.links {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    margin-top: 1.5rem;
}

.links a {
    color: var(--text-muted);
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
}

.links a:hover {
    color: #ffffff;
}

/* ---- Homepage: Miscellaneous section ---- */
.misc {
    margin-top: 2.8rem;
    text-align: center;
}

.misc-divider {
    width: 36px;
    height: 1px;
    background: var(--border);
    margin: 0 auto 2rem;
}

.misc-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.misc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: inherit;
}

.misc-label {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.misc-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: inline-block;
    transition: transform 0.3s ease;
    line-height: 1;
}

.misc-toggle[aria-expanded="true"] .misc-chevron {
    transform: rotate(180deg);
}

.misc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.misc-body.open {
    max-height: 500px;
}

.misc-desc {
    font-size: 0.875rem;
    color: var(--accent);
    line-height: 1.75;
    margin-top: 1.1rem;
    margin-bottom: 1.3rem;
}

/* To add a post: copy one .post-card block in index.html and update href, title, summary, date */
.post-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.post-card {
    display: block;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1.1rem 1.25rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.post-card:hover {
    border-color: #2e4460;
    background: rgba(255, 255, 255, 0.055);
}

.post-card-title {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.post-card-summary {
    font-size: 0.84rem;
    color: var(--accent);
    line-height: 1.6;
    margin-bottom: 0.55rem;
}

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

.post-card-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-card-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---- Blog post page ---- */
body.post-page {
    display: block;
    padding: 3.5rem 1.5rem 5rem;
}

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

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 2.5rem;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: #ffffff;
}

.post-title {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    font-size: 1.55rem;
    color: #ffffff;
    line-height: 1.45;
    margin-bottom: 2rem;
    white-space: normal;
    letter-spacing: -0.01em;
}

.post-heading {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    font-size: 1.05rem;
    color: var(--accent);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
    white-space: normal;
}

.post-p {
    font-size: 0.95rem;
    color: var(--accent);
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.post-p strong {
    color: #ffffff;
    font-weight: 500;
}

.post-p em {
    font-style: italic;
    color: var(--text-muted);
}

.post-figure {
    margin: 2.2rem 0;
    text-align: center;
}

.post-figure img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.post-footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

.post-footer a:hover {
    color: #ffffff;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .photo {
        width: 116px;
        height: 116px;
    }

    .post-title {
        font-size: 1.3rem;
    }
}
