/* ============================================================
   Academic site — standalone stylesheet
   Loaded only by index.html (the academic default version).
   The design-portfolio version keeps using styles.css.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ac-font: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ac-shell: 1180px;
  --ac-pad-x: clamp(28px, 5.5vw, 72px);
  --ac-col-gap: clamp(28px, 3.2vw, 56px);
  --ac-rail-w: clamp(320px, 30vw, 500px);
  --ac-copy-w: min(740px, calc(100vw - var(--ac-rail-w) - var(--ac-col-gap) - 2 * var(--ac-pad-x)));
  --ac-frame: calc(var(--ac-rail-w) + var(--ac-col-gap) + var(--ac-copy-w));
  --ac-inset: max(var(--ac-pad-x), calc((100vw - var(--ac-frame)) / 2));
  --ac-inset-left: max(20px, calc(var(--ac-inset) - clamp(20px, 2.8vw, 44px)));
  --ac-section-y: clamp(48px, 7vh, 72px);

  --ac-t: 300ms;
  --ac-t-fast: 170ms;
  --ac-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --ac-paper: #ffffff;
  --ac-ink: #101214;
  --ac-ink-2: #3d4248;
  --ac-ink-3: #767d86;
  --ac-line: rgba(16, 18, 20, 0.18);
  --ac-line-soft: rgba(16, 18, 20, 0.09);
  --ac-placeholder: #eeeeee;
  --ac-accent: #255fb8;
  --ac-mark: #8bb3ed;
  --ac-hl: color-mix(in srgb, #058cf2 16%, var(--ac-paper));
  --ac-backdrop: rgba(255, 255, 255, 0.88);
  --ac-card-shadow: 0 2px 10px rgba(20, 22, 26, 0.06);
  --ac-card-shadow-hover: 0 8px 22px rgba(20, 22, 26, 0.1);
}

[data-theme="dark"] {
  --ac-paper: #14161a;
  --ac-ink: #f2f1ee;
  --ac-ink-2: #b6bbc2;
  --ac-ink-3: #7c838b;
  --ac-line: rgba(242, 241, 238, 0.22);
  --ac-line-soft: rgba(242, 241, 238, 0.14);
  --ac-placeholder: #2b2f35;
  --ac-accent: #86b4f0;
  --ac-mark: #4c7ec4;
  --ac-hl: color-mix(in srgb, #058cf2 28%, var(--ac-paper));
  --ac-backdrop: rgba(20, 22, 26, 0.86);
  --ac-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --ac-card-shadow-hover: 0 8px 22px rgba(0, 0, 0, 0.42);
}

/* Match the design-site header: same type, padding, and bar chrome. */
:root {
  --hd-font: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --hd-pad-x: clamp(24px, 5vw, 96px);
  --hd-accent: #0099fd;
  --hd-t: var(--ac-t);
  --hd-t-fast: var(--ac-t-fast);
  --hd-ease: var(--ac-ease);
}
.site-header {
  animation: none;
}
html .site-header .hd-bar {
  background: rgba(255, 255, 255, 0.86);
}
html .site-header.is-stuck .hd-bar {
  padding-block: 13px;
}
html .site-header .hd-actions {
  border-left: 0;
  padding-left: 0;
  margin-left: auto;
}
html .site-header .hd-brand-name {
  font-weight: 600;
  letter-spacing: -0.02em;
}
[data-theme="light"], [data-theme="dark"] {
  --hd-bg: var(--ac-backdrop);
  --hd-panel: var(--ac-paper);
  --hd-surface: color-mix(in srgb, var(--ac-ink) 5%, transparent);
  --hd-on-solid: var(--ac-paper);
  --hd-fg: var(--ac-ink);
  --hd-fg-dim: var(--ac-ink-3);
  --hd-line: var(--ac-line);
  --hd-line-soft: var(--ac-line-soft);
}

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

html {
  font-size: 16px;
  background: var(--ac-paper);
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--ac-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ac-ink);
  background: var(--ac-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--ac-t) var(--ac-ease), color var(--ac-t) var(--ac-ease);
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.ac-shell {
  width: 100%;
  max-width: var(--ac-shell);
  margin: 0 auto;
  padding-inline: var(--ac-pad-x);
  overflow: visible;
}

