/* ==========================================================================
   Home page
   ========================================================================== */

.home-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 110px;
  overflow: hidden;
  isolation: isolate;
}
.home-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 22% 50%, rgba(7,10,20,.88) 0%, rgba(7,10,20,.55) 45%, rgba(7,10,20,0) 75%),
    linear-gradient(0deg, var(--ink-0) 0%, transparent 25%);
}
.home-name {
  font-size: clamp(56px, 11vw, 148px);
  font-weight: 300;
  line-height: .95;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  margin-top: 22px;
}
.home-name em { color: var(--gold); }
.home-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 32px);
  color: var(--cream);
  margin: 22px 0 0;
  font-weight: 300;
}
.home-lede { max-width: 52ch; color: var(--muted); font-size: 17px; margin: 18px 0 34px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-eq {
  position: absolute;
  right: var(--gutter);
  bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--faint);
  font-size: 13px;
}
.hero-eq span:first-child { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.hero-eq .katex { color: var(--muted); }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--gold);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@media (max-width: 700px) { .hero-eq { display: none; } }

.home-section { padding: clamp(80px, 11vw, 140px) 0 0; scroll-margin-top: var(--nav-h); }
.home-section .section-title { max-width: 20ch; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { font-size: 18px; color: var(--text); margin: 0 0 16px; max-width: 60ch; }
.about-text p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 64px;
  line-height: .9;
  padding: 6px 10px 0 0;
  color: var(--gold);
}
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.facts li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17,24,48,.45);
  font-size: 15px;
}
.facts span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }

/* Research */
.interest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 760px) { .interest-grid { grid-template-columns: 1fr; } }
.interest {
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24,33,61,.55), rgba(11,16,32,.55));
  transition: border-color .3s, transform .3s var(--ease);
}
.interest:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.interest-num { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.interest h3 { font-size: 24px; margin: 10px 0 10px; }
.interest p { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.interest .eq { overflow-x: auto; overflow-y: hidden; color: var(--cream); padding-top: 12px; border-top: 1px dashed var(--line); }
.interest .eq .katex { font-size: 1.05em; }
.pubs-note {
  margin-top: 22px;
  padding: 16px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
}

/* Teaching & projects cards */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  margin-top: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(227,194,122,.08), rgba(11,16,32,.6) 55%);
  color: var(--text);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.feature:hover { color: var(--text); transform: translateY(-4px); box-shadow: 0 30px 80px -40px rgba(227,194,122,.35); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }
.feature-body { padding: clamp(24px, 3.5vw, 40px); }
.feature-body h3 { font-size: clamp(26px, 3vw, 34px); margin: 14px 0 12px; }
.feature-body p { color: var(--muted); margin: 0 0 18px; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.feature-cta { display: inline-flex; gap: 8px; align-items: center; color: var(--gold); font-weight: 500; }
.feature-art { position: relative; min-height: 260px; border-left: 1px solid var(--line); background: rgba(7,10,20,.5); }
@media (max-width: 860px) { .feature-art { border-left: 0; border-top: 1px solid var(--line); } }
.feature-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.module-dots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 6px 0 20px; }
.module-dots i { height: 6px; border-radius: 3px; background: var(--ink-3); }
.module-dots i.on { background: var(--gold); }
.module-dots-label { font-size: 13px; color: var(--faint); }

.code-art {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  overflow: hidden;
  white-space: pre;
}
.code-art b { color: var(--gold); font-weight: 400; }
.code-art i { color: var(--faint); font-style: normal; }

/* Contact */
.contact-card {
  margin-top: 40px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 0% 0%, rgba(227,194,122,.12), transparent 60%), rgba(17,24,48,.5);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: center;
}
.contact-card p { margin: 0; color: var(--muted); max-width: 46ch; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
