:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #757575;
  --gold: #b5935a;
  --font-display: 'Playfair Display', serif;
  --font-main: 'Inter', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
}

/* 2. Make the menu transparent and float it OVER the image */
nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 2rem 5%;
  z-index: 100;
  box-sizing: border-box;
}

nav .logo { 
  font-family: var(--font-display); 
  letter-spacing: 3px; 
  color: var(--text);
}

nav .links a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.is-index nav .links a {
    color: #ffffff;
}

.is-index nav {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
}

/* If your logo is dark and disappears on the home page, 
   we can invert it using CSS filters rather than making a second file. */
.is-index .site-logo {
    filter: brightness(0) invert(1);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    /* Adjust the height to fit your nav bar aesthetic */
    height: 34px; 
    width: auto;
    
    /* Best practice for logos: ensures sharp rendering */
    image-rendering: -webkit-optimize-contrast;
    
    /* Ensures the logo doesn't shift during page load */
    display: block;
}

/* Optional: Subtle hover effect for the logo */
.logo-link:hover .site-logo {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* 3. Ensure the Hero scales to fit the screen perfectly */
.hero {
  /* 1. Ensure the container has a physical size */
  min-height: 70vh; 
  width: 100%;
  
  /* 2. Fallback color (if this shows up, the path to the image is the problem) */
  background-color: #222; 

  /* 3. The Image Logic */

  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('images/banner.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  
  /* 4. Layout Logic */
  display: flex;
  align-items: flex-end;
  padding: 5%;
  box-sizing: border-box;
}

/* 4. Content section below the image */
.content-section {
  padding: 5rem 10%;
  background: var(--bg);
  color: var(--text);
  position: relative;
  z-index: 10;
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-image-wrapper {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #222;
}

.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

/* Hover effect: Scales the image when the link is hovered */
.blog-card-link:hover .blog-img {
    transform: scale(1.05);
}

/* Optimized Blog Grid */
.blog-grid {
    display: grid;
    /* Enforces 440px max width while staying responsive */
    grid-template-columns: repeat(auto-fit, minmax(300px, 440px)); 
    gap: 4rem;
    justify-content: center; /* Centers cards if there are only 1 or 2 */
}

.blog-image-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 440px; /* Matches your source image resolution */
    aspect-ratio: 3 / 2;
    background: #222;
}

.blog-image-wrapper-square {
    overflow: hidden;
    width: 100%;
    max-width: 440px; /* Matches your source image resolution */
    aspect-ratio: 1 / 1;
    background: #222;
}

.blog-meta {
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.blog-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0;
}

/* Optional: subtle color shift on title hover */
.blog-card-link:hover .blog-title {
    color: var(--gold);
    transition: color 0.3s ease;
}

.blog-description {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666; /* Muted color so it doesn't compete with the title */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limits description to 3 lines */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    transition: color 0.3s ease;
}

/* Update meta to keep spacing tight */
.blog-meta {
    padding-top: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #eee; /* Subtle separator */
    padding-bottom: 0.5rem;
}

/* Visual feedback on hover */
.blog-card-link:hover .blog-description {
    color: var(--text);
}

.site-footer {
    background-color: #1a1a1a; /* Charcoal Grey */
    color: #999;
    padding: 4rem 0 2rem 0;
    width: 100%;
    font-family: var(--font-main);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15%; /* Space between the two columns */
    margin-bottom: 4rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.column-title {
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
}

.footer-column a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid #2a2a2a;
    padding-top: 2rem;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rss-link {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icon and text */
}

.rss-icon {
    width: 14px; /* Slightly smaller than text for better visual weight */
    height: 14px;
    stroke: currentColor; /* This makes it inherit the grey/white color of your link */
    transition: transform 0.3s ease;
}

.rss-link:hover .rss-icon {
    color: var(--gold);
    transform: translateY(-1px); /* Subtle lift on hover */
}


/* Article Layout Systems */
.post-container {
    max-width: 800px; /* Narrower for better reading line-length */
    margin: 0 auto;
    padding: 10rem 5% 5rem 5%;
}

.post-header {
    text-align: center;
    margin-bottom: 4rem;
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-style: italic;
    margin-top: 1rem;
}

.post-featured-image {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 5rem;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content .lead {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 2rem;
}

.post-content h2 {
    margin: 3rem 0 1.5rem 0;
    font-size: 1.8rem;
}

.post-inset-image {
    margin: 3rem 0;
}

.post-inset-image img {
    width: 100%;
    height: auto;
}

.image-caption {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.back-link {
    text-decoration: none;
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* Lightbox Styles */
#lightbox-dialog {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    outline: none;
}

#lightbox-dialog::backdrop {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

#lightbox-dialog img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* Close instruction */
#lightbox-dialog::after {
    content: "Click anywhere to close";
    display: block;
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
}

/* Add a cursor hint to clickable images */
.post-content img, .post-featured-image img {
    cursor: zoom-in;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.author-portrait {
    width: 60px;  /* Small, 1:1 aspect */
    height: 60px;
    border-radius: 50%; /* Optional: creates a circular portrait */
    object-fit: cover;
    flex-shrink: 0; /* Prevents the image from squishing */
    background: #f4f4f4;
}

.author-info p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.author-info strong {
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 2px;
}

/* Specifically targeting mobile phones in landscape mode */
@media screen and (orientation: landscape) and (max-device-height: 1080px) {
    .hero-title {
        /* Reduce the font size so it doesn't swallow the whole screen */
        font-size: clamp(1.5rem, 8vh, 2.5rem); 
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    /* Optional: If you have a CTA button in the hero */
    .hero-btn {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }
}