/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

:root {
  --ink: #1a1a1a;
  --paper: #f8f6f1;
  --warm: #e8e4dc;
  --accent: #6b4c3b;
  --accent-light: #8b6c5b;
  --muted: #7a746b;
  --rule: #d4cfc6;
  --highlight: #f0ebe3;
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ---- HERO ---- */
.hero {
  padding: 10rem 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 700px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.35s forwards;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin-top: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.65s forwards;
}

/* ---- PAGE HERO (subpages) ---- */
.page-hero {
  padding-top: 8rem;
}

/* ---- SECTIONS ---- */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.8rem;
}

section h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

section p {
  color: var(--ink);
  max-width: 640px;
  font-weight: 300;
}

.divider {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.divider hr {
  border: none;
  border-top: 1px solid var(--rule);
}

/* ---- ABOUT ---- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p + p {
  margin-top: 1rem;
}

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
  filter: grayscale(15%);
}

.about-details {
  padding: 2rem;
  background: var(--highlight);
  border-radius: 3px;
}

.about-details h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--accent);
}

.detail-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.detail-value {
  font-weight: 400;
}

.collaborator-role {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem !important;
}

/* ---- RESEARCH ---- */
.research-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ---- PILLARS ---- */
.pillar-block {
  margin-top: 3rem;
  padding: 2.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: white;
}

.pillar-block + .pillar-block {
  margin-top: 2rem;
}

.pillar-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.pillar-number {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  min-width: 2rem;
  opacity: 0.6;
}

.pillar-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.pillar-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.pillar-description {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 300;
  max-width: 700px;
  margin-bottom: 1.5rem;
}

.pillar-credit {
  font-size: 0.82rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.pillar-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pillar-item {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  background: var(--highlight);
  border-radius: 2px;
  font-weight: 400;
}

.research-subheading {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.pillar-block .research-grid {
  margin-top: 1.5rem;
}

.research-card {
  padding: 2rem;
  background: var(--highlight);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.research-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.research-type {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.research-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.research-venue {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  font-weight: 300;
}

.research-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 300;
}

.research-links {
  margin-top: 1.2rem;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.research-links a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.research-links a:hover {
  border-bottom-color: var(--accent);
}

.research-links a::after {
  content: ' →';
}

/* ---- POSTER VIEWER ---- */
.poster-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.poster-meta {
  margin-bottom: 2rem;
  max-width: 640px;
}

.poster-meta p {
  font-weight: 300;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.poster-viewer-wrap {
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  background: #e8e4dc;
}

.poster-viewer-wrap iframe {
  width: 100%;
  height: 75vh;
  min-height: 500px;
  border: none;
  display: block;
}

.poster-viewer-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.poster-download {
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.poster-download:hover {
  border-bottom-color: var(--accent);
}

.poster-download::after {
  content: ' ↓';
}

/* ---- PUBLICATIONS ---- */
.pub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.pub-card {
  padding: 2.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.pub-card:hover {
  border-color: var(--accent-light);
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.pub-name {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.pub-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.pub-description {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}

.pub-cta {
  margin-top: 1.2rem;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}

.pub-cta::after {
  content: ' →';
}

/* ---- CONTACT ---- */
.contact-content {
  display: flex;
  gap: 4rem;
  align-items: start;
}

.contact-text {
  flex: 1;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink);
  padding: 1rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: all 0.2s;
  font-size: 0.92rem;
}

.contact-link:hover {
  border-color: var(--accent-light);
  background: white;
  transform: translateX(4px);
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-link span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
}

/* ---- FOOTER ---- */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--ink);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--rule);
    gap: 1.2rem;
  }
  .hamburger { display: block; }

  .hero { padding: 7rem 1.5rem 3rem; }
  .page-hero { padding-top: 6rem; }
  section { padding: 3.5rem 1.5rem; }
  .poster-section { padding: 3.5rem 1.5rem; }

  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo { max-width: 200px; }
  .pub-grid { grid-template-columns: 1fr; }
  .contact-content { flex-direction: column; gap: 2rem; }

  .poster-viewer-wrap iframe {
    height: 50vh;
    min-height: 350px;
  }

  footer {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}
