/* ============================================================
   Temi Alao · Academic Portfolio
   Watercolor-globe theme (matched to business card)
   Cormorant Garamond + EB Garamond · MOBILE FIRST
   ============================================================ */

:root {
  --bg-page: #FCFCFC;
  --bg-soft: #F5F4F1;
  --surface: #FFFFFF;
  --bg-feature: #3A3A3A;

  --ink: #3A3A3A;
  --text-secondary: #5A5854;
  --text-muted: #8B8880;
  --on-dark: #F1EFEA;
  --on-dark-soft: #C9C6BF;

  --accent: #35809E;          /* watercolor sea blue */
  --accent-strong: #2A6981;
  --blue-100: #E3EEF3;
  --green: #6F8F55;           /* watercolor land green */
  --sage: #8FA878;
  --earth: #D08A3E;           /* warm ochre from the figures */

  --border: #E7E5E0;
  --border-dark: #55534E;

  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', 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(--serif);
  background: var(--bg-page);
  color: var(--ink);
  font-size: 17px;
  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(--display); font-weight: 500;
  font-size: clamp(34px, 9.5vw, 64px); line-height: 1.12;
  letter-spacing: 0.26em; text-transform: uppercase; text-indent: 0.26em;
  color: var(--ink);
}
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 8vw, 38px); line-height: 1.16; letter-spacing: 0.015em; color: var(--ink); }
h3 { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.28; letter-spacing: 0.01em; 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-family: var(--serif); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: lowercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow-line { width: 24px; height: 1px; background: currentColor; display: inline-block; transform-origin: left center; }
.eyebrow-gold, .eyebrow-earth { color: var(--earth); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 3px;
  font-family: var(--serif); font-size: 14.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: lowercase;
  text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--bg-page); border: 1px solid var(--ink); }
