/* ================================================================
   DescribeAI Ghost Theme v2.0
   Exact match to getdescribeai.com source
   Colors, fonts, and components extracted from globals.css + page.tsx
   ================================================================ */

/* ── TOKENS (exact from source) ── */
:root {
    --bg:           #050505;
    --bg-card:      #0c0c0c;
    --bg-inner:     #111111;
    --border:       #1a1a1a;
    --border-subtle:#222222;
    --text:         #ede9e3;
    --text-muted:   #777777;
    --text-faint:   #555555;
    --accent:       #FF6B4A;
    --accent-light: #FF8F6B;
    --accent-bg:    rgba(255, 107, 74, 0.07);
    --accent-border:rgba(255, 107, 74, 0.20);
    --accent-shadow:rgba(255, 107, 74, 0.20);
    --font-body:    'DM Sans', system-ui, sans-serif;
    --font-display: 'Outfit', 'DM Sans', sans-serif;
    --radius-sm:    8px;
    --radius:       12px;
    --radius-lg:    16px;
    --radius-xl:    24px;
    --max-w:        1160px;
    --content-w:    720px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.7; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── ANIMATIONS (from globals.css) ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TYPOGRAPHY UTILS ── */
.section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: block;
}
.text-accent { color: var(--accent); }

/* ── BUTTONS ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover {
    box-shadow: 0 6px 24px var(--accent-shadow);
    transform: translateY(-1px);
}
.btn-primary--large {
    padding: 0.8rem 1.75rem;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--accent-border); color: var(--accent); }

/* ── HEADER ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ── LOGO ── */
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}
.logo-wordmark {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.logo-accent { color: var(--accent); }

/* ── NAV ── */
.site-nav { flex: 1; }
.site-nav ul { display: flex; gap: 0.125rem; list-style: none; }
.site-nav a {
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ── HERO ── */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 5rem 1.5rem 3.5rem;
    animation: fadeUp 0.4s ease both;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1rem;
    tracking-tight: true;
}
.hero-sub {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 460px;
    line-height: 1.65;
    margin-top: 0.5rem;
}

/* ── POSTS SECTION ── */
.posts-section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem 5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* ── POST CARD ── */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
    animation: fadeUp 0.4s ease both;
}
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.1s; }
.post-card:nth-child(4) { animation-delay: 0.15s; }
.post-card:nth-child(5) { animation-delay: 0.2s; }
.post-card:nth-child(6) { animation-delay: 0.25s; }
.post-card:hover { border-color: var(--border-subtle); transform: translateY(-2px); }

.post-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}
.post-card--featured .post-card-image-wrap { flex: 0 0 44%; }
.post-card--featured .post-card-body { padding: 2.25rem; }

.post-card-image-wrap { display: block; overflow: hidden; }
.post-card-image {
    width: 100%;
    padding-top: 56%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}
.post-card-image-wrap:hover .post-card-image { transform: scale(1.02); }
.post-card--featured .post-card-image { height: 100%; padding-top: 0; }

.post-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.post-card-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
}
.post-card-tag:hover { color: var(--accent-light); }

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    flex: 1;
}
.post-card--featured .post-card-title { font-size: 1.5rem; }
.post-card-title a { color: var(--text); transition: color 0.15s; }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ── PAGINATION ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 3rem;
    font-size: 0.875rem;
}
.pagination-info { color: var(--text-faint); }

/* ── SINGLE POST ── */
.post-wrapper {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.post-hero {
    width: 100vw;
    max-height: 480px;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 3rem;
}
.post-hero img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.post-article { padding-bottom: 5rem; animation: fadeUp 0.4s ease both; }

.post-header { margin-bottom: 2.5rem; }

.post-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 0.875rem;
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1rem;
    tracking-tight: true;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-faint);
}
.meta-sep { color: var(--text-faint); }

/* ── POST CONTENT ── */
.gh-content { color: var(--text); }

.gh-content > * + * { margin-top: 1.25rem; }

.gh-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}
.gh-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.gh-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
}

.gh-content p {
    font-size: 1.025rem;
    line-height: 1.8;
    color: rgba(237, 233, 227, 0.88);
    margin-bottom: 1.25rem;
}

