/* ============================================================
   site.css — Lucio La Cava personal website design system
   Tokens → Base → Keyframes → Backdrop → Header → Footer →
   Hero → Streaming Bio → Sections → News → Publications →
   Research / Projects → Teaching → Contact → Responsive
   ============================================================ */

/* ── SELF-HOSTED FONTS (weights 400/500/600, latin + latin-ext) ── */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/geist-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/geist-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/geist-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/geist-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/geist-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/geist-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --bg:#0d0f18;
  --bg2:#11131e;
  --surface:#181b29;
  --elevated:#1f2335;
  --border:#272b3e;
  --border-strong:#363b54;
  --fg:#eef0f7;
  --fg-dim:#c2c6d6;
  --muted:#878ca0;
  --muted-dim:#5e637a;
  --accent:#ed8c70;
  --accent-soft:rgba(237,140,112,.13);
  --iris:#6aa1ff;
  --iris-soft:rgba(106,161,255,.13);
  --iris-strong:#9bc1ff;
  --maxw:1240px;
  --font-display:"Space Grotesk",sans-serif;
  --font-body:"Geist","IBM Plex Sans",-apple-system,system-ui,sans-serif;
  --font-mono:"JetBrains Mono",monospace;
}

/* ── LIGHT THEME (html[data-theme="light"]) ──────────────── */
html[data-theme="light"] {
  --bg:#f7f8fc;
  --bg2:#eef1f7;
  --surface:#ffffff;
  --elevated:#f2f4fa;
  --border:#e3e7f0;
  --border-strong:#cdd4e3;
  --fg:#171a24;
  --fg-dim:#3c4254;
  --muted:#646b80;
  --muted-dim:#9298ac;
  --accent:#c85a36;
  --accent-soft:rgba(200,90,54,0.10);
  --iris:#2f6ae0;
  --iris-soft:rgba(47,106,224,0.10);
  --iris-strong:#214fb0;
}
/* A few values are hardcoded for the dark base — restate them for light. */
html[data-theme="light"] .ll-header { background: rgba(255,255,255,0.72); }
html[data-theme="light"] ::selection { background: rgba(47,106,224,0.18); color: var(--fg); }

/* ── BASE / RESET ───────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: 90px;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: rgba(179, 232, 94, 0.25);
  color: #fff;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--bg);
}

*::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* ── KEYFRAMES ──────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes blink {
  0%, 50%       { opacity: 1; }
  50.01%, 100%  { opacity: 0; }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(40px, -30px); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-50px, 40px); }
}

/* ── REVEAL HELPER ─────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.22, .7, .3, 1),
              transform .7s cubic-bezier(.22, .7, .3, 1);
}

[data-reveal].is-shown {
  opacity: 1;
  transform: none;
}

/* ── AMBIENT GRADIENT BACKDROP ──────────────────────────── */
.ll-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Aurora blob 1 — iris, top-center */
.ll-aurora.a1 {
  position: absolute;
  top: -300px;
  left: 20%;
  width: 900px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(106, 161, 255, 0.13), transparent 65%);
  filter: blur(60px);
  animation: drift 22s ease-in-out infinite;
}

/* Aurora blob 2 — accent, top-right */
.ll-aurora.a2 {
  position: absolute;
  top: -100px;
  right: -150px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 140, 112, 0.11), transparent 60%);
  filter: blur(50px);
  animation: drift2 26s ease-in-out infinite;
}

/* Aurora blob 3 — iris, mid-left */
.ll-aurora.a3 {
  position: absolute;
  top: 800px;
  left: -200px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 161, 255, 0.08), transparent 60%);
  filter: blur(60px);
  animation: drift 30s ease-in-out infinite reverse;
}

/* Subtle dot grid */
.ll-dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at top, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 20%, transparent 70%);
}

/* Top vignette */
.ll-vignette {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: linear-gradient(180deg, rgba(106, 161, 255, 0.024), transparent);
  pointer-events: none;
}

/* ── INTERACTIVE / HOVER UTILITY CLASSES ────────────────── */
.ll-link,
.ll-link:visited {
  color: var(--fg);
  text-decoration: none;
  transition: color .15s;
}

