:root {
    --blog-ink: #0c0b0f;
    --blog-ivory: #f7f1e7;
    --blog-rose: #d08c72;
    --blog-slate: #1f1a22;
    --blog-lilac: #7a5c8c;
    --blog-mist: rgba(247, 241, 231, 0.6);
    --blog-glow: rgba(208, 140, 114, 0.4);
    --blog-border: rgba(12, 11, 15, 0.12);
    --blog-shadow: 0 24px 60px rgba(12, 11, 15, 0.16);
}

.blogs-page {
    background: radial-gradient(circle at top, rgba(208, 140, 114, 0.35), transparent 45%),
        linear-gradient(160deg, #f9f2e8 0%, #f0e9f5 60%, #f9f1f9 100%);
    color: var(--blog-ink);
}

.blogs-hero {
    position: relative;
    padding: 6rem clamp(2rem, 8vw, 6rem) 4rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 2rem;
    align-items: center;
}

.hero-content {
    max-width: 48rem;
}

.hero-kicker {
    font-family: "Cormorant Garamond", "Garamond", serif;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.7rem;
}

.hero-title {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: clamp(2.6rem, 4vw, 4rem);
    margin: 1rem 0 1.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(12, 11, 15, 0.8);
    max-width: 36rem;
}

.hero-search {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(12, 11, 15, 0.08);
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 12px 30px rgba(12, 11, 15, 0.08);
    backdrop-filter: blur(14px);
}

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--blog-ink);
}

.clear-search {
    font-size: 0.85rem;
    color: var(--blog-lilac);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.hero-orbit {
    position: relative;
    width: 100%;
    height: 320px;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(12, 11, 15, 0.2);
    border-radius: 50%;
    animation: float 12s ease-in-out infinite;
}

.orbit-ring.ring-two {
    inset: 14%;
    border-color: rgba(122, 92, 140, 0.3);
    animation-delay: -6s;
}

.orbit-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--blog-rose);
    top: 20%;
    left: 65%;
    box-shadow: 0 0 20px var(--blog-glow);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-14px);
    }
}

.blogs-content {
    padding: 0 0 5rem;
}

.blogs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
}

.results-count {
    font-weight: 600;
}

.search-term {
    margin-left: 1rem;
    color: var(--blog-lilac);
    font-size: 0.9rem;
}

.pagination-meta {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(12, 11, 15, 0.55);
}

.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
    justify-content: start;
    gap: 2rem;
}

.blog-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--blog-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(12, 11, 15, 0.2);
}

.card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-media {
    position: relative;
    height: clamp(180px, 22vw, 220px);
    background: linear-gradient(135deg, rgba(208, 140, 114, 0.5), rgba(122, 92, 140, 0.5));
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    font-family: "Playfair Display", serif;
    color: rgba(255, 255, 255, 0.85);
}

.date-pill {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(12, 11, 15, 0.8);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.card-body {
    padding: 1.4rem 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.card-title {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description {
    color: rgba(12, 11, 15, 0.75);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(12, 11, 15, 0.6);
    margin-top: auto;
}

.dot {
    opacity: 0.5;
}

.blogs-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-btn,
.page-number {
    border: 1px solid var(--blog-border);
    background: rgba(255, 255, 255, 0.7);
    color: var(--blog-ink);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-number.active {
    background: var(--blog-ink);
    color: white;
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.blogs-empty {
    display: grid;
    place-items: center;
    padding: 4rem 0;
}

.empty-card {
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--blog-shadow);
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--blog-ink);
    color: var(--blog-ink);
    text-decoration: none;
    background: transparent;
    transition: all 0.2s ease;
}

.ghost-btn:hover {
    background: var(--blog-ink);
    color: white;
}

.blog-detail {
    background: linear-gradient(180deg, #0f0c14 0%, #1c1524 40%, #f7f1e7 40%, #f7f1e7 100%);
    color: var(--blog-ink);
}

.detail-hero {
    color: white;
    padding: 5rem 0 3rem;
    background: radial-gradient(circle at 20% 10%, rgba(208, 140, 114, 0.4), transparent 55%);
}

.detail-hero-inner {
    display: grid;
    gap: 1rem;
}

.detail-kicker {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumbs {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

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

.detail-title {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
}

.detail-subtitle {
    color: rgba(255, 255, 255, 0.8);
    max-width: 48rem;
}

.detail-meta {
    display: flex;
    gap: 0.8rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.detail-actions .ghost-btn {
    border-color: rgba(255, 255, 255, 0.65);
    color: white;
}

.detail-actions .ghost-btn:hover {
    background: white;
    color: var(--blog-ink);
}

.detail-body {
    padding: 3rem 0 6rem;
}

.markdown-body {
    background: white;
    padding: clamp(2rem, 4vw, 3rem);
    border-radius: 28px;
    box-shadow: var(--blog-shadow);
    max-width: 860px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    font-family: "Playfair Display", serif;
    margin-top: 2.5rem;
}

.markdown-body p,
.markdown-body li {
    line-height: 1.8;
    color: rgba(12, 11, 15, 0.82);
}

.markdown-body pre {
    background: #141217;
    color: #f7f1e7;
    padding: 1.4rem;
    border-radius: 16px;
    overflow-x: auto;
}

.markdown-body code {
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.9rem;
}

.markdown-body blockquote {
    border-left: 3px solid var(--blog-rose);
    padding-left: 1rem;
    color: rgba(12, 11, 15, 0.7);
    margin: 2rem 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.markdown-body th,
.markdown-body td {
    border-bottom: 1px solid rgba(12, 11, 15, 0.2);
    padding: 0.8rem;
}

.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--blog-ink);
    color: white;
    box-shadow: var(--blog-shadow);
}

@media (max-width: 900px) {
    .blogs-hero {
        grid-template-columns: 1fr;
    }

    .hero-orbit {
        height: 200px;
    }
}

@media (max-width: 640px) {
    .blogs-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-numbers {
        display: none;
    }
}
