body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

header {
    background: #333;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensures it stays above other elements */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 {
    margin: 0;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.section {
    padding-top: 50px;
    padding-bottom: 50px;
    background: #f4f4f4;
}

.section:nth-child(even) {
    background: #fff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}


.contact-links a {
    color: #0073e6;
    text-decoration: none;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.publication {
    background: #fff;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
}

.publication h3 a {
    color: #0073e6;
    text-decoration: none;
}

.publication h3 a:hover {
    text-decoration: underline;
}

.about-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    /* align-items: center; Aligns text and image vertically */
    align-items: flex-start; /* Aligns elements by their top edges */

    gap: 20px; /* Space between the text and the image */
}

.about-text {
    flex: 1; /* Allows the text to take up available space */
}

.teaching-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* <--- ADD THIS LINE to stack items vertically */
    align-items: flex-start; 
    gap: 20px; 
}

.teaching-text {
    flex: 1; /* Allows the text to take up available space */
}

.button-container {
    margin-bottom: 20px;
  }
  button {
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    font-size: 16px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
  }
  button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
  }
  .list {
    display: none;
    margin-top: 20px;
    text-align: left;
    /* max-width: 400px; */
    margin-left: auto;
    margin-right: auto;
  }
  .list.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* Wrapper for the new list section */
.course-list-wrapper {
    margin-top: 3rem; /* Adds space between the intro text and the list */
    width: 100%;
}

.teaching-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    display: inline-block; /* Makes the underline only as wide as the text */
}

/* Hierarchy Styling */
.course-hierarchy {
    display: block;
}

.school-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.school-name:first-of-type {
    margin-top: 0;
}

.course-details {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #e0e0e0;
    padding-left: 1.2rem;
}

.course-details ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.course-details li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.role {
    font-weight: 400;
    font-style: italic;
    color: #666;
    font-size: 0.95em;
    margin-left: 0.5rem;
}

.semester {
    display: block;
    font-size: 0.9em;
    color: #888;
    margin-top: 0.3rem;
}