.ll-link:hover {
  color: var(--iris);
}

.ll-chip,
.ll-chip:visited {
  color: var(--fg-dim);
  transition: border-color .2s, background .2s, transform .2s;
}

.ll-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.ll-cta-primary,
.ll-cta-primary:visited {
  background: var(--fg);
  color: var(--bg);
  transition: transform .15s, box-shadow .15s;
}

.ll-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -10px rgba(106, 161, 255, 0.27);
}

/* Icon strip links */
.ll-icon-link,
.ll-icon-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 12px;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-dim);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s, background .2s, color .2s, transform .2s, box-shadow .2s;
  position: relative;
}

.ll-icon-link:hover {
  border-color: var(--border-strong) !important;
  color: var(--fg) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
}

.ll-icon-link[data-accent="true"],
.ll-icon-link[data-accent="true"]:visited {
  border-color: rgba(106, 161, 255, 0.33);
  background: var(--iris-soft);
  color: var(--iris);
}

.ll-icon-link[data-accent="true"]:hover {
  color: var(--iris) !important;
  border-color: rgba(106, 161, 255, 0.6) !important;
  background: rgba(106, 161, 255, 0.13) !important;
  box-shadow: 0 10px 24px -8px rgba(106, 161, 255, 0.4);
}

/* ── HEADER ─────────────────────────────────────────────── */
.ll-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(13, 15, 24, 0.7);
  border-bottom: 1px solid var(--border);
}

.ll-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ll-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  font-size: 16px;
  transition: color .15s;
}

.ll-logo:hover {
  color: var(--iris);
}

.ll-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.ll-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ll-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  flex-shrink: 0;
}

.ll-theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--iris);
}

/* Mobile nav — shown only ≤860px (rules in the responsive block) */
.ll-hamburger { display: none; }
.ll-mobile-nav { display: none; }

.ll-mobile-link {
  display: block;
  padding: 13px 24px;
  min-height: 44px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 16px;
  border-top: 1px solid var(--border);
}

.ll-mobile-link:hover { color: var(--fg); background: var(--surface); }
.ll-mobile-link[aria-current="page"] { color: var(--iris); }
.ll-mobile-cta { color: var(--iris); font-family: var(--font-mono); }

.ll-nav {
  display: flex;
  gap: 2px;
}

.ll-nav-link,
.ll-nav-link:visited {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--fg-dim);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
}

.ll-nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--iris);
  transform: scaleX(0);
  opacity: 0;
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22, .7, .3, 1), opacity .3s;
}

.ll-nav-link.is-active,
.ll-nav-link.is-active:visited {
  color: var(--fg);
}

.ll-nav-link.is-active::after {
  transform: scaleX(1);
  opacity: 1;
}

.ll-header-cta {
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.ll-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.ll-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 56px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ll-foot-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pulsing iris dot used in footer and eyebrow */
.ll-dot-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--iris);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

/* ── SECTION LAYOUT ─────────────────────────────────────── */
.ll-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 56px 48px;
  position: relative;
  z-index: 2;
}

.ll-section--news,
.ll-section--pubs,
.ll-section--contact {
  padding: 64px 56px;
}

.ll-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.ll-section-head-l {
  display: flex;
  align-items: flex-end;
  gap: 28px;
}

.ll-section-num {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding-bottom: 6px;
}

.ll-section-eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--iris);
  margin-bottom: 10px;
}

.ll-section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--fg);
}

.ll-accent {
  color: var(--accent);
}

/* ── HERO ───────────────────────────────────────────────── */
.ll-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 56px 48px;
  position: relative;
  z-index: 2;
}

/* Status pill eyebrow */
.ll-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--iris);
  margin-bottom: 36px;
  padding: 7px 14px;
  border: 1px solid rgba(106, 161, 255, 0.2);
  border-radius: 99px;
  background: var(--iris-soft);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Avatar circle */
.ll-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, var(--elevated), var(--bg2));
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--bg),
              0 0 0 5px rgba(106, 161, 255, 0.4),
              0 20px 40px -10px rgba(106, 161, 255, 0.2);
}

.ll-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Portrait + name row wrapper */
.ll-hero-name-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 16px;
}

