@import "font.css";

:root {
  --highlight: #d55104;
  --primary: rgb(0, 71, 171);
  --primary-hover: rgb(0, 150, 255);
  --lightbg: #f5f5f5
}

.layout {
  max-width: 1000px;
  margin: 0 auto;           /* center horizontally */
  padding: 0 1rem;          /* small side padding for mobile */
}

.active-link {
    /* background-color:var(--lightbg);
    padding: 10px;
    border-radius: 4px; */
}

html {
  font-family: "EB Garamond", serif;
}
body { margin: 0; }
/* Goal band: full-width background with constrained text */
.goal-band {
  background: #eef3ff;
  width: 100%;
  margin-top: 0;
}
.goal-band .goal-text {
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 8px 0;
  font-size: 1.3em;
  font-weight: 400;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Reduce top padding for first section after goal band */
.goal-band + section {
  padding-top: 8px;
}

/* Recruiting note */
.recruiting-note {
  background: #fff8e6;
  border: 1px solid #ffe4ac;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 16px 0 24px 0;
  font-size: 1.1em;
  line-height: 1.5;
}



.main-header {
  background-color: var(--lightbg);
  border-bottom: 1px solid #e6e6e6;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left / center / right */
  grid-template-rows: auto auto; /* top: logos, bottom: nav */
  align-items: center;
  height: auto; /* allow two rows */
  max-width: 800px; /* match main text width */
  margin: 0 auto;
  padding: 20px 1rem 20px;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-right { justify-content: flex-end; }

/* Place AR logo centered in first row */
.header-left {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-content: center;
}
.header-right {
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-end;
}

.site-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.brand-left, .brand-right {
  height: 34px; /* slightly smaller logos */
  width: auto;
  display: block;
}
/* Make AR logo 50% larger */
.brand-left { height: 52px; max-width: 100%; object-fit: contain; }

/* Centered navigation in second row, spanning full width */
.header-nav {
  justify-self: center;
  grid-column: 1 / -1;
  grid-row: auto; /* flows after stacked CMU variant if present */
  margin-top: 8px;
}

/* Stacked CMU logo placed between AR logo and nav */
.header-cmu-stacked {
  grid-column: 1 / -1;
  justify-self: center;
  /* margin-top: 4px; */
}
.brand-cmu-stacked {
  height: 32px; /* ~30% smaller than prior 32px */
  width: auto;
}

/* Inline CMU logo variant (next to AR logo) */
.brand-cmu-inline {
  height: 34px; /* ~5% smaller than prior 32px */
  width: auto;
}

nav ul {
  font-size: 30px; /* bigger header links */
  font-weight: 400;
  margin: 0;
  text-align: center; /* center links below logos */
}

h2 {
  font-size: 30px;
  font-weight: 500;
  margin: 12px 0;
}

p {
  font-size: 18px;
  font-weight: 300;
}

nav ul {
  list-style-type: none;
  padding: 0;
}

nav ul li {
  display: inline;
  margin: 0 10px;
}

nav ul li a {
    text-decoration: none;
    color:var(--primary);
    border-bottom: 1px;
}

nav ul li a:hover {
    text-decoration: none;
    color: var(--primary-hover);
}

.highlight {
    color: var(--highlight);
    text-decoration: italics;
    /* font-weight:800 */
}

section {
  padding: 20px 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.main-footer {
  background-color: var(--lightbg);
  text-align: center;
  padding: 12px 5px;
  position: static; /* no longer sticky */
  width: 100%;
  margin-top: 40px;
}

.hero-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  width: 100%;
}

.lab-carousel {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #eee;
  border-radius: 10px;
}
.hero-text {
  text-align: left;
  max-width: 800px;
  font-size: 1.2em; 
  line-height: 1.8;
}

.hero-text ul {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}


/* Define a fixed aspect ratio container */
.image-box {
  position: absolute;
  width: 100%;
  aspect-ratio: 3 / 2; /* or 16 / 9, 4 / 3 — choose what looks best */
  top: 0;
  left: 0;
}


/* Duplicate .lab-carousel definition removed - using the one above */

/* All images occupy same space and are layered */
.lab-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;         /* or 'contain' */
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}


.dots {
  text-align: center;
  margin-top: 1rem;
}

.dot {
  display: inline-block;
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: #ccc;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #0047AB;  /* or your highlight color */
}


/* People */
.person-info h2 {
  margin: 0;
  font-size: 1.2em;  /* Increased for clarity */
}

.person-info p {
  margin: 0;
  font-size: 1.1em;  /* Increased for clarity */
}

.person-info a {
  color: var(--primary);
  text-decoration: none;
}

.person-info a:hover {
  color: var(--primary-hover);
}

/* Make sure person-container layout works across all sizes */
.person-info h2 {
  margin: 0;
  font-size: 1.2em;  /* Increased for clarity */
}

.person-info p {
  margin: 0;
  font-size: 1.1em;  /* Increased for clarity */
}

.person-info a {
  color: var(--primary);
  text-decoration: none;
}

.person-info a:hover {
  color: var(--primary-hover);
}

/* Make sure person-container layout works across all sizes */
.people-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px; /* increased gap */
  margin: 0 auto;
  padding-bottom: 20px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 350px;
  width: 100%;
  height: auto;
}

