:root {
  --navy: #1b1f4a;
  --grey: #d9d9d9;
  --white: #f5f5f7;
  --gold: #e3a63a;
  --dark-gold: #c4871f;
  --pale-gold: #f2d27a;
  --midnight-blue: #0f1233;
  --cosmic-blue: #2c2f6b;
  --inverse-text: #ffffff;
  --border: #b8aea6;

  --font-heading: "Montserrat", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--navy);
  background-color: var(--grey);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em 0;
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2rem;
  background-color: var(--cosmic-blue);
  color: var(--gold);
  padding: 1rem 0rem;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
h3 {
  font-size: 1.5rem;
}

header {
  color: var(--inverse-text);
  background-color: var(--midnight-blue);
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* NAVIGATION LAYOUT */

nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

/* LINKS */

a {
  font-family: var(--font-heading);
}

nav a {
  color: var(--inverse-text);
  text-decoration: none;
  font-weight: 600;

  padding: 0.45rem 0.75rem;
  border-radius: 6px;

  display: block;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

nav a:hover {
  background-color: var(--cosmic-blue);
  color: var(--inverse-text);
  transform: translateY(-3px);
}

nav a.active {
  background-color: var(--gold);
  color: var(--midnight-blue);
}

nav a.active:hover {
  background-color: var(--dark-gold);
  color: var(--navy);
}

/* DROPDOWN */

.dropdown-menu {
  display: none;

  position: absolute;
  top: calc(100% + 0rem);
  left: 0;

  min-width: 150px;

  background-color: var(--midnight-blue);

  border: 1px solid var(--border);
  border-radius: 10px;

  padding: 0.4rem;

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);

  z-index: 1000;
}

/* show dropdown on hover */

.dropdown:hover .dropdown-menu {
  display: block;
}

/* dropdown items */

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;

  padding: 0.65rem 0.9rem;

  border-radius: 6px;

  white-space: nowrap;

  box-sizing: border-box;
}

/* optional subtle divider effect */

.dropdown-menu li + li {
  margin-top: 0.2rem;
}

.dropdown > a::after {
  content: " ▼";
  font-size: 1rem;
}

footer {
  color: var(--inverse-text);
  background-color: var(--midnight-blue);
  text-align: center;
  border-top: 1px solid var(--border);
}

main {
  padding: 2rem 0rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.logo img {
  height: 4rem;
  width: auto;
}

.logo-text {
  font-size: 2rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 auto;
}

section img {
  max-width: 800px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 6px;
}

p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.centered {
  text-align: center;
}

.button-link {
  display: block;
  width: fit-content;
  margin: 1rem auto;
  padding: 0.25rem 0.5rem;
  background-color: var(--gold);
  color: var(--midnight-blue);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

.button-link:hover {
  background-color: var(--dark-gold);
  transform: translateY(-3px);
}

.three-column-list {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 0.5rem 2rem;

  max-width: 800px;

  margin: 0 auto;

  padding-left: 1.5rem;
}

.two-column-list {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 0.5rem 2rem;

  max-width: 800px;

  margin: 0 auto;

  padding-left: 1.5rem;
}

.image-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 1.5rem;

  max-width: 1200px;

  margin: 0 auto;
  align-items: center;
}

.image-grid img {
  width: 100%;

  height: auto;

  object-fit: cover;

  display: block;

  border-radius: 8px;
}

.compact {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.card {
  width: 20rem;
  background-color: var(--white);
  border: 1px solid var(--cosmic-blue);
  border-radius: 6px;
}

.card-body {
  padding: 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 2rem;
  justify-content: center;
}

.feature-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--border);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background-color: var(--grey);
}

.feature-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.icon-research::before {
  content: "🔭";
}

.icon-press-release::before {
  content: "📣";
}

.icon-news::before {
  content: "📰";
}

.icon-collaboration::before {
  content: "🤝";
}

.icon-publication::before {
  content: "📄";
}

.icon-data::before {
  content: "📊";
}

.icon-software::before {
  content: "💻";
}

.article-card {
  margin-bottom: 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--white);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.article-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

.article-content {
  padding: 1.5rem;
}

.article-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1.3;
}

.article-excerpt {
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-source {
  font-weight: 500;
  margin: 0;
}

.article-date {
  color: var(--navy);
  font-size: 0.9rem;
  margin: 0;
}

.collab-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  padding: 2rem;
  border: 1px solid var(--border);

  margin-top: 2rem;
  margin-bottom: 2rem;
}

.collab-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.collab-content.reverse {
  flex-direction: row-reverse;
}

.collab-text {
  flex: 1;
  text-align: left;
}

.collab-image img {
  width: 250px;
  height: auto;
  display: block;
  border-radius: 6px;
}

.grid-table {
  display: grid;
  grid-template-columns: 1fr 3fr;
  border: 1px solid var(--border);
}

.grid-table.four {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 4fr;
  margin-bottom: 1rem;
}

.grid-table.four div {
  font-size: 1rem;
  text-align: center;
}

.grid-table div {
  padding: 0.25rem;
  border: 1px solid var(--border);
  background-color: var(--white);
}

/* MOBILE / RESPONSIVE SUPPORT */

* {
  box-sizing: border-box;
}

@media (max-width: 900px) {
  body {
    font-size: 1.1rem;
  }

  header,
  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
  }

  nav {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }

  nav a {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    margin-top: 0.25rem;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
  }

  main {
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 2.25rem;
    text-align: center;
  }

  h2 {
    font-size: 1.6rem;
    width: auto;
    margin-left: 0;
    padding: 0.75rem 1rem;
    text-align: center;
  }

  h3 {
    font-size: 1.3rem;
  }

  p,
  .compact {
    max-width: 100%;
  }

  .logo {
    justify-content: center;
  }

  .logo img {
    height: 3rem;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .three-column-list,
  .two-column-list {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding-left: 1.25rem;
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    gap: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    width: 100%;
  }

  .collab-content,
  .collab-content.reverse {
    flex-direction: column;
  }

  .collab-text {
    text-align: left;
  }

  .collab-image img {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .grid-table,
  .grid-table.four {
    grid-template-columns: 1fr;
  }

  .grid-table.four div,
  .grid-table div {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  header {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  nav a {
    font-size: 0.95rem;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .collab-card {
    padding: 1.25rem;
  }

  .article-content {
    padding: 1rem;
  }

  .article-title {
    font-size: 1.2rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