/* Large display name */
.ll-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 11vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0;
  color: var(--fg);
  flex: 1;
  min-width: 0;
}

/* Mono meta line under name */
.ll-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

/* Icon nav strip — equal-width, single line */
.ll-icon-strip {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 8px;
  margin-bottom: 56px;
}

/* ── STREAMING BIO PANEL ─────────────────────────────────── */
.ll-bio {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6),
              0 0 0 1px rgba(255, 255, 255, .02) inset;
}

/* Toolbar bar */
.ll-bio-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .015), transparent);
}

/* Traffic light dots */
.ll-bio-dots {
  display: flex;
  gap: 6px;
}

.ll-bio-dots span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #3b4252;
  display: inline-block;
}

/* Title / label area */
.ll-bio-title {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ll-bio-title .filename {
  color: var(--fg-dim);
}

.ll-bio-title .sep {
  color: var(--muted-dim);
}

/* LIVE badge */
.ll-bio-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--iris);
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(106, 161, 255, 0.2);
  background: var(--iris-soft);
}

.ll-bio-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--iris);
  animation: pulse 1.4s infinite;
  flex-shrink: 0;
}

/* Two-column content grid */
.ll-bio-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  min-height: 260px;
}

/* Streaming text area */
.ll-bio-text {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
}

.ll-bio-text-stream {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
}

/* Blinking caret */
.ll-bio-caret {
  display: inline-block;
  width: 9px;
  height: 18px;
  vertical-align: -3px;
  margin-left: 2px;
  background: var(--iris);
  border-radius: 1px;
  animation: blink 1s infinite step-end;
}

/* Logits panel */
.ll-bio-logits {
  padding: 22px 24px;
}

.ll-bio-logits-label {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* Individual logit row */
.ll-bio-logit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.ll-bio-logit-tok {
  width: 26px;
  color: var(--fg-dim);
  font-weight: 600;
}

.ll-bio-logit-tok.top {
  color: var(--iris);
}

/* Progress bar track */
.ll-bio-logit-bar {
  flex: 1;
  height: 4px;
  background: var(--elevated);
  border-radius: 99px;
  overflow: hidden;
}

/* Fill inside the bar (width set inline by JS) */
.ll-bio-logit-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(106, 161, 255, 0.6), rgba(237, 140, 112, 0.33));
  transition: width .14s ease-out;
}

.ll-bio-logit-fill.top {
  background: linear-gradient(90deg, var(--iris), rgba(106, 161, 255, 0.8));
  box-shadow: 0 0 8px rgba(106, 161, 255, 0.33);
}

/* Probability label */
.ll-bio-logit-p {
  width: 36px;
  text-align: right;
  color: var(--muted-dim);
  font-size: 14px;
}

/* Token count badge */
.ll-bio-count {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── NEWS ───────────────────────────────────────────────── */
.ll-news-card {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .5);
}

.ll-news-row {
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 36px 110px 1fr;
  gap: 20px;
  align-items: center;
  transition: background .15s;
}

.ll-news-row:hover {
  background: rgba(255, 255, 255, .015);
}

/* All rows except the first get a top border */
.ll-news-row + .ll-news-row {
  border-top: 1px solid var(--border);
}

/* Icon cell */
.ll-news-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--iris-soft);
  border: 1px solid rgba(106, 161, 255, 0.2);
  color: var(--iris);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Date cell */
.ll-news-date {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Body cell */
.ll-news-body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg-dim);
}

/* ── PUBLICATIONS ───────────────────────────────────────── */
/* Pub controls bar (search + filter) */
.ll-pub-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.ll-input {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

.ll-input::placeholder {
  color: var(--muted);
}

.ll-input:focus {
  border-color: var(--border-strong);
}

/* Filter chips (publication topics, news categories) */
.ll-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.ll-filter-chip {
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}

.ll-filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.ll-filter-chip.is-active {
  border-color: rgba(106, 161, 255, 0.5);
  background: var(--iris-soft);
  color: var(--iris);
}

/* Toast notification */
.ll-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}

.ll-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── A11Y & POLISH: skip link, scroll progress, back-to-top ── */
.ll-skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--iris);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;
  transition: top .2s;
}

