/* 
 * INDEX STYLE OVERRIDES 
 * Preserves core aesthetic from style.css but alters layout for structure 
 */

/* 1. Reset Body Layout */
/* style.css uses flex centering. We want a vertical stack (Header - Main - Footer) */
body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center; /* Center the column contents */
    padding: 2rem 5%; /* Use percentage padding for responsiveness */
    gap: 3rem;
    height: auto;
    min-height: 100vh;
}

/* 2. Header Customization */
/* Separate from the 'main' HUD, acting as a title element */
header {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    border-bottom: 2px solid var(--c-bg-panel); /* Subtle separator */
}

header h1 {
    font-size: clamp(2rem, 4vw, 3rem); /* Slightly smaller than landing */
    margin-bottom: 1rem;
}

header h2 {
    font-family: var(--font-stack-tech);
    color: var(--c-accent-1); /* Mint color for contrast */
    border-left: none; /* Remove side border style */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* 3. Main Container Expansion */
/* style.css constrains this to 800px. We want to use the space. */
main {
    max-width: 1200px;
    width: 100%;
    padding: 3rem;
    
    /* Internal Grid Layout */
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* 4. Desktop Grid Layout (The "Smart" part) */
@media (min-width: 900px) {
    main {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: auto auto;
        align-items: start;
    }

    /* Top Left: The Problem */
    #the-problem {
        grid-column: 1 / 8; /* Spans 7 columns */
        padding-right: 2rem;
    }

    #the-problem h3 {
        color: var(--c-primary);
    }

    /* Top Right: The Handbook (CTA) */
    #the-handbook {
        grid-column: 8 / 13; /* Spans 5 columns */
        border-left: 2px dashed var(--c-bg-dark); /* distinct separator */
        padding-left: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    /* Bottom: The Architect */
    #the-architect {
        grid-column: 1 / 13; /* Full width */
        grid-row: 2;
        align-items: flex-start;

        /* Internal grid for bio */
        display: grid;
        grid-template-columns: 250px 1fr;
        grid-column-gap: 2rem;
        
        margin-top: 1rem;
        padding-top: 2rem;
        border-top: 2px dashed var(--c-bg-dark);
    }

    #the-architect h3 {
        grid-column: 1;
        grid-row: 1;
        margin-top: 0;
        text-align: right; /* Align header against the text */

    }

    #the-architect p {
        grid-column: 2;
        margin-bottom: 1rem;
    }

    #the-architect p:first-of-type{
        margin-top: 0;
    }
}

/* 5. Section Specifics */
h3 {
    font-family: var(--font-stack-tech);
    color: var(--c-accent-2);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* Make the CTA link stand out */
#the-handbook a {
    display: inline-block;
    background: var(--c-bg-dark);
    color: var(--c-accent-1);
    padding: 1rem;
    border: 1px solid var(--c-accent-1);
    text-decoration: none;
    font-family: var(--font-stack-tech);
    transition: all 0.3s ease;
    text-align: center;
}

#the-handbook a:hover {
    background: var(--c-accent-1);
    color: var(--c-bg-dark);
    box-shadow: 0 0 20px rgba(0, 255, 191, 0.3);
}

/* 6. Footer Styling */
footer {
    width: 100%;
    max-width: 1200px;
    border-top: 1px solid var(--c-text-dim);
    padding-top: 2rem;
    
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

footer nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
}

footer a {
    color: var(--c-text-dim);
    text-decoration: none;
    font-family: var(--font-stack-tech);
    font-size: 0.9rem;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--c-primary);
}

footer p {
    font-family: var(--font-stack-tech);
    font-size: 0.8rem;
    color: var(--c-text-dim);
    text-align: right;
    margin: 0;
    line-height: 1.4;
}