/* ==========================================================================
   Goldshtein Lab: shared stylesheet
   Earthy / nature-inspired academic theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --forest: #141414;
  --forest-dark: #000000;
  --moss: #8a6f00;
  --clay: #f5c400;
  --clay-dark: #a8830a;
  --sand: #f4f4f2;
  --sand-light: #ffffff;
  --paper: #ffffff;
  --ink: #141414;
  --ink-soft: #4a4a48;
  --line: #e2e2de;
  --max-width: 1080px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--sand-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--forest-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 500;
}

h1 { font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
header.site-header {
  background: var(--forest);
  color: var(--sand);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--clay);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sand);
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; opacity: 0.9; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--clay);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--sand);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  opacity: 1;
  text-decoration: none;
  border-bottom-color: var(--clay);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--sand);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav.main-nav {
    display: none;
    width: 100%;
  }
  nav.main-nav.open { display: block; }
  .nav-inner { flex-wrap: wrap; }
  nav.main-nav ul {
    flex-direction: column;
    gap: 0;
    padding-top: 12px;
  }
  nav.main-nav li { border-top: 1px solid rgba(255,255,255,0.12); }
  nav.main-nav a { display: block; padding: 12px 2px; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at top right, rgba(245,196,0,0.14), transparent 55%),
    var(--sand);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clay-dark);
  margin-bottom: 14px;
}

.hero p.lead {
  font-size: 1.15rem;
  max-width: 640px;
}

/* Hero variant with a photographic background (e.g. LENS thermal roost imagery) */
.hero-photo {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--clay);
  padding: 96px 0 80px;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bats.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(1.4) contrast(1.05);
  z-index: 0;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.5) 32%, rgba(0,0,0,0.2) 52%, rgba(0,0,0,0) 68%);
  z-index: 1;
}
.hero-photo .container {
  position: relative;
  z-index: 2;
}

.hero-photo .eyebrow { color: var(--clay); text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.hero-photo h1,
.hero-photo p.lead {
  color: var(--sand-light);
  text-shadow: 0 2px 16px rgba(0,0,0,0.75), 0 1px 4px rgba(0,0,0,0.85);
}
.hero-photo p.lead { color: #f2f0ea; }
.hero-photo .caption {
  margin-top: 28px;
  font-size: 0.8rem;
  color: rgba(250,246,238,0.65);
  letter-spacing: 0.02em;
}
.hero-photo .btn-outline {
  border-color: var(--sand-light);
  color: var(--sand-light);
}
.hero-photo .btn-outline:hover {
  background: var(--sand-light);
  color: var(--forest-dark);
}
.hero-photo .btn-primary {
  background: var(--clay);
  color: var(--forest-dark);
}
.hero-photo .btn-primary:hover { background: #ffd633; }

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--forest);
  color: var(--sand);
}
.btn-primary:hover { background: var(--forest-dark); text-decoration: none; }
.btn-outline {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest);
}
.btn-outline:hover { background: var(--forest); color: var(--sand); text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section.alt { background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--moss);
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clay-dark);
  background: rgba(245,196,0,0.18);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- News list ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  display: flex;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.news-list li:last-child { border-bottom: 1px solid var(--line); }
.news-date {
  flex-shrink: 0;
  width: 104px;
  font-weight: 600;
  color: var(--moss);
  font-size: 0.88rem;
}