/* ---------- Hero ---------- */
.ac-hero {
  padding-top: 0;
  padding-bottom: 0;
}
.ac-hero-grid {
  display: grid;
  grid-template-columns: minmax(460px, 0.52fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
}

.ac-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ac-bio {
  display: grid;
  gap: 16px;
  max-width: 67ch;
  padding-top: 2px;
}
.ac-bio p {
  font-size: clamp(1.02rem, 1.2vw, 1.14rem);
  line-height: 1.68;
  color: var(--ac-ink-2);
}
.ac-bio p:first-child {
  font-size: clamp(1.14rem, 1.55vw, 1.38rem);
  line-height: 1.52;
  color: var(--ac-ink);
  letter-spacing: -0.012em;
}

/* ---------- Sections ---------- */
.ac-section { padding-block: var(--ac-section-y); }
.ac-section--compact { padding-block: clamp(28px, 5vh, 50px); }
.ac-section + .ac-section .ac-shell {
  border-top: 1px solid var(--ac-line-soft);
  padding-top: var(--ac-section-y);
}
.ac-section-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.ac-h2 {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: clamp(24px, 4vh, 36px);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ac-ink);
}
.ac-h2-text { position: relative; }
.ac-h2-text::after { display: none; }
.ac-sparkle {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 0;
  fill: var(--ac-mark);
}

/* ---------- Research focus ---------- */
.ac-focus-list {
  display: grid;
  gap: 0;
}
.ac-focus {
  display: grid;
  grid-template-columns: minmax(160px, 0.36fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 40px);
  padding-block: 18px;
  border-top: 1px solid var(--ac-line-soft);
}
.ac-focus:first-child { padding-top: 0; border-top: 0; }
.ac-focus-title {
  font-size: 0.95rem;
  line-height: 1.32;
  font-weight: 600;
}
.ac-focus-body {
  max-width: 68ch;
  font-size: 0.94rem;
  line-height: 1.58;
  color: var(--ac-ink-2);
}

/* ---------- Publications ---------- */
.ac-pub-list {
  display: grid;
  gap: 0;
  overflow: visible;
}
.ac-pub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(168px, 18vw, 218px);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px clamp(22px, 3.4vw, 34px);
  align-items: stretch;
  padding-block: clamp(26px, 4.3vh, 38px);
  border-top: 1px solid var(--ac-line-soft);
  cursor: default;
  overflow: visible;
}
.ac-pub:first-child { padding-top: 0; border-top: 0; }
.ac-pub--clickable { cursor: pointer; }

.ac-pub-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding-top: 2px;
}
.ac-pub-venue {
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.28;
  color: #058cf2;
  letter-spacing: 0;
}
.ac-pub-title {
  font-size: clamp(0.95rem, 1vw, 1rem);
  font-weight: 600;
  line-height: 1.3;
  max-width: none;
  letter-spacing: 0;
}
.ac-pub-authors {
  margin-top: 8px;
  font-size: 0.86rem;
  line-height: 1.42;
  color: var(--ac-ink-2);
}
.ac-pub-authors b { font-weight: 500; color: var(--ac-ink); }

.ac-pub-links {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  gap: 8px 18px;
  min-width: 0;
}
.ac-pub-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 3px;
  font-size: 0.82rem;
  font-weight: 450;
  line-height: 1.2;
  color: var(--ac-ink-2);
  transition: color var(--ac-t-fast) var(--ac-ease);
}
.ac-pub-link span { font-size: 0.9em; }
.ac-pub-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #058cf2;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms var(--ac-ease), opacity 120ms var(--ac-ease);
}
.ac-pub-link.is-active,
.ac-pub-link:hover {
  color: #058cf2;
}
.ac-pub-link.is-active::after,
.ac-pub-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}
.ac-pub-link--disabled {
  color: var(--ac-ink-2);
  cursor: default;
  pointer-events: none;
}
.ac-pub-link--disabled:hover {
  color: var(--ac-ink-2);
}
.ac-pub-link--disabled::after {
  display: none;
}

.ac-pub-thumb {
  --pub-thumb-pad: 0px;
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  justify-self: end;
  align-self: start;
  width: 100%;
  aspect-ratio: 1287 / 864;
  background: transparent;
  overflow: visible;
  border-radius: 0;
}
.ac-pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ac-pub-parallax {
  --pub-parallax-x: 0px;
  --pub-parallax-y: 0px;
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 1287 / 864;
  isolation: isolate;
  cursor: default;
}
.ac-pub-thumb .ac-pub-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.ac-pub-layer-base {
  z-index: 0;
  transform: translate3d(0, 0, 0);
}
.ac-pub-layer-color {
  z-index: 1;
  transform: translate3d(var(--pub-parallax-x), var(--pub-parallax-y), 0);
  transition: transform 160ms var(--ac-ease);
  will-change: transform;
}
.ac-pub--clickable:hover .ac-pub-layer-color,
.ac-pub-parallax:hover .ac-pub-layer-color {
  transition-duration: 70ms;
}

