/* ===========================================================
   Rim H. Chaif — academic site
   Palette: deep navy, warm gold, ivory, ink
   Type: Fraunces (display) + Inter (body)
   =========================================================== */

:root {
  --navy: #16263f;
  --navy-deep: #0f1c30;
  --gold: #b08442;
  --gold-soft: #c79a55;
  --ivory: #f7f4ee;
  --paper: #ffffff;
  --ink: #23303f;
  --ink-soft: #4a5768;
  --line: #e4ddcf;
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--navy);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 0.5em;
}

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

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand a { color: var(--navy); text-decoration: none; }
.brand .name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}
.brand .tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink);
  font-size: 0.94rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-links a.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--navy);
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0 4px;
  }
  .nav-links.open { display: flex; }
  .nav-inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  margin-bottom: 12px;
}
.hero h1 .credential { color: var(--gold); font-style: italic; font-size: 0.55em; }
.hero .eyebrow {
  color: var(--gold);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  line-height: 1.4;
}
.hero p.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 46ch; }
.hero-photo {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #dfe4ea 0%, #cbd3dc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7787;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
  border: 1px solid var(--line);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.btn-row { display: flex; gap: 14px; margin: 28px 0 20px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); text-decoration: none; }
.btn-ghost { border: 1px solid var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; text-decoration: none; }

.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.social-row a:hover { background: var(--gold); text-decoration: none; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; padding: 40px 0; gap: 32px; }
  .hero-photo { max-width: 320px; }
}

/* ---------- Page header (interior pages) ---------- */
.page-head {
  background: var(--navy);
  color: #fff;
  padding: 56px 0 48px;
}
.page-head h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); }
.page-head .eyebrow {
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.page-head p { color: #d6dce4; max-width: 62ch; margin: 0; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section.tight { padding: 40px 0; }
.section-eyebrow {
  text-align: center;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-eyebrow::before,
.section-eyebrow::after { content: "— "; }
.section-eyebrow::after { content: " —"; }

h2.center { text-align: center; }

/* ---------- Highlights strip ---------- */
.highlights {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hl {
  padding: 32px 18px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.hl:last-child { border-right: none; }
.hl .icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ivory);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.3rem;
}
.hl .big { font-family: "Fraunces", serif; font-size: 1.7rem; color: var(--navy); font-weight: 600; }
.hl h4 { font-size: 0.95rem; margin: 4px 0 8px; }
.hl p { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) {
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .hl { border-bottom: 1px solid var(--line); }
  .hl:nth-child(odd) { border-right: 1px solid var(--line); }
  .hl:nth-child(even) { border-right: none; }
}

/* ---------- Featured research (dark band) ---------- */
.research-band { background: var(--navy); color: #fff; }
.research-band .section-eyebrow { color: var(--gold-soft); }
.research-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 32px;
}
.research-grid .ra { border-left: 1px solid rgba(255,255,255,0.18); padding-left: 20px; }
.research-grid .ra .icon { color: var(--gold-soft); font-size: 1.6rem; margin-bottom: 12px; }
.research-grid .ra h4 { color: #fff; font-size: 1.02rem; }
.research-grid .ra p { color: #c7cfda; font-size: 0.86rem; margin: 0; }
@media (max-width: 820px) { .research-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .research-grid { grid-template-columns: 1fr; } }

/* ---------- Cards / lists ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 28px;
  margin-bottom: 22px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.meta { color: var(--gold); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; }
.muted { color: var(--ink-soft); }

.pub-list { list-style: none; padding: 0; margin: 0; counter-reset: pub; }
.pub-list li {
  padding: 18px 0 18px 44px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pub-list li::before {
  counter-increment: pub;
  content: counter(pub);
  position: absolute;
  left: 0; top: 18px;
  font-family: "Fraunces", serif;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .venue { font-style: italic; color: var(--ink-soft); }
.pub-list .badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 2px 10px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.subhead {
  font-family: "Fraunces", serif;
  color: var(--navy);
  font-size: 1.3rem;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.tag-list li {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--ink);
}

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  padding: 0 0 26px 26px;
  border-left: 2px solid var(--line);
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: 4px;
  width: 12px; height: 12px;
  background: var(--gold);
  border-radius: 50%;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline .yr { color: var(--gold); font-weight: 600; font-size: 0.85rem; }
.timeline h4 { margin: 2px 0 4px; font-size: 1.05rem; }

/* ---------- News ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.news-list .date { color: var(--gold); font-weight: 600; font-size: 0.85rem; }
.news-list h4 { margin: 0 0 4px; font-size: 1.05rem; }
@media (max-width: 620px) { .news-list li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-grid .field { margin-bottom: 8px; }
.contact-grid .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); font-weight: 600; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Quote band ---------- */
.quote-band { background: var(--ivory); text-align: center; padding: 40px 0; border-top: 1px solid var(--line); }
.quote-band p {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--navy);
  margin: 0 auto;
  max-width: 60ch;
}
.quote-band .marks { color: var(--gold); font-size: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #c7cfda;
  padding: 40px 0 32px;
  font-size: 0.9rem;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; align-items: center; }
.site-footer a { color: var(--gold-soft); }
.site-footer .fnav { display: flex; gap: 18px; flex-wrap: wrap; }

.cv-embed {
  width: 100%;
  min-height: 900px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
