/* ============================================================
   Temi Alao · Academic Portfolio
   Editorial-botanical · EB Garamond + Inter · MOBILE FIRST
   ============================================================ */

:root {
  --bg-page: #F7F5EC;
  --bg-soft: #F1EDE0;
  --surface: #FFFFFF;
  --bg-feature: #13314C;

  --ink: #13314C;
  --text-secondary: #3D5066;
  --text-muted: #6E7E8F;
  --on-dark: #EAF2F8;
  --slate-300: #8499A8;

  --accent: #2F6DA3;
  --accent-strong: #255B8A;
  --blue-100: #DBE9F3;
  --botanical: #4E7A5E;
  --sage: #8AAB8E;

  --sunflower: #E2A12E;
  --sunflower-300: #EFC56A;
  --sunflower-100: #F7EAC9;

  --border: #E9E3D2;
  --border-dark: #36506B;

  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg-page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }

/* ---------- MOBILE-FIRST base ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 13vw, 70px); line-height: 1.04; letter-spacing: 0; color: var(--ink); }
h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 7.5vw, 34px); line-height: 1.16; letter-spacing: -0.01em; color: var(--ink); }
h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.28; color: var(--ink); }
.serif { font-family: var(--serif); }
.lead { font-size: 18px; color: var(--text-secondary); }
.lead.serif { font-size: 20px; line-height: 1.5; }
.narrow { max-width: 720px; }
a { color: inherit; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow-line { width: 24px; height: 2px; background: currentColor; display: inline-block; transform-origin: left center; }
.eyebrow-gold { color: var(--sunflower); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-blue { background: var(--accent); }
.dot-green { background: var(--botanical); }
.dot-gold { background: var(--sunflower); }
.dot-sage { background: var(--sage); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 11px;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(19,49,76,0.18); }
.btn-secondary { background: var(--surface); color: var(--accent); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(247,245,236,0.72); transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.nav.scrolled { background: rgba(247,245,236,0.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--border); }
.nav-inner { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); }
.brand-sub { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.nav-links, .nav-cv { display: none; }
.menu-btn { margin-left: auto; display: flex; flex-direction: column; gap: 4px; width: 42px; height: 42px; padding: 11px; background: transparent; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.22s var(--ease), opacity 0.22s var(--ease); }
.menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; flex-direction: column; padding: 4px 22px 18px; background: rgba(247,245,236,0.98); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 0; font-size: 18px; font-weight: 600; color: var(--text-secondary); text-decoration: none; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section h2 { margin-bottom: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 52px; }
.hero-row { display: flex; flex-direction: column; gap: 30px; }
.hero-left { display: flex; flex-direction: column; gap: 18px; }
.hero-left h1 { margin: 2px 0 2px; }
.hero-left .lead { max-width: 34ch; }
.locations { display: flex; flex-wrap: wrap; gap: 18px; }
.loc { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.cta-row { display: flex; flex-direction: column; gap: 12px; }
.cta-row .btn { width: 100%; }

/* photo + stem */
.portrait-wrap { align-self: center; width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; }
.portrait { width: 100%; aspect-ratio: 380 / 420; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--blue-100); box-shadow: 0 18px 44px rgba(19,49,76,0.10); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.portrait.is-empty { display: flex; align-items: center; justify-content: center; }
.portrait.is-empty::after { content: 'Portrait'; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-muted); }
.stem { width: 116px; height: 146px; margin-top: -4px; color: var(--botanical); }