/* ---------- Featured projects ---------- */
.ac-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px);
}
.ac-project {
  display: block;
  padding-top: 16px;
  border-top: 1px solid var(--ac-line-soft);
  transition: border-color var(--ac-t-fast) var(--ac-ease), transform var(--ac-t) var(--ac-ease);
}
.ac-project:hover {
  border-color: var(--ac-accent);
  transform: translateY(-2px);
}
.ac-project-media {
  overflow: hidden;
  aspect-ratio: 11 / 5;
  background: var(--ac-placeholder);
  border-radius: 2px;
}
.ac-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ac-ease);
}
.ac-project:hover .ac-project-media img { transform: scale(1.04); }
.ac-project-title {
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 600;
}
.ac-project-desc {
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ac-ink-2);
}

.ac-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: clamp(24px, 4vh, 36px);
  font-size: 0.78rem;
  color: var(--ac-ink-2);
  border-bottom: 1px solid var(--ac-line-soft);
  padding-bottom: 3px;
  transition: color var(--ac-t-fast) var(--ac-ease), border-color var(--ac-t-fast) var(--ac-ease);
}
.ac-more span { transition: transform var(--ac-t) var(--ac-ease); }
.ac-more:hover { color: var(--ac-accent); border-color: var(--ac-accent); }
.ac-more:hover span { transform: translateX(4px); }

/* ---------- Footer ---------- */
.ac-footer {
  margin-top: clamp(30px, 5vh, 50px);
  border-top: 1px solid var(--ac-line-soft);
  padding-block: clamp(26px, 4vh, 40px);
}
.ac-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 26px;
}
.ac-footer-email {
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--ac-line-soft);
  padding-bottom: 2px;
  transition: color var(--ac-t-fast) var(--ac-ease), border-color var(--ac-t-fast) var(--ac-ease);
}
.ac-footer-email:hover { color: var(--ac-accent); border-color: var(--ac-accent); }
.ac-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-right: auto;
}
.ac-footer-links a,
.ac-footer-note {
  font-size: 0.75rem;
  color: var(--ac-ink-3);
}
.ac-footer-links a { transition: color var(--ac-t-fast) var(--ac-ease); }
.ac-footer-links a:hover { color: var(--ac-ink); }

/* ---------- Scroll reveal ---------- */
.ac-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ac-ease), transform 0.65s var(--ac-ease);
}
.ac-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ac-reveal { opacity: 1; transform: none; transition: none; }
  .ac-pub-layer-color { transform: none !important; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .ac-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .ac-section-row,
  .ac-focus {
    grid-template-columns: 1fr;
  }
  .ac-pub {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 28vw);
    gap: 12px 22px;
    padding-block: 30px;
  }
}

