/* Reset the page to match the dark poster theme */
body {
    background-color: #050505; /* Deep black/charcoal */
    color: #f0f0f0; /* Off-white for high contrast */
    font-family: "Times New Roman", Times, serif; /* Matches "The Gold Weaver" poster font */
    line-height: 1.6;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Constrain width so it looks like a column/article, not a stretched web page */
body > * {
    max-width: 700px;
    width: 100%;
}

/* OVERRIDE LEGACY TAGS */
/* We must use !important to override the inline <font color> attributes in the HTML */
font {
    color: inherit !important; 
    font-family: inherit !important;
}

/* Style the main title (Vivienne Becker...) */
font[size="7"] {
    font-size: 2.5rem;
    font-weight: normal;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

/* Style the subtitle (The Gold Weaver) */
font[size="6"] {
    font-size: 2rem;
    color: #d4af37 !important; /* Muted Gold color to match the subject/dress */
    font-style: italic;
    display: block;
    margin-bottom: 30px;
}

/* Style the intro text */
font[size="4"] {
    font-size: 1.2rem;
    display: block;
    border-bottom: 1px solid #333; /* subtle separator */
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Paragraph spacing */
p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    font-weight: 300;
    text-align: justify; /* Gives it that newspaper/review block look */
    hyphens: auto; /* Hyphenation for long words */
}

/* On mobile, reflow gallery tables into columns */
@media (max-width: 600px) {
    table {
        display: block;
        width: 100%;
    }
    table tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    table td {
        flex: 0 0 33%;
        display: block;
        padding: 3px;
        box-sizing: border-box;
    }
    table td img {
        width: 100%;
        height: auto;
        display: block;
    }
}
 
/* Individual picture pages (picXX.html) - image fills space up to ~80% viewport height */
body[bgcolor="#ffffff"] table td img {
    display: block;
    max-height: 80vh;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0 auto;
}

/* Don't apply the mobile gallery transform to individual picture pages */
@media (max-width: 600px) {
    body[bgcolor="#ffffff"] table {
        display: table;
        width: auto;
    }
    body[bgcolor="#ffffff"] table tr {
        display: table-row;
    }
    body[bgcolor="#ffffff"] table td {
        display: table-cell;
        flex: none;
        padding: 0;
    }
    body[bgcolor="#ffffff"] table td img {
        max-height: 80vh;
        max-width: 100%;
        width: auto;
        height: auto;
    }
}
 
/* LINK STYLING */
/* The poster has clean sans-serif details, let's use that for the nav links */
a {
    color: #fff !important;
    text-decoration: none;
    font-family: Helvetica, Arial, sans-serif; /* Contrast font like the poster dates */
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    margin: 0 5px;
}

a:hover {
    color: #d4af37 !important; /* Gold hover effect */
    border-bottom: 1px solid #d4af37;
}

/* Footer layout */
center:last-of-type {
    margin-top: 50px;
    border-top: 1px solid #333;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
