:root {
  --bg: #ffffff;
  --text: #1A1A18;
  --text-secondary: #6B6560;
  --accent: hsla(340, 65%, 65%, 1);
  --accent-hover: hsla(340, 65%, 50%, 1);
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --mono: 'IBM Plex Mono', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(255,255,255,0.45) var(--bg);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.6);
}


body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg) url('noise.png') repeat;
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

/* ---- CONTAINER ---- */
.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.page-content {
  animation: fadeIn 0.35s ease both;
}

.page-content.fade-out {
  animation: fadeOut 0.2s ease both;
}

.page-content.fade-in {
  animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

/* ---- HEADER / NAV ---- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.site-logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.site-logo:hover {
  opacity: 0.6;
}

.site-logo img {
  height: 24px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.2rem;
  transition: border-color 0.35s ease;
}

.nav-links:hover {
  border-color: hsla(340, 65%, 65%, 0.3);
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ---- GLASS ---- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.glass:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* ---- TYPOGRAPHY ---- */
h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.tagline {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}

p {
  margin-bottom: 0.8rem;
  line-height: 1.65;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

a:hover { color: var(--accent-hover); }

em { font-family: var(--serif); font-style: italic; }

/* ---- DIVIDER ---- */
.divider {
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 1.75rem 0;
}

/* ---- RESEARCH TEASER (home page) ---- */
.research-teaser {
  display: block;
  text-decoration: none;
  color: inherit;
}

.research-teaser:hover {
  border-color: hsla(340, 65%, 65%, 0.3);
  color: inherit;
}

.teaser-arrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.6rem;
  display: inline-block;
  transition: transform 0.2s;
}

.research-teaser:hover .teaser-arrow {
  transform: translateX(3px);
}

/* ---- TEAM ---- */
.team-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.team-card:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.team-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.6rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.team-card .name {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.team-card .role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.team-card .bio {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---- RESEARCH ITEMS ---- */
a.research-item {
  display: block;
  color: inherit;
  text-decoration: none;
}

.research-item:hover {
  border-color: hsla(340, 65%, 65%, 0.25);
}

.research-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  background: hsla(340, 65%, 65%, 0.1);
  color: var(--accent);
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.research-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---- CONTACT ---- */
.contact-email {
  font-family: var(--mono);
  font-size: 0.88rem;
}

/* ---- FOOTER ---- */
.footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .container { padding: 2rem 1.25rem 3rem; }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 2rem;
  }
  .site-logo img { height: 20px; }
  .nav-links { width: 100%; }
  .nav-links li { flex: 1; }
  .nav-links a { display: block; text-align: center; }
  h1 { font-size: 1.4rem; }
  .glass { padding: 1.1rem 1.25rem; }
  .team-grid { padding: 1.1rem 1.25rem; }
}
