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

/* ===== BASE ===== */
html, body {
  height: 100%;
  background: #0c0d0f;
  color: #ededed;
  font-family: "Aptos", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== PAGE ENTRY (MATCH HOME) ===== */
body {
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.loaded {
  opacity: 1;
}

/* ===== TOP BAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  background: rgba(12,13,15,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
}

.topbar-inner {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.95);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: rgba(255,255,255,0.9);
}

/* ===== NAV ===== */
.nav {
  display: flex;
  gap: 2.2rem;
}

.nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  padding-bottom: 6px;
  transition: color 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #ffffff;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0%;
  height: 1px;
  background: rgba(255,255,255,0.6);
  transition: width 0.28s ease, left 0.28s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
  left: 0;
}

/* ===== PAGE ===== */
.page {
  padding-top: 120px;
}

.page-header {
  text-align: center;
  margin-bottom: 80px;
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.9);
}

/* ===== CONTENT SURFACE ===== */
.content-surface {
  background: #181818;
}

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 6vw 140px;
}

/* ===== INTRO ===== */
.intro {
  max-width: 720px;
  margin: 0 auto 80px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
}

/* ==================================================
   RESEARCH: STACKED HORIZONTAL CARDS
   ================================================== */

.research-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.research-card {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.research-card a {
  display: block;
  padding: 36px 40px;
  text-decoration: none;
  color: inherit;
}

.research-card:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}

.research-card h2 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.95);
}

.research-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin-bottom: 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  max-width: 420px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

/* ===== FOOTER ===== */
.footer {
  height: 64px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
}

/* ===== GRAIN ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.008'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  .topbar {
    height: 64px;
  }

  .brand {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #0c0d0f;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 28px 0 36px;
    border-bottom: 1px solid rgba(255,255,255,0.06);

    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a {
    font-size: 0.78rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .content {
    padding: 72px 6vw 120px;
  }

  .intro {
    font-size: 0.95rem;
    margin-bottom: 64px;
  }

  .research-card a {
    padding: 28px;
  }

  .research-card h2 {
    font-size: 1rem;
  }

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