/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --color-navy: #0B1A2E;
    --color-navy-light: #0F2138;
    --color-navy-mid: #132540;
    --color-orange: #E8652D;
    --color-orange-hover: #F07A47;
    --color-white: #FFFFFF;
    --color-text-muted: #B8BCC4;
    --color-text-subtle: #8A8F99;
    --color-bg-light: #F8F4F1;
    --color-border: #E0E4E8;
    --color-text: #2D2D2D;
    --color-text-light: #5A5A5A;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Raleway', sans-serif;
    --max-width: 1100px;
    --content-width: 720px;
    --header-height: 72px;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a { color: var(--color-orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-orange-hover); }

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

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-navy);
    height: var(--header-height);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.01em;
}

.logo:hover { color: var(--color-white); }

.logo-sub {
    font-weight: 400;
    color: var(--color-orange);
    margin-left: 0.15em;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.main-nav a:hover { color: var(--color-white); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-white);
    position: absolute;
    left: 0;
    transition: 0.3s;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

/* === Journal Index === */
.journal-hero {
    background: var(--color-bg-light);
    padding: 3.5rem 0 3rem;
    border-bottom: 3px solid var(--color-orange);
}

.journal-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.journal-hero p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 560px;
}

.post-grid {
    padding: 3rem 0 4rem;
}

.post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: var(--content-width);
}

.post-card {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 2.5rem;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--color-text-subtle);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-card-category {
    color: var(--color-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.post-card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-card h2 a {
    color: var(--color-navy);
}

.post-card h2 a:hover {
    color: var(--color-orange);
}

.post-card-image {
    border-radius: 6px;
    margin-bottom: 1rem;
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
}

.post-card-excerpt {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-orange);
}

.read-more:hover { color: var(--color-orange-hover); }

/* === Single Post === */
.post-header {
    background: var(--color-bg-light);
    padding: 3rem 0 2.5rem;
    border-bottom: 3px solid var(--color-orange);
}

.post-header .container {
    max-width: var(--content-width);
}

.post-header-meta {
    font-size: 0.85rem;
    color: var(--color-text-subtle);
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-navy);
    line-height: 1.25;
}

.post-hero-image {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.post-hero-image img {
    width: 100%;
    border-radius: 6px;
    margin-top: 2rem;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin: 2.5rem 0 0.75rem;
}

.post-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-orange);
    margin: 2rem 0 0.5rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul, .post-content ol {
    margin: 0 0 1.25rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.4rem;
}

.post-content blockquote {
    border-left: 4px solid var(--color-orange);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--color-bg-light);
    color: var(--color-text-light);
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.post-content img {
    border-radius: 6px;
    margin: 1.5rem 0;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content code {
    font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
    background: var(--color-bg-light);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--color-navy);
    color: var(--color-text-muted);
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

.post-footer {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
}

.back-link {
    font-weight: 600;
    font-size: 0.95rem;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 5rem 0;
}

.empty-state h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--color-text-light);
}

/* === Footer === */
.site-footer {
    background: var(--color-navy);
    color: var(--color-text-muted);
    padding: 2.5rem 0 2rem;
    margin-top: 2rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.site-footer a {
    color: var(--color-text-muted);
}

.site-footer a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.footer-links button {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0;
}

.footer-links button:hover { color: var(--color-white); }

.rss-link { font-size: 0.85rem; }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-navy-light);
        padding: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
        z-index: 99;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .journal-hero h1 { font-size: 1.75rem; }
    .journal-hero { padding: 2.5rem 0 2rem; }

    .post-header h1 { font-size: 1.75rem; }
    .post-header { padding: 2rem 0; }

    .post-card h2 { font-size: 1.3rem; }

    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