/* ---------- About ---------- */
.about-row { display: flex; flex-direction: column; gap: 24px; }
.pull-quote { font-family: var(--serif); font-size: 24px; line-height: 1.3; color: var(--botanical); margin: 2px 0 6px; }
.quote-attr { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.about-body { display: flex; flex-direction: column; gap: 18px; }
.about-body p { color: var(--text-secondary); }
.placeholder-note { font-size: 13px; font-style: italic; color: var(--text-muted); }

/* ---------- Education ---------- */
.timeline { margin-top: 28px; }
.ed-row { display: flex; flex-direction: column; gap: 5px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.ed-year { font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); order: -1; }
.ed-school { color: var(--text-secondary); }
.ed-note { font-size: 14.5px; color: var(--text-muted); margin-top: 4px; }
.appts { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.appt { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.appt-title { font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sunflower); margin-bottom: 4px; }
.appt-sub { font-size: 14.5px; color: var(--text-secondary); }

/* ---------- Research tags ---------- */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag { display: inline-flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 11px 18px; font-size: 15px; font-weight: 600; color: var(--ink); transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.tag:hover { transform: translateY(-3px); border-color: var(--sunflower); box-shadow: 0 8px 18px rgba(19,49,76,0.08); }
.tag:hover .dot { transform: scale(1.35); }
.tag .dot { transition: transform 0.2s var(--ease); }

/* ---------- Dissertation feature ---------- */
.feature-wrap { padding: 8px 0; }
.feature { position: relative; overflow: hidden; background: var(--bg-feature); color: var(--on-dark); border-radius: 22px; padding: 36px 26px; }
.feature-body { position: relative; z-index: 2; max-width: 760px; }
.feature-title { color: #fff; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 8vw, 46px); line-height: 1.08; margin: 6px 0 16px; }
.feature-text { color: var(--on-dark); font-size: 17px; line-height: 1.62; }
.feature-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.feature-meta li { font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,0.10); }
.feature .eyebrow { display: flex; flex-wrap: wrap; padding-right: 58px; }
.feature-flower { position: absolute; z-index: 1; top: 22px; right: 18px; width: 48px; height: 48px; opacity: 0.95; }

/* ---------- Publications ---------- */
.pub-group { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sunflower); margin: 30px 0 2px; }
.pub { padding: 20px 0; border-bottom: 1px solid var(--border); }
.pub h3 { margin-bottom: 6px; transition: color 0.2s var(--ease); }
.pub:hover h3 { color: var(--accent); }
.pub-meta { font-size: 14.5px; color: var(--text-muted); }

/* ---------- Awards ---------- */
.hi-grid { display: flex; flex-direction: column; gap: 16px; margin: 28px 0; }
.hi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease); }
.hi-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(19,49,76,0.10); }
.hi-big { font-family: var(--serif); font-weight: 700; font-size: 44px; line-height: 1.05; color: var(--accent); margin-bottom: 6px; }
.hi-card h3 { margin-bottom: 6px; }
.hi-sub { font-size: 14.5px; color: var(--text-muted); }
.two-col { display: flex; flex-direction: column; gap: 30px; }
.list-title { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sunflower); margin-bottom: 8px; }
.li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 15.5px; }
.li-year { font-size: 13.5px; font-weight: 600; color: var(--accent); flex: 0 0 46px; }
.bullet { display: flex; gap: 11px; padding: 9px 0; color: var(--text-secondary); font-size: 15.5px; }
.bullet .dot { margin-top: 8px; }

/* ---------- Contact ---------- */
.contact-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 22px; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-title { font-size: clamp(30px, 8vw, 46px); margin: 6px 0 12px; }
.contact-sub { max-width: 540px; margin-bottom: 24px; }
.contact-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.contact-btns .btn { width: 100%; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-feature); color: var(--on-dark); padding: 32px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-name { font-family: var(--serif); font-size: 21px; }
.footer-sub { font-size: 14px; color: var(--slate-300); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 14px; font-weight: 600; color: var(--on-dark); text-decoration: none; opacity: 0.85; }
.footer-links a:hover { opacity: 1; }

/* ============================================================
   ANIMATIONS · subtle, themed, memorable
   ============================================================ */

/* base reveal: rise + fade */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* eyebrow line draws out horizontally */
.eyebrow .eyebrow-line { transform: scaleX(0); transition: transform 0.6s var(--ease-out) 0.1s; }
.reveal.in .eyebrow-line, .in > .eyebrow .eyebrow-line, .eyebrow.in .eyebrow-line, .reveal-feature.in .eyebrow-line { transform: scaleX(1); }

/* heading wipe-up: text revealed by an upward unmask */
.wipe { clip-path: inset(0 0 102% 0); transform: translateY(14px); opacity: 0; transition: clip-path 0.8s var(--ease-out), transform 0.8s var(--ease-out), opacity 0.6s ease; }
.wipe.in { clip-path: inset(0 0 -6% 0); transform: none; opacity: 1; }

