/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #ffffff;
    color: #000000;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* Accessibility: Focus styles */
*:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Accessibility: Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode - Auto detection */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    body:not(.light-mode) #hero-image {
        filter: brightness(0.9);
    }
    
    body:not(.light-mode) a {
        color: #8ab4f8;
    }
    
    body:not(.light-mode) a:visited {
        color: #c58af9;
    }
}

/* Dark Mode - Manual toggle */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode #hero-image {
    filter: brightness(0.9);
}

body.dark-mode a {
    color: #8ab4f8;
}

body.dark-mode a:visited {
    color: #c58af9;
}

/* Main Container */
#main-body {
    max-width: 900px;
    width: 100%;
    transition: unset;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    flex-direction: column;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
}

#content-wrapper {
    width: 100%;
}

/* Header */
#page-title {
    font-family: Times New Roman, Times, serif;
    font-size: 26px;
    font-weight: 700;
    padding: 10px;
    text-align: center;
}

/* Image */
#hero-image {
    color: black;
    object-fit: scale-down;
    object-position: center top;
    padding: 0% 10% 0% 10%;
    width: 100%;
    height: auto;
    min-width: 90%;
    max-width: 100%;
    margin: 0;
    display: block;
}

/* Content */
#main-content {
    padding: 10px;
    width: 100%;
    text-align: center;
}

/* Accessibility: Links */
a {
    text-decoration: underline;
    text-decoration-skip-ink: auto;
}

a:hover,
a:focus {
    text-decoration-thickness: 2px;
}

/* Accessibility: Sections */
section,
article {
    margin-bottom: 2em;
}

/* Responsive Design */
@media (max-width: 992px) {
    #hero-image {
        max-height: 100%;
        max-width: 100%;
        min-height: 90%;
        min-width: 90%;
    }
    
    #main-content {
        text-align: center;
    }
    
    #page-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    #main-content {
        padding: 10px 10% 10px 10%;
        width: 100%;
    }
}