/* Modern Academic Homepage – Haggai Maron */

:root {
  --navy:        #1e3a5f;
  --navy-dark:   #0f2744;
  --navy-light:  #eaecf1;
  --navy-pale:   #f5f6f9;
  --blue:        #2d6ea8;
  --text:        #1a2332;
  --text-muted:  #5a6a7a;
  --text-light:  #8a9aaa;
  --border:      #c0cdd8;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 6px 24px rgba(0,0,0,0.13);
  --radius:      10px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: #f3f4f6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

/* ─── Layout ─── */
.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ═══════════════════════════════════════
   HEADER — dark navy identity bar
═══════════════════════════════════════ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--navy-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

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

.nav-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-name:hover { color: rgba(255,255,255,0.85); text-decoration: none; }

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

header nav ul li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}

header nav ul li a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #fff;
  font-size: 1.3rem;
}

/* ═══════════════════════════════════════
   MAIN
═══════════════════════════════════════ */
main { padding-top: 58px; }

/* ═══════════════════════════════════════
   ABOUT
═══════════════════════════════════════ */
#about {
  padding: 2.5rem 0 2rem;
  background: #f3f4f6;
}

/* ── Profile card ── */
.about-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-top {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

/* Circular photo */
.about-photo {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.about-photo img {
  width: 185px;
  height: 185px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 4px solid var(--navy);
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.22);
  display: block;
}

.about-bio {
  flex: 1;
  min-width: 0;
}

.about-bio h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.about-position {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-position strong {
  color: var(--navy);
  font-weight: 600;
}

.about-position a { color: var(--text-muted); font-weight: 500; }
.about-position a:hover { color: var(--blue); }

/* Affiliation chips */
.affil-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: 99px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.chip:hover { opacity: 0.85; text-decoration: none; }

.chip-blue {
  background: var(--navy-light);
  color: var(--navy-dark);
  border: 1px solid #a8c0dc;
}

.chip-dark {
  background: #1a2332;
  color: #fff;
  border: 1px solid #1a2332;
}

.about-bio p {
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.72;
  margin-bottom: 0.8rem;
}

.contact-line {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8eef0;
}

/* ── Subsection grids (Group+News, Talks+Teaching) ── */
.about-subsections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.sub-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.75rem;
}

.sub-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--navy-light);
}

.member-category {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.8rem;
  margin-bottom: 0.35rem;
  display: block;
}

.member-list {
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.9;
}

.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.6;
  padding: 0.5rem 0 0.5rem 0.9rem;
  border-bottom: 1px solid #eceef1;
  position: relative;
}

.news-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

.news-list li:last-child { border-bottom: none; }

/* ── Talks & Media list ── */
.talks-list {
  list-style: none;
  padding: 0;
}

.talks-list li {
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.6;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-bottom: 1px solid #eceef1;
  position: relative;
}

.talks-list li:last-child { border-bottom: none; }

.talks-list li::before {
  position: absolute;
  left: 0;
  top: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.talk-yt::before {
  content: '▶';
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #cc1111;
  color: #fff;
  font-size: 0.45rem;
  padding-left: 1px;
}

.talk-pod::before {
  content: '◉';
  color: var(--blue);
  font-size: 0.85rem;
}

/* ── Teaching card (also used as a sub-card) ── */
.teaching-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.75rem;
  margin-bottom: 0;
}

.teaching-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--navy-light);
}

.teaching-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.teaching-list li {
  font-size: 0.85rem;
  color: #374151;
}

/* ═══════════════════════════════════════
   PUBLICATIONS
═══════════════════════════════════════ */
#publications {
  background: var(--navy-light);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3.5rem;
}

#publications > .container > h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Publication card — white card on blue-grey bg */
.pub-card {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 3px solid transparent;
}

.pub-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
  border-left-color: var(--blue);
}

.pub-img {
  flex: 0 0 150px;
  max-width: 150px;
  align-self: flex-start;
}

.pub-img img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
  object-fit: cover;
}

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.pub-authors {
  font-size: 0.825rem;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.2rem;
}

.pub-award {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c81e1e;
  margin: 0.25rem 0;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  align-items: center;
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 500;
  color: #374151;
  background: #f4f6f9;
  border: 1px solid #c0cdd8;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.6;
}

.btn:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  text-decoration: none;
}

.btn::after {
  content: ' \2197';
  font-size: 0.7em;
  opacity: 0.5;
}

.btn:hover::after {
  opacity: 0.8;
}

/* Logo in about section */
.about-logo {
  display: block;
  max-width: 220px;
  height: auto;
  margin: 0.8rem 0 0.2rem;
  border-radius: 6px;
  opacity: 0.88;
}

/* Abstract toggle */
details.abstract-toggle {
  display: inline;
}

details.abstract-toggle summary {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 500;
  color: #374151;
  background: #f4f6f9;
  border: 1px solid #c0cdd8;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  list-style: none;
  white-space: nowrap;
  line-height: 1.6;
  font-family: inherit;
}

details.abstract-toggle summary::-webkit-details-marker { display: none; }

details.abstract-toggle summary::after {
  content: '▾';
  font-size: 0.65rem;
  margin-left: 0.15rem;
}

details.abstract-toggle[open] summary::after { content: '▴'; }

details.abstract-toggle summary:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.abstract-text {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--navy-pale);
  border-left: 3px solid var(--blue);
  border-radius: 0 5px 5px 0;
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.65;
  max-width: 660px;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: var(--navy-dark);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

footer a { color: rgba(255,255,255,0.75); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 720px) {
  html { font-size: 14px; }

  .nav-toggle { display: block; }

  header nav {
    display: none;
    position: absolute;
    top: 58px;
    left: 0; right: 0;
    background: var(--navy-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 1.5rem 1rem;
  }

  header nav.open { display: block; }

  header nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .about-card { padding: 1.5rem; }

  .about-top {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-photo {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }

  .about-photo img {
    width: 110px;
    height: 110px;
  }

  .about-subsections {
    grid-template-columns: 1fr;
  }

  .pub-card {
    flex-direction: column;
    gap: 1rem;
  }

  .pub-img {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .nav-inner { padding: 0 1rem; }
  .about-bio h1 { font-size: 1.6rem; }
}
