/* =========================
   Base typography & layout
   ========================= */

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f9;
    color: #333;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 5%;
}

header,
footer {
    text-align: center;
    margin-bottom: 20px;
}

h1,
h2 {
    color: #333;
}

h1 {
    text-align: center;
}

/* =========================
   Content helpers
   ========================= */

.content-center {
    text-align: center;
}

.content-center figcaption {
    text-align: center;
}

.section {
    margin-bottom: 30px;
}

/* =========================
   Images & figures
   ========================= */

img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

figure {
    display: block;
    margin: 20px auto;
    text-align: center;
    max-width: fit-content;
}

figcaption {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

/* =========================
   Video embeds
   ========================= */

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    max-width: 800px;
    max-height: 450px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================
   Code blocks
   ========================= */

pre {
    background-color: #eaeaea;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

/* =========================
   Links
   ========================= */

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Invisible links (intentional) */

a.invisible-link,
a.invisible-link:visited,
a.invisible-link:hover,
a.invisible-link:active {
    color: #f4f4f9;
    text-decoration: none;
    cursor: default;
}

/* =========================
   Buttons
   ========================= */

.home-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    margin-top: 20px;
}

.home-button:hover {
    background-color: #444;
    cursor: pointer;
}

/* =========================
   Navigation (OVERRIDES FLEX)
   ========================= */

nav {
    background-color: #333;
    color: white;
    padding: 10px;
}

/* OVERRIDE previous flex-based nav */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Top-level menu items */
nav ul li {
    display: inline-block;
    margin-right: 20px;
    position: relative;
    white-space: nowrap;
}

/* Links inside nav */
nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
}

/* Hover effect for nav links */
nav ul li a:hover {
    background-color: #555;
    text-decoration: none;
}

/* First-level dropdown */
nav ul li ul {
    display: none;
    position: absolute;
    background-color: #444;
    padding: 10px;
    list-style: none;
    margin: 0;
    top: 100%;
    left: 0;
    z-index: 1000;
}

/* Dropdown items */
nav ul li ul li {
    display: block;
    margin: 0;
}

/* Nested dropdowns (right side) */
nav ul li ul li ul {
    top: 0;
    left: 100%;
}

/* Show dropdowns on hover */
nav ul li:hover > ul {
    display: block;
}

nav ul li ul li:hover > ul {
    display: block;
}

/* --------------------------
   Intro section: image + text
   -------------------------- */
.intro {
    display: flex;
    flex-wrap: wrap;          /* allows stacking on small screens */
    gap: 20px;                /* space between image and text */
    align-items: flex-start;  /* align text to top of image */
    margin-bottom: 30px;
}

.intro figure {
    margin-top: 25px;  /* adjust the value as needed */
    margin-right: 20px; /* keeps gap between image and text */
    flex: 0 0 250px;   /* keeps previous width */
}

.intro img {
    width: 100%;
    height: auto;
}

.bio-text {
    flex: 1;                  /* text takes remaining width */
    min-width: 200px;         /* prevents too narrow text */
}

