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

body.dark-bg {
    background: var(--bg-main);
    background: radial-gradient(circle at top, #0e1823 0, #05070a 45%, #000000 100%);
    color: var(--text-main);
    font-family: "Fira Code", monospace;
    line-height: 1.7;
    overflow-x: hidden;
}

:root {
    --bg-main: #05070a;
    --bg-elevated: #0b0f13;
    --bg-alt: #090c10;

    --accent: #4db8ff;
    --accent-soft: #4db8ff33;

    --text-main: #d0e7ff;
    --text-muted: #6b8290;

    --border-subtle: #171c22;
    --shadow-glow: 0 0 25px #4db8ff33;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
    transition: 0.2s ease;
}
a:hover {
    text-shadow: 0 0 8px var(--accent);
}

/* Containers */
.container {
    width: 90%;
    max-width: 980px;
    margin: 0 auto;
}

/* ------------------------------------------------------------
   HEADER + NAV (CLEAN)
------------------------------------------------------------- */
.site-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(10px);
}

/* this is your actual header wrapper: <div class="container header-inner"> */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* logo */
.logo {
    margin: 0;
}
.logo a {
    color: #9cd4ff;
    font-size: 1.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo a span {
    color: var(--accent);
}

/* desktop nav */
.main-nav .nav-menu {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
}
.main-nav .nav-menu li { position: relative; }
.main-nav .nav-menu a {
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 2px;
    position: relative;
}
.main-nav .nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}
.main-nav .nav-menu a:hover::after { width: 100%; }

/* hamburger (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
}
.hamburger span {
    height: 3px;
    background: var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 6px var(--accent-soft);
    transition: 0.3s;
}

/* slide-out menu (OFFSCREEN by default) */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -260px;              /* IMPORTANT: hidden offscreen */
    width: 260px;
    height: 100vh;
    background: #05070f;
    padding: 40px 20px;
    border-left: 1px solid #1b1f27;
    box-shadow: -2px 0 16px #000000aa;
    transition: right 0.35s ease;
    z-index: 99999;
}

/* visible when active */
.mobile-menu.active {
    right: 0;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-nav-menu li { margin-bottom: 20px; }
.mobile-nav-menu a {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid #1b1f27;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main);
}
.mobile-nav-menu a:hover {
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent);
}

/* hamburger animation */
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* BREAKPOINT: use hamburger on <= 860px */
@media (max-width: 860px) {
    .main-nav { display: none; }
    .hamburger { display: flex; }
}

/* BREAKPOINT: force desktop nav on >= 861px */
@media (min-width: 861px) {
    .main-nav { display: block; }
    .hamburger { display: none; }
    .mobile-menu { right: -260px; } /* ensure closed if resized */
}

/* END MOBILE — DO NOT ADD EXTRA BRACES BELOW THIS LINE */
/* ------------------------------------------------------------
   HOME SECTIONS
------------------------------------------------------------- */
.home-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

/* Post Grid */
.post-grid {
    display: grid;
    gap: 20px;
}
@media (min-width: 700px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
    background: var(--bg-elevated);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    transition: 0.2s;
}
.post-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-soft);
}
.post-card h3 { margin-bottom: 6px; }

/* ------------------------------------------------------------
   CATEGORY CHIPS
------------------------------------------------------------- */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.category-chip {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #05070f;
}
/* ------------------------------------------------------------
   SINGLE POST
------------------------------------------------------------- */
.post-single h1 {
    font-size: 2.1rem;
}  
 .content-area p {
    margin-bottom: 1.1em;
}
/* ------------------------------------------------------------
   BREADCRUMBS
------------------------------------------------------------- */
.breadcrumbs {
    font-size: 0.8rem;
    margin: 15px 0 10px;
    color: var(--text-muted);
}
.breadcrumbs a { color: var(--accent); }

/* ------------------------------------------------------------
   404 PAGE
------------------------------------------------------------- */
.error-404 {
    padding: 80px 0;
}

.terminal {
    background: #05070f;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #1b1f27;
    text-align: left;
    box-shadow: 0 0 16px #00000060;
}

.terminal-title {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

/* ------------------------------------------------------------
   FOOTER
------------------------------------------------------------- */
.site-footer {
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}
/* --- Webhole layout tweaks after rebuild --- */

/* Center footer content nicely */
.site-footer .container {
    text-align: center;
}

/* Ensure main content has breathing room from header */
.site-main.container {
    padding-top: 20px;
}

/* ------------------------------------------------------------
   HAMBURGER ANIMATION (open/close)
------------------------------------------------------------- */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* ------------------------------------------------------------
   GENERAL LAYOUT FIXES
------------------------------------------------------------- */

/* Prevent page from shifting left */
body {
    margin: 0;
    padding: 0;
}

/* Ensure main content stays centered */
.site-main.container {
    margin-top: 20px;
}

/* Make footer centered and consistent */
.site-footer {
    width: 100%;
    padding: 30px 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
}

/* Strong layout integrity for posts & pages */
.post-card,
.post-single,
.content-area {
    width: 100%;
    box-sizing: border-box;
}
/* ----------------------------------------
   CATEGORY / ARCHIVE IMAGE SIZE FIX
----------------------------------------- */
.category .post-thumb img,
.archive .post-thumb img,
.search .post-thumb img {
    width: 100%;
    height: 180px;          /* controls vertical size */
    object-fit: cover;     /* crops nicely, no distortion */
    border-radius: 8px;
}
/* ------------------------------------------------------------
   SEARCH RESULTS — VERTICAL LIST
------------------------------------------------------------- */

.search-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-list .post-card {
    display: block;
}

.search-results .post-thumb img {
    max-width: 100%;
    height: auto;
}
/* ----------------------------------------
   SINGLE POST WIDTH FIX (recommended)
----------------------------------------- */
.single-post .site-main.container {
    max-width: 1100px;
}
/* ----------------------------------------
   SINGLE POST FEATURED IMAGE FIX
----------------------------------------- */
.single-post .single-thumb {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px;
}

.single-post .single-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
/* ------------------------------------------------------------
   CATEGORY ARCHIVE – FORCE VERTICAL POSTS
------------------------------------------------------------- */

.category .post-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category .post-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Optional: thumbnail sizing for category pages */
.category .post-card img {
    max-width: 220px;
    height: auto;
    border-radius: 6px;
}

/* Stack cleanly on mobile */
@media (max-width: 640px) {
    .category .post-card {
        flex-direction: column;
    }

    .category .post-card img {
        max-width: 100%;
    }
}
