* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #731930;
  --primary-dark: #5a0f23;
  --primary-light: #8b3a47;
  --secondary: #000000;
  --accent: #d4a574;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --background: #f5f5f5;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.nav-brand h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.nav-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  font-weight: 300;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.3rem;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.nav-links a:hover {
  color: var(--accent);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Main content */
main {
  padding: 0.75rem 0 0;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, rgba(115, 25, 48, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0;
  border-left: 5px solid var(--primary);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.hero-text h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-image-small {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-image-small img {
  max-width: 300px;
  width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.hero-news h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.news-category {
  margin-bottom: 2rem;
}

.news-category h4 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.news-category-box {
  background: var(--white);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--primary);
}

.hero-news .news-item {
  margin-bottom: 0.3rem;
  padding: 0.15rem 0.25rem 0.25rem 0.25rem;
  background: transparent;
  box-shadow: none;
  border-left: none;
}

.hero-news .news-item:hover {
  box-shadow: none;
  transform: none;
}

.news-category:last-child .news-item:last-child {
  border-bottom: none;
}

.news-category-box .news-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.hero-news .news-item time {
  display: block;
  color: var(--primary);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-news .news-item p {
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.hero-image {
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-break {
  display: none;
  flex-basis: 100%;
  height: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.5rem;
}

.btn-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  display: block;
}

.icon-youtube-box,
.icon-linkedin-box {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.icon-youtube-play,
.icon-linkedin-in {
  fill: currentColor;
}

.btn-primary .icon-youtube-box {
  fill: var(--white);
  stroke: var(--white);
}

.btn-primary .icon-youtube-play {
  fill: var(--primary);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(115, 25, 48, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  display: inline-block;
}

/* Sections */
.news-section,
.content-section {
  margin-bottom: 3rem;
}

.page-header {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary);
}

.page-header h2 {
  font-size: 2rem;
  color: var(--primary);
}

section h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.section-title {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.section-divider {
  border: 0;
  border-top: 2px solid var(--border);
  margin: 1rem 0 2rem;
}

/* News grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.news-item {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.news-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.news-date {
  flex-shrink: 0;
  min-width: 90px;
}

.news-item time {
  display: block;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
  text-align: right;
}

.news-content {
  flex: 1;
}

.news-item p {
  color: var(--text);
  line-height: 1.6;
}

/* Publications */
.year-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.publication {
  background: var(--white);
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
}

.publication h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.publication-meta {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.publication-venue {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 0rem;
}

.publication .btn-small {
  margin-right: 0.5rem;
}

/* Projects */
.project-card {
  background: var(--white);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
  display: flow-root;
}

.project-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.project-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-logo {
  max-width: 120px;
  height: auto;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
  float: left;
}

.project-content {
  display: flow-root;
}

.project-card .btn-small {
  margin-right: 0.5rem;
}

/* Project detail pages */
.back-button {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.project-detail {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
}

.project-detail-image {
  max-width: 200px;
  height: auto;
  margin-right: 2rem;
  margin-bottom: 1.5rem;
  float: left;
}

.project-detail-content {
  display: flow-root;
  line-height: 1.8;
  color: var(--text);
}

.project-detail-content p {
  margin-bottom: 1.5rem;
}

.project-detail-content ul {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.project-detail-content li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.project-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
  clear: both;
}

.project-links h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.project-links p {
  margin-bottom: 0.5rem;
}

/* Courses */
.course-card {
  background: var(--white);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
  transition: all 0.3s ease;
}

.course-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.course-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(115, 25, 48, 0.1) 0%, rgba(115, 25, 48, 0.05) 100%);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.course-semester {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

.course-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.course-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.course-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.course-buttons .btn-small {
  margin: 0;
}

/* Course detail pages */
.course-title-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.course-number-large {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(115, 25, 48, 0.3);
}

.course-title-header h2 {
  margin: 0;
  color: var(--primary);
}

.course-semester-large {
  font-size: 1rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.5rem;
}

.course-detail {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
}

.course-detail-content {
  line-height: 1.8;
  color: var(--text);
}

.course-detail-content p {
  margin-bottom: 1.5rem;
}

.course-detail-content ul {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.course-detail-content li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.course-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.course-links h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.course-links p {
  margin-bottom: 0.5rem;
}

/* Group grid */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.student-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
  border-top: 4px solid var(--primary);
}

.student-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.student-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--primary);
}

.student-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.student-role {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.student-joined {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.student-card p {
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.student-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.student-card a:hover {
  text-decoration: underline;
}

/* Talks */
.talk-item {
  background: var(--white);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--accent);
}

.talk-item h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.talk-meta {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Posters */
.posters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.poster-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--primary);
  transition: all 0.3s ease;
  text-align: center;
}

.poster-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.poster-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
  max-height: 300px;
  object-fit: cover;
}

.poster-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.poster-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 2rem 0;
  margin-top: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  gap: 2rem;
}

.footer-contact {
  justify-self: start;
}

.footer-affiliation {
  justify-self: center;
  text-align: center;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  justify-self: end;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.footer-copyright {
  text-align: center;
}

.footer-usc-logo {
  display: block;
  height: 116px;
  width: auto;
}

.footer-herc-logo {
  display: block;
  height: 116px;
  width: auto;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--accent);
}

.footer-section p {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.footer-section a {
  color: var(--accent);
  text-decoration: none;
}

.footer-section a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
    justify-content: flex-start;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-text h2 {
    font-size: 2rem;
  }

  .news-grid,
  .projects-grid,
  .group-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .footer-branding {
    justify-content: flex-start;
  }

  .footer-affiliation {
    justify-self: start;
    text-align: left;
  }

  .footer-meta {
    justify-self: start;
    width: auto;
    text-align: left;
  }

  .footer-copyright {
    text-align: left;
  }
}

@media (min-width: 769px) {
  .cta-break {
    display: block;
  }
}
