/* ============================================
   lovely — a minimal Ghost theme
   ============================================ */

/* --- Reset & Base --- */

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

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: #2b2b2b;
    background: #faf6ee;
    line-height: 1.6;
}

::selection {
    background: hsla(129, 32%, 47%, 0.2);
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 12vh 24px 16vh;
}

/* --- Topbar --- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #9b9689;
    letter-spacing: 0.02em;
}

.topbar-name {
    text-transform: lowercase;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.status-dot {
    width: 5px;
    height: 5px;
    background: #519e60;
    border-radius: 50%;
    display: inline-block;
}

/* --- Homepage: Intro --- */

.intro {
    margin-bottom: 6rem;
}

.intro h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: #2b2b2b;
    margin-bottom: 1.75rem;
}

.intro h1 em {
    font-style: italic;
    color: #7a7568;
}

.intro-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
    color: #9b9689;
}

/* --- Homepage: Section label --- */

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    color: #9b9689;
    margin-bottom: 1.5rem;
}

/* --- Homepage: Post list --- */

.post-item {
    border-top: 1px solid #e6e0d2;
}

.post-item:last-child {
    border-bottom: 1px solid #e6e0d2;
}

.post-item a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1.1rem 0;
    transition: opacity 0.15s ease;
}

.post-item a:hover .post-title {
    color: #519e60;
}

.post-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.post-title {
    font-size: 1rem;
    font-weight: 400;
}

.post-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    color: #9b9689;
}

.post-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #9b9689;
    flex-shrink: 0;
    margin-left: 2rem;
}

/* --- Article page --- */

.article-header {
    margin-bottom: 4rem;
}

.article-header h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.article-header time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #9b9689;
}

/* --- Article body --- */

.article-body {
    font-size: 1rem;
    line-height: 1.75;
    color: #3d3d3d;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #2b2b2b;
}

.article-body h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: #2b2b2b;
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #d1cab8;
    transition: text-decoration-color 0.15s ease;
}

.article-body a:hover {
    text-decoration-color: #2b2b2b;
}

.article-body blockquote {
    border-left: 2px solid #e6e0d2;
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: #7a7568;
    font-style: italic;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 2px;
}

.article-body pre {
    background: #f8f8f8;
    padding: 1.25rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

.article-body code {
    font-size: 0.85em;
    background: #f2ece0;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

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

.article-body hr {
    border: none;
    border-top: 1px solid #e6e0d2;
    margin: 3rem 0;
}

/* --- Article footer --- */

.article-footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #e6e0d2;
}

.article-footer a {
    font-size: 0.85rem;
    color: #9b9689;
    transition: color 0.15s ease;
}

.article-footer a:hover {
    color: #2b2b2b;
}

/* --- Site footer --- */

.site-footer {
    margin-top: 6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    color: #9b9689;
}

.site-footer a {
    color: #9b9689;
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: #519e60;
}

.link-sep {
    margin: 0 0.4rem;
    color: #d1cab8;
}

/* --- Responsive --- */

@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    main {
        padding: 8vh 20px 12vh;
    }

    .intro {
        margin-bottom: 4rem;
    }

    .intro h1 {
        font-size: 1.8rem;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }
}

/* --- Ghost-specific: hide unwanted elements --- */

.kg-width-wide,
.kg-width-full {
    max-width: 100%;
}