.gh-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-border);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}
.gh-content a:hover { text-decoration-color: var(--accent); }

.gh-content ul,
.gh-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.gh-content li {
    font-size: 1.025rem;
    line-height: 1.8;
    color: rgba(237, 233, 227, 0.88);
    margin-bottom: 0.4rem;
}
.gh-content li::marker { color: var(--accent); }

.gh-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.25rem 0 0.25rem 1.25rem;
    margin: 1.75rem 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.025rem;
}

.gh-content code {
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    padding: 0.1em 0.4em;
    font-size: 0.875em;
    color: var(--accent);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.gh-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.75rem 0;
}
.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    color: var(--text);
}

.gh-content img {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin: 1.75rem 0;
}
.gh-content figure { margin: 1.75rem 0; }
.gh-content figcaption { font-size: 0.82rem; color: var(--text-faint); text-align: center; margin-top: 0.5rem; }

.gh-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.gh-content thead { background: var(--bg-inner); }
.gh-content th {
    padding: 0.7rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.gh-content td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    color: rgba(237, 233, 227, 0.88);
    font-size: 0.925rem;
    line-height: 1.6;
    vertical-align: top;
}
.gh-content tr:last-child td { border-bottom: none; }

/* ── POST CTA BOX (matches site's card style) ── */
.post-cta-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-top: 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.post-cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,107,74,0.08) 0%, transparent 65%);
    pointer-events: none;
}
.post-cta-box h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    margin: 0.5rem 0 0.75rem;
    line-height: 1.2;
}
.post-cta-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ── POST NAV ── */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding: 3rem 1.5rem;
    max-width: var(--content-w);
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid var(--border);
}
.post-nav-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s, background 0.15s;
}
.post-nav-card:hover { border-color: var(--border-subtle); background: var(--bg-inner); }
.post-nav-card--next { text-align: right; }
.post-nav-label { font-size: 0.75rem; color: var(--text-faint); font-weight: 600; }
.post-nav-title { font-size: 0.9rem; font-weight: 700; color: var(--text); line-height: 1.35; }

/* ── FOOTER ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    padding-bottom: 2.5rem;
    flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 200px; }
.footer-brand .site-logo { margin-bottom: 0.875rem; }
.footer-brand p { font-size: 0.82rem; color: var(--text-faint); line-height: 1.6; max-width: 240px; }
.footer-col { display: flex; flex-direction: column; gap: 0.5rem; min-width: 120px; }
.footer-col-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.footer-col a { font-size: 0.875rem; color: var(--text-faint); transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-cta { color: var(--accent) !important; font-weight: 600 !important; }
.footer-cta-sub { font-size: 0.75rem; color: var(--text-faint); }
.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-faint);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .header-inner { padding: 0 1rem; gap: 1rem; }
    .site-nav { display: none; }
    .hero { padding: 3rem 1rem 2rem; }
    .posts-section { padding: 0 1rem 4rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .post-card--featured { flex-direction: column; }
    .post-wrapper { padding: 0 1rem; }
    .post-hero { margin-left: -1rem; width: calc(100% + 2rem); }
    .post-hero img { height: 240px; }
    .post-nav { grid-template-columns: 1fr; padding: 2rem 1rem; }
    .footer-inner { gap: 2rem; }
    .post-cta-box { padding: 1.75rem 1.25rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.9rem; }
    .post-title { font-size: 1.6rem; }
    .btn-primary { font-size: 0.82rem; padding: 0.55rem 1rem; }
}

/* ── GHOST CARD WIDTHS (required) ── */
.kg-width-wide {
    margin-left: calc(50% - 50vw + 3rem);
    margin-right: calc(50% - 50vw + 3rem);
    max-width: calc(100vw - 6rem);
}
.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
@media (max-width: 768px) {
    .kg-width-wide, .kg-width-full {
        margin-left: -1rem;
        margin-right: -1rem;
        max-width: calc(100% + 2rem);
    }
}

/* ── ERROR PAGE ── */
.error-page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 6rem 1.5rem;
}
.error-inner { max-width: 480px; }
