/* style.css */

:root { 
    --primary: #b0c4de; 
    --dark-text: #2c3e50; 
    --accent: #8e735b; 
    --bg: #ffffff; 
    --light-grey: #f9f9f9; 
}

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

body { 
    font-family: 'Lato', sans-serif; 
    line-height: 1.6; 
    color: var(--dark-text); 
    background-color: var(--bg); 
    display: flex; 
}

/* Sidebar Navigation */
nav { 
    width: 280px; 
    height: 100vh; 
    background: var(--primary); 
    color: var(--dark-text); 
    position: fixed; 
    padding: 2rem; 
    display: flex; 
    flex-direction: column; 
    border-right: 1px solid rgba(0,0,0,0.1); 
}

.headshot-container { 
    width: 150px; 
    height: 150px; 
    border-radius: 50%; 
    overflow: hidden; 
    margin-bottom: 1.5rem; 
    border: 3px solid white; 
    flex-shrink: 0; 
}

.headshot-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* Sidebar Title Spacing Fix */
nav h1 {
    margin: 0;
    padding: 0;
}

nav h1 a { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.4rem; 
    color: var(--dark-text); 
    text-decoration: none; 
    line-height: 1.1; /* Tight line spacing for the title */
    display: block;
    margin-bottom: 1.5rem; 
}

nav a { 
    color: var(--dark-text); 
    text-decoration: none; 
    margin-top: 1rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-size: 0.85rem; 
    transition: 0.3s; 
    opacity: 0.7; 
}

nav a:hover, nav a.active { 
    opacity: 1; 
    padding-left: 5px; 
    border-left: 3px solid white; 
}

/* Main Content */
main { 
    margin-left: 280px; 
    padding: 4rem; 
    max-width: 1100px; 
    width: 100%; 
}

.page-header-accent { 
    width: 100%; 
    height: 8px; 
    background: var(--primary); 
    margin-bottom: 2rem; 
    border-radius: 4px; 
}

h2 { 
    font-family: 'Playfair Display', serif; 
    font-size: 2.2rem; 
    color: var(--dark-text); 
    margin-bottom: 1.5rem; 
    border-bottom: 2px solid var(--primary); 
    display: inline-block; 
}

/* Responsive Design */
@media (max-width: 768px) { 
    body { flex-direction: column; } 
    nav { width: 100%; height: auto; position: relative; padding: 1.5rem; } 
    main { margin-left: 0; padding: 2rem; } 
}
/* --- Publication Grid Styles --- */

.book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Creates 3 equal columns */
    gap: 2rem;                             /* Spacing between books */
    margin-top: 2rem;
    align-items: start;
}

.book-card {
    text-align: center; 
}

.book-card img {
    width: 100%;       
    max-width: 200px;  /* Keeps the book covers a reasonable size */
    height: auto;      
    display: block;
    margin: 0 auto 1rem auto; /* Centers the image inside the column */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

/* Mobile fix: stacks them on small screens */
@media (max-width: 600px) {
    .book-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Media Page Styles --- */

.news-item {
    margin-bottom: 3rem; /* Adds space between each publication section */
}

.news-item h3 {
    font-family: 'Playfair Display', serif; /* Matches the site titles */
    font-size: 1.5rem;
    color: var(--dark-text);
    margin-bottom: 1rem;   /* Space between the subhead and the links */
    border-bottom: 1px solid #eee; /* Optional: adds a subtle line under the subhead */
    display: inline-block;
    padding-right: 2rem;
}

.news-item p {
    margin-bottom: 0.5rem; /* Space between individual articles */
}

.news-item a {
    color: var(--dark-text);
    text-decoration: none;
    transition: 0.2s;
}

.news-item a:hover {
    color: var(--accent);
    text-decoration: underline;
}
/* --- Media Page Alternating Logos --- */

/* Basic layout for each media group */
.news-item {
    display: flex;
    align-items: flex-start; /* Aligns the top of the image and top of the title */
    gap: 3rem;               /* Space between text and image */
    margin-bottom: 4rem;     /* Space between publication blocks */
    width: 100%;
}

/* Container for the text block (h3 and p links) */
.text-content {
    flex: 1; /* Makes the text box take up all remaining space */
}

/* Subheading Styling */
.news-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--dark-text);
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: inline-block;
    padding-bottom: 0.3rem;
    padding-right: 2rem;
}

/* Link Styling */
.news-item p {
    margin-bottom: 0.6rem;
}

.news-item a {
    color: var(--dark-text);
    text-decoration: none;
    transition: 0.2s;
    line-height: 1.4;
}

.news-item a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* THE LOGO IMAGE CONTROL */
.publication-logo {
    flex-shrink: 0;         /* Prevents the image from being squished */
    width: auto;             /* Let width adjust to height */
    height: 120px;           /* Makes all logos roughly the same vertical size */
    max-width: 200px;        /* Keeps horizontal logos like Washington Post in check */
    object-fit: contain;     /* Ensures whole logo is visible without cropping */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05)); /* Optional soft shadow for polish */
}

/* Adjustments for the specific logos based on their visual content */

/* Slate logo (image_0.png) is solid and bold; needs slightly less height */
.logo-right img[src*="slate"] {
    height: 100px;
}

/* Ms. Magazine logo (image_1.png) is a square shape */
.logo-left img[src*="ms-magazine"] {
    height: 130px; /* Slightly taller because it's square */
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .news-item {
        flex-direction: column !important; /* Stack text above image on small screens */
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    .news-item h3 {
        padding-right: 0;
    }
    
    /* Make logos slightly smaller on mobile */
    .publication-logo {
        height: 80px !important;
        margin-top: 1rem;
    }
}/* Keep linked book titles dark unless hovered */
.book-card h3 a {
    text-decoration: none;
    color: var(--dark-text);
}

.book-card h3 a:hover {
    color: var(--accent); /* Changes color slightly when mouse is over it */
    text-decoration: underline;
}