.btn-primary:hover { background: #262626; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58,58,58,0.16); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border-dark); }
.btn-secondary:hover { border-color: var(--ink); background: var(--bg-soft); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(252,252,252,0.78); transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.nav.scrolled { background: rgba(252,252,252,0.94); 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.2; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); }
.brand-sub { font-family: var(--serif); font-size: 10.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: lowercase; 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: 1px solid var(--border); border-radius: 3px; cursor: pointer; }
.menu-btn span { display: block; width: 16px; height: 1.5px; 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(5.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.mobile-menu { display: none; flex-direction: column; padding: 4px 22px 18px; background: rgba(252,252,252,0.98); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 0; font-size: 17px; font-weight: 500; letter-spacing: 0.12em; text-transform: lowercase; 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 (card front) ---------- */
.hero { padding: 30px 0 56px; }
.hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.hero-globe { width: min(430px, 86vw); height: auto; }
.hero-center h1 { margin-top: 4px; }
.hero-tag {
  font-family: var(--serif); font-size: clamp(14px, 3.6vw, 18px);
  letter-spacing: 0.24em; text-transform: lowercase; text-indent: 0.24em;
  color: var(--text-secondary);
}
.tag-sep { color: var(--text-muted); padding: 0 0.35em; }
.hero-center .lead { max-width: 52ch; margin-top: 8px; }
.locations { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.loc { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; letter-spacing: 0.06em; color: var(--text-muted); }
.cta-row { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; margin-top: 6px; }
.cta-row .btn { width: 100%; }

/* ---------- About ---------- */
.about-row { display: flex; flex-direction: column; gap: 24px; }
.portrait-wrap { width: 100%; max-width: 300px; display: flex; flex-direction: column; align-items: center; margin: 4px 0 14px; }
.stem { width: 106px; height: 134px; margin-top: -4px; color: var(--green); }
.portrait { width: 100%; aspect-ratio: 380 / 420; border-radius: 4px; overflow: hidden; border: 1px solid var(--border); background: var(--blue-100); box-shadow: 0 16px 38px rgba(58,58,58,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; letter-spacing: 0.12em; color: var(--text-muted); }
.pull-quote { font-family: var(--display); font-size: 25px; font-weight: 500; line-height: 1.3; color: var(--green); margin: 2px 0 6px; }
.quote-attr { font-size: 13px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.about-body { display: flex; flex-direction: column; gap: 18px; }
.about-paras { 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: 14px; font-weight: 500; letter-spacing: 0.1em; color: var(--accent); order: -1; }
.ed-school { color: var(--text-secondary); }
.ed-note { font-size: 15px; 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: 4px; padding: 18px 20px; }
.appt-title { font-size: 12.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: lowercase; color: var(--earth); margin-bottom: 4px; }
.appt-sub { font-size: 15px; 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: 10px 19px; font-size: 15.5px; font-weight: 500; letter-spacing: 0.02em; 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(--accent); box-shadow: 0 8px 18px rgba(58,58,58,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: 6px; padding: 36px 26px; }
.feature-body { position: relative; z-index: 2; max-width: 760px; }
.feature .eyebrow { display: flex; flex-wrap: wrap; padding-right: 64px; }
.feature-title { color: #FFFFFF; font-family: var(--display); font-weight: 600; font-size: clamp(30px, 8vw, 48px); line-height: 1.1; letter-spacing: 0.02em; 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: 500; letter-spacing: 0.08em; padding: 7px 15px; border-radius: 999px; background: rgba(255,255,255,0.10); }
.feature-globe { position: absolute; z-index: 1; top: 20px; right: 16px; width: 62px; height: 62px; opacity: 0.95; }

/* ---------- Publications ---------- */
.pub-group { font-size: 13.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: lowercase; color: var(--earth); 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: 15px; 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: 4px; 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(58,58,58,0.10); }
.hi-big { font-family: var(--display); font-weight: 600; font-size: 46px; line-height: 1.05; color: var(--accent); margin-bottom: 6px; }
.hi-card h3 { margin-bottom: 6px; }
.hi-sub { font-size: 15px; color: var(--text-muted); }
.two-col { display: flex; flex-direction: column; gap: 30px; }
.list-title { font-size: 13.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: lowercase; color: var(--earth); margin-bottom: 8px; }
.li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 16px; }
.li-year { font-size: 14px; font-weight: 500; color: var(--accent); flex: 0 0 46px; }
.bullet { display: flex; gap: 11px; padding: 9px 0; color: var(--text-secondary); font-size: 16px; }
.bullet .dot { margin-top: 9px; }

/* ---------- Contact (card back) ---------- */
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; 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 28px; }
.contact-grid { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-bottom: 30px; }
.contact-globe { width: min(240px, 62vw); height: auto; }
.contact-divider { width: 44px; height: 1px; background: var(--border-dark); }
.contact-info { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.contact-name { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: 0.3em; text-transform: uppercase; text-indent: 0.3em; color: var(--ink); margin-bottom: 6px; }
.contact-line { font-family: var(--serif); font-size: 17px; letter-spacing: 0.12em; color: var(--text-secondary); text-decoration: none; transition: color 0.2s var(--ease); }
a.contact-line:hover { color: var(--accent); }
.contact-addr { font-size: 15px; letter-spacing: 0.06em; line-height: 1.75; color: var(--text-muted); margin-top: 10px; }
.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(--display); font-size: 18px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.footer-sub { font-size: 14px; letter-spacing: 0.08em; color: var(--on-dark-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 14.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: lowercase; 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.
   NOTE: keep a small unclipped sliver (94%, not 100%+) — Chromium's
   IntersectionObserver respects clip-path, and a fully clipped element
   never intersects, so it would never reveal. Opacity 0 hides the sliver. */
.wipe { clip-path: inset(0 0 94% 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; } }

/* hero globe drifts up softly, like the card art settling into place */
.hero-globe.hero-anim { transform: translateY(26px) scale(0.97); animation-name: globeIn; animation-duration: 1.1s; }
@keyframes globeIn { to { opacity: 1; transform: none; } }

/* portrait blooms in (scroll-triggered in About) */
.portrait-wrap { opacity: 0; }
.portrait-wrap.bloom { opacity: 1; transition: opacity 0.4s ease; }
.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 beneath the headshot */
.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 globe fades gently into view (JS drives its scroll transform) */
.feature-globe { opacity: 0; transition: opacity 0.8s ease 0.3s; }
.reveal-feature.in .feature-globe { opacity: 0.95; }

/* 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; justify-content: center; max-width: none; }
  .cta-row .btn { width: auto; }
  .feature { padding: 56px; }
  .feature .eyebrow { padding-right: 0; }
  .feature-globe { width: 78px; height: 78px; top: 36px; right: 40px; }
  .contact-grid { flex-direction: row; justify-content: center; gap: 44px; text-align: left; }
  .contact-divider { width: 1px; height: 220px; align-self: center; }
  .contact-info { align-items: flex-start; }
  .contact-name { text-indent: 0; }
  .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: 18px; }
  .nav-inner { padding: 20px 0; gap: 24px; }
  .nav-links { display: flex; gap: 28px; margin-left: auto; }
  .nav-links a { font-family: var(--serif); font-size: 14.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: lowercase; color: var(--text-secondary); text-decoration: none; position: relative; }
  .nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px; 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: 9px 20px; font-size: 13.5px; }
  .menu-btn { display: none; }

  .hero { padding: 48px 0 92px; }
  .hero-globe { width: min(500px, 46vw); }
  .hero-center .lead { font-size: 20px; }

  .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; }
  .eyebrow .eyebrow-line { transform: none !important; }
  .feature-globe { opacity: 0.95 !important; transform: none !important; }
  .portrait-wrap { opacity: 1 !important; }
  .portrait-wrap .portrait { clip-path: none !important; transform: none !important; }
  .stem .stem-line { stroke-dashoffset: 0 !important; }
  .stem .leaf { opacity: 1 !important; transform: none !important; }
  * { transition-duration: 0.001s !important; }
}
