/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul, ol {
    list-style-position: inside;
}

img {
    width: 100%;
}

/* == END RESET === MY ANSWER BELOW ============= */

/* ==============================================
    Styling Variables
   ============================================== */

:root {
    /* IMPROVEMENT:
       Improved contrast handling and consistent palette definition */

    /* --- colour palette --- */
    --color-active: #0fbcf5;        /* active link or selected nav item        */
    --color-aside: #e6e6e6;         /* sidebar background                      */
    --color-background: #ffffff;    /* main background                         */
    --color-border: #bdbdbd;        /* light border colour                     */
    --color-header: #0b5d0b;        /* header background                       */
    --color-heading: #0b6e75;       /* h1, h2 headings                         */
    --color-link: #ffffff;          /* default link color in header/nav/footer */
    --color-link-hover: #0fbcf5;    /* hover state for links                   */
    --color-nav-footer: #0b5d0b;    /* nav & footer background                 */
    --color-text: #333333;          /* default body text                       */

    /* TYPOGRAPHY IMPROVEMENTS:
    - Increased base sizing
    - Clear hierarchy for headings
    - Better readability than fixed 14px base */

    /* --- typography --- */
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;    /* main body font                     */
    --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif; /* headings and nav/footer            */
    --font-size-base: 1rem;                                         /* image captions usually             */
    --font-size-h1: 2rem;                                           /* primary page headings              */
    --font-size-h2: 1.5rem;                                         /* secondary headings                 */
    --font-size-h3: 1.25rem;                                        /* tertiary headings / minor headings */

    /* IMPROVEMENT:
    Replaced ad-hoc spacing with consistent scale for usability */

    /* --- spacing --- */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
}

/* ==============================================
    Background Setup Layout
   ============================================== */
body {
    font-family: var(--font-body);

    /* IMPROVEMENT:
    Increased line-height improves readability (accessibility) */
    line-height: 1.6;

    color: var(--color-text);
    background-color: var(--color-background);
    font-size: var(--font-size-base);

    /* IMPROVEMENT:
    Removed fixed 80rem layout constraint -> improves responsiveness and mobile usability */
    max-width: 100%;

    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

header {
    background-color: var(--color-header);
    color: var(--color-link);
    padding: var(--space-md);

    /* IMPROVEMENT:
    Center alignment improves readability and focus */
    text-align: center;
}

.tagline {
    margin-top: var(--space-xs);
}

nav, footer {
    background-color: var(--color-nav-footer);
    color: var(--color-link);
    padding: var(--space-sm);
}

main {
    padding: var(--space-md);
}

aside {
    background-color: var(--color-aside);
    padding: var(--space-md);
}

#first-aside {
    border-top: 1px solid var(--color-border);
}

#second-aside {
    border-top: 1px solid var(--color-border);
}

/* ==============================================
    Typography
   ============================================== */
#site-title {
    color: #ffffff;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--color-heading);
    margin-bottom: var(--space-sm);

    /* IMPROVEMENT:
    Better spacing improves scanability for users */
    line-height: 1.3;
}

h1 {
    font-size: var(--font-size-h1);
    text-align: center;
}

h2 {
    font-size: var(--font-size-h2);
    text-align: center;
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    /* IMPROVEMENT:
    Consistent paragraph spacing improves readability */
    margin-bottom: var(--space-sm);
}

/* ==============================================
    Navigation / Links
   ============================================== */

nav ul, footer ul {
    list-style: none;
}

nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
}

footer ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
}

/* IMPROVEMENT:
   - Clear hover and focus states improve keyboard navigation usability
   - Contrast-based link styling improves accessibility compliance */
a {
    color: inherit;
    text-decoration: none;
}

nav a, footer a {
    color: var(--color-link);
}

a:hover, a:focus {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* IMPROVEMENT:
   Focus states added for keyboard accessibility */
nav a:focus, footer a:focus, .skip-link:focus {
    outline: 3px solid var(--color-active);
    outline-offset: 2px;
}

/* IMPROVEMENT:
   Explicit link styling in content improves discoverability */
main a, aside a {
    color: var(--color-active);
    font-weight: bold;
    text-decoration: underline;
}

main a:hover, main a:focus,
aside a:hover, aside a:focus {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* ==============================================
    Images
   ============================================== */

main img {
    width: 100%;
    margin-bottom: var(--space-sm);
}

/* IMPROVEMENT:
   Removed floats for better responsive behaviour */
main img.left, main img.right {
    float: none;
}

aside img {
    margin-bottom: var(--space-sm);
}

/* ==============================================
    Accessibility
   ============================================== */

/* IMPROVEMENT:
Allows keyboard users to skip navigation */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    background-color: #000000;
    color: #ffffff;
    padding: var(--space-sm);
}

.skip-link:focus {
    left: var(--space-sm);
    top: var(--space-sm);
    z-index: 1000;
}

/* ==============================================
    Tablet Layout
   ============================================== */

@media screen and (min-width: 48em) {

    nav ul, footer ul {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    /* IMPROVEMENT:
    Better horizontal navigation improves usability on tablets */
    .main-image-row {
        display: flex;
        justify-content: center;
        gap: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .main-image-row img {
        width: 48%;
        margin: 0;
        float: none;
    }

    /* IMPROVEMENT:
    Side-by-side images improve visual hierarchy and scanning */
    .fashion-images {
        display: flex;
        justify-content: center;
        gap: var(--space-sm);
    }

    .fashion-images img {
        width: 30%;
    }
}

/* ==============================================
    Responsive Layout
   ============================================== */

@media screen and (min-width: 82em) {

    body {
        display: grid;

        /* IMPROVEMENT:
        Introduces flexible gutters (1fr) for full-width breathing room */
        grid-template-columns: 1fr 20rem 40rem 20rem 1fr;
        grid-template-areas:
            "header header      header    header       header"
            "nav    nav         nav       nav          nav"
            ".      first-aside main      second-aside ."
            "footer footer      footer    footer       footer";
    }

    header {
        grid-area: header;
    }

    nav {
        grid-area: nav;
    }

    main {
        grid-area: main;
    }

    #first-aside {
        grid-area: first-aside;
        border-top: none;
        border-right: 1px solid var(--color-border);
        padding: var(--space-sm);
    }

    /* IMPROVEMENT:
       Slight enlargement improves visual balance with main content */
    #first-aside img {
        width: 100%;
        max-width: 110%;
        height: auto;
        display: block;
        margin-bottom: var(--space-sm);
        margin-top: var(--space-md);
    }

    /* IMPROVEMENT:
       Resets tablet flex layout back to vertical column on desktop */
    .fashion-images {
        display: block;
    }

    #second-aside {
        grid-area: second-aside;
        border-top: none;
        border-left: 1px solid var(--color-border);
    }

    footer {
        grid-area: footer;
    }
}