/* Variables */
:root{
  --base-font-size: 16px;
  --heading-font: 'RPI-Geist', sans-serif;
  --body-font: 'RPI-Geist', sans-serif;
  --body-line-height: 1.6;
  --heading-line-height: 1.15;
  --text: #000000;
  --rpi-primary: #d6001c; /* RPI Red */
  --rpi-link-blue: #006eb0; /* RPI Link Blue */
  --rpi-muted: #b9ccd8; /* RPI Gray */
  --rpi-bg: #ffffff;
  --rpi-header-text: #ffffff;
  --rpi-accent: var(--rpi-primary);
}

/* RPI Geist fonts */
@font-face {
  font-family: 'RPI-Geist';
  src: url('../fonts/RPIGeist-Regular.woff2') format('woff2'),
       url('../fonts/RPIGeist-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RPI-Geist';
  src: url('../fonts/RPIGeist-Medium.woff2') format('woff2'),
       url('../fonts/RPIGeist-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RPI-Geist';
  src: url('../fonts/RPIGeist-Bold.woff2') format('woff2'),
       url('../fonts/RPIGeist-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RPI-Geist';
  src: url('../fonts/RPIGeist-RegularItalic.woff2') format('woff2'),
       url('../fonts/RPIGeist-RegularItalic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'RPI-Geist-Mono';
  src: url('../fonts/RPIGeistMono-Regular.woff2') format('woff2'),
       url('../fonts/RPIGeistMono-Regular.woff') format('woff'),
       url('../fonts/RPIGeistMono-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RPI-Geist-Mono';
  src: url('../fonts/RPIGeistMono-Medium.woff2') format('woff2'),
       url('../fonts/RPIGeistMono-Medium.woff') format('woff'),
       url('../fonts/RPIGeistMono-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RPI-Geist-Mono';
  src: url('../fonts/RPIGeistMono-Bold.woff2') format('woff2'),
       url('../fonts/RPIGeistMono-Bold.woff') format('woff'),
       url('../fonts/RPIGeistMono-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RPI-Geist-Mono';
  src: url('../fonts/RPIGeistMono-Italic.woff2') format('woff2'),
       url('../fonts/RPIGeistMono-Italic.woff') format('woff'),
       url('../fonts/RPIGeistMono-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Base */
html { 
  font-family: var(--body-font); 
  font-size: var(--base-font-size); 
  box-sizing: border-box; -webkit-font-smoothing:antialiased; 
  -moz-osx-font-smoothing:grayscale; 
}*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--text);
  background: var(--rpi-bg);
  line-height: var(--body-line-height);
  font-variant-ligatures: none;
  -webkit-font-variant-ligatures: none;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

/* Page container for readable measure */
main {
  padding: 3.5rem 1rem 3rem; /* leave space for fixed header */
  display: block;
}

/* Responsive type scale using clamp() */
h1, h2, h3, h4 {
  font-family: var(--heading-font);
  color: var(--text);
  margin: 0 0 0.6rem 0;
  line-height: 1.15;
}

h1 { font-size: clamp(1.6rem, 2.2vw + 1rem, 3rem); letter-spacing: -0.02em; font-weight:700; }
h2 { font-size: clamp(1.3rem, 1.6vw + 0.9rem, 2rem); font-weight:700; }
h3 { font-size: clamp(1.05rem, 1.1vw + 0.8rem, 1.25rem); font-weight:600; }

p {
  margin: 0 0 1rem 0;
  font-size: clamp(0.95rem, 0.45vw + 0.9rem, 1.05rem);
  color: var(--text);
}

a {
  color: var(--rpi-link-blue);
}

.textContainerDiv {
  margin-left: 3%; 
  margin-right: 10%; 
  margin-top: 1.5%;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--rpi-primary);
    padding: .5rem;
    z-index: 1000; 

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: center;
}

.headerButton {
    background-color: transparent;
    color: var(--rpi-header-text); 
    padding: .35rem .6rem; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; /* Change cursor on hover */
    font-family: var(--heading-font);
    font-size: 16px; 
    text-align: center; 
    text-decoration: none; /* Remove underline from text */
    transition: background-color .15s ease, transform .06s ease;
} 

.headerButton:hover {
    background-color: var(--rpi-muted);
}

.headerButton:active {
  transform: translateY(1px); 
}

.headerButton.active {
  background-color: var(--rpi-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(204,0,0,0.14);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdownContent {
  display: none;
  position: absolute;
  flex-direction: column; gap: 0.25rem;
  /* Center the dropdown relative to the parent and allow the left
     position to effectively scale with the content width by using
     translateX(-50%). min-width:max-content ensures it grows to fit
     its contents and max-width prevents it from overflowing the viewport. */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--rpi-primary);
  padding: 0.35rem;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 1100;
  min-width: max-content;
}

.dropdown:hover .dropdownContent {
  display: flex;
}

#footer {
  background: #000;
  color: #fff; 
}
#footer .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1rem;
}
#footer p { margin: 0 0 .5rem 0; color: #fff; }
#footer a { color: var(--rpi-accent); text-decoration: underline; }
#footer .footer-right { text-align: right; }

.team-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.team-photo {
  width: 15rem;
  height: auto;
  object-fit: cover;
  flex: 0 0 15rem;
  border-radius: 4px;
}

@media (max-width: 520px) {
  .team-photo { width: 140px; height: 140px; flex: 0 0 140px; }
  .team-row { gap: 0.75rem; }
}