:root {
    --bg-color: #ffffff;
    --text-color: #555;
    --title-color: #ffffff;
    --muted-color: #999;
    --border-color: #e0e0e0;
    --link-color: #444; 
    --font-sans: "Monda", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", serif;
}

/* --- BASE STYLES --- */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 18px;
}

/* --- HEADER (Full Width Row) --- */
.site-header {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    width: 100%;
}

.header-inner {
    max-width: 1100px; /* Wider than content */
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.site-title {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    padding: 0 15px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    background: #000; 
}

.site-title a {
    color: var(--title-color);
    text-decoration: none; 
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

nav a:link, 
nav a:visited {
    color: var(--text-color); 
    padding: 0 3px;
    transition: all .15s;
    transition-timing-function: cubic-bezier(.7, 0, .3, 1);
    text-decoration: none;
}

nav a .fa-mastodon {
    color: #6364FF;
    margin-right: 7px;
}

nav a .fa-rss {
    color: #FF6600;
    margin-right: 7px;
}

nav a:hover .fa-solid {
    color: #ffffff;
}

nav a:hover .fa-brands {
    color: #ffffff;
}

nav a:hover { 
    box-shadow: inset 0 -30px 0 #000; 
    color: #fff; 
}

/* --- MAIN CONTENT (Narrow Column) --- */
.site-main {
    max-width: 700px; /* Tighter reading column */
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.custom-content {
    border: 10px #000 solid;
    padding: 30px;
}

.content a:link, 
.content a:visited,
.custom-content a:link, 
.custom-content a:visited,
.site-main a:link,
.site-main a:visited {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px #000 solid;
    padding: 0 3px;
    transition: all .15s;
    transition-timing-function: cubic-bezier(.7, 0, .3, 1);
    text-decoration: none;
}

.content a:hover,
.custom-content a:hover,
.site-main a:hover {
    box-shadow: inset 0 -30px 0 #000; 
    color: #fff;
}

.site-main h1, 
.site-main h2, 
.site-main h3,
.site-main h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    margin-top: 0;
    text-align: center;
}

.site-main h3 {
    margin: 50px 0;
}

.site-main h4 { 
    color: #fff; 
    background: #000; 
    padding: 0 10px;
    font-size: 1.0em;
    text-transform: uppercase;
    display: inline;
}

.site-main h4 + p {
    display: inline;
    padding: 0 0 0 10px; 
    text-align: center;
}

.site-main h4 + p + img {
    margin-top: 30px; 
}

.site-main h4 + p + div {
    margin-top: 30px; 
}

.site-main h4 + div {
    margin-top: 30px; 
}

.site-main h5 { 
    color: #fff;
    background: #000;
    padding: 0 8px;
    font-size: 1.0em;
    text-transform: uppercase;
    display: inline;
}

.site-main h5 + p {
    display: inline;
    padding: 0 0 0 10px; 
    font-size: 1.0em;
    text-align: center;
}

.site-main h6 {
    color: #fff;
    background: #000;
    padding: 0 8px;
    font-size: 1.0em;
    text-transform: uppercase;
    display: inline;
}

.site-main h6 + p {
    display: inline;
    padding: 0 0 0 10px; 
    font-size: 1.0em;
    text-align: center;
}

.site-main img {
    border: 10px #000 solid;
    text-align: center;
    margin: 0 auto;
}

.site-main p {
    text-align: center; 
    font-size: 1.2em;
}

.site-main h1 { font-size: 2rem; }
.site-main h2 { font-size: 1.5rem; }

/* Article Styling */
article {
    margin-bottom: 4rem;
}

article header {
    margin-bottom: 1.5rem;
}

article h2 a {
    color: var(--text-color);
}

.meta {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--muted-color);
    margin-top: 0.5rem;
}

.section-break {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* --- MARK HIGHLIGHTS --- */
mark {
  font-style: italic;
  font-weight: 500;
  color: #444;
  background: linear-gradient(to top, var(--c1) 20%, transparent 25%);
  text-shadow: 0 1px #fff;
  font-size: 1.0em;
  padding: 0 4px;
  border-radius: 2px;
}

mark.mark-color-0 {
  background: linear-gradient(to top, #EA1889 20%, transparent 25%);
}

mark.mark-color-1 {
  background: linear-gradient(to top, #43E608 20%, transparent 25%);
}

mark.mark-color-2 {
  background: linear-gradient(to top, #33DDFF 20%, transparent 25%);
}

mark.mark-color-3 {
  background: linear-gradient(to top, #FED600 20%, transparent 25%);
}

mark.mark-color-4 {
  background: linear-gradient(to top, #FE5C00 20%, transparent 25%);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Typography Details */
pre, code {
    font-family: monospace;
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

blockquote {
    border-left: 3px solid var(--text-color);
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--muted-color);
}

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

/* --- FOOTER (Full Width Row) --- */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    width: 100%;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-footer p {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--muted-color);
}

.site-footer a:link, 
.site-footer a:visited {
    color: var(--text-color); 
    padding: 0 3px;
    transition: all .15s;
    transition-timing-function: cubic-bezier(.7, 0, .3, 1);
    text-decoration: none;
}

.site-footer a:hover { 
    box-shadow: inset 0 -30px 0 #000; 
    color: #fff; 
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .site-main {
        padding: 2rem 1.5rem;
    }
}

/* --- POST FOOTER (Linked Date Below Content) --- */
.post-footer {
    margin-top: 2rem;
    text-align: center;
}

.meta-link {
    font-family: var(--font-sans);
    font-size: 0.6em;
    color: #ccc; 
    text-decoration: none;
    text-transform: uppercase;
}

.meta-link:hover {
    color: #444444; /* Dark grey */
    text-decoration: none; /* Prevents the global link hover underline */
}

/* --- PHOTOS POST STYLING --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Forces exactly 3 equal columns */
    gap: 1rem; /* Ensures the exact same spacing between every photo */
    text-align: center;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    border: #000 3px solid; 
}

.gallery4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Forces exactly 3 equal columns */
    gap: 1rem; /* Ensures the exact same spacing between every photo */
    text-align: center;
}

.gallery4 img {
    width: 100%;
    height: auto;
    display: block;
    border: #000 3px solid; 
}

/* Optional: Ensure single photos don't look tiny if only one exists */
.photos-content img:only-child {
    width: 100%;
}

iframe {
    width: 100%;
    margin: -50px 0 0 0;
    border: 10px solid #000000;
    display: block;
}

/* --- LIGHTBOX --- */
body.lightbox-open {
    overflow: hidden; /* Locks background scrolling */
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    
    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    
    /* Subtle zoom start state */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}