@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;

  scroll-behavior: smooth;
  scroll-padding-top: 50px;

  --color-bg-light: #faf9f5;
  --color-bg: #f0eee6;
  --color-gray-medium: #87867f;
  --color-gray-dark: #333;
  --color-slate-dark: #141413;
  --color-award: #ebdbbc;
  --color-blue: #4a90e2;
}

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

body {
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  color: var(--color-gray-dark);
  background-color: var(--color-bg);
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navbar */
.navbar {
  background-color: var(--color-bg);
  position: sticky;
  padding: 0 20px;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
  text-wrap: nowrap;
}

.nav-logo a:hover {
  color: var(--color-blue);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-gray-dark);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger animation when active */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu - full page overlay */
.nav-menu {
  display: none;
  list-style: none;
  position: fixed;
  top: 70px;
  left: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-bg);
  width: 100%;
  height: calc(100vh - 70px);
  padding: 2rem 0;
}

.nav-menu.active {
  display: flex;
}

.nav-menu li {
  margin: 0;
  width: 100%;
  text-align: center;
}

.nav-menu a {
  display: block;
  color: var(--color-gray-dark);
  text-decoration: none;
  font-weight: 400;
  font-size: 2rem;
  padding: 1rem 2rem;
  width: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--color-blue);
}

/* Container for all sections */
section {
  padding: 1rem 20px;
}

footer {
  padding: 2rem 20px;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

/* Welcome Section */
#welcome {
  scroll-margin-top: 20px;
}

.welcome-content,
.announcement-content,
.research-content,
.people-content,
.publications-content,
.join-content,
.footer-content {
  max-width: 900px;
  margin: 0 auto;
}

.welcome-content {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.welcome-text {
  max-width: 50ch;
}

.welcome-text h2 {
  line-height: 1.3;
}

.welcome-text p {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.welcome-img {
  display: none;
}

.emoji-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 6rem;
}

.human-emoji {
  display: inline-block;
  transition: transform 0.2s ease;
  transform-style: preserve-3d;
}

.human-emoji.flip-out {
  transform: rotateX(90deg);
}

.human-emoji.flip-in {
  transform: rotateX(-90deg);
}

.plus-sign {
  font-size: 3rem;
  color: var(--color-gray-medium);
  font-weight: 300;
}

.announcement-content {
  background: var(--color-bg-light);
  border: 1px solid var(--color-gray-medium);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Research Section */
.research-areas {
  display: grid;
  max-width: 900px;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.research-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.research-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.research-text {
  padding: 1rem;
}

.research-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.research-card p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

/* People Section */
.people-grid {
  display: grid;
  max-width: 900px;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.person-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.person-card > div {
  width: 100%;
}

.person-card > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.person-card img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

.person-card:hover img {
  opacity: 0.7;
}

.person-card:hover h3 {
  color: var(--color-blue);
}

.person-card h3,
.person-card p {
  text-wrap: nowrap;
}

/* Publications Section */
.publications-container {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  gap: 1.5rem;
}

.publication-card {
  display: flex;
  gap: 1rem;
}

.publication-card h3 {
  padding: 0;
}

.pub-image {
  display: none;
  flex-shrink: 0;
  width: 200px;
  height: 120px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pub-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.publication-card h3 {
  line-height: 1.5;
}

.publication-card h3 a {
  display: block;
  cursor: pointer;
}

.publication-card h3:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.publication-card p {
  font-size: 0.85rem;
}

.publication-card h4 {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.publication-card .venue {
  background-color: var(--color-gray-medium);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0rem 0.3rem;
  border-radius: 5px;
}

.publication-card .award {
  background-color: var(--color-award);
  color: var(--color-slate-dark);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0rem 0.3rem;
  border-radius: 5px;
}

.pub-links {
  display: flex;
  gap: 0.5rem;
}

.pub-links a {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0rem 0.3rem;
  border-radius: 5px;
  border: 1px solid var(--color-gray-medium);
  background-color: var(--color-bg-light);
}

.pub-links a:hover {
  background-color: var(--color-gray-dark);
  border: 1px solid var(--color-gray-dark);
  color: var(--color-bg);
}

.join-content h3 {
  margin-bottom: 2rem;
}

.join-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.join-card {
  display: flex;
  flex-direction: column;
}

.join-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 0.5rem;
}

.hyperlink a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hyperlink a .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.hyperlink a:hover {
  color: var(--color-blue);
}

.hyperlink a:hover .arrow {
  transform: rotate(45deg);
}

@media (min-width: 640px) {
  .nav-logo a {
    font-size: 1.3rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: auto;
    height: auto;
    padding: 0;
  }

  .nav-menu li {
    width: auto;
    text-align: left;
  }

  .nav-menu a {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .nav-menu li:last-child a {
    padding-right: 0;
  }

  .research-areas {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 1rem;
  }

  .people-grid {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 1rem;
  }

  .publications-container {
    gap: 2rem;
  }

  .pub-image {
    display: block;
  }

  .join-card {
    display: flex;
    flex-direction: row;
    gap: 2rem;
  }

  .join-card h4 {
    flex: 0 0 200px;
    width: 200px;
  }

  .join-card p {
    flex: 1;
  }

  section {
    padding: 2rem 20px;
  }

  section h2 {
    font-size: 2rem;
  }

  footer {
    padding: 4rem 20px;
  }
}

@media (min-width: 768px) {
  .nav-logo a {
    font-size: 1.5rem;
  }

  .welcome-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
  }

  .welcome-img img {
    width: 100%;
  }

  .research-areas {
    gap: 1.5rem;
  }

  .people-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 1rem;
  }

  .footer-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .people-grid {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .person-card p {
    font-size: 0.8rem;
  }
}
