/* The Palta Lab - consolidated stylesheet */

/* Colors and shared settings. Change --menu-size to resize the menu. */
:root {
  --ink: #1e2933;
  --muted: #68737d;
  --line: #d9dde1;
  --paper: #fbfaf7;
  --white: #fff;
  --accent: #58799c;
  --red: #cf4545;
  --max: 1180px;
  --menu-size: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
main { min-height: 60vh; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Header and navigation */
.site-header { background: rgba(251,250,247,.97); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: var(--max);
  margin: auto;
  padding: 14px 28px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.logo-link { display: block; width: 610px; max-width: 58%; min-width: 0; flex-shrink: 1; }
.logo-link picture, .site-logo { display: block; width: 100%; height: auto; }
.nav { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 24px; padding-bottom: 9px; }
.site-header .nav a { color: #3c4650; text-decoration: none; font-size: var(--menu-size); }
.nav a:hover { color: #000; }

/* Homepage slideshow: complete images, without cropping */
.hero { max-width: var(--max); margin: 32px auto 0; padding: 0 28px 18px; }
.slides { width: 100%; position: relative; }
.slide { display: none; width: 100%; margin: 0; padding: 0; border: 0; }
.slide.active { display: block; }
.hero-images-only .slide { background: transparent; }
.hero-images-only .slide-media { display: block; width: 100%; height: auto; min-height: 0; padding: 0; background: transparent; }
.hero-images-only .slide-media picture { display: flex; width: 100%; margin: 0; padding: 0; justify-content: center; align-items: center; }
.hero-images-only .slide-media img { display: block; width: auto; height: auto; max-width: 100%; max-height: 520px; margin: 0 auto; object-fit: contain; object-position: center; }
.hero-images-only .slide:nth-child(2) img,
.hero-images-only .slide:nth-child(3) img { max-height: 460px; }
.hero-arrow, .dot { border: 0; background: none; cursor: pointer; color: var(--muted); }
.hero-arrow { font-size: 1.35rem; padding: 6px 10px; }
.dots { display: flex; gap: 8px; }
.image-only-dots { justify-content: center; gap: 4px; padding-top: 8px; }
.dot { width: 28px; height: 28px; padding: 0; border: 9px solid var(--paper); border-radius: 50%; background: #b8c0c6; }
.dot.active { background: var(--red); }

/* Shared content and typography */
.section, .page-intro, .research-block, .featured-work, .teaching-feature, .about-grid { max-width: var(--max); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.section { padding-top: 54px; padding-bottom: 54px; }
.eyebrow { color: var(--accent); font-size: .78rem; letter-spacing: .18em; font-weight: 700; margin-bottom: 10px; }
.slide h1, .page h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height: 1.12; margin: 0 0 18px; }
.slide h1 { font-size: clamp(2rem,4vw,4rem); }
.slide p { font-size: 1.06rem; margin: 0 0 12px; max-width: 39rem; }
.note { font-size: .86rem !important; color: var(--muted); }
.intro { max-width: 950px; text-align: center; padding-top: 58px; }
.intro h2, .section h2, .research-block h2, .featured-work h2, .teaching-feature h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; margin: 0 0 14px; }
.intro h2 { font-size: 2rem; }
.lead { font-size: 1.15rem; color: #39444d; }
.home-intro { padding-top: 32px; padding-bottom: 48px; }
.section-heading { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.section-heading h2 { font-size: 1.8rem; }
.page { padding-top: 44px; }
.page-intro { padding-top: 30px; padding-bottom: 28px; max-width: 900px; }
.page-intro h1 { font-size: 1.75rem; }
.page-intro p { font-size: 1.12rem; color: #404b54; }
.page-intro.compact-intro { max-width: 960px; padding-top: 18px; padding-bottom: 34px; }
.page-intro.compact-intro h1 { font-size: 1.75rem; line-height: 1.25; margin-bottom: 12px; }
.page-intro.compact-intro p { font-size: 1.02rem; }

/* Publications */
.pub-list { display: flex; flex-direction: column; }
.pub { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub-year { color: var(--muted); font-variant-numeric: tabular-nums; }
.pub strong { font-weight: 600; }
.pub.full { padding: 20px 0; }

/* Research */
.research-block, .teaching-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding-top: 58px; padding-bottom: 58px; border-top: 1px solid var(--line); }
.research-block.reverse .research-text, .teaching-feature.reverse > div { order: 2; }
.research-block.reverse picture, .teaching-feature.reverse picture { order: 1; }
.research-block img, .teaching-feature img { width: 100%; max-height: 530px; object-fit: contain; background: #fff; }
.research-block h2, .featured-work h2 { font-size: 1.75rem; }
.featured-work { padding-top: 58px; padding-bottom: 58px; border-top: 1px solid var(--line); }
.featured-work > div { max-width: 780px; margin-bottom: 24px; }
.featured-work img { width: 100%; background: #fff; border: 1px solid var(--line); }
.featured-work article + article { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.featured-work article > p { max-width: 780px; }
.featured-work .multiscale-figure { width: 100%; max-width: 551px; margin: 24px auto 0; }
.featured-work figure figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }

/* Teaching */
.teaching-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; border-top: 1px solid var(--line); }
.teaching-preview img { width: 100%; max-height: 420px; object-fit: cover; }
.teaching-copy h2 { font-size: 2rem; }
.teaching-page { padding-top: 18px; }
.teaching-title { padding-bottom: 16px !important; }
.teaching-page .page-intro, .course-list, .teaching-projects { width: 100%; max-width: 960px; margin-left: auto; margin-right: auto; padding-left: 28px; padding-right: 28px; }
.teaching-page .page-intro p { font-size: 1rem; max-width: 54rem; }
.course-list { padding-top: 0; padding-bottom: 56px; }
.course { padding: 22px 0; border-top: 1px solid var(--line); }
.course:first-child { border-top: 0; }
.course h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.3rem; font-weight: 600; margin: 0 0 7px; line-height: 1.25; }
.course-code { font-family: Arial, Helvetica, sans-serif; font-size: .82rem; font-weight: 400; color: var(--muted); margin-left: 7px; }
.course p { margin: 0; color: #3f4a53; font-size: 1rem; }
.teaching-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 32px; }
.teaching-projects figure { margin: 0; }
.teaching-projects img { width: 100%; height: auto; }
.teaching-projects figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* About and profile links */
.about-grid { display: grid; grid-template-columns: minmax(280px,390px) 1fr; gap: 60px; align-items: start; padding-top: 52px; padding-bottom: 72px; }
.portrait { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-grid h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; font-size: 3.2rem; margin: 0 0 20px; }
.about-copy h1 { font-size: 1.75rem; line-height: 1.25; }
.profile-icons { display: flex; gap: 11px; margin-top: 28px; }
.profile-icon { width: 56px; height: 56px; border: 1px solid #cfd5da; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #495762; text-decoration: none; transition: transform .15s ease, border-color .15s ease, color .15s ease; }
.profile-icon:hover { transform: translateY(-1px); border-color: #8192a1; color: #17212a; }
.profile-icon svg { width: 34px; height: 34px; fill: currentColor; }
.profile-icon.researchgate span { font-family: Georgia, serif; font-size: 1.6rem; font-weight: 700; letter-spacing: -.07em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 34px 28px 22px; color: #4d5962; background: #f5f4f0; }
.footer-grid { max-width: var(--max); margin: auto; display: grid; grid-template-columns: 1.2fr 1fr .7fr; gap: 30px; font-size: .9rem; }
.footer-grid strong { color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; }
.footer-motto { max-width: var(--max); margin: 28px auto 0; padding-top: 15px; border-top: 1px solid #d0d4d7; letter-spacing: .19em; font-size: .72rem; color: #647c96; }
.footer-profile-icons { justify-content: flex-start; margin-top: 14px; }
.footer-profile-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 4px; font-size: .85rem; line-height: 1.5; }

/* Narrow screens */
@media (max-width: 800px) {
  .header-inner { flex-direction: column; gap: 14px; padding-left: 20px; padding-right: 20px; }
  .logo-link { width: 100%; max-width: 520px; }
  .nav { justify-content: center; flex-shrink: 1; padding-bottom: 4px; gap: 16px; }
  .hero { padding-left: 20px; padding-right: 20px; margin-top: 18px; }
  .teaching-preview, .research-block, .teaching-feature, .about-grid, .teaching-projects, .footer-grid { grid-template-columns: 1fr; }
  .research-block.reverse .research-text, .teaching-feature.reverse > div,
  .research-block.reverse picture, .teaching-feature.reverse picture { order: initial; }
  .page-intro.compact-intro h1, .about-copy h1 { font-size: 1.5rem; }
  .intro h2 { font-size: 1.65rem; }
}
@media (max-width: 600px) {
  .hero-images-only .slide-media img { max-height: 340px; }
  .hero-images-only .slide:nth-child(2) img,
  .hero-images-only .slide:nth-child(3) img { max-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .profile-icon { transition: none; }
}
