/* ==========================================================================
   1. GLOBAL RESET & BASE STYLES
   ========================================================================== */
*, *:before, *:after {
    box-sizing: border-box; /* CRUCIAL: Keeps borders & padding inside the width calculation */
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background-color: #f4e9d8;           /* Warm papyrus */
    color: #3c2f2f;
    margin: 0;                           /* Removes default browser border gaps */
    padding: 0 0 40px 0;                 /* Removes top padding so header sits flush; keeps bottom cushion */
    line-height: 1.7;
}

/* ==========================================================================
   2. HEADER STYLING (Updated to span edge-to-edge)
   ========================================================================== */
.header {
    background-color: #f5d76e;           /* Richer, darker yellow */
    color: #3c2f2f;
    padding: 30px 40px;                  /* Generous internal spacing for content */
    display: flex;
    align-items: center;
    gap: 25px;
    border-bottom: 4px solid #3c2f2f;    /* Dark brown outline on the bottom edge only */
    
    /* --- EDGE TO EDGE FIXES --- */
    width: 100%;                         /* Spans the full width of the screen */
    margin: 0;                           /* Ensures it sits completely flush at the very top */
}

.logo {
    width: 140px;                        /* Scaled cleanly to fit header tracking */
    height: auto;
    border: 4px solid #3c2f2f;
    border-radius: 12px;
    box-shadow: 
        0 8px 20px rgba(60, 47, 47, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.15);
}

.header h1 {
    font-family: 'EB Garamond', Georgia, serif;
    margin: 0;
    font-size: 2.8em;
    letter-spacing: 2px;
    font-weight: 700;
}

/* ==========================================================================
   3. MAIN CONTENT AREA (Keeps its uniform side padding frame)
   ========================================================================== */
.content {
    background-color: #e8f0f8;           /* Soft light blue */
    padding: 50px 60px;
    border-radius: 8px;
    border: 4px solid #3c2f2f;           /* Dark brown outline */
    box-shadow: 
        0 10px 25px rgba(60, 47, 47, 0.15),
        inset 0 4px 12px rgba(255,255,255,0.6),
        inset 0 -4px 12px rgba(0,0,0,0.08);

    /* Responsive Spacing Guardrails */
    width: calc(100% - 40px);            /* Forces exactly 40px of space left over on the screen */
    max-width: 1000px;                   /* Prevents stretching past your original desktop limit */
    margin: 40px auto;                   /* Centers the layout container on the papyrus backdrop */
}

/* ==========================================================================
   4. LAYOUT COMPONENTS & IMAGE GALLERY
   ========================================================================== */
.about-paragraph {
    font-size: 18pt;
    margin-bottom: 40px;
    max-width: 800px;
}

.pokemon-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin: 40px 0;
}

.pokemon-gallery figure {
    margin: 0;
    max-width: 280px;
    text-align: center;
    border: 4px solid #3c2f2f;           /* Dark brown outline for images */
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
}

.pokemon-gallery img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.pokemon-gallery figcaption {
    font-size: 14pt;
    font-style: italic;
    font-weight: bold;
}

/* Navigation / Quick Links */
.links-list {
    font-size: 18pt;
    background-color: #ffe6e6;           /* Soft light red / rose */
    padding: 35px 40px;
    border-radius: 8px;
    margin-top: 50px;
    border: 4px solid #3c2f2f;           /* Dark brown outline */
    box-shadow: 0 6px 15px rgba(60, 47, 47, 0.1);
}

.links-list h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.links-list ul { padding-left: 30px; }
.links-list li { margin: 16px 0; }
.links-list a { color: #3c2f2f; text-decoration: none; }
.links-list a:hover { color: #006400; text-decoration: underline; }

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS (MOBILE INTERACTION)
   ========================================================================== */
@media (max-width: 768px) {
    .content {
        padding: 30px 20px;              /* Reduces internal spacing so text has breathing room on mobile */
    }

    .header {
        flex-direction: column;          /* Stacks logo and text nicely on mobile screens */
        text-align: center;
        padding: 25px 20px;
    }

    .header h1 {
        font-size: 2.2em;                /* Scales down header sizing for small viewports */
    }

    .about-paragraph, .links-list {
        font-size: 14pt;                 /* Makes typography highly readable on phones */
    }

    .links-list {
        padding: 25px 20px;              /* Adjusts links container padding for smaller viewports */
    }
}