/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    background: linear-gradient(135deg, #FFFFFF 0%, #D2B48C 100%);
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"%3E%3Cpath d="M0 0h200v200H0z" fill="none"/%3Cpath d="M50 50h100v100H50z" fill="none" stroke="%238B4513" stroke-width="2" opacity="0.1"/%3C/svg%3E');
    background-size: 150px;
}

/* Header styling */
h1 {
    color: #FFFFFF;
    text-align: center;
    font-family: 'Cinzel', serif;
    padding: 1rem;
    background: linear-gradient(135deg, #8B4513 0%, #A52A2A 100%);
    font-size: 2rem;
    letter-spacing: 1px;
    font-weight: 700;
    border-bottom: 4px solid #8B4513;
    position: sticky;
    top: 0;
    z-index: 100;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px; /* Match logo height */
}

#AD_Logo {
    height: 80px;
    position: absolute;
    top: 10px;
    left: 20px;
    border: 3px solid #8B4513;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#AD_Logo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

#Logo {
    width: 200px;
    max-width: 100%;
    height: auto;
}

/* Intro styling */
#Intro {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    text-align: center;
    color: #FFFFFF;
    background: linear-gradient(90deg, #8B4513, #A52A2A);
    padding: 1rem;
    margin: 1rem 0;
}

/* Navigation styling */
nav {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #276e47 0%, #3A8B5B 100%);
    border-top: 2px solid #276e47;
    border-bottom: 2px solid #276e47;
}

nav ul {
    list-style: none;
    display: flex;
}

nav li {
    border-right: 1px solid #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0; /* Prevent flex items from stretching unevenly */
    padding-left: 1em;
    padding-right: 1em;
}

nav li:last-child {
    border-right: none;
}

nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Lora', serif;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding: 0 1rem;
    text-align: center; /* Explicitly center the text */
    width: 100%; /* Ensure the anchor takes full width of the li */
}

nav a:hover {
    color: #A52A2A;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%); /* Center the underline */
    background: #FFFFFF;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Table/Bio section */
table {
    width: 90%;
    margin: 2rem auto;
    border-collapse: collapse;
    background: #FFFFFF;
    border: 3px solid #8B4513;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #D2B48C;
}

th {
    background: #A52A2A;
    color: #FFFFFF;
    font-size: 1.1rem;
    text-align: left;
}

td {
    font-size: 0.95rem;
    color: #000000;
}

tr:nth-child(even) {
    background: #F9F9F9;
}

tr:last-child td {
    border-bottom: none;
}

/* Footer styling */
footer {
    margin-top: auto;
    padding: 1rem;
    background: linear-gradient(135deg, #8B4513 0%, #A52A2A 100%);
    text-align: center;
    color: #FFFFFF;
    font-size: 0.9rem;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

footer a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    font-family: 'Lora', serif;
}

footer a:hover {
    color: #A52A2A;
    text-shadow: 0 0 5px rgba(255, 248, 225, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        min-height: 60px; /* Adjust for smaller logo */
    }

    #AD_Logo {
        height: 60px;
        top: 5px;
        left: 10px;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav li {
        padding: 0.3rem 0;
    }

    table {
        width: 100%;
        display: block;
    }

    th, td {
        font-size: 0.9rem;
        padding: 0.8rem;
        display: block;
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

body, table, nav, footer {
    animation: fadeIn 0.8s ease-in;
}

/* PDF styling */
.pdf {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 800px;
    height: 600px;
}

/* Clock styling */
#clock {
    text-align: center;
    font-size: 1.5rem;
    color: #8B4513;
    margin: 1rem 0;
    font-weight: 600;
    background: rgba(255, 248, 225, 0.5);
    padding: 0.75rem;
    border: 2px solid #8B4513;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-family: 'Lora', serif;
}