@media (max-width: 560px) {
  .ac-projects { grid-template-columns: 1fr; }
  .ac-pub {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .ac-pub-copy {
    grid-column: 1;
    grid-row: 1;
  }
  .ac-pub-thumb {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 420px;
    justify-self: start;
  }
  .ac-pub-links {
    grid-column: 1;
    grid-row: 3;
    margin-top: 2px;
  }
}


/* Academic hero + lanyard badge */
.ac-page {
  position: relative;
  min-height: 100vh;
}
.ac-left-rail {
  position: relative;
  z-index: 20;
}
.ac-scroll-column {
  position: relative;
  z-index: 2;
}
.ac-hero {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: auto;
  padding-top: clamp(28px, 6vh, 60px);
  padding-bottom: 0;
}
.ac-hero-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(460px, 0.52fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-top: 0;
}
.ac-bio {
  position: relative;
  z-index: 2;
  max-width: 76ch;
}
.ac-id {
  align-self: start;
}
.ac-id-lanyard {
  position: relative;
  z-index: 20;
  width: 100%;
  min-height: min(90vh, 840px);
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}
.ac-lanyard-stage {
  position: absolute;
  top: 0;
  left: var(--lanyard-stage-left, 0px);
  width: var(--lanyard-stage-width, 100vw);
  height: min(90vh, 840px);
  z-index: 20;
  overflow: visible;
  touch-action: none;
  cursor: default;
  user-select: none;
  pointer-events: none;
}
.ac-id-lanyard:not(.is-ready) .ac-lanyard-stage {
  opacity: 0;
  pointer-events: none;
}
.ac-lanyard-stage.is-card-hover { cursor: grab; }
.ac-lanyard-stage.is-icon-hover { cursor: pointer; }
.ac-lanyard-stage.dragging { cursor: grabbing; }
html.ac-lanyard-card-hover,
html.ac-lanyard-card-hover * {
  cursor: grab !important;
}
html.ac-lanyard-icon-hover,
html.ac-lanyard-icon-hover * {
  cursor: pointer !important;
}
html.ac-lanyard-card-dragging,
html.ac-lanyard-card-dragging * {
  cursor: grabbing !important;
}
.ac-lanyard-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: inherit;
  pointer-events: none;
}
.ac-bio {
  gap: 18px;
  max-width: 76ch;
  padding-top: 4px;
}
.ac-bio p {
  font-size: 0.98rem;
  line-height: 1.58;
  color: var(--ac-ink-2);
  letter-spacing: 0;
  text-wrap: pretty;
}
.ac-bio p:first-child {
  font-size: 0.98rem;
  line-height: 1.58;
  color: var(--ac-ink-2);
}
.ac-bio p::first-letter {
  font-weight: inherit;
}
.ac-bio a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}
.ac-bio a:hover {
  color: #058cf2;
}
.ac-bio a.ac-bio-u {
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: #058cf2;
}
.ac-bio a.ac-bio-u:hover {
  color: #058cf2;
}
.ac-bio strong {
  font-weight: 600;
  color: var(--ac-ink);
}
.ac-bio mark {
  color: inherit;
  font-weight: 600;
  background: var(--ac-hl);
  padding: 0.04em 0.14em;
  margin: 0 -0.04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
@media (min-width: 761px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
  .ac-page {
    min-height: 100vh;
  }
  .ac-left-rail {
    position: fixed;
    top: 72px;
    bottom: 0;
    left: var(--ac-inset-left);
    width: var(--ac-rail-w);
    pointer-events: none;
  }
  .ac-scroll-column {
    height: 100vh;
    margin-left: calc(var(--ac-inset-left) + var(--ac-rail-w));
    overflow-y: auto;
    overflow-x: visible;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    padding-top: 72px;
    padding-left: var(--ac-col-gap);
    padding-right: var(--ac-inset);
  }
  .ac-scroll-column .ac-shell {
    max-width: var(--ac-copy-w);
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .ac-bio {
    max-width: none;
  }
  .ac-left-rail .ac-id-lanyard {
    height: calc(100vh - 72px);
    min-height: calc(100vh - 72px);
  }
  .ac-left-rail .ac-lanyard-stage {
    height: calc(100vh - 72px);
  }
  .ac-section {
    padding-block: clamp(38px, 6vh, 70px);
  }
  .ac-section .ac-shell {
    border-top: 1px solid var(--ac-line-soft);
    padding-top: clamp(38px, 6vh, 70px);
  }
  .ac-h2 {
    margin-bottom: 18px;
    font-size: 1.2rem;
  }
  #education .ac-shell {
    max-width: min(760px, 100%);
  }
  .ac-pub {
    grid-template-columns: minmax(0, 1fr) clamp(168px, 18vw, 218px);
    gap: 12px clamp(22px, 3.4vw, 34px);
    padding-block: clamp(26px, 4.3vh, 38px);
  }
  .ac-pub-venue {
    font-size: 0.86rem;
  }
  .ac-pub-title {
    font-size: clamp(0.95rem, 1vw, 1rem);
    line-height: 1.3;
  }
  .ac-pub-authors {
    font-size: 0.86rem;
    line-height: 1.42;
  }
  .ac-pub-thumb {
    --pub-thumb-pad: 0px;
    aspect-ratio: 1287 / 864;
  }
  .ac-footer {
    margin-top: 0;
  }
}
@media (max-width: 760px) {
  html,
  body {
    height: auto;
    overflow: visible;
  }
  .ac-page {
    display: block;
    padding-top: 64px;
  }
  .ac-left-rail {
    position: relative;
    width: 100%;
  }
  .ac-scroll-column {
    height: auto;
    margin-left: 0;
    overflow: visible;
    padding-top: 0;
  }
  .ac-id {
    position: relative;
    top: auto;
  }
  .ac-hero-grid {
    grid-template-columns: 1fr;
  }
  .ac-id-lanyard {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .ac-id-lanyard,
  .ac-lanyard-stage {
    min-height: min(58vh, 420px);
    height: min(58vh, 420px);
  }
  .ac-lanyard-stage {
    left: 0;
    width: 100%;
  }
  .ac-hero {
    padding-top: 8px;
  }
}

/* ---------- Education archive folders ---------- */
#education {
  position: relative;
  z-index: 1;
}
#education:has(#eduScene[data-active]) { z-index: 40; }
#aboutEducation {
  position: relative;
  width: 100%;
  margin: 8px 0 0;
  display: flex;
  justify-content: center;
}
#aboutEducation .edu-svg {
  display: block;
  width: 86%;
  max-width: 640px;
  height: auto;
  overflow: visible;
  touch-action: manipulation;
}
.edu-scene { display: contents; }
.edu-node {
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.88s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.62s var(--ac-ease), filter 0.88s cubic-bezier(0.19, 1, 0.22, 1);
  transform-box: fill-box;
  transform-origin: 50% 75%;
}
.edu-node > *:not(.edu-hit-area) { pointer-events: none; }
.edu-hit-area { pointer-events: all; cursor: pointer; }
#upenn.edu-node { transform: rotate(-2.8deg); }
#davis.edu-node { transform: rotate(6.42deg); }
.edu-scene[data-hover="upenn"]:not([data-active]) #upenn {
  transform: rotate(-2.8deg) translateY(-8px) scale(1.012);
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.18));
}
.edu-scene[data-hover="davis"]:not([data-active]) #davis {
  transform: rotate(6.42deg) translateY(-8px) scale(1.012);
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.18));
}
.edu-scene[data-active="upenn"] #upenn {
  transform: rotate(0deg) translateY(-12px) scale(1.018);
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.23));
}
.edu-scene[data-active="upenn"] #davis { opacity: 0.58; }
.edu-scene[data-active="davis"] #davis {
  transform: rotate(0deg) translateY(-12px) scale(1.018);
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.23));
}
.edu-scene[data-active="davis"] #upenn { opacity: 0.58; }
.edu-popup {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 24px));
  max-height: min(88dvh, calc(100vh - 96px));
  overflow: auto;
  z-index: 60;
  background: var(--ac-paper);
  border: 1px solid var(--ac-line);
  border-radius: 18px;
  box-shadow: var(--ac-card-shadow-hover);
}
.edu-popup[hidden] { display: none; }
.edu-info-panel { display: none; }
.edu-popup[data-active="upenn"] [data-edu-panel="upenn"],
.edu-popup[data-active="davis"] [data-edu-panel="davis"] { display: block; }
.edu-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 1.15rem;
}
.edu-popup-panel-head { padding: 14px 48px 10px 26px; }
.edu-archive-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  background: var(--ac-ink);
  color: var(--ac-paper);
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.edu-card-top { padding: 8px 56px 18px 26px; border-bottom: 1px solid var(--ac-line-soft); }
.edu-info-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 4px; }
.edu-info-degree { font-family: Bitter, Georgia, serif; font-style: italic; font-weight: 300; margin: 0; color: var(--ac-ink-2); }
.edu-card-archive { padding: 12px 26px 22px; }
.edu-course-list { list-style: none; padding: 0; margin: 0; }
.edu-course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--ac-line-soft);
}
.edu-course-item:first-child { border-top: 0; }
.edu-course-name { font-size: 0.94rem; font-weight: 500; }
.edu-course-view {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--ac-line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}
@media (max-width: 760px) {
  #upenn.edu-node,
  #davis.edu-node { transform: none; }
  .edu-popup {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 16px);
    margin: 16px auto 0;
  }
}

/* One equal breathing space on either side of the publication / education rule. */
#publications.ac-section { padding-bottom: 0; }
#publications .ac-pub:last-child { padding-bottom: 0; }
#publications .ac-shell { padding-bottom: var(--ac-section-y); }
#education.ac-section { padding-top: 0; }
#education .ac-shell {
  border-top: 1px solid var(--ac-line-soft);
  padding-top: var(--ac-section-y);
}
#education #davis, #education #davis * { cursor:default; }
