:root {
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-color: #222;
  --muted-text: #666;
  --accent: #ffffff;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Body ---------- */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 0 20px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  padding: 1rem 2rem;
  border-bottom: none;
  position: relative;
}

header h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  color: #ffffff;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: #ffffff;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* ---------- Main Content ---------- */
main {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 800px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

main h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

main p {
  font-size: 1.1rem;
  max-width: 65ch;
  margin-bottom: 1.2rem;
  /* remove this for paragraphs wrapping floated images */
}

h1, h2, h3 {
  line-height: 1.2;
}

p {
  color: var(--text-color);
}

/* ---------- Global Images ---------- */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1.5rem auto;
}

/* ---------- FLOATED IMAGE (50% larger) ---------- */
figure.float-left {
  float: left;
  width: 300px;          /* increased from 150px to 225px */
  margin: 0 20px 15px 0; /* space between image and text */
}

figure.float-left img {
  width: 300px;          /* match figure width */
  height: auto;
  display: block;
  margin: 0;             /* remove centering */
}

figure.float-left figcaption {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: center;    /* optional centering under image */
}

/* Ensure all following text wraps around float */
figure.float-left ~ * {
  max-width: none;
}

/* Clear floats */
main::after {
  content: "";
  display: block;
  clear: both;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  figure.float-left {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }

  figure.float-left img {
    width: 100%;
  }
}


/* ---------- Forms ---------- */
input[type="text"],
select,
#searchInput,
#dialectSelect {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* ---------- Cards ---------- */
.card {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px 20px;
  margin: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card p {
  margin: 5px 0;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  margin: 40px 0 20px;
  padding: 2rem;
  background-color: whitesmoke;
  color: black;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 1rem;
    width: 200px;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 600px) {
  figure.float-left {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }

  figure.float-left img {
    width: 100%;
  }
}


/* ---------- Teaching & Outreach Page ---------- */
main.teaching-page {
  padding: 2rem;
  background: white;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 900px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

main.teaching-page h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #222;
}

main.teaching-page section {
  margin-top: 1.5rem;
}

main.teaching-page section h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #2563eb; /* use accent color */
}

main.teaching-page p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

main.teaching-page ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

main.teaching-page ul li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* Basic menu layout */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.menu li {
  position: relative;
}

.menu a {
  text-decoration: none;
  padding: 8px 12px;
  display: block;
}

/* Dropdown styling */


.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 1000;
}

.dropdown-menu li a {
  padding: 10px;
  white-space: nowrap;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Optional hover effect */
.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

/* Main navigation links */
.menu > li > a {
  color: white;
}

/* Keep dropdown links readable */
.dropdown-menu a {
  color: #222;
}

ul {
  padding-left: 40px;
}