.person-image {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
}

/* People page adjustments */
#phd-advisees .person-image {
  width: 99px;   /* 10% smaller than 110px */
  height: 99px;
}

/* Increase section headers on people page by ~10% */
#people h2 { font-size: 33px; }

/* Constrain overall width of People page to match other pages */
#people { max-width: 900px; margin: 0 auto; }
#people .layout { max-width: 900px; }


/* News */
.news-widget {
  max-width: 800px;
  width: 100%;
  border: 0px solid var(--lightbg);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 40px;
}

.news-widget h2 {
  margin: 0 0 20px;
  font-size: 2em;
}

.news-list {
  max-height: none; /* let it flow */
  overflow: visible;
  padding-right: 0;
}

/* Scrollbar style (optional) */
.news-list::-webkit-scrollbar {
  width: 8px;
}
.news-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.news-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 0.5rem;
}

.news-date {
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.1em; 
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.news-event {
  font-size: 1.1em;
  flex-grow: 1;
  flex-basis: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-item:last-child {
  margin-bottom: 0;
}

.news-content {
  margin-left: 10px;
}

.news-event a {
    text-decoration: none; 
    color: var(--primary);
}

.news-event a:hover {
    text-decoration: none;
    color: var(--primary-hover);
}


/* Publications */
.publications-widget {
  width: 100%;
  padding: 20px;
  margin: 20px auto;
}

.publications-widget h2 {
  margin: 0 0 20px;
  font-size: 2em;
  text-align: center;
}

.publications-list {
  font-size: 1.2em;
  /* No height restrictions - let content flow naturally */
}

.publication-item {
  padding: 0.5em 0;
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-title {
  font-size: 1.5em;
  margin: 0 0 10px;
}

.publication-authors,
.publication-conference,
.publication-links,
.publication-category {
  margin: 5px 0;
}
.publication-awards {
  margin: 5px 0;
  color: #ff1515;
}

.publication-links a {
  color: #007bff;
  text-decoration: none;
}

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

/* Category Buttons */
.category-buttons {
  text-align: center;
  margin-bottom: 20px;
}

.category-buttons button {
  margin: 0 5px;
  padding: 10px 20px;
  border: none;
  background-color: #eed7ff;
  color: #0e0c3f;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.category-buttons button:hover {
  background-color: #dd88f9;
}

.category-buttons button:focus {
  outline: none;
}

/* Abstract content styling - override global p styles */
.abstract-content p {
  font-size: 0.95em !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  margin: 0.5em 0 !important;
}

.abstract-content p:first-child {
  margin-top: 0 !important;
}

.abstract-content p:last-child {
  margin-bottom: 0 !important;
}


/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
  /* Header adjustments */
  .header-inner { height: auto; grid-template-rows: auto auto; }
  .brand-left, .brand-right { height: 28px; }
  /* AR logo 50% larger on mobile as well */
  .brand-left { height: 42px; }
  .brand-cmu-stacked { height: 20px; }
  .brand-cmu-inline { height: 26px; }
  .site-title { font-size: 22px; }
  .goal-band .goal-text { font-size: 1em; }
  .hero-text { font-size: 1em; }
  .publications-list { font-size: 1em; }
  
  nav ul {
    font-size: 20px;
  }
  
  nav ul li {
    margin: 0 5px;
  }
  
  /* Main headings */
  h2 {
    font-size: 24px;
  }
  
  /* Hero section */
  .hero-row {
    padding: 0 10px;
  }
  
  .lab-carousel {
    max-width: 100%;
    margin-bottom: 1rem;
  }
  
  /* News widget */
  .news-widget {
    padding: 10px 0;
  }
  
  .news-widget h2 {
    font-size: 1.5em;
  }
  
  /* People section */
  .people-container {
    gap: 0px;
  }
  
  .person {
    flex-direction: column;
    text-align: center;
    max-width: 280px;
  }
  
  .person-image {
    margin-bottom: 10px;
  }
  
  /* Publications */
  .publication-title {
    font-size: 1.2em;
  }

  /* People page headers on tablet/mobile */
  #people h2 { font-size: 26px; }
  
  .category-buttons button {
    padding: 8px 15px;
    margin: 3px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  /* Very small screens */
  header h1 {
    font-size: 28px;
  }
  
  nav ul {
    font-size: 16px;
    padding: 0;
  }
  
  nav ul li {
    margin: 0px 5px;
  }
  
  .layout {
    padding: 0 0.5rem;
  }
  
  section {
    padding: 15px 0.5rem;
  }
  
  /* Stack everything vertically */
  .hero-row {
    gap: 0px;
  }
  
  .news-list {
    max-height: 300px;
  }
  
  /* Adjust footer for mobile */
  .main-footer {
    position: static;
    margin-top: 30px;
  }

  /* People page headers on very small screens */
  #people h2 { font-size: 26px; }

  /* Make AR logo smaller on very small screens */
  .brand-left { height: 34px; }
}

/* Extremely narrow screens */
@media (max-width: 360px) {
  .brand-left { height: 30px; }
}

/* Large screens */
@media (min-width: 1200px) {
  .layout {
    max-width: 1200px;
  }
  
  section {
    max-width: 1200px;
  }
  .header-inner { max-width: 800px; }
}