/*
Theme Name: Survive Tactics
Theme URI: https://survivetactics.org
Author: Survive Tactics
Description: Clean gray-white tactical survival blog theme
Version: 1.0
*/

:root {
    --bg: #f5f5f4;
    --bg-card: #ffffff;
    --bg-section: #fafaf9;
    --text: #1c1c1b;
    --text-muted: #6b6b68;
    --text-light: #9a9a96;
    --accent: #3f3f3d;
    --accent-hover: #1c1c1b;
    --border: #e5e5e3;
    --border-strong: #d4d4d2;
    --nav-bg: rgba(255, 255, 255, 0.96);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --max-width: 1180px;
    --content-width: 740px;
}

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

html { -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

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

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

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

.nav-logo .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--text);
    margin: 0 0.3rem 0.15rem 0;
    vertical-align: middle;
}

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

.nav-menu a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: color 0.2s;
}

.nav-menu a:hover { color: var(--text); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
}

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

/* Hero / Featured */
.featured {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.featured-img-wrap {
    overflow: hidden;
    margin-bottom: 1.8rem;
    background: var(--bg-section);
    border: 1px solid var(--border);
}

.featured-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.featured h2 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.6px;
}

.featured h2 a { color: var(--text); }
.featured h2 a:hover { color: var(--text-muted); }

.featured .excerpt {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-width: 720px;
}

.featured .meta,
.post-card .meta {
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.cat-tag {
    display: inline-block;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--border-strong);
    margin-bottom: 0.9rem;
    background: var(--bg-card);
}

/* Post Grid */
.section-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 2.5rem 2rem;
}

.post-card {
    background: transparent;
    transition: transform 0.2s;
}

.post-card:hover { transform: translateY(-2px); }

.post-card .thumb-wrap {
    overflow: hidden;
    margin-bottom: 1.1rem;
    background: var(--bg-section);
    border: 1px solid var(--border);
}

.post-card .thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s;
}

.post-card:hover .thumb { transform: scale(1.03); }

.post-card h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 0.5rem 0 0.6rem;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--text-muted); }

.post-card .card-excerpt {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0.7rem;
}

/* Single Post */
.single-post {
    max-width: var(--content-width);
    margin: 0 auto;
}

.single-post .cat-tag {
    margin-bottom: 1rem;
}

.single-post h1 {
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.7px;
    margin-bottom: 1rem;
}

.single-post .meta {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.single-post .featured-img-wrap { margin-bottom: 2.5rem; }
.single-post .featured-img { height: 380px; }

.single-post .content h2 {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text);
    letter-spacing: -0.3px;
}

.single-post .content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.8rem 0 0.8rem;
    color: var(--text);
}

.single-post .content p {
    margin-bottom: 1.3rem;
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.75;
}

.single-post .content a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.single-post .content a:hover { color: var(--text-muted); }

.single-post .content strong {
    color: var(--text);
    font-weight: 700;
}

.single-post .content ul,
.single-post .content ol {
    margin: 0 0 1.3rem 1.5rem;
    color: var(--text);
}

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

.related-section {
    max-width: 1000px;
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

/* Page */
.page-content {
    max-width: var(--content-width);
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.6px;
}

.page-content .content p {
    margin-bottom: 1.2rem;
    line-height: 1.75;
}

.page-content .content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 0.8rem;
}

/* 404 */
.error-404 {
    text-align: center;
    padding: 6rem 1.5rem;
    max-width: 540px;
    margin: 0 auto;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--text);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
}

.error-404 .sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 1rem 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--text);
    color: var(--bg-card);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: background 0.2s;
    border: 1px solid var(--text);
}

.btn:hover { background: var(--text-muted); color: var(--bg-card); border-color: var(--text-muted); }

/* Pagination */
.pagination {
    margin-top: 4rem;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.6rem 1rem;
    margin: 0 0.2rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination .page-numbers.current {
    background: var(--text);
    color: var(--bg-card);
    border-color: var(--text);
}

.pagination .page-numbers:hover { border-color: var(--text); color: var(--text); }
.pagination .page-numbers.current:hover { color: var(--bg-card); }

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
    margin-top: 6rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .logo {
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 380px;
}

.footer h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.footer a {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.7rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    max-width: var(--max-width);
    margin: 3rem auto 0;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-light);
    font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .nav-toggle { display: block; }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 1.5rem;
        gap: 1.2rem;
        border-bottom: 1px solid var(--border);
    }
    .featured h2 { font-size: 1.7rem; }
    .featured-img { height: 280px; }
    .single-post h1 { font-size: 1.9rem; }
    .single-post .featured-img { height: 260px; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
    .post-grid { grid-template-columns: 1fr; }
    .container { padding: 2rem 1.2rem; }
    .error-404 h1 { font-size: 4rem; }
}