/* ---------- Publications ---------- */
.pub-group { margin-bottom: 40px; }
.pub-group h3 {
  border-bottom: 2px solid var(--clay);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pub-item:first-child { padding-top: 0; }
.pub-item .authors { color: var(--ink); }
.pub-item .authors strong { color: var(--forest-dark); }
.pub-item .venue { font-style: italic; font-weight: 700; color: var(--ink-soft); }
.pub-item .year {
  display: inline-block;
  background: var(--forest);
  color: var(--sand);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 5px;
  margin-right: 10px;
  vertical-align: middle;
}
.pub-item .note {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.pub-item .links a { margin-right: 14px; font-size: 0.88rem; font-weight: 600; }
.pub-item .media { margin-top: 6px; font-size: 0.88rem; }
.pub-item .highlight { border-left: 3px solid var(--clay); padding-left: 16px; margin-left: -19px; }

.pub-item-cover {
  overflow: hidden; /* contain the floated cover so the item's border-bottom sits below it */
}
.pub-cover {
  float: left;
  width: 120px;
  margin: 2px 20px 10px 0;
}
.pub-cover img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.pub-cover .cover-credit {
  display: block;
  margin-top: 5px;
  font-size: 0.68rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

@media (max-width: 560px) {
  .pub-cover { float: none; width: 140px; margin: 0 0 12px; }
}

.pub-filter-note {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.92rem;
  margin-bottom: 32px;
}

/* ---------- People ---------- */
.profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 48px;
}
@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; }
}

.avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--forest);
  border: 3px solid var(--clay);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sand);
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  font-weight: 600;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meta-list { list-style: none; padding: 0; margin: 18px 0; }
.meta-list li { margin-bottom: 6px; font-size: 0.94rem; }
.meta-list .k { font-weight: 600; color: var(--forest-dark); margin-right: 6px; }

.opening {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--moss);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 18px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-block h3 { margin-bottom: 10px; }
.contact-block address { font-style: normal; color: var(--ink-soft); }

.editme {
  background: #fff7e6;
  border: 1px dashed var(--clay);
  color: var(--clay-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--forest-dark);
  color: rgba(250,246,238,0.75);
  padding: 40px 0;
  margin-top: 40px;
  font-size: 0.88rem;
}
footer.site-footer a { color: var(--sand); }
footer.site-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Footer links ---------- */
footer.site-footer .footer-links a { margin: 0 4px; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Accessibility toolbar ---------- */
:root { --a11y-font-scale: 1; }
body { font-size: calc(1em * var(--a11y-font-scale)); }

#a11y-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--forest-dark);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
}
#a11y-toggle:hover { opacity: 0.9; }
#a11y-toggle:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }

#a11y-panel {
  position: fixed;
  bottom: 82px;
  right: 20px;
  z-index: 9999;
  width: 264px;
  max-width: calc(100vw - 40px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  padding: 18px;
  font-size: 15px;
}
#a11y-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--ink);
}
#a11y-panel .a11y-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 6px; }
#a11y-panel .a11y-row span { color: var(--ink-soft); font-size: 0.9rem; }
#a11y-panel .a11y-row button {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: var(--sand);
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.a11y-toggle-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}
.a11y-toggle-btn.active { background: var(--clay); color: var(--forest-dark); border-color: var(--clay-dark); }
.a11y-toggle-btn:last-child { margin-bottom: 0; }

body.a11y-high-contrast { background: #000 !important; color: #fff !important; }
body.a11y-high-contrast p, body.a11y-high-contrast li, body.a11y-high-contrast span { color: #fff !important; }
body.a11y-high-contrast h1, body.a11y-high-contrast h2, body.a11y-high-contrast h3, body.a11y-high-contrast h4 { color: #fff !important; }
body.a11y-high-contrast a { color: #ffe14d !important; }
body.a11y-high-contrast .site-header, body.a11y-high-contrast .site-footer { background: #000 !important; border-color: #fff; }
body.a11y-high-contrast .card, body.a11y-high-contrast .opening, body.a11y-high-contrast #a11y-panel { background: #000 !important; border-color: #fff !important; }
body.a11y-underline-links a { text-decoration: underline !important; }
body.a11y-readable-font, body.a11y-readable-font * { font-family: Arial, Helvetica, sans-serif !important; letter-spacing: 0.01em; line-height: 1.7 !important; }
.small { font-size: 0.88rem; color: var(--ink-soft); }
