:root {
  --bg: #ffffff;
  --text: #000000;
  --accent: #e5e5e5;
  --blue: #0060a8;
  --pill-bg: #f4f4f4;
  --header-h: 60px;
  --footer-h: 50px;
  --transition: 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden; 
}

header, footer {
  flex: 0 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: var(--bg);
}

header { 
    height: var(--header-h); 
    border-bottom: 1px solid var(--accent); 
}

footer { 
    height: var(--footer-h); 
    border-top: 1px solid var(--accent); 
    justify-content: center; 
    gap: 20px; 
}

main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* Scrollable areas for Experience, Projects, Publications */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  -webkit-overflow-scrolling: touch;
}

/* --- Carousel --- */
.carousel {
  height: 100%;
  width: 100%; 
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 40px;
  position: relative;
  justify-content: center;
}

.carousel__slides {
  display: flex;
  column-gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel__slides::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 100%; /* Ensures slide is always full width of container */
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* Carousel navdots */
.carousel__navdots {
  bottom: 0;
  left: 0;
  right: 0;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: absolute;
}

.carousel__navdots button {
  appearance: none;
  border: 0;
  cursor: pointer;
  background-color: var(--accent); 
  border-radius: 50%;
  height: 15px;
  width: 15px;
  transition: var(--transition);
}

.carousel__navdots button.is-active {
  background-color: var(--blue);
  transform: scale(1.2);
}

/* Filter pills and chips */
.pill, .chip {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--text);
  border-radius: 20px;
  font-size: 0.75rem;
  margin: 4px 2px;
  background: transparent;
}

.chip.active { 
    background: var(--text); 
    color: var(--bg); 
}

/* Nav menu */
.header-controls button {
    background: none;
    border: none;
    padding: 0;
}

#menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto
}

#menu-links {
  list-style: none;
  margin-top: 40px;
  text-align: right;
}

#menu-links img {
    clip-path: circle();
    height: clamp(24px, 15dvh, 200px); /* what size should this be? */
    max-width: fit-content;
}

#menu-links a {
  text-decoration: none;
  color: var(--text);
font-size: clamp(2rem, 8vw, 3.5rem); /* Responsive font size */  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

#close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Section content */
.section-title {
    margin: 20px; 
    font-size: 1.8rem; 
}

.section-body {
    padding-left: 20px;
    margin: 5px;
}
.filters {
    margin-left: 20px;
}

.card-header span {
    font-style: italic;
}

.card-body {
    border-left: 2px solid var(--accent);
    padding-left: 20px;
}

.edu-item, .item-card {
  margin-bottom: 25px;
}

.edu-item .degree, .item-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.edu-item .thesis {
  font-size: 0.85rem;
  margin-top: 8px;
  color: #444;
}