.ll-skip:focus {
  top: 16px;
}

.ll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--iris), var(--accent));
  z-index: 100;
  transition: width .1s ease-out;
}

.ll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, border-color .2s, color .2s;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
}

.ll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ll-top:hover {
  color: var(--iris);
  border-color: var(--iris);
}

/* ── PRINT (optimised for the publications list) ─────────── */
@media print {
  .ll-backdrop, #site-header, #site-footer, .ll-pub-controls, .ll-filter-chips,
  .ll-skip, .ll-progress, .ll-top, .ll-pub-rail { display: none !important; }
  html, body { background: #fff; color: #000; }
  .ll-section { padding: 0; max-width: none; }
  .ll-section-head { border-color: #ccc; }
  .ll-pub, .ll-pub-group, .ll-teach-row { break-inside: avoid; }
  /* Expand abstracts so the printed list is self-contained */
  .ll-pub-abstract { grid-template-rows: 1fr !important; opacity: 1 !important; }
  a { color: #000; text-decoration: underline; }
}

/* Year group row */
.ll-pub-group {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

/* Year sticky column */
.ll-pub-year-col {
  position: sticky;
  top: 100px;
  align-self: start;
}

.ll-pub-year {
  font-family: var(--font-display);
  font-size: clamp(40px, 9vw, 72px);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 8px;
}

.ll-pub-count {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Publication list */
.ll-pub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Publication card */
.ll-pub {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color .18s, background .18s, transform .18s;
}

.ll-pub:hover {
  border-color: var(--border-strong);
  background: var(--elevated);
  transform: translateX(4px);
}

/* Accent rail (left edge, revealed on hover) */
.ll-pub-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--iris);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s cubic-bezier(.22, .7, .3, 1);
}

.ll-pub:hover .ll-pub-rail {
  transform: scaleY(1);
}

/* Pub header row */
.ll-pub-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}

.ll-pub-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.3;
  letter-spacing: -0.01em;
  flex: 1;
}

/* Venue/type tag chip */
.ll-pub-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(237, 140, 112, 0.25);
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}

/* Abstract — expands on hover via CSS grid trick */
.ll-pub-abstract {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.22, .7, .3, 1),
              opacity .3s;
  opacity: 0;
}

.ll-pub:hover .ll-pub-abstract {
  grid-template-rows: 1fr;
  opacity: 1;
}

.ll-pub-abstract-inner {
  overflow: hidden;
  min-height: 0;
}

.ll-pub-abstract-inner p {
  margin: 2px 0 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 720px;
}

/* Meta row */
.ll-pub-meta {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 15px;
  color: var(--muted);
  flex-wrap: wrap;
}

.ll-sep {
  color: var(--border-strong);
}

.ll-pub-venue {
  color: var(--iris);
  font-family: var(--font-mono);
  font-size: 14px;
}

.ll-pub-links {
  margin-left: auto;
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
}

/* BibTeX pre block */
.ll-bibtex {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-dim);
  overflow-x: auto;
  white-space: pre;
}

.ll-bibtex[hidden] {
  display: none;
}

/* Empty state */
.ll-empty {
  padding: 48px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── RESEARCH / PROJECTS ─────────────────────────────────── */
/* Research cards grid */
.ll-research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Research card */
.ll-research {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  position: relative;
  overflow: hidden;
  height: 100%;
  transition: border-color .2s, background .2s, transform .2s;
}

.ll-research:hover {
  border-color: var(--border-strong);
  background: var(--elevated);
  transform: translateY(-2px);
}

/* Icon badge in research card */
.ll-research-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  position: relative;
}

.ll-research-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--iris-soft);
  color: var(--iris);
  border: 1px solid rgba(106, 161, 255, 0.2);
}

.ll-research-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.14em;
}

.ll-research-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  color: var(--fg);
  position: relative;
}

.ll-research-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  position: relative;
}

/* Project cards */
.ll-project {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .2s, transform .2s;
}

.ll-project:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.ll-project-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--elevated);
  overflow: hidden;
}

.ll-project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ll-project-body {
  padding: 20px 24px;
}

