@font-face {
  font-family: 'Space Mono';
  src: url('assets/fonts/space-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('assets/fonts/space-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('assets/fonts/space-mono-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('assets/fonts/space-mono-700-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


:root {
  /* Pastel Palette */
  --primary: #A0C4FF;
  /* Soft Blue */
  --primary-light: #EAF2FF;
  /* Lighter Blue */
  --secondary: #F1F1F1;
  /* Light Gray */
  --text: #2d4439;
  /* Dark green */
  --text-light: #507765;
  /* Lighter Red */
  --border: #507765;
  --white: #FFFFFF;
  --bg-body: #c3bfb2;
  /* Gray */
  --border-radius-large: 4px;
  --day-color: #F0F2B4;
}

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

body {
  font-family: 'Space Mono', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  /* background-color: var(--bg-body); */
  background: linear-gradient(to bottom, #fffff3 0%, #F0F2B4 20%, #e3e3d7 50%);
  line-height: 1.5;
  padding: 0;
}

.site-banner {
  color: var(--text);
  padding: 0 10vw;
  margin-top: -3vw;
  line-height: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  /* height: 100vh; REMOVED */
  height: 100vh;
  z-index: 1;
  /* background-color: #000; CHANGED Fallback color if image fails */
  /* background-color: var(--bg-body); */
  /* Set desired background */
  transition: filter 0.3s ease;
  /* Add transition for smooth blur effect */
}

.site-banner.blurred {
  filter: blur(8px) opacity(0.25);
  /* Apply blur effect when class is added */
}

.site-banner img {
  display: block;
  /* Ensure image takes full width and removes bottom space */
  width: 100%;
  /* Already set inline, but good to have here */
  /* height: 100%; REMOVED */
  height: 100%;
  /* RESTORED */
  /* object-fit: cover; CHANGED Cover the area, cropping if needed */
  object-fit: contain;
  /* Contain image to show full image + background */
}

/* Style for the scroll-down button on the banner */
.scroll-down-button {
  position: absolute;
  /* Position relative to the fixed banner */
  top: 85%;
  /* Position lower part of the banner */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  /* Above banner image, below nav */
  padding: 0.8rem 1.5em;
  font-family: 'Space Mono', 'monospace';
  font-size: 1.5em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-large);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(3px);
}

.scroll-down-button:hover {
  background-color: var(--white);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.site-nav {
  position: fixed;
  padding-top: 3em;
  top: 0;
  left: 0;
  z-index: 101;
  padding: 1em;
  max-height: 100vh;
  overflow-y: auto;
}

/* Add animation container for rectangles */
.nav-animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
  overflow: visible;
}

/* Rectangle animation styles */
.nav-rectangle {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rectangleFlow 8s linear infinite;
  opacity: 0.8;
  transform: translateY(0);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  overflow: hidden;
}

.nav-rectangle img {
  width: 200%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
  transform: rotate(-90deg);
}

@keyframes rectangleFlow {
  0% {
    transform: translateY(0);
    opacity: 0.8;
  }

  100% {
    transform: translateY(-100%);
    opacity: 0.8;
  }
}

.site-nav>a {
  max-width: 13em;
  cursor: pointer;
  color: var(--text);
  /*Changedfrom--primary*/
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-weight: 400;
  font-size: 1em;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: block;
  /*Makelinksblock-levelforeasierspacing*/
  margin-bottom: 0.5em;
  /*Spacebetweenlinks*/
  padding: 0.4rem 0.8em;
  /*Paddinginsidelink*/
  background-color: rgba(255, 255, 255, 0.75);
  /*UpdatedSemi-transparentbackground*/
  border-radius: var(--border-radius-large);
  /*Usevariableforconsistentrounding*/
  backdrop-filter: blur(3px);
  /*Frostedglasseffect*/
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  -webkit-transition: background-color 0.2s ease, color 0.2s ease;
  -moz-transition: background-color 0.2s ease, color 0.2s ease;
  -ms-transition: background-color 0.2s ease, color 0.2s ease;
  -o-transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav>a::before {
  content: '> ';
}

.site-nav>a.selected::before {
  content: '- ';
}

.site-nav a.livestream-link {
  background: linear-gradient(135deg,
      rgba(255, 182, 193, 0.2),
      /* Pastel Pink */
      rgba(173, 216, 230, 0.2),
      /* Pastel Blue */
      rgba(144, 238, 144, 0.2),
      /* Pastel Green */
      rgba(255, 218, 185, 0.2),
      /* Pastel Peach */
      rgba(221, 160, 221, 0.2)
      /* Pastel Purple */
    );
  background-size: 400% 400%;
  animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.site-nav a:hover {
  color: var(--text);
  background-color: var(--white);
  /* Use solid white on hover */
}

.container {
  max-width: 1000px;
  /* Reduced width */
  /* margin: 100vh auto 2em; CHANGED */
  /* margin: 2rem auto 2em; CHANGED Set top margin relative to body padding */
  margin: 100vh auto 2em;
  /* RESTORED Start below banner */
  padding: 2em;
  background-color: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-large);
  /* Use variable */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  /* Soft shadow */
  position: relative;
  /* Needed for z-index stacking */
  z-index: 10;
  /* Above banner, below nav */
}

h1 {
  font-size: 1.8em;
  /* Slightly smaller */
  font-weight: 600;
  margin-bottom: 1.5em;
  color: var(--text);
  text-align: center;
  /* Center title */
}

.tabs {
  display: flex;
  gap: 0.5em;
  margin-top: 1em;
  margin-bottom: 2em;
  flex-wrap: wrap;
  justify-content: space-between;
}

.tab-button {
  font-family: 'Space Mono', 'monospace';
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 0.5rem 0.75em;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-large);
  font-weight: 400;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
}


/* Add specific colors for each day */
.tab-button[data-day="monday"] {
  /* --day-color: #FFB5E8; */
  /* Pastel Pink */
}

.tab-button[data-day="tuesday"] {
  /* --day-color: #B5DEFF; */
  /* Pastel Blue */
}

.tab-button[data-day="wednesday"] {
  /* --day-color: #BFFCC6; */
  /* Pastel Green */
}

.tab-button[data-day="thursday"] {
  /* --day-color: #FFC9DE; */
  /* Pastel Rose */
}

.tab-button[data-day="friday"] {
  /* --day-color: #D5AAFF; */
  /* Pastel Purple */
}

.tab-button:hover {
  background-color: var(--day-color);
  /* border-color: var(--day-color); */
  color: var(--text);
  font-weight: 700;
}

.tab-button.active {
  background-color: var(--day-color);
  color: var(--text);
  /* Changed from var(--white) to var(--text) for higher contrast */
  border-color: var(--day-color);
  font-weight: 700;
  /* Make active text bolder for even better contrast */
  border: 1px solid var(--border);


}

.schedule {
  display: none;
}

.schedule.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.schedule h2 {
  font-size: 1.5em;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 1.5em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25em;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  margin-top: 1.5em;
}

.time-labels {
  display: flex;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  background-color: var(--white);
  z-index: 10;
  padding-bottom: 0.5em;
}

.time-label {
  flex: 1;
  text-align: center;
  font-size: 0.8em;
  color: var(--text-light);
  font-weight: 500;
}

.slots {
  position: relative;
  padding-top: 1em;
  max-width: 95%;
  /* Constrain slots width slightly within container */
  margin: 0 auto;
  /* Center the slots area */
}

.time-slot {
  display: flex;
  /* Increased space to prevent overlap */
  /* height: 3.2em; */
  /* Slightly shorter */
  position: relative;
  align-items: center;
  /* Align items vertically */
  border-top: 1px solid var(--bg-body);
  padding-left: 1em;
}

.time-slot:first-child {
  border-top: none;
  /* margin-top: -1.75em; */
}

.time {
  width: 7em;
  font-size: 1em;
  /* Increased from 0.8rem */
  color: var(--text);
  /* Changed from --text-light to --text for better contrast */
  font-weight: 400;
  /* Increased from 500 */
  display: flex;
  align-items: center;
  flex-shrink: 0;
  justify-content: center;
  /* Space between time and slot */
  background-color: rgba(255, 255, 255, 0.7);
  /* Added subtle background */
  padding: 0.2rem 0.8em;
  /* Added padding */
  border-radius: 4px;
  /* Added rounded corners */
  margin-right: 0.5em;
  /* Added spacing */
  height: 100%;
  letter-spacing: 0.5px;
}

.slot-content {
  flex: 1;
  /* background-color: #fff3; */
  border: none;
  /* Remove base border */
  /* border-top: 1px solid rgba(255, 255, 255, 0.5); */
  /* Lighter top */
  border-radius: var(--border-radius-large);
  /* Use variable */
  padding: 1.5rem 0.75em;
  /* Adjusted padding */
  font-size: 1em;
  /* Adjusted font size */
  transition: all 0.2s ease;
  display: flex;
  gap: 0.5em;
  align-items: center;
  height: 100%;
  min-width: 0;
  /* Allow shrinking */
}

.section-content:last-child {
  margin-bottom: -1em;
}


/* 3D Border Effect for Slot Content (Students & Breaks) */
.student-slot .slot-content,
.break-slot .slot-content {
  border: none;
  border-radius: var(--border-radius-large);
  /* Use variable */
  /* padding: 0.6rem 0.9em; */
  /* Adjusted padding */
  font-size: 0.9em;
  /* Adjusted font size */
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  height: 100%;
  min-width: 0;
  /* Allow shrinking */
}

.empty-slot .slot-content {
  background-color: var(--bg-body);
  /* Use body bg for empty */
  border: 1px dashed var(--border);
  color: var(--text-light);
  flex-shrink: 0;
  /* Prevent shrinking */
}

.time-slot.break-slot {
  background-color: var(--bg-body);
  color: var(--text);
}

.break-slot .slot-content {
  /* Changed from --break */
  font-size: 1.6em;
  line-height: 0.6em;
  text-transform: uppercase;
}

.student-slot .student-name {
  font-weight: 400;
  /* Bolder names */
  white-space: nowrap;
  /* Prevent wrapping */
  overflow: hidden;
  /* Hide overflow */
  text-overflow: ellipsis;
  /* Add ellipsis */
  font-size: 1.75em;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.student-slot .slot-number {
  position: relative;
  top: 1px;
  background-color: rgba(255, 255, 255, 0.75);
  color: black;
  border-radius: 50%;
  width: 32px;
  /* Adjusted size */
  height: 32px;
  /* Adjusted size */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  padding-top: 2px;
  padding-left: 1px;
  /* Adjusted size */
  margin-right: 0.6em;
  /* Adjusted margin */
  flex-shrink: 0;
  border: 1px solid var(--border);

}

.thesis-archive-slot {
  margin-left: auto;
}

.thesis-archive-button {
  font-family: 'Space Mono', 'monospace';
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 0.5rem 0.75em;
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-large);
  cursor: pointer;
  transition: all 0.3s ease;

}

.thesis-archive-button:hover {
  background-color: var(--white);
  color: var(--text);
  transform: translateY(-2px);
}

.thesis-archive-arrow {
  width: 10px;
  height: 10px;
  margin-left: 0.5em;
}

.legend {
  flex-direction: column;
  width: fit-content;
  overflow-y: auto;
  height: fit-content;
  max-height: calc(100vh - 13.5em);
  padding: 1em 1em 4em;
}

.legend-item {
  cursor: pointer;
  padding: 0.5em 1em;
  margin: 0.25rem 0;
  border-radius: var(--border-radius-large);
  align-items: center;
  font-size: 0.85em;
}

.visually-hidden {
  display: none;
}

.consolidated-empty-slot .slot-content {
  background-color: var(--secondary);
  /* Use secondary gray */
  border: 1px dashed var(--border);
  color: var(--text-light);
  font-style: italic;
  height: auto;
  /* Allow height to adjust */
  min-height: 3.2em;
  /* Match new slot height */
  padding: 0.8rem 1em;
  /* Adjusted padding */
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-large);
  /* Use variable */
}

.consolidated-empty-slot .time {
  display: none;
  /* Hide the individual time for consolidated slots */
}

/* Section Styling */
.schedule-section {
  border: 1px solid var(--border);
  /* Folder-like corners: Rounded top, square bottom */
  border-radius: 4px;
  /* Rounded all corners */
  padding: 0 1rem 1rem 1em;
  transition: background-color 0.3s ease;
  position: relative;
  /* Adjust padding-top if needed based on tab */
  margin-top: 56px;
  /* Increased margin-top for more tab clearance */
  /* Remove background-clip if it causes issues */
  /* background-clip: padding-box; */
}

.section-department-tab {
  position: absolute;
  top: -2.3em;
  left: -1px;
  background-color: inherit;
  color: var(--text);
  padding: 0.4rem 0.8em;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-size: 1em;
  font-weight: 400;
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-department-tab:hover {
  text-decoration: underline;
}

.section-content {
  /* Hidden by default - using max-height for transition */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  opacity: 0;
  transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
  display: flex;
  flex-direction: column;
  /* gap: 1.2em; */
}

.schedule-section.expanded .section-content {
  /* Adjust max-height as needed, should be larger than expected content */
  max-height: 2000px;
  /* Increased value to accommodate more content */
  opacity: 1;
}

.section-instructor {
  font-weight: 600;
  color: var(--text);
  /* Ensure contrast */
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--border);
  font-size: 0.85em;
  /* Slightly smaller */
  margin-top: 0em;
  /* Remove space below the tab */
  /* Mix blend mode can sometimes help text contrast on varied backgrounds, but can be complex */
  /* mix-blend-mode: difference; /* Experiment if needed */
}

/* Remove section-color-* classes as we'll use inline styles */
/*.schedule-section.section-color-1 { ... } etc. */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Added animation for the background gradient */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* === Mobile Menu Styles (below 850px) === */
#menu-toggle,
#close-menu {
  display: none;
  /* Hide buttons by default */
  position: fixed;
  /* Keep them in place */
  z-index: 105;
  /* Above most other elements */
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  line-height: 1;
  /* Center icon vertically */
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(3px);
  color: var(--text);
  padding-bottom: 4px;
}

#menu-toggle {
  top: 1em;
  left: 1em;
}

#close-menu {
  top: 1em;
  right: 1em;
  /* Positioned relative to the sliding menu */
  /* Override fixed positioning when inside the column */
  position: absolute;
}

aside.warnings {
  position: absolute;
  top: 3em;
  right: 0;
  width: 50%;
  z-index: 1000;
}

li.error {
  color: crimson;
}