/* ==========================================================
   Ealey Lab website styles
   Change the colors below to restyle the whole site.
   ========================================================== */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --navy: #0a2240;          /* dark background (hero, footer) */
  --primary: #004c9b;       /* main blue (links, headings) */
  --primary-dark: #003670;
  --accent: #ffc72c;        /* gold highlight (buttons, underlines) */
  --accent-dark: #b98700;   /* gold that is readable on white */
  --teal: #2bb3a3;          /* secondary highlight */
  --text: #17202e;
  --muted: #5a6577;
  --bg: #ffffff;
  --bg-alt: #f3f6fb;
  --border: #e1e7f0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10,34,64,.05), 0 8px 24px rgba(10,34,64,.06);
  --shadow-lg: 0 2px 4px rgba(10,34,64,.06), 0 18px 40px rgba(10,34,64,.14);
  --max-width: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

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

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; min-height: 68px;
}
.brand {
  color: var(--navy); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  display: flex; align-items: center; gap: 12px;
}
.brand:hover { color: var(--navy); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font); font-size: .85rem; font-weight: 700; letter-spacing: .5px;
}
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--navy); }
.nav-links a.active { background: var(--navy); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--navy); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 12px 24px 18px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero (home) and page banners ---------- */
.hero, .page-title {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(43,179,163,.35), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(0,76,155,.9), transparent 60%),
    linear-gradient(135deg, #0a2240 0%, #0d3566 100%);
}
/* soft translucent droplets in the background */
.hero::before, .hero::after, .page-title::before {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.22), rgba(255,255,255,.03) 60%);
  border: 1px solid rgba(255,255,255,.14);
}
.hero::before { width: 380px; height: 380px; right: 6%; top: 50%; transform: translateY(-50%); animation: float 9s ease-in-out infinite; }
.hero::after  { width: 170px; height: 170px; right: 30%; bottom: -50px; animation: float 11s ease-in-out infinite reverse; }
.page-title::before { width: 260px; height: 260px; right: 8%; top: -90px; }
@keyframes float { 0%,100% { margin-top: 0; } 50% { margin-top: -18px; } }

.hero { padding: 120px 0 110px; }
.hero .container, .page-title .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; margin: 0 0 22px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.2rem; max-width: 620px; color: rgba(255,255,255,.86); margin: 0 0 34px; }

.page-title { padding: 76px 0 64px; }
.page-title h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1.1; margin: 0 0 10px; }
.page-title p { margin: 0; color: rgba(255,255,255,.82); max-width: 680px; font-size: 1.08rem; }
.page-title a { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  background: var(--accent); color: var(--navy); text-decoration: none; font-weight: 600;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 6px 18px rgba(255,199,44,.3);
}
.btn:hover { color: var(--navy); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,199,44,.4); }
.btn.outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.55); margin-left: 10px; box-shadow: none; }
.btn.outline:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
section.alt { background: var(--bg-alt); }
h2 {
  font-family: var(--font-display); font-weight: 600; color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.2; margin: 0 0 28px;
}
h2::after { content: ""; display: block; width: 52px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 14px; }
h3 { margin: 0 0 8px; color: var(--navy); }
.lead { font-size: 1.15rem; color: #2a3547; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfd9e8; }
.card p { margin: 0; color: var(--muted); }
.card h3 { font-size: 1.12rem; }

.icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center; color: var(--primary);
  background: linear-gradient(135deg, rgba(0,76,155,.1), rgba(43,179,163,.16));
}
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Image placeholder — replace with <img src="..." alt="..."> */
.placeholder-img {
  background: repeating-linear-gradient(45deg, #e8ecf2, #e8ecf2 10px, #f1f4f8 10px, #f1f4f8 20px);
  border-radius: var(--radius); display: grid; place-items: center;
  color: var(--muted); font-size: .85rem; text-align: center; aspect-ratio: 16 / 10;
}

/* ---------- Research page ---------- */
.research-block { display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: start; }
.research-block .num {
  font-family: var(--font-display); font-weight: 600; font-size: 3.4rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--primary); opacity: .55;
}
.research-block h2 { margin-bottom: 20px; }
.research-block p { margin: 0 0 14px; }
.paper-link {
  display: inline-block; margin-top: 6px; padding: 12px 18px; border-radius: 12px;
  background: #fff; border: 1px solid var(--border); font-size: .95rem; color: var(--muted);
}
section:not(.alt) .paper-link { background: var(--bg-alt); }
@media (max-width: 640px) { .research-block { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- People ---------- */
.avatar {
  width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 2.6rem; font-weight: 600;
  box-shadow: 0 10px 24px rgba(0,76,155,.25);
}
.avatar.square { width: 220px; height: 220px; margin: 0; border-radius: 24px; font-size: 4.2rem; }
.person { text-align: center; }
.person img { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; object-fit: cover; }
.person h3 { font-size: 1.08rem; margin-bottom: 4px; }
.role { color: var(--accent-dark); font-weight: 600; font-size: .9rem; }
.person .links { margin-top: 14px; font-size: .88rem; display: flex; gap: 8px; justify-content: center; }
.person .links a, .pi .links a {
  text-decoration: none; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; font-weight: 500; transition: all .15s;
}
.person .links a:hover, .pi .links a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.pi { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.pi img { width: 220px; height: 220px; border-radius: 24px; object-fit: cover; }
.pi h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin-bottom: 2px; }
.pi .links { display: flex; gap: 8px; flex-wrap: wrap; font-size: .9rem; margin-top: 18px; }
@media (max-width: 640px) { .pi { grid-template-columns: 1fr; } }

.alumni { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.alumni li { padding: 16px 20px; border-radius: 12px; background: var(--bg-alt); border-left: 4px solid var(--teal); }
.alumni li span { display: block; color: var(--muted); font-size: .92rem; }

/* ---------- Publications ---------- */
.pub-year {
  font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--navy);
  display: flex; align-items: center; gap: 16px; margin: 48px 0 16px;
}
.pub-year:first-of-type { margin-top: 0; }
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pub {
  padding: 20px 24px; margin-bottom: 12px; border-radius: 14px; background: #fff;
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  transition: transform .15s, box-shadow .15s;
}
.pub:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.pub .title { font-weight: 600; color: var(--navy); line-height: 1.45; }
.pub .authors { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.pub .authors .me { font-weight: 700; color: var(--text); }
.pub .venue { font-style: italic; font-size: .95rem; margin-top: 4px; color: var(--primary); }
.pub .tags a {
  font-size: .78rem; font-weight: 600; text-decoration: none; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border); margin: 10px 6px 0 0; display: inline-block; transition: all .15s;
}
.pub .tags a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- News ---------- */
.news-item { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.news-item .date { color: var(--accent-dark); font-weight: 600; font-size: .9rem; }
@media (max-width: 560px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Call-to-action band ---------- */
.cta {
  border-radius: 24px; padding: 48px; color: #fff; text-align: center;
  background:
    radial-gradient(500px 300px at 90% 0%, rgba(43,179,163,.4), transparent 60%),
    linear-gradient(135deg, #0a2240 0%, #004c9b 100%);
}
.cta h2 { color: #fff; margin-bottom: 12px; }
.cta h2::after { margin-left: auto; margin-right: auto; }
.cta p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 56px 0 28px; font-size: .92rem; border-top: 4px solid var(--accent); }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-bottom: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; font-size: .82rem; }

/* ---------- Scroll-in animation (added by site.js) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero::after { animation: none; }
  html { scroll-behavior: auto; }
}
