/* Tian Lab — shared styles */

:root {
  --bg: #f0f0ee;
  --border: #dcdcda;
  --text: #1a1a1a;
  --text-muted: #6b6459;
  --accent: #503c7d;
  --accent-dark: #3a2d5c;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --size-heading: 1.75rem;
  --size-content: 1.15rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--size-content);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-size: var(--size-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.5em;
}

p, li {
  font-size: var(--size-content);
  color: var(--text);
  margin: 0 0 1em;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / nav */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nyu-logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.brand {
  display: inline-block;
  width: 200px;
  border: 2px solid var(--text);
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.46;
  text-align: center;
}

.brand:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  font-size: calc(var(--size-heading) * 0.75);
  font-weight: 500;
  line-height: 1;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
}

/* Hero (landing page) */

.hero {
  padding: 3.5rem 0 1rem;
  text-align: center;
}

.hero h1 {
  max-width: 875px;
  margin: 0 auto 0.4rem;
}

.hero-subtitle {
  color: var(--text-muted);
  margin: 0 auto 1rem;
}

.hero-visual {
  margin: 2rem auto;
  max-width: 900px;
}

.hero-visual svg,
.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.hero-text {
  max-width: 820px;
  margin: 1.5rem auto 3rem;
}

.hero-text p:last-child {
  margin-bottom: 0;
}

/* Plain content sections (no cards/panels) */

section {
  padding: 2.75rem 0;
}

.overview {
  padding: 3rem 0 2rem;
}

.overview h1 {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.overview .lede {
  max-width: 640px;
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.term-list {
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.research-figure {
  max-width: 400px;
  margin: 2.5rem auto 0;
}

.research-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.research-figure figcaption {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.term-list p {
  margin-bottom: 1rem;
}

.term-list p:last-child {
  margin-bottom: 0;
}

/* Research project sections */

.project-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}

.project-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.project-layout.reverse .project-visual {
  order: 2;
}

.project-text h2 {
  margin-bottom: 0.75rem;
}

.project-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Main research directions (numbered list) */

.directions-list {
  list-style: decimal;
  margin: 1.5rem 0 0;
  padding-left: 1.5rem;
}

.directions-list li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.directions-list li:first-child {
  border-top: none;
  padding-top: 0.5rem;
}

.directions-list li::marker {
  font-weight: 700;
  font-size: 1.1rem;
}

.directions-list p {
  margin: 0;
}

/* People */

.person {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  padding: 2rem 0;
}

.person-photo {
  width: 208px;
  height: 208px;
  border-radius: 8px;
  background: #e6e4e0;
  border: 2px dashed var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  overflow: hidden;
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-body h3 {
  margin-bottom: 0.1rem;
}

.person-role {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.person-body p:last-child {
  margin-bottom: 0;
}

.note {
  font-style: italic;
}

/* Publications */

.pub-group {
  margin-bottom: 1rem;
}

.pub-group h2 {
  margin-bottom: 0.25rem;
  text-align: center;
}

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.pub-item.no-figure {
  grid-template-columns: 1fr;
}

.pub-list li:first-child .pub-item {
  border-top: none;
  padding-top: 0.5rem;
}

.pub-item .pub-title {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.pub-item .pub-authors {
  margin-bottom: 0.3rem;
}

.pub-item .pub-venue {
  margin-bottom: 0;
}

.pub-figure {
  height: 170px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pub-figure img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  border: 2px solid #000;
}

/* News */

.news-item {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.news-item:first-child {
  border-top: none;
  padding-top: 0;
}

.news-date {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* Join / Contact */

.join-section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
}

.join-section:first-of-type {
  border-top: none;
}

.join-section h3 {
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Responsive */

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .project-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-layout.reverse .project-visual {
    order: 0;
  }

  .person {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .pub-item {
    grid-template-columns: 1fr;
  }

  .pub-figure {
    order: -1;
  }
}
