/* ============================================
   CONFIGURATION — Easy to change
   ============================================ */
:root {
  --bg: #000000;
  --bg-light: #ffffff;
  --text: #ffffff;
  --text-dark: #111111;
  --text-dim: rgba(255,255,255,0.4);
  --text-dim-dark: rgba(0,0,0,0.45);
  --text-muted: rgba(255, 255, 255, 0.369);
  --text-muted-dark: rgba(0,0,0,0.12);
  --accent: #ffffff;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --nav-height: 60px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  cursor: default;
}

::selection {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.3s ease;
}
a:hover { opacity: 0.6; }

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(255,255,255,0.06);
}

nav.light-mode {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(0,0,0,0.06);
}
nav.light-mode .nav-brand { color: #000; }
nav.light-mode .nav-logo-img { filter: invert(1); }
nav.light-mode .nav-links a { color: rgba(0,0,0,0.4); }
nav.light-mode .nav-links a:hover { color: #000; }
nav.light-mode .nav-toggle span { background: #000; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: color 0.4s ease;
}

.nav-logo-img {
  height: 26px;
  width: auto;
  transition: filter 0.4s ease;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s ease;
  font-weight: 400;
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

.nav-links a.active { color: var(--text); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 200;
  background: none;
  border: none;
  padding: 8px 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: #fff;
  transition: all 0.3s ease;
}
.nav-toggle.active span:first-child {
  transform: rotate(45deg) translate(2px, 3px);
}
.nav-toggle.active span:last-child {
  transform: rotate(-45deg) translate(2px, -3px);
}

/* ============================================
   HERO
   ============================================ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

#three-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

.hero-subtitle {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

.hero-subtitle p {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 300;
}

.hero-subtitle .cornell {
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: pulse-down 2s ease infinite;
}

.scroll-indicator svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}

@keyframes pulse-down {
  0%, 100% { opacity: 0.2; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.5; transform: translateX(-50%) translateY(6px); }
}

/* ============================================
   SECTIONS — Generic
   ============================================ */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px;
  position: relative;
}

.section-inner {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.section-label {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 400;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 200;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 24px;
}

.section-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--text-muted);
  margin: 0 auto 40px;
}

/* ============================================
   RESEARCH TOPICS
   ============================================ */
.research-topics {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.research-topic {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  text-align: left;
}

.research-topic:nth-child(even) {
  flex-direction: row-reverse;
  text-align: right;
}

.topic-number-wrap {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  position: relative;
  cursor: default;
}

.topic-number-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.topic-content {
  flex: 1;
  padding-top: 10px;
}

.topic-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 300;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
}

.topic-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-dim);
}

/* ============================================
   LIGHT SECTIONS
   ============================================ */
.section--light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section--light .section-label { color: var(--text-muted-dark); }
.section--light .section-title { color: var(--text-dark); }
.section--light .section-text { color: var(--text-dim-dark); }
.section--light .divider { background: var(--text-muted-dark); }

/* Smooth gradient transitions */
.section-transition-to-light {
  height: 40vh;
  background: linear-gradient(
    to bottom,
    #000000 0%,
    #080808 8%,
    #121212 16%,
    #1e1e1e 24%,
    #2e2e2e 32%,
    #424242 40%,
    #585858 48%,
    #717171 55%,
    #8b8b8b 62%,
    #a5a5a5 70%,
    #bebebe 78%,
    #d5d5d5 85%,
    #e8e8e8 92%,
    #ffffff 100%
  );
}

.section-transition-to-dark {
  height: 40vh;
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #e8e8e8 8%,
    #d5d5d5 15%,
    #bebebe 22%,
    #a5a5a5 30%,
    #8b8b8b 38%,
    #717171 45%,
    #585858 52%,
    #424242 60%,
    #2e2e2e 68%,
    #1e1e1e 76%,
    #121212 84%,
    #080808 92%,
    #000000 100%
  );
}

/* ============================================
   PEOPLE
   ============================================ */
.people-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
}

.person-card {
  text-align: center;
  max-width: 280px;
}

.person-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  margin-bottom: 24px;
  filter: grayscale(100%);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.person-photo:hover {
  filter: grayscale(30%);
  transform: scale(1.03);
}

.person-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.person-title {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.6;
  font-weight: 300;
}

.person-dept {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 10px;
  max-width: 260px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

footer p {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================
   FADE-IN
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .nav-logo-text { font-size: 8px; letter-spacing: 1.5px; }
  .nav-logo-img { height: 20px; }
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: right 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  }

  nav.light-mode .nav-links { background: rgba(0,0,0,0.97); }
  nav.light-mode .nav-links a { color: rgba(255,255,255,0.4); }
  nav.light-mode .nav-links a:hover { color: #fff; }

  .nav-links.open { right: 0; }

  .nav-links a {
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--text-dim) !important;
  }
  .nav-links a:hover { color: var(--text) !important; }

  .section { padding: 80px 24px; min-height: auto; }
  .hero-subtitle { bottom: 60px; padding: 0 20px; }
  .hero-subtitle p { font-size: 9px; letter-spacing: 2px; }

  .section-transition-to-light,
  .section-transition-to-dark { height: 20vh; }

  .research-topic,
  .research-topic:nth-child(even) {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .topic-number-wrap { width: 110px; height: 110px; }
  .research-topics { gap: 50px; }
  .person-photo { width: 160px; height: 160px; }
  .people-grid { gap: 40px; }
  footer { padding: 24px; flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .nav-logo-text { font-size: 7px; letter-spacing: 1px; }
  .nav-brand { gap: 6px; }
  .hero-subtitle p { font-size: 8px; letter-spacing: 1.5px; }
  .section-title { font-size: 24px; }
}
