/* ===========================================================
   Hadar Averbuch-Elor — website_v2
   A prettier take on the academic homepage, inspired by the
   editorial navy/lavender palette and wide-letterspaced
   headings of hadarelor.com, rebuilt as an original design.
=========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,500&family=Caveat:wght@600&display=swap');

:root {
  --ink: #182153;         /* deep navy - headings, primary text */
  --ink-soft: #3c4166;    /* softened navy for body copy */
  --muted: #6b7094;       /* muted slate for secondary text */
  --accent: #51587e;      /* slate-indigo band */
  --accent-dark: #171b2c; /* near-black navy for dark sections */
  --lavender: #aeb4d4;    /* soft lavender accent */
  --lavender-bg: #eceefa; /* very light lavender for pills/hovers */
  --bg: #f6f6f9;          /* page background, off-white */
  --card: #ffffff;
  --line: #e4e5f0;
  --shadow: 0 10px 30px -12px rgba(24, 33, 83, 0.18);
  --shadow-hover: 0 18px 40px -14px rgba(24, 33, 83, 0.28);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Section heading kicker ---------- */
.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-heading {
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: 0.5px;
  color: var(--ink);
  margin: 0 0 8px;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 44px;
  max-width: 640px;
}

.section-head-block { margin-bottom: 8px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover { color: var(--ink); border-bottom-color: var(--lavender); }

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

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--accent) 0%, #6a7099 100%);
  padding: 76px 0 92px;
  color: #fff;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
}

.hero-photo {
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 16px;
  max-width: 620px;
  text-align: justify;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.social-row a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.social-row a:hover {
  background: #fff;
  color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- Publications ---------- */
.pubs-section { padding: 88px 0; }

.year-subhead {
  margin-top: 52px;
  color: var(--muted);
  border-bottom-color: var(--line);
  font-size: 0.85rem;
}

.year-subhead:first-of-type { margin-top: 0; }

.pub-extra {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9a6b1f;
  background: #fdf3e2;
  padding: 3px 9px;
  border-radius: 20px;
  align-self: flex-start;
  margin-top: 2px;
}

.pub-extra::before { content: '\2605'; font-size: 0.75rem; }

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 320px);
  justify-content: start;
  gap: 26px;
}

.pub-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.pub-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--lavender-bg);
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: transform 0.4s ease;
}

.pub-card:hover .pub-thumb img { transform: scale(1.03); }

.pub-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pub-venue {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--lavender-bg);
  padding: 4px 10px;
  border-radius: 20px;
}

.pub-title {
  font-size: 1.03rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

.pub-title a:hover { color: var(--accent); text-decoration: underline; }

.pub-authors {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.pub-authors .me { color: var(--ink); font-weight: 600; }

/* ---------- Group ---------- */
.group-section {
  padding: 88px 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.group-subhead {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 48px 0 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lavender);
  display: inline-block;
}

.group-subhead:first-of-type { margin-top: 0; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 34px 26px;
}

.member-card { text-align: center; }

.member-photo {
  width: 150px;
  height: 150px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  outline: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.member-card:hover .member-photo {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.member-photo img { width: 100%; height: 100%; object-fit: cover; }

.member-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lavender-bg);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.3rem;
}

.member-name {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.member-name[href]:hover { color: var(--accent); text-decoration: underline; }

.member-note {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.alumni-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 40px;
}

.alumni-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.alumni-name { color: var(--ink-soft); font-weight: 400; }
.alumni-name[href]:hover { color: var(--accent); text-decoration: underline; }

.alumni-note {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ---------- Contact ---------- */
.contact-section {
  background: var(--accent-dark);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.contact-section .kicker { color: var(--lavender); }
.contact-section .section-heading { color: #fff; }

.contact-block { margin-top: 28px; }

.contact-block p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
}

.contact-block strong { color: #fff; font-weight: 600; }

.contact-email {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-dark);
  background: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-email:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,0.4);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--accent-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .pub-grid { grid-template-columns: 1fr; }
  .alumni-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { max-width: 220px; margin: 0 auto; }
  .social-row { justify-content: center; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}
