/* ==========================================================================
   GLOBAL.CSS - ACM Collective Intelligence 2026
   Base variables, resets, typography, global layout containers,
   header/navigation, and footer.
   Included on EVERY page.
   ========================================================================== */

/* 1. Root Variables (VT Brand Palette) */
:root {
    --vt-maroon: #861F41;         
    --vt-burnt-orange: #E5751F;   
    --vt-hokie-stone: #75787B;     
    --vt-white: #FFFFFF;          
    --vt-impact-orange: #CA4F00;  
    --vt-grey: #D7D2CB;           
    --vt-smoke: #E5E1E6;          
    --vt-teal: #508590;           
}

/* 2. Global Structural Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2b2b2b;
    background-color: var(--vt-white);
    line-height: 1.75;
}

/* 3. Base Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--vt-maroon);
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--vt-smoke);
    padding-bottom: 0.5rem;
}

h2:first-of-type {
    margin-top: 0;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    margin: 2.5rem 0 0.75rem 0;
}

h5 {
    font-size: 1.1rem;
    margin: 2rem 0 0.5rem 0;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #3d3d3d;
}

ul, ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

ul ul, ol ul, ul ol, ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    list-style-type: circle; 
}

strong {
    font-weight: 600;
}

/* Standardized Code Blocks */
code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    background-color: var(--vt-smoke);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #bd10e0;
}

/* 4. Global Structural Classes */
.nav-container,
.cover-wrapper,
.header-wrapper,
.page-content {
    /* 1200px max-width standardized to prevent layout "jump" between home and subpages */
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-content {
    padding: 4rem 2rem 6rem 2rem;
}

/* Establish strict vertical rhythm */
.page-content section,
.section-block,
.tier-section {
    margin-bottom: 4.5rem;
}

.page-content section:last-of-type,
.section-block:last-of-type,
.tier-section:last-of-type {
    margin-bottom: 0;
}

/* Universal Inline Links (Replaces .accent-link and unique overrides) */
.inline-link {
    color: var(--vt-maroon);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.inline-link:hover {
    color: var(--vt-impact-orange);
    border-bottom-color: var(--vt-burnt-orange);
}

/* 5. Header & Navigation */
header {
    background-color: var(--vt-white);
    border-bottom: 1px solid var(--vt-grey);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}

.logo a {
    display: block;
}

.logo img {
    width: 100px;
    height: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin-bottom: 0;
    padding-left: 0;
}

.nav-menu > li {
    position: relative;
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.nav-menu a {
    color: var(--vt-hokie-stone);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-menu > li > a {
    display: block;
}

.nav-menu a:hover,
.nav-menu li:hover > a {
    color: var(--vt-impact-orange);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--vt-white);
    border: 1px solid var(--vt-grey);
    border-top: 3px solid var(--vt-maroon);
    list-style: none;
    min-width: 200px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    border-radius: 0 0 4px 4px;
    margin-bottom: 0;
}

.dropdown li {
    width: 100%;
    margin-bottom: 0;
}

.dropdown a {
    padding: 0.6rem 1.2rem;
    display: block;
    font-size: 0.9rem;
    color: #3d3d3d;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown a:hover {
    background-color: var(--vt-smoke);
    color: var(--vt-maroon);
    text-decoration: none;
}

.nav-menu li:hover .dropdown {
    display: block;
}

/* 6. Footer */
footer {
    background-color: #1a1a1a;
    color: var(--vt-grey);
    padding: 4rem 2rem;
    text-align: center;
    border-top: 4px solid var(--vt-maroon);
}

footer p {
    color: var(--vt-grey);
    margin-bottom: 0.25rem;
    font-size: 0.9rem; /* overrides the global p size */
}

footer a {
    color: var(--vt-grey);
    text-decoration: underline;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--vt-white);
}

/* 7. Global Responsive Breakpoints */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 2rem;
    }
    .nav-menu {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .dropdown {
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
    }
    .page-content {
        padding-top: 3rem;
    }
}