:root {
    --bg-color: #FDFBF7;        /* Vellum */
    --text-color: #222222;      /* Charcoal */
    --accent-color: #C0362C;    /* International Orange */
    --meta-color: #666666;      /* Grey for dates/intro */
    
    --font-serif: 'Libre Baskerville', serif;
    --font-sans: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header Typography */
.site-header {
    text-align: center;
    padding: 60px 20px 40px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 60px;
}

.site-header h1 a {
    font-family: var(--font-serif);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Updated Branding for Flex Alignment */
.site-branding {
    display: flex;
    align-items: center;
    justify-content: center; /* Keeps it centered like the original design */
    gap: 20px; 
    text-decoration: none;
}

/* Updated Logo Size to match the larger text */
.logo-mark {
    width: 60px;  /* Increased to balance with the 2.5rem text */
    height: 60px;
    color: var(--accent-color); /* Matches the logo to your header text color */
}

.site-title {
    font-family: var(--font-serif);
    color: var(--accent-color);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;      /* Slightly tighter than 1px to make it feel "sturdier" */
    font-weight: 700;            /* Changed from normal to Bold (700) */
    line-height: 1.1;            /* Ensures the logo and text align vertically better */
}

/* The Grid Layout */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* The Tile Design */
.post-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.post-tile:hover .tile-image {
    opacity: 0.85;
    box-shadow: 0 0 0 4px var(--accent-color); /* The Orange Border on Hover */
}

.tile-image-container {
    margin-bottom: 20px;
}

.tile-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    
    /* THE FILTER PIPELINE */
    /* 1. Lower saturation for a cinematic look */
    /* 2. Slight blue/cyan tint via hue-rotate and sepia */
    /* 3. Lower brightness to make the white text pop */
    filter: saturate(0.7) brightness(0.9) contrast(1.1) sepia(0.2) hue-rotate(160deg);
    
    transition: filter 0.4s ease, transform 0.4s ease;
}

.post-tile:hover .tile-image {
    /* Bring back the original color on hover */
    filter: saturate(1) brightness(1) contrast(1) sepia(0) hue-rotate(0deg);
    transform: scale(1.02); /* Subtle zoom for interaction */
}

.tile-content h2 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.tile-excerpt {
    font-family: var(--font-sans);
    color: var(--meta-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.tile-meta {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Post Page Container */
.post-content {
    max-width: 800px; /* Narrower than the grid for better readability */
    margin: 0 auto;
    padding: 0 20px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-page-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-top: 10px;
    line-height: 1.2;
}

/* Post Hero Image */
.post-hero {
    margin-bottom: 60px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.post-hero img {
    width: 100%;
    height: 60vh; /* Takes up 60% of the screen height */
    object-fit: cover;
}

/* Post Body Typography */
.post-body {
    font-family: var(--font-serif); /* Use serif for the actual story */
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
}

.post-body p {
    margin-bottom: 2rem;
}

/* Style for any images you drop inside the markdown */
.post-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 2px;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0;
    color: var(--meta-color);
    font-size: 0.8rem;
}