/*
Theme Name: M8N1AC Dark
Theme URI: http://m8n1ac.com
Author: Darrin Abell
Description: Custom dark memoir theme for Memoir of a Maniac
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: m8n1ac
*/

/* =============================================
   RESET & BASE
   ============================================= */

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

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

body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #f0f0f0;
    line-height: 1.25;
    margin-bottom: 1rem;
    font-weight: normal;
    letter-spacing: 0.02em;
}

h1 { font-size: 2.6rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.9rem; margin-top: 3rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-top: 2rem; }
h4 { font-size: 1.2rem; margin-top: 1.5rem; }

p {
    margin-bottom: 1.5rem;
    color: #d4d4d4;
}

a {
    color: #8b0000;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #cc2200;
}

strong, b {
    color: #f0f0f0;
    font-weight: 600;
}

em, i {
    color: #c8c8c8;
    font-style: italic;
}

ul, ol {
    margin: 0 0 1.5rem 1.8rem;
}

li {
    margin-bottom: 0.5rem;
    color: #d4d4d4;
}

hr {
    border: none;
    border-top: 1px solid #2a2a2a;
    margin: 3rem 0;
}

/* =============================================
   BLOCKQUOTES
   ============================================= */

blockquote {
    border-left: 3px solid #8b0000;
    margin: 2rem 0;
    padding: 1rem 0 1rem 2rem;
    font-style: italic;
    color: #b8b8b8;
    font-family: Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.9;
    background: #111111;
}

blockquote p {
    color: #b8b8b8;
    margin-bottom: 0;
}

/* =============================================
   LAYOUT
   ============================================= */

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
    background-color: #080808;
    border-bottom: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-branding { flex-shrink: 0; }

.site-title {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    font-weight: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
}

.site-title a {
    color: #e0e0e0;
}

.site-title a:hover {
    color: #8b0000;
}

/* =============================================
   NAVIGATION
   ============================================= */

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-navigation ul li a {
    display: block;
    color: #888;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.45rem 0.7rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a {
    color: #8b0000;
}

/* =============================================
   ENTRY / PAGE CONTENT
   ============================================= */

.entry-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #1e1e1e;
}

.entry-title {
    font-size: 2.4rem;
    color: #f0f0f0;
    font-family: Georgia, serif;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 0;
}

.entry-content { font-size: 1rem; line-height: 1.8; }

/* =============================================
   BLOG INDEX CARDS
   ============================================= */

.post-card {
    background: #111;
    border: 1px solid #1e1e1e;
    border-left: 3px solid #8b0000;
    padding: 2rem 2.5rem;
    margin-bottom: 2.5rem;
    transition: border-color 0.2s ease;
}

.post-card:hover { border-left-color: #cc2200; }

.post-card .post-title {
    font-family: Georgia, serif;
    font-size: 1.6rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.post-card .post-title a { color: #e8e8e8; }
.post-card .post-title a:hover { color: #8b0000; }

.post-meta {
    font-size: 0.72rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.post-excerpt { color: #aaa; font-size: 0.95rem; line-height: 1.7; }

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8b0000;
    border-bottom: 1px solid #8b0000;
    padding-bottom: 2px;
}

.read-more:hover { color: #cc2200; border-color: #cc2200; }

/* =============================================
   TABLES
   ============================================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9rem;
}

thead { border-bottom: 2px solid #8b0000; }

th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #f0f0f0;
    font-family: Georgia, serif;
    font-weight: normal;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #111;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1a1a1a;
    color: #c8c8c8;
    vertical-align: top;
}

tr:hover td { background: #111; }

/* =============================================
   IMAGES & GALLERY
   ============================================= */

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

figure { margin: 2.5rem 0; }

figcaption {
    font-size: 0.78rem;
    color: #555;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.wp-block-image { margin: 2.5rem 0; }
.wp-block-image img { width: 100%; height: auto; }

.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 2.5rem 0;
}

.wp-block-gallery .wp-block-image { margin: 0; }

.wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: brightness(0.85) saturate(0.85);
    transition: filter 0.3s ease;
}

.wp-block-gallery .wp-block-image img:hover {
    filter: brightness(1) saturate(1);
}

/* =============================================
   404
   ============================================= */

.error-404 { text-align: center; padding: 6rem 2rem; }

.error-code {
    font-family: Georgia, serif;
    font-size: 8rem;
    color: #8b0000;
    line-height: 1;
    display: block;
    margin-bottom: 1rem;
}

.error-404 h1 {
    font-size: 1.6rem;
    color: #444;
    font-weight: normal;
    margin-bottom: 1.5rem;
}

.error-404 p { color: #444; }

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    background: #080808;
    border-top: 1px solid #1a1a1a;
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner { max-width: 820px; margin: 0 auto; }

.footer-title {
    font-family: Georgia, serif;
    font-size: 0.82rem;
    color: #3a3a3a;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.footer-contact { font-size: 0.78rem; color: #2e2e2e; }
.footer-contact a { color: #444; }
.footer-contact a:hover { color: #8b0000; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    html { font-size: 16px; }

    .header-inner {
        padding: 0.75rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
    }

    .main-navigation ul li a {
        padding: 0.35rem 0.5rem;
        font-size: 0.6rem;
    }

    .site-content { padding: 2.5rem 1.25rem; }
    h1, .entry-title { font-size: 1.8rem; }
    h2 { font-size: 1.45rem; }
    .post-card { padding: 1.5rem; }
    th, td { padding: 0.5rem 0.6rem; }
}