/* hero load entrance (no scroll gate) */
.hero-anim { opacity: 0; transform: translateY(18px); animation: heroIn 0.85s var(--ease-out) forwards; animation-delay: calc(var(--d) * 0.11s + 0.15s); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* portrait blooms in */
.portrait-wrap { opacity: 0; }
.portrait-wrap.bloom { opacity: 1; }
.portrait-wrap .portrait { clip-path: inset(100% 0 0 0); transform: scale(1.04); }
.portrait-wrap.bloom .portrait { transition: clip-path 0.9s var(--ease-out) 0.15s, transform 1.1s var(--ease-out) 0.15s; clip-path: inset(0 0 0 0); transform: none; }

/* stem grows + leaves unfurl */
.stem .stem-line { stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200); }
.stem .leaf { opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: 60px 60px; }
.grow .stem-line { transition: stroke-dashoffset 1s var(--ease-out) 0.35s; stroke-dashoffset: 0; }
.grow .leaf { transition: opacity 0.6s ease, transform 0.7s var(--ease-out); }
.grow .leaf-1 { transition-delay: 0.95s; opacity: 1; transform: none; }
.grow .leaf-2 { transition-delay: 1.15s; opacity: 1; transform: none; }

/* dissertation feature ease-up + scale */
.reveal-feature { opacity: 0; transform: translateY(40px) scale(0.985); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal-feature.in { opacity: 1; transform: none; }

/* feature sunflower: whole bloom scales in as one unit */
.feature-flower .sf-bloom { opacity: 0; transform: scale(0.3); transform-box: fill-box; transform-origin: center; }
.reveal-feature.in .feature-flower .sf-bloom { transition: opacity 0.6s ease 0.3s, transform 0.75s var(--ease-out) 0.3s; opacity: 1; transform: none; }

/* staggered group reveals */
.stagger > * { opacity: 0; transform: translateY(18px) scale(0.96); transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1){transition-delay:.02s}.stagger.in > *:nth-child(2){transition-delay:.07s}
.stagger.in > *:nth-child(3){transition-delay:.12s}.stagger.in > *:nth-child(4){transition-delay:.17s}
.stagger.in > *:nth-child(5){transition-delay:.22s}.stagger.in > *:nth-child(6){transition-delay:.27s}
.stagger.in > *:nth-child(7){transition-delay:.32s}.stagger.in > *:nth-child(8){transition-delay:.37s}

/* active nav link */
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }

/* ============================================================
   TABLET / DESKTOP (mobile-first scale-ups)
   ============================================================ */
@media (min-width: 680px) {
  .container { padding: 0 40px; }
  .section { padding: 80px 0; }
  .hi-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
  .appts { flex-direction: row; flex-wrap: wrap; }
  .ed-row { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: start; }
  .ed-year { order: 0; }
  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .cta-row .btn { width: auto; }
  .feature { padding: 56px; }
  .feature .eyebrow { padding-right: 0; }
  .feature-flower { width: 60px; height: 60px; top: 40px; right: 44px; }
  .contact-btns { flex-direction: row; max-width: none; justify-content: center; }
  .contact-btns .btn { width: auto; }
  .footer-inner { flex-direction: row; align-items: center; }
  .footer-links { margin-left: auto; }
}

@media (min-width: 980px) {
  .container { padding: 0 60px; }
  .section { padding: 88px 0; }
  body { font-size: 17px; }
  .nav-inner { padding: 20px 0; gap: 24px; }
  .nav-links { display: flex; gap: 28px; margin-left: auto; }
  .nav-links a { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; position: relative; }
  .nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--accent); transition: width 0.25s var(--ease); }
  .nav-links a:hover { color: var(--accent); }
  .nav-links a:hover::after { width: 100%; }
  .nav-cv { display: inline-flex; padding: 10px 20px; font-size: 14px; }
  .menu-btn { display: none; }

  .hero { padding: 64px 0 84px; }
  .hero-row { flex-direction: row; align-items: center; gap: 64px; }
  .hero-left { flex: 1; gap: 22px; }
  .hero-left .lead { font-size: 20px; }
  .portrait-wrap { flex: 0 0 auto; width: 380px; max-width: 380px; align-self: center; }
  .stem { width: 130px; height: 160px; }

  .about-row { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
  .feature-text { font-size: 19px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-feature, .wipe, .hero-anim, .stagger > * { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; transition: none !important; }
  .portrait-wrap { opacity: 1 !important; }
  .portrait-wrap .portrait { clip-path: none !important; transform: none !important; }
  .eyebrow .eyebrow-line { transform: none !important; }
  .stem .stem-line, .feature-flower .sf-stem { stroke-dashoffset: 0 !important; }
  .stem .leaf, .feature-flower .sf-bloom { opacity: 1 !important; transform: none !important; }
  * { transition-duration: 0.001s !important; }
}
