:root {
        --bg: #f7f7f5;
        --fg: #111;
        --muted: #5a5a5a;
        --line: rgba(17, 17, 17, 0.18);
        --font: "Source Serif 4", "Times New Roman", Times, serif;
        --footer-h: 2rem;
        --glass: rgba(255, 255, 255, 0.42);
        --glass-strong: rgba(255, 255, 255, 0.64);
        --glass-border: rgba(255, 255, 255, 0.58);
        --glass-edge: rgba(0, 0, 0, 0.08);
        --blur: 28px;
        --ease: cubic-bezier(0.22, 1, 0.36, 1);
        --arc-h: min(38vw, 16rem);
      }

      [data-theme="dark"] {
        --bg: #0a0a0a;
        --fg: #f2f2f2;
        --muted: #a0a0a0;
        --line: rgba(242, 242, 242, 0.2);
        --glass: rgba(40, 40, 40, 0.45);
        --glass-strong: rgba(55, 55, 55, 0.62);
        --glass-border: rgba(255, 255, 255, 0.18);
        --glass-edge: rgba(255, 255, 255, 0.08);
      }

      * { box-sizing: border-box; margin: 0; padding: 0; }

      html, body {
        height: 100%;
        overflow-x: hidden;
        font-family: var(--font);
        background:
          radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,0.9), transparent 60%),
          radial-gradient(900px 500px at 80% 40%, rgba(210, 220, 230, 0.35), transparent 55%),
          var(--bg);
        color: var(--fg);
      }

      [data-theme="dark"] html,
      [data-theme="dark"] body {
        background:
          radial-gradient(1000px 500px at 50% -10%, rgba(80,80,90,0.35), transparent 55%),
          var(--bg);
      }

      body { overflow: hidden; }

      a { color: inherit; }

      .site {
        height: 100%;
        display: flex;
        flex-direction: column;
      }

      /* ─── Home ─── */
      .home {
        flex: 1;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        grid-template-areas:
          "photo name"
          "photo bio";
        column-gap: 1.5rem;
        row-gap: 0.75rem;
        padding: 4.5rem 4vw 2rem;
        align-items: center;
        align-content: center;
        transition: filter 0.5s var(--ease), opacity 0.5s var(--ease);
      }

      .home__name {
        grid-area: name;
        align-self: end;
        font-size: clamp(1.75rem, 3.5vw, 2.75rem);
        font-weight: 450;
        letter-spacing: -0.02em;
        line-height: 1.1;
        padding: 0 2vw 0 0.5rem;
      }

      .home__photo {
        grid-area: photo;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem;
      }

      .home__photo img {
        display: block;
        width: min(100%, 26rem);
        height: auto;
        max-height: calc(100vh - 8rem);
        object-fit: cover;
        object-position: center top;
      }

      .home__bio {
        grid-area: bio;
        align-self: start;
        max-width: 34rem;
        padding: 0 2vw 1rem 0.5rem;
        font-size: clamp(1.05rem, 1.6vw, 1.35rem);
        font-weight: 350;
        line-height: 1.55;
      }

      /* ─── Scrim ─── */
      .scrim {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: var(--footer-h);
        z-index: 45;
        background: rgba(110, 110, 110, 0.42);
        backdrop-filter: blur(10px) grayscale(0.35);
        -webkit-backdrop-filter: blur(10px) grayscale(0.35);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.45s var(--ease);
      }

      .site.is-nav-open .scrim {
        opacity: 1;
        pointer-events: auto;
      }

      .site.is-nav-open .home,
      .site.is-nav-open .section {
        filter: blur(8px) grayscale(0.45);
        opacity: 0.45;
        pointer-events: none;
      }

      [data-theme="dark"] .scrim {
        background: rgba(18, 18, 18, 0.55);
      }

      /* ─── Glass arc ─── */
      .orbit {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 4.25rem;
        z-index: 60;
        pointer-events: none;
        transition: height 0.55s var(--ease);
      }

      .orbit__hit {
        pointer-events: auto;
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        width: 9rem;
        height: 3.75rem;
        border: 0;
        cursor: pointer;
        background: transparent;
        -webkit-tap-highlight-color: transparent;
      }

      .orbit__glass {
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        width: 8.75rem;
        height: 3.5rem;
        border-radius: 0 0 50% 50% / 0 0 100% 100%;
        background:
          linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.28) 55%, rgba(255,255,255,0.12) 100%),
          var(--glass);
        backdrop-filter: blur(var(--blur)) saturate(1.55);
        -webkit-backdrop-filter: blur(var(--blur)) saturate(1.55);
        border: 1px solid var(--glass-border);
        border-top: none;
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.75),
          inset 0 -1px 0 var(--glass-edge),
          0 10px 32px rgba(0, 0, 0, 0.1);
        transition:
          width 0.55s var(--ease),
          height 0.55s var(--ease),
          border-radius 0.55s var(--ease),
          left 0.55s var(--ease),
          transform 0.55s var(--ease),
          background 0.4s,
          box-shadow 0.4s,
          clip-path 0.55s var(--ease);
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding-bottom: 0.7rem;
        pointer-events: none;
      }

      [data-theme="dark"] .orbit__glass {
        background:
          linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 50%, rgba(0,0,0,0.2) 100%),
          var(--glass);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.2),
          inset 0 -1px 0 rgba(0, 0, 0, 0.35),
          0 10px 32px rgba(0, 0, 0, 0.35);
      }

      .orbit__chevron {
        width: 1.1rem;
        height: 1.1rem;
        opacity: 0.7;
        transition: opacity 0.3s, transform 0.45s var(--ease);
      }

      .orbit__chevron path {
        fill: none;
        stroke: var(--fg);
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .orbit__hit:hover .orbit__glass {
        background:
          linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.35) 55%, rgba(255,255,255,0.14) 100%),
          var(--glass-strong);
      }

      .site.is-nav-open .orbit {
        height: var(--arc-h);
        pointer-events: auto;
      }

      .site.is-nav-open .orbit__hit {
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        transform: none;
        cursor: default;
      }

      .site.is-nav-open .orbit__glass {
        left: 0;
        right: 0;
        top: 0;
        transform: none;
        width: 100%;
        height: 100%;
        border-radius: 0;
        clip-path: ellipse(50% 100% at 50% 0%);
        padding-bottom: 0;
        align-items: flex-start;
        justify-content: center;
        background:
          linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.34) 48%, rgba(255,255,255,0.14) 100%),
          var(--glass-strong);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.75),
          0 18px 48px rgba(0, 0, 0, 0.12);
      }

      [data-theme="dark"] .site.is-nav-open .orbit__glass {
        background:
          linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.25) 100%),
          var(--glass-strong);
      }

      .site.is-nav-open .orbit__chevron {
        position: absolute;
        bottom: 8%;
        left: 50%;
        transform: translateX(-50%) rotate(180deg);
        opacity: 0.55;
        z-index: 2;
      }

      .orbit__items {
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 3;
      }

      .orbit__item {
        position: absolute;
        left: 50%;
        top: 50%;
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, -50%);
        transition: opacity 0.35s var(--ease);
      }

      .site.is-nav-open .orbit__item {
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0.12s;
      }

      .orbit__item a {
        display: inline-flex;
        white-space: nowrap;
        text-decoration: none;
        color: var(--fg);
        font-size: clamp(1rem, 2.2vw, 1.4rem);
        font-weight: 420;
        padding: 0.55rem 1.1rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.38);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
        transition: background 0.25s, transform 0.25s var(--ease);
      }

      [data-theme="dark"] .orbit__item a {
        background: rgba(0, 0, 0, 0.32);
      }

      .orbit__item a:hover {
        background: rgba(255, 255, 255, 0.62);
        transform: scale(1.06);
      }

      [data-theme="dark"] .orbit__item a:hover {
        background: rgba(255, 255, 255, 0.12);
      }

      /* Name in expanded arc → home */
      .orbit__brand {
        position: absolute;
        left: 50%;
        top: 0.7rem;
        transform: translateX(-50%);
        z-index: 4;
        font-size: clamp(0.95rem, 1.6vw, 1.15rem);
        font-weight: 450;
        letter-spacing: -0.01em;
        text-decoration: none;
        color: var(--fg);
        opacity: 0;
        pointer-events: none;
        padding: 0.2rem 0.45rem;
        border-radius: 0.25rem;
        transition: opacity 0.35s 0.1s, background 0.2s;
        white-space: nowrap;
      }

      .site.is-nav-open .orbit__brand {
        opacity: 0.85;
        pointer-events: auto;
      }

      .orbit__brand:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.35);
      }

      [data-theme="dark"] .orbit__brand:hover {
        background: rgba(255, 255, 255, 0.08);
      }

      /* ─── Footer ─── */
      .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 70;
        height: var(--footer-h);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        background: var(--bg);
        color: var(--fg);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
      }

      .footer__left,
      .footer__social {
        display: flex;
        align-items: center;
        outline: 1px solid var(--fg);
        padding: 0 0.75rem;
        gap: 0.75rem;
        min-width: 0;
      }

      .footer__left { justify-content: space-between; }
      .footer__social { justify-content: space-between; }

      .footer__meta {
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .footer a { color: inherit; text-decoration: none; }

.footer__info:hover,
.footer__info.is-active {
  background: var(--fg);
  color: var(--bg);
  padding: 0 0.25rem;
}

      .footer__links { display: flex; gap: 0.85rem; }

      .theme-toggle {
        position: fixed;
        top: 0.85rem;
        right: 1rem;
        z-index: 40;
        width: 2rem;
        height: 2rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        cursor: pointer;
        color: var(--fg);
        overflow: hidden;
        transition: opacity 0.35s var(--ease);
      }

      body:has(.site.is-nav-open) .theme-toggle {
        opacity: 0;
        pointer-events: none;
      }

      .theme-toggle__icon {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition:
          opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
          transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
      }

      .theme-toggle__icon svg {
        width: 1.15rem;
        height: 1.15rem;
      }

      .theme-toggle__icon--moon svg {
        width: 1.18rem;
        height: 1.18rem;
      }

      .theme-toggle__icon--sun {
        opacity: 1;
        transform: rotate(0deg) scale(1);
      }

      .theme-toggle__icon--moon {
        opacity: 0;
        transform: rotate(-60deg) scale(0.4);
      }

      [data-theme="dark"] .theme-toggle__icon--sun {
        opacity: 0;
        transform: rotate(60deg) scale(0.4);
      }

      [data-theme="dark"] .theme-toggle__icon--moon {
        opacity: 1;
        transform: rotate(0deg) scale(1);
      }

      /* ─── Sections shell ─── */
      .section {
        display: none;
        position: fixed;
        inset: 4.25rem 0 calc(var(--footer-h));
        z-index: 30;
        overflow: auto;
        padding: 1.5rem 5vw 3rem;
        transition: filter 0.5s var(--ease), opacity 0.5s var(--ease);
      }

      .site[data-view="research"] .home,
      .site[data-view="bio"] .home,
      .site[data-view="potpourri"] .home {
        display: none;
      }

      .site[data-view="research"] .section--research,
      .site[data-view="bio"] .section--bio,
      .site[data-view="potpourri"] .section--potpourri {
        display: block;
      }

      .section__header {
        max-width: 52rem;
        margin: 0 auto 1.75rem;
      }

      .section__title {
        font-size: clamp(1.6rem, 3vw, 2.1rem);
        font-weight: 450;
        letter-spacing: -0.02em;
        margin-bottom: 0.45rem;
      }

      .section__lede {
        font-size: 1.02rem;
        font-weight: 320;
        line-height: 1.55;
        color: var(--muted);
        max-width: 36rem;
      }

      .section__lede a {
        color: var(--fg);
        text-decoration: none;
        border-bottom: 1px solid var(--line);
        transition: border-color 0.2s;
      }

      .section__lede a:hover {
        border-bottom-color: var(--fg);
      }

      /* ─── Research cards: text + links, then full figure below ─── */
      .research-list {
        max-width: 56rem;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
      }

      .project-card {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.15rem 1.15rem 1.2rem;
        border: 1px solid var(--line);
        background: transparent;
        text-decoration: none;
        color: inherit;
        transition:
          background 0.35s var(--ease),
          border-color 0.35s var(--ease),
          box-shadow 0.35s var(--ease),
          transform 0.35s var(--ease),
          backdrop-filter 0.35s var(--ease);
      }

      .project-card:hover,
      .project-card:focus-visible {
        background: var(--glass-strong);
        border-color: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(18px) saturate(1.4);
        -webkit-backdrop-filter: blur(18px) saturate(1.4);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.55),
          0 12px 36px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
        outline: none;
      }

      [data-theme="dark"] .project-card:hover,
      [data-theme="dark"] .project-card:focus-visible {
        border-color: rgba(255, 255, 255, 0.22);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.12),
          0 12px 36px rgba(0, 0, 0, 0.35);
      }

      .project-card__media {
        width: 100%;
        border: 1px solid var(--line);
        background: rgba(0, 0, 0, 0.03);
        overflow: hidden;
      }

      .project-card__media img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: contain;
      }

      .project-card__body {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        min-width: 0;
      }

      .project-card__meta {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
      }

      .project-card__title {
        font-size: clamp(1.15rem, 2vw, 1.4rem);
        font-weight: 450;
        letter-spacing: -0.015em;
        line-height: 1.25;
      }

      .project-card__authors {
        font-size: 0.92rem;
        font-weight: 320;
        line-height: 1.45;
        color: var(--muted);
      }

      .project-card__authors .self {
        color: var(--fg);
        font-weight: 450;
      }

      .project-card__venue {
        font-size: 0.88rem;
        font-weight: 320;
        font-style: italic;
        line-height: 1.4;
        color: var(--muted);
      }

      .project-card__links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 0.35rem;
      }

      .project-card__links a {
        font-size: 0.82rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        text-decoration: none;
        border-bottom: 1px solid var(--line);
        padding-bottom: 0.05rem;
        transition: border-color 0.2s, color 0.2s;
      }

      .project-card__links a:hover {
        border-bottom-color: var(--fg);
      }

      /* ─── Bio page ─── */
      .bio-page {
        max-width: 40rem;
        margin: 0 auto;
      }

      .bio-block {
        margin-bottom: 2.25rem;
      }

      .bio-block__title {
        font-size: 1.15rem;
        font-weight: 450;
        letter-spacing: -0.01em;
        margin-bottom: 0.85rem;
        padding-bottom: 0.45rem;
        border-bottom: 1px solid var(--line);
      }

      .bio-block p {
        font-size: 1.05rem;
        font-weight: 320;
        line-height: 1.65;
        margin-bottom: 0.9rem;
      }

      .bio-block p:last-child { margin-bottom: 0; }

      .bio-block ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
      }

      .bio-block li {
        position: relative;
        padding-left: 1rem;
        font-size: 1.02rem;
        font-weight: 320;
        line-height: 1.55;
      }

      .bio-block li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.65em;
        width: 0.35rem;
        height: 1px;
        background: var(--fg);
      }

      .link-underline {
        color: inherit;
        text-decoration: none;
        border-bottom: 1px solid var(--line);
        transition: border-color 0.2s;
      }

      .link-underline:hover {
        border-bottom-color: var(--fg);
      }

      /* ─── Potpourri: title first, wide full image ─── */
      .potpourri-grid {
        max-width: 64rem;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.25rem;
      }

      .pot-card {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--line);
        background: transparent;
        overflow: hidden;
        transition:
          background 0.35s var(--ease),
          border-color 0.35s var(--ease),
          box-shadow 0.35s var(--ease),
          transform 0.35s var(--ease),
          backdrop-filter 0.35s var(--ease);
      }

      .pot-card:hover {
        background: var(--glass-strong);
        border-color: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(18px) saturate(1.4);
        -webkit-backdrop-filter: blur(18px) saturate(1.4);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.55),
          0 12px 36px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
      }

      .pot-card__media {
        width: 100%;
        overflow: hidden;
        border-top: 1px solid var(--line);
        background: rgba(0, 0, 0, 0.04);
      }

      .pot-card__media img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: contain;
      }

      .pot-card__caption {
        padding: 0.95rem 1.15rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
      }

      .pot-card__name {
        font-size: 1.05rem;
        font-weight: 420;
        letter-spacing: -0.01em;
      }

      .pot-card__date {
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
      }

      @media (max-width: 800px) {
        :root {
          --footer-h: 4rem;
          --arc-h: min(52vw, 14rem);
        }

        .home {
          grid-template-columns: 1fr;
          grid-template-areas:
            "name"
            "photo"
            "bio";
          padding: 5rem 1.25rem 5.5rem;
          overflow: auto;
          align-content: start;
          row-gap: 1rem;
        }

        .home__name {
          align-self: start;
          padding: 0;
          text-align: center;
        }

        .home__photo img {
          width: min(100%, 18rem);
          max-height: 48vh;
        }

        .home__bio { padding: 0 0 2rem; }

        .section { padding: 1.25rem 1.25rem 3rem; }

        .footer {
          grid-template-columns: 1fr;
          height: var(--footer-h);
          grid-template-rows: 1fr 1fr;
        }

        .footer__social { order: -1; }
      }
    

/* ─── Info page ─── */
.info-page {
  position: fixed;
  inset: 4.25rem 0 calc(var(--footer-h));
  z-index: 30;
  overflow: auto;
  padding: 1.5rem 5vw 3rem;
  transition: filter 0.5s var(--ease), opacity 0.5s var(--ease);
}

.site.is-nav-open .info-page {
  filter: blur(8px) grayscale(0.45);
  opacity: 0.45;
  pointer-events: none;
}

.info-page__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.info-page__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 450;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.info-page p {
  font-size: 1.05rem;
  font-weight: 320;
  line-height: 1.65;
}

/* Footer social from footer.js */
.footer__email {
  font-weight: 400;
}

.footer__social-link h4 {
  font-weight: 400;
  font-size: inherit;
}
