/* ============================================
   BLEEK.IN — Ghost Theme Stylesheet
   ============================================ */

/* ---- RESET ---- */

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

/* ---- VARIABLES ---- */

:root {
    --black: #0a0a0a;
    --white: #f5f3f0;
    --gray: #777;
    --gray-light: #d0ccc6;
    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ---- BASE ---- */

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    color: var(--black);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--black);
    color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- LAYOUT ---- */

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- NAVIGATION ---- */

.site-nav {
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-light);
}

.site-nav-logo {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-nav-links {
    display: flex;
    gap: 2rem;
}

.site-nav-links a {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav-links a:hover,
.site-nav-links a.nav-current {
    color: var(--black);
}

/* ---- HERO (home page static content) ---- */

.hero {
    padding: 5rem 0 4rem;
    border-bottom: 2px solid var(--black);
}

.hero-top {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    margin-bottom: 3.5rem;
}

.hero-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
    flex-shrink: 0;
}

.hero-identity {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
}

/* ---- HOME STATIC CONTENT (from Ghost page) ---- */

.home-content {
    padding: 0;
}

.home-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.8rem;
}

.home-content h1 em {
    font-style: italic;
    font-weight: 300;
}

.home-content > p:first-of-type {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 580px;
    line-height: 1.8;
    margin-bottom: 0;
}

/* ---- SECTIONS ---- */

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.section:last-of-type {
    border-bottom: none;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 2.5rem;
}

/* ---- GHOST PAGE BODY ON HOME ---- */

.home-body {
    padding: 0;
}

.home-body hr {
    border: none;
    border-top: 1px solid var(--gray-light);
    margin: 0;
    padding: 0;
}

.home-body h2 {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 300;
    line-height: 1.6;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-top: 3rem;
    border-top: none;
}

.home-body h2:first-child {
    padding-top: 4rem;
}

.home-body h2 strong {
    font-weight: 600;
}

.home-body h3 {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gray);
    margin-top: 3rem;
    margin-bottom: 2.5rem;
    padding-top: 3rem;
    border-top: none;
}

.home-body h4 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gray-light);
    line-height: 1;
    margin-bottom: 0.6rem;
    margin-top: 3rem;
}

.home-body h4:first-of-type {
    margin-top: 0;
}

.home-body h5 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.7rem;
}

.home-body p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.1rem;
}

.home-body blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    max-width: 640px;
    border-left: none;
    padding: 4rem 0;
    margin: 3rem 0 0;
    border-top: none;
    border-bottom: 2px solid var(--black);
}

.home-body blockquote p {
    font-size: inherit;
    line-height: inherit;
    margin-bottom: 0;
}

.home-body a {
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.home-body a:hover {
    color: var(--black);
    border-color: var(--black);
}

/* ---- FEATURED ARTICLES (home) — compact grid ---- */

.featured-articles {
    padding: 4rem 0;
}

.featured-articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.featured-article {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--black);
    transition: opacity 0.3s;
}

.featured-article:hover {
    opacity: 0.6;
}

.featured-article-tag {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.featured-article-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.featured-article-excerpt {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.7;
    flex-grow: 1;
}

.featured-article-date {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--gray-light);
    letter-spacing: 0.05em;
    margin-top: 0.8rem;
}

.all-articles-link {
    display: inline-block;
    margin-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.all-articles-link:hover {
    color: var(--black);
    border-color: var(--black);
}

/* ---- ARTICLES GRID (index page) ---- */

.articles-page-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    padding: 3rem 0 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 3rem 0;
}

.article-card {
    text-decoration: none;
    color: var(--black);
    display: flex;
    flex-direction: column;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--gray-light);
    transition: opacity 0.3s;
}

.article-card:hover {
    opacity: 0.6;
}

.article-card-tag {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.6rem;
}

.article-card-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.article-card-excerpt {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.7;
    flex-grow: 1;
}

.article-card-date {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--gray-light);
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

/* ---- PAGINATION ---- */

.pagination {
    padding: 2rem 0 4rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.pagination a {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.pagination a:hover {
    color: var(--black);
    border-color: var(--black);
}

/* ---- SINGLE POST ---- */

.post-header {
    padding: 4rem 0 3rem;
    border-bottom: 2px solid var(--black);
}

.post-tag {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 1.2rem;
}

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

.post-tag a:hover {
    color: var(--black);
}

.post-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--gray);
}

/* ---- POST BODY (article content) ---- */

.post-body {
    padding: 3rem 0;
}

.post-body p {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

.post-body h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

.post-body h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-body blockquote {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    border-left: 2px solid var(--black);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    color: var(--gray);
}

.post-body blockquote p {
    font-size: inherit;
    line-height: inherit;
    margin-bottom: 0;
}

.post-body ul, .post-body ol {
    margin: 1.5rem 0;
    padding-left: 1.2rem;
}

.post-body li {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 0.5rem;
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: var(--gray-light);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.post-body pre {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    line-height: 1.6;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-body img {
    margin: 2rem 0;
}

.post-body a {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--black);
    transition: opacity 0.2s;
}

.post-body a:hover {
    opacity: 0.5;
}

.post-body .kg-image-card,
.post-body .kg-gallery-card,
.kg-image-card,
.kg-gallery-card {
    margin: 2.5rem 0;
}

.kg-width-wide,
.post-body .kg-width-wide {
    max-width: 960px;
    margin-left: calc(50% - 480px);
    margin-right: calc(50% - 480px);
}

.kg-width-full,
.post-body .kg-width-full {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-width-wide img,
.kg-width-full img,
.post-body .kg-width-wide img,
.post-body .kg-width-full img {
    width: 100%;
}

.post-body figcaption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--gray);
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    text-align: center;
}

/* ---- POST FOOTER (next article) ---- */

.post-footer-nav {
    padding: 3rem 0;
    border-top: 2px solid var(--black);
}

.post-footer-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.post-next {
    text-decoration: none;
    color: var(--black);
    display: block;
    transition: opacity 0.3s;
}

.post-next:hover {
    opacity: 0.6;
}

.post-next-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ---- STATIC PAGE ---- */

.page-header {
    padding: 4rem 0 2rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-body {
    padding: 2rem 0 4rem;
}

.page-body p {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.5rem;
}

.page-body h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

.page-body a {
    color: var(--black);
    border-bottom: 1px solid var(--black);
    text-decoration: none;
}

/* ---- FOOTER ---- */

.site-footer {
    padding: 3.5rem 0;
    border-top: 2px solid var(--black);
}

.contact-email {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    border-bottom: 2px solid var(--black);
    padding-bottom: 3px;
    transition: opacity 0.3s;
}

.contact-email:hover {
    opacity: 0.4;
}

.footer-note {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 2.5rem;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 600px) {
    .articles-grid,
    .featured-articles-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-card,
    .featured-article {
        padding: 2rem 0;
        padding-bottom: 2rem;
    }
}

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

    .hero {
        padding: 3rem 0 2.5rem;
    }

    .hero-top {
        gap: 1.2rem;
        margin-bottom: 2.5rem;
    }

    .hero-photo {
        width: 120px;
        height: 120px;
    }

    .hero-name {
        font-size: 1.8rem;
    }

    .section {
        padding: 3rem 0;
    }

    .contact-email {
        font-size: 1.4rem;
    }

    .site-nav-links {
        gap: 1rem;
    }

    .site-nav-links a {
        font-size: 0.55rem;
    }
}
