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

/* Box sizing reset */
html { 
    box-sizing: border-box; 
}
*, *::before, *::after { 
    box-sizing: inherit; 
}

/* Typography baseline */
html { 
    font-size: 18px; 
}

body {
    font-family: "Lato", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
}

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

/* Main site container */
.container {
    max-width: 44.8rem;
    margin-left: auto;
    margin-right: auto;
    padding: 2.4rem 1.2rem;
}

/* Homepage specific container */
.index {
    max-width: 44.8rem !important;
    margin-left: auto;
    margin-right: auto;
    padding: 2.4rem 1.2rem;
}

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

header {
    display: grid;
    grid-template-columns: minmax(100px, 191px) auto;
    grid-template-rows: minmax(1em, 90px) auto;
    gap: 1rem;
}

/* Logo positioning */
header a {
    grid-row: span 2;
}

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

/* Header typography */
header h1, header h3 {
    font-family: "Lato", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.1;
}

header h1 span, header h3 span {
    text-transform: uppercase;
    font-weight: 300;
    display: block;
}

/* Remove decorative elements from header */
header h1::before, header h3::before {
    content: "";
}

/* Navigation */
header nav {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
}

header nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
}

header nav a, header nav a:visited {
    color: #333333;
    text-decoration: none;
    padding: .25rem .5rem;
    border-radius: 1rem;
    text-transform: uppercase;
    font-size: .85rem;
}

header nav a::before {
    content: "§";
    margin-right: .5rem;
}

/* ==========================================================================
   HOMEPAGE GRID LAYOUT
   ========================================================================== */

div.index main {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr;
    column-gap: 2rem;
}

div.index main article:nth-child(1), 
div.index main article:nth-child(2), 
div.index main article:nth-child(3) {
    grid-column-start: 1;
    grid-column-end: 4;
}

div.index main article:nth-child(3) {
    border-bottom: 1px solid #ababab;
}

/* Homepage typography */
/* First 3 articles in 3-column grid keep larger h3 */
div.index main article:nth-child(-n+3) h3 {
    font-size: 2rem;
    line-height: 2.4rem;
    margin: 0;
}

/* All other h3s in index layout get smaller size */
div.index main h3 {
    font-size: 1.5rem;
    line-height: 1.8rem;
    margin: 0;
}

div.index main h3::before {
    content: none;
}

/* Homepage spacing */
div.index main article {
    margin-bottom: 1.5em;
}

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

/* Main content headings */
main h1 {
    font-size: 2.25rem;
    line-height: 1.2;
}

main h2 {
    font-size: 1.51572rem;
    line-height: 1.1;
}

main h3 {
    font-size: 1.31951rem;
    line-height: 1.1;
}

/* Decorative hangers for main content - REMOVED */
/* main h1::before, main h3::before {
    content: "#";
    font-weight: 200;
    margin-left: -1.5rem;
    padding-right: .5rem;
    color: rgba(0, 0, 0, .2);
    vertical-align: text-top;
} */

/* Hover states - REMOVED (no more decorative hangers) */
/* main h1:hover::before, main h3:hover::before {
    font-weight: 350;
    color: rgba(0, 0, 0, .3);
} */

/* Links */
h1 a, h3 a {
    color: #333333;
    text-decoration: none;
}

h3 a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   CONTENT ELEMENTS
   ========================================================================== */

/* Articles */
article {
    margin-bottom: 3em;
}

/* Publication details */
p.pub-details {
    font-weight: 600;
    text-transform: uppercase;
    font-size: .725rem;
    letter-spacing: .1rem;
    margin: 0;
}

/* Callouts and CTAs */
.mc-cta {
    width: 14em;
    margin: 1rem auto;
    text-align: center;
    padding: .25em;
    display: block;
    font-size: 1.5em;
    border: 1px solid #cccccc;
    border-radius: .5em;
    background-color: #2c50c4;
    color: white;
    text-decoration: none;
}

div.callout {
    border: 1px dotted #666666;
    padding: 1em 1em 0 1em;
    background-color: aliceblue;
    margin-bottom: 2rem;
}

/* Images */
img.bodyshot {
    width: 200px;
    margin-left: 1em;
    margin-bottom: 1em;
    float: right;
}

/* Footer */
div.h-card p {
    margin-left: .75rem;
}

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

/* Mobile header adjustments */
@media screen and (max-width: 800px) {
    header {
        display: grid;
        grid-template-columns: minmax(10rem, 20rem);
        grid-template-rows: auto;
        gap: 0;
        font-size: 1rem;
    }
    
    header a {
        width: 50%;
    }
    
    header h1, header h3 {
        font-size: 1.2rem;
    }
    
    header nav a, header nav a:visited {
        font-size: .75rem;
        padding: 0;
        margin: 0;
    }
    
    header nav a::before {
        content: "§";
        margin-right: 0.25rem;
    }
}

/* Responsive images */
@media screen and (min-width: 10em) and (max-width: 1200px) {
    img.bodyshot {
        width: 300px;
    }
}

@media screen and (min-width: 2em) and (max-width: 500px) {
    img.bodyshot {
        width: 150px;
    }
    
    .mc-cta {
        width: 10em;
    }
}



