/* Shared site stylesheet — based on the Publications page design */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header, footer {
    width: 100%;
    background-color: #4a4e69;
    color: #fff;
    text-align: center;
    padding: 0.5rem;
}
header h1 {
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
}
header p {
    font-size: 0.85rem;
    margin: 0.2rem 0 0 0;
}
footer p {
    font-size: 0.85rem;
    margin: 0;
    padding: 0.75rem;
}
footer a {
    color: #f2e9e4;
}

nav {
    width: 100%;
    background-color: #22223b;
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
nav a {
    padding: 0.5rem 1rem;
    background-color: #c9ada7;
    color: #22223b;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
nav a:hover {
    background-color: #4a4e69;
    color: #f2e9e4;
}

/* Sub-navigation "tabs" used on the Publications pages */
.subnav {
    width: 100%;
    background-color: #f2e9e4;
    display: flex;
    justify-content: center;
    padding: 0.6rem;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-bottom: 2px solid #c9ada7;
}
.subnav a {
    padding: 0.4rem 0.9rem;
    background-color: #fff;
    color: #4a4e69;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #c9ada7;
}
.subnav a:hover {
    background-color: #c9ada7;
    color: #22223b;
}
.subnav a.active {
    background-color: #4a4e69;
    color: #fff;
    border-color: #4a4e69;
}

main {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

section {
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article {
    overflow: auto; /* clear floated photos */
}
article + article {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dotted #c9ada7;
}

h1, h2 {
    color: #4a4e69;
}
h2 {
    border-bottom: 2px solid #c9ada7;
    padding-bottom: 0.5rem;
    margin-bottom: 0.8rem;
}

p {
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

ul {
    padding-left: 1.5rem;
    list-style-type: square;
}
li {
    margin-bottom: 0.8rem;
}

a {
    color: #4a4e69;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Photos kept from the old pages, shown inline within their section.
   Each figure gets a fixed box and its image is cropped to fill it
   (object-fit: cover), so every photo of the same type is the same size
   regardless of the original image's dimensions. */
figure {
    float: right;
    margin: 0 0 1rem 1.2rem;
}
figure img {
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}
figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.3rem;
}

/* General photos (portraits, places, hobby pictures) */
figure.photo img {
    width: 200px;
    height: 150px;
}

/* Book / encyclopedia covers — taller, upright aspect ratio */
figure.cover img {
    width: 150px;
    height: 220px;
}

@media screen and (max-width: 600px) {
    figure {
        float: none;
        margin: 0 auto 1rem auto;
    }
    figure.photo img,
    figure.cover img {
        width: 200px;
        height: auto;
        max-height: 260px;
    }
}