.ll-project-links {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ── TEACHING ───────────────────────────────────────────── */
.ll-teach-group {
  margin-bottom: 36px;
}

.ll-teach-year {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.ll-teach-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ll-teach-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(39, 43, 62, 0.5);
  font-size: 15px;
}

.ll-teach-role {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}

.ll-teach-role[data-role="T"] {
  color: var(--iris);
  border-color: rgba(106, 161, 255, 0.3);
  background: var(--iris-soft);
}

.ll-teach-role[data-role="TA"] {
  color: var(--accent);
  border-color: rgba(237, 140, 112, 0.3);
  background: var(--accent-soft);
}

.ll-teach-title {
  color: var(--fg-dim);
  flex: 1;
}

.ll-teach-lvl {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── CONTACT ────────────────────────────────────────────── */
.ll-contact {
  background: linear-gradient(135deg, var(--surface), var(--bg2) 60%, rgba(237, 140, 112, 0.067));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  position: relative;
  overflow: hidden;
}

/* Accent glow blob in contact panel */
.ll-contact-glow {
  position: absolute;
  right: -100px;
  top: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 140, 112, 0.2), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

.ll-contact-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 24px;
  color: var(--fg);
}

.ll-contact-aside-label {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ll-contact-socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* ── ERRORS ─────────────────────────────────────────────── */
.ll-error {
  padding: 24px;
  border-radius: 10px;
  border: 1px solid rgba(237, 140, 112, 0.3);
  background: rgba(237, 140, 112, 0.08);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.55;
}

/* ── RESPONSIVE — max-width 860px ───────────────────────── */
@media (max-width: 860px) {
  /* Header */
  .ll-header-inner {
    padding: 14px 24px;
  }

  .ll-nav {
    display: none;
  }

  /* Mobile nav toggle + panel */
  .ll-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg-dim);
    cursor: pointer;
  }

  .ll-theme-toggle { width: 44px; height: 44px; }

  .ll-mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    background: var(--bg2);
  }

  .ll-mobile-nav.open {
    max-height: 80vh;
    overflow-y: auto;
    border-top: 1px solid var(--border);
  }

  /* Hero */
  .ll-hero,
  .ll-section {
    padding: 48px 24px 32px;
  }

  .ll-section--news,
  .ll-section--pubs,
  .ll-section--contact {
    padding: 48px 24px;
  }

  .ll-hero-name-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .ll-icon-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Bio panel */
  .ll-bio-grid {
    grid-template-columns: 1fr;
  }

  .ll-bio-text {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  /* Section header */
  .ll-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Research grid */
  .ll-research-grid {
    grid-template-columns: 1fr;
  }

  /* News rows: row 1 = icon · date, row 2 = body (full width) */
  .ll-news-row {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    gap: 8px 10px;
  }

  .ll-news-ic {
    grid-column: 1;
    grid-row: 1;
  }

  .ll-news-date {
    grid-column: 2;
    grid-row: 1;
  }

  .ll-news-body {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  /* Publications */
  .ll-pub-group {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ll-pub-year-col {
    position: static;
  }

  /* Contact */
  .ll-contact {
    grid-template-columns: 1fr;
    padding: 32px 24px;
    gap: 32px;
  }

  /* Footer */
  .ll-footer-inner {
    padding: 32px 24px 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ── TABLET: 2-column research/projects grid ─────────────── */
@media (min-width: 561px) and (max-width: 860px) {
  .ll-research-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── SMALL PHONES ────────────────────────────────────────── */
@media (max-width: 480px) {
  .ll-header-inner { padding: 12px 18px; }
  .ll-hero, .ll-section { padding: 40px 18px 28px; }
  .ll-section--news, .ll-section--pubs, .ll-section--contact { padding: 40px 18px; }
  .ll-icon-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ll-icon-link { padding: 11px 12px; }
  .ll-bio-toolbar { flex-wrap: wrap; gap: 8px; }
  .ll-bio-text, .ll-bio-logits { padding: 18px; }
  .ll-contact { padding: 28px 18px; }
  .ll-mobile-link { padding: 13px 18px; }
  /* Long venues / author strings shouldn't force horizontal scroll */
  .ll-pub-meta, .ll-pub-venue { overflow-wrap: anywhere; }
}
