/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #fdf6f6;
  --surface:  #ffffff;
  --accent:   #8b1a2e;
  --accent2:  #5c0f1e;
  --text:     #1a0a0d;
  --muted:    #7a5560;
  --border:   #e8d4d7;
  --radius:   10px;
  --shadow:   0 2px 12px rgba(92,15,30,.08);
}

body {
  font-family: 'Georgia', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}

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

/* ── Nav ──────────────────────────────────────────────────── */
nav {
  background: var(--accent2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

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

nav .nav-brand {
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: .02em;
}

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

nav ul a {
  color: rgba(255,255,255,.85);
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
}

nav ul a:hover,
nav ul a.active { color: #fff; text-decoration: none; }

/* ── Nav dropdown ─────────────────────────────────────────── */
nav ul li { position: relative; }

nav ul li .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent2);
  min-width: 280px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  padding: .4rem 0;
  z-index: 200;
}

nav ul li:hover .dropdown { display: block; }

nav ul li .dropdown a {
  display: block;
  padding: .55rem 1.2rem;
  font-size: .85rem;
  color: rgba(255,255,255,.85);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

nav ul li .dropdown a:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}

/* ── Page wrapper ─────────────────────────────────────────── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Hero / Profile ───────────────────────────────────────── */
.hero {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-bottom: 3.5rem;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.hero-photo .photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.hero-info h1 {
  font-size: 2rem;
  color: var(--accent2);
  margin-bottom: .25rem;
}

.hero-info .title {
  font-family: 'Helvetica Neue', sans-serif;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: .75rem;
  font-style: italic;
}

.hero-info .affiliation {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero-info .bio {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--accent);
  color: #fff;
  padding: .35rem .9rem;
  border-radius: 20px;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .82rem;
  transition: background .2s;
}

.links a:hover { background: var(--accent2); text-decoration: none; }

/* ── Section headings ─────────────────────────────────────── */
section h2 {
  font-size: 1.4rem;
  color: var(--accent2);
  border-bottom: 2px solid var(--accent);
  padding-bottom: .4rem;
  margin-bottom: 1.5rem;
  font-family: 'Helvetica Neue', sans-serif;
  letter-spacing: .02em;
}

section { margin-bottom: 3rem; }

/* ── Project cards ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.project-card h3 {
  font-size: 1rem;
  color: var(--accent2);
  margin-bottom: .5rem;
}

.project-card p {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .9rem;
}

.tag {
  display: inline-block;
  background: #f5dde0;
  color: var(--accent2);
  font-size: .75rem;
  font-family: 'Helvetica Neue', sans-serif;
  padding: .2rem .55rem;
  border-radius: 12px;
  margin: .15rem .1rem;
}

.project-link {
  display: inline-block;
  margin-top: .6rem;
  font-size: .85rem;
  font-family: 'Helvetica Neue', sans-serif;
}

/* ── Team page ────────────────────────────────────────────── */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--accent2);
  margin-bottom: .4rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.6rem;
  margin-bottom: 1.5rem;
}

.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.member-card .avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin: 0 auto .9rem;
  display: block;
}

.member-card .avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c0392b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  margin: 0 auto .9rem;
  border: 3px solid var(--accent);
}

.member-card h3 {
  font-size: .95rem;
  color: var(--text);
  margin-bottom: .2rem;
}

.member-card .role {
  font-size: .8rem;
  color: var(--accent);
  font-family: 'Helvetica Neue', sans-serif;
  font-style: italic;
  margin-bottom: .5rem;
}

.member-card .member-links {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: .5rem;
}

.member-card .member-links a {
  font-size: .78rem;
  font-family: 'Helvetica Neue', sans-serif;
  background: #f5dde0;
  color: var(--accent2);
  padding: .2rem .55rem;
  border-radius: 10px;
}

.member-card .member-links a:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.collaborator-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.collab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.collab-card .collab-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d9eeb, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.collab-card .collab-info h4 {
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .1rem;
}

.collab-card .collab-info .inst {
  font-size: .78rem;
  color: var(--muted);
  font-family: 'Helvetica Neue', sans-serif;
}

/* ── Project cards as links ───────────────────────────────── */
a.project-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.project-card:hover { text-decoration: none; }
a.project-card h3 { transition: color .2s; }
a.project-card:hover h3 { color: var(--accent); }

/* ── Individual project pages ─────────────────────────────── */
.back-link {
  display: inline-block;
  margin-bottom: 1.8rem;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .88rem;
  color: var(--accent);
}

.back-link:hover { text-decoration: underline; }

.project-page-header {
  margin-bottom: 2.5rem;
}

.project-page-header h1 {
  font-size: 1.9rem;
  color: var(--accent2);
  margin-bottom: .75rem;
  line-height: 1.3;
}

.project-tags { margin-top: .5rem; }

.project-list {
  padding-left: 1.3rem;
  font-size: .97rem;
}

.project-list li { margin-bottom: .55rem; }

/* ── Project figures ──────────────────────────────────────── */
.project-figure {
  margin: 1.8rem 0;
  text-align: center;
}

.project-figure img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.project-figure figcaption {
  margin-top: .7rem;
  font-size: .82rem;
  color: var(--muted);
  font-family: 'Helvetica Neue', sans-serif;
  font-style: italic;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Publications ─────────────────────────────────────────── */
.pub-list {
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.pub-list li {
  font-size: .93rem;
  line-height: 1.6;
  color: var(--text);
}

.pub-list li a {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .82rem;
  word-break: break-all;
}

/* ── Lab Photos Gallery ───────────────────────────────────── */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

.photo-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--surface);
}

.photo-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.photo-item--auto img {
  height: 220px;
  object-fit: contain;
  background: var(--surface);
}

.photo-item:hover img { transform: scale(1.03); }

.photo-item figcaption {
  padding: .65rem 1rem;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Contact / Let's Work Together ───────────────────────── */
.contact-intro {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info p {
  font-size: .97rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .88rem;
  color: var(--accent2);
  text-decoration: none;
  transition: color .2s;
}

.contact-link:hover { color: var(--accent); text-decoration: none; }

.contact-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5dde0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: bold;
  color: var(--accent2);
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-group label {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  font-family: 'Georgia', serif;
  font-size: .95rem;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color .2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.btn-send {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .65rem 1.6rem;
  border-radius: 20px;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .88rem;
  cursor: pointer;
  transition: background .2s;
}

.btn-send:hover { background: var(--accent2); }

@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .links { justify-content: center; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
