/* 1. CSS RESET & BOX MODEL PARAMETERS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensures padding/borders stay inside widths */
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif; /* Bauhaus typography */
    line-height: 1.6;
    color: #111111; /* black text */
    background-color: #f5f4f0; /* Cream paper background */
    padding: 30px; /* Outer workspace cushion */
}

/* 2. LAYOUT CONTAINER */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto; /* Centers layout on screen */
    display: flex;
    flex-direction: column;
    gap: 25px; /* Spatial gap between modules */
}

/* 3. HEADER HARDWARE */
header {
    background-color: #e63946; /* Primary Red */
    color: #ffffff;
    padding: 50px 40px;
    border: 5px solid #111111; /* Bold structural outline */
}

header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase; /* Sharp geometric appearance */
    letter-spacing: -0.04em;
    line-height: 0.9;
}

/* 4. NAVIGATION (FLEXBOX) */
nav {
    background-color: #ffffff;
    border: 5px solid #111111;
    padding: 15px 40px;
}

nav ul {
    list-style: none;
    display: flex; /* Flexbox horizontal row alignment */
    align-items: center;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: #111111;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.15s ease; /* Smooth transition for the hover color change */
}

/* Changes text color of Home and Gallery to yellow on hover */
nav a:hover {
    color: #ffb703; /* Yellow text */
}

/* Far right button placement using Flexbox space distribution */
.nav-right {
    margin-left: auto; /* Pushes item completely to the right edge */
}

.about-btn {
    background-color: #111111;
    color: #ffffff !important; /* Forces text to stay white initially */
    padding: 8px 20px;
    border: 2px solid #111111;
    transition: all 0.15s ease;
}

/* Changes background color of the About button to yellow on hover */
.about-btn:hover {
    background-color: #ffb703; /* Pops to yellow background */
    color: #111111 !important; /* Turns text black for high contrast */
}

/* 5. MAIN CONTENT & SIDEBAR AREA (CSS GRID) */
.main-container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 parts content, 1 part sidebar */
    gap: 25px;
}

/* Responsive breakdown for smaller viewports */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr; /* Stacks layout vertically */
    }
    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .nav-right {
        margin-left: 0; /* Resets button position on mobile */
    }
}

/* 6. CONTENT BOXES & FLOAT WORK */
main {
    background-color: #ffffff;
    border: 5px solid #111111;
    padding: 40px;
}

article h2 {
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

/* Floated layout element */
.floated-graphic {
    float: left; /* Pulls graphic left, text wraps around right side */
    width: 120px;
    height: 120px;
    background-color: #ffb703; /* Primary Yellow */
    border: 4px solid #111111;
    margin-right: 25px; /* Margin pushes text safely away */
    margin-bottom: 10px;
}

/* Clearfix hack to ensure container wraps fully around the float */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 7. SIDEBAR COMPONENT (BLUE) */
aside {
    background-color: #0044cc; /* Blue background */
    color: #ffffff; /* white text for clean contrast */
    border: 5px solid #111111;
    padding: 30px;
    height: fit-content;
}

aside h3 {
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 3px solid #ffffff; /* White baseline rule to match text */
    padding-bottom: 5px;
}

/* 8. FOOTER ZONE */
footer {
    background-color: #111111;
    color: #ffffff;
    padding: 25px;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}