/* ═══════════════════════════════════════════════
   Valeria Fascianelli — Personal Website
   ═══════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --dark:        #080e1c;
  --dark-2:      #0d1528;
  --accent:      #4f46e5;
  --accent-2:    #7c74f5;
  --white:       #ffffff;
  --off-white:   #f7f8fc;
  --border:      #e8eaf0;
  --text:        #1a2038;
  --text-mid:    #4a5474;
  --text-muted:  #6e7a96;
  --text-light:  #9aa3bc;

  --nav-h:       64px;
  --max-w:       1100px;
  --radius:      10px;
  --radius-lg:   18px;

  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── SCROLL PROGRESS ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, var(--accent), var(--accent-2), #a78bfa);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
sup { font-size: 0.65em; vertical-align: super; }
strong { font-weight: 600; }

/* ── TYPOGRAPHY ── */
h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* animated underline on h2 when revealed */
h2.reveal::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), rgba(79,70,229,0));
  margin-top: 0.65rem;
  border-radius: 2px;
  transition: width 0.7s var(--ease) 0.3s;
}
h2.reveal.visible::after { width: 80px; }

.label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.label-light { color: rgba(255,255,255,0.45); }

.section-intro {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 2.75rem;
}

.inline-link {
  color: var(--accent);
  border-bottom: 1px solid rgba(79,70,229,0.25);
  transition: border-color 0.2s, color 0.2s;
}
.inline-link:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

/* ── LAYOUT ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 5.5rem 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 50px;
  padding: 0.7rem 1.6rem;
  transition: all 0.22s var(--ease);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 3px 16px rgba(79,70,229,0.3);
}
.btn-primary:hover {
  background: #4138d6;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(79,70,229,0.4);
}
.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-light {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  transition: all 0.2s;
}
.btn-outline-light:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(8,14,28,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}
.nav-logo:hover { color: var(--accent-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-links li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.68);
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  transition: color 0.2s, background 0.2s;
}
.nav-links li a:hover { color: var(--white); background: rgba(255,255,255,0.07); }
.nav-pill {
  color: var(--white) !important;
  background: var(--accent) !important;
  padding: 0.45rem 1.1rem !important;
}
.nav-pill:hover { background: #4138d6 !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.nav-burger span {
  display: block;
  width: 21px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.28s, opacity 0.28s;
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--dark);
  display: flex;
  align-items: center;
  overflow: hidden;
}
#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.28;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  min-height: 100vh;
  width: 100%;
}

.hero-text { flex: 1; max-width: 560px; }

.hero-tag {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3.2rem, 6.5vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}
.hero-name em {
  font-style: italic;
  display: inline-block;
  padding-right: 0.08em;
  background: linear-gradient(120deg, var(--accent-2) 0%, #a78bfa 40%, var(--accent-2) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: name-shimmer 5s linear infinite;
}
@keyframes name-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-role {
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 2.25rem;
}

.hero-ctas {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

/* Photo */
.hero-photo { flex-shrink: 0; }

.photo-orbit {
  position: relative;
  width: 300px;
  height: 300px;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(124, 116, 245, 0.2);
  pointer-events: none;
}
.orbit-ring-1 {
  inset: -22px;
  animation: spin 22s linear infinite;
}
.orbit-ring-2 {
  inset: -42px;
  border-color: rgba(124, 116, 245, 0.1);
  animation: spin 36s linear infinite reverse;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.orbit-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.orbit-dot-1 {
  width: 8px; height: 8px;
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(124, 116, 245, 0.7);
  top: -26px; left: 50%;
  transform-origin: 4px 176px;
  animation: spin 22s linear infinite;
}
.orbit-dot-2 {
  width: 5px; height: 5px;
  background: rgba(124, 116, 245, 0.6);
  box-shadow: 0 0 8px rgba(124, 116, 245, 0.5);
  bottom: 15%; right: -47px;
  transform-origin: -196px 2.5px;
  animation: spin 36s linear infinite reverse;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 0 10px rgba(79,70,229,0.07), 0 24px 64px rgba(0,0,0,0.5);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.25));
  animation: scroll-line 1.8s ease-in-out infinite;
}
@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* stagger for cards */
.r-card:nth-child(2) { transition-delay: 0.08s; }
.r-card:nth-child(3) { transition-delay: 0.16s; }
.r-card:nth-child(4) { transition-delay: 0.24s; }

/* ── ABOUT ── */
.about {
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.about::before {
  content: '';
  position: absolute;
  top: -80px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(79,70,229,0.055) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.about::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(8,145,178,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-copy p {
  font-size: 0.97rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.about-links {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.about-links .sep { margin: 0 0.5rem; }

.about-side { display: flex; flex-direction: column; gap: 1.25rem; }

/* Current position card */
.position-card {
  background: var(--off-white);
  border: 1.5px solid rgba(79,70,229,0.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.position-card .card-label { color: var(--accent); margin-bottom: 1.25rem; }

.position-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.position-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.position-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.position-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.position-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.position-card .card-label-prev { margin-top: 1.5rem; color: var(--text-muted); }
.position-item-prev strong { color: var(--text-mid); font-weight: 500; }
.position-item-prev span { color: var(--text-muted); }
.position-item-prev .position-dot { background: var(--text-muted); opacity: 0.55; }

/* Cards in sidebar */
.edu-card, .awards-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s;
}
.edu-card:hover, .awards-card:hover {
  border-color: rgba(79,70,229,0.2);
  box-shadow: 0 8px 32px rgba(79,70,229,0.07);
}
.card-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.edu-list { display: flex; flex-direction: column; gap: 1.1rem; }
.edu-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.edu-list li:last-child { border-bottom: none; padding-bottom: 0; }
.edu-list strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.edu-list span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.awards-list { display: flex; flex-direction: column; gap: 0.9rem; }
.awards-list li {
  font-size: 0.845rem;
  color: var(--text-mid);
  line-height: 1.5;
  display: flex;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.awards-list li:last-child { border-bottom: none; padding-bottom: 0; }
.award-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 30px;
  flex-shrink: 0;
  padding-top: 1px;
}

/* ── CV / EXPERIENCE ── */
.cv-section { background: var(--off-white); }

.cv-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}
.cv-header h2 { margin-bottom: 0; }

.cv-block {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.cv-block:last-child { border-bottom: 1px solid var(--border); }

.cv-block-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.cv-entries {
  display: block;
  column-gap: 1.5rem;
}
.cv-2col { column-count: 2; }
.cv-3col { column-count: 3; }

.cv-entry {
  display: flex;
  gap: 0.75rem;
  padding: 0.55rem 0.5rem;
  border-radius: 6px;
  align-items: baseline;
  transition: background 0.15s;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 0.15rem;
}
.cv-entry:hover { background: var(--border); }

.cv-year {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 44px;
  flex-shrink: 0;
  padding-top: 1px;
}

.cv-entry span:last-child {
  font-size: 0.845rem;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ── RESEARCH ── */
.research { background: var(--off-white); }

/* ── GALLERY ── */
.gallery { background: var(--off-white); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(26,32,56,0.10); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); cursor: zoom-in; }
.gallery-item img:hover { transform: scale(1.03); box-shadow: 0 16px 40px rgba(26,32,56,0.18); }
.gallery-caption { margin-top: 0.7rem; font-size: 0.78rem; color: var(--text-muted); line-height: 1.55; }
.gallery-caption a { color: var(--accent); }
.gallery-caption a:hover { text-decoration: underline; }

.r-list {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

.r-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  cursor: default;
  transition: background 0.25s var(--ease), border-left-color 0.25s var(--ease), padding-left 0.25s var(--ease);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.r-item:hover {
  border-left-color: var(--item-color, var(--accent));
  background: rgba(var(--item-rgb, 79,70,229), 0.05);
  padding-left: 1.75rem;
}
.r-item:hover .r-text { color: var(--text); }

.r-item:nth-child(1) { --item-color: #4f46e5; --item-rgb: 79,70,229; }
.r-item:nth-child(2) { --item-color: #7c3aed; --item-rgb: 124,58,237; }
.r-item:nth-child(3) { --item-color: #9333ea; --item-rgb: 147,51,234; }
.r-item:nth-child(4) { --item-color: #0891b2; --item-rgb: 8,145,178; }

.r-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--item-color, var(--accent));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.r-item:hover .r-num {
  opacity: 1;
  transform: scale(1.1);
}

.r-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.3;
  transition: color 0.25s;
}

/* ── HIGHLIGHTED RESEARCH ── */
.highlights { background: var(--off-white); }

.hl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-top: 2rem;
  transition: box-shadow 0.25s var(--ease);
}
.hl-card:hover { box-shadow: 0 16px 56px rgba(0,0,0,0.08); }

/* Header row */
.hl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.hl-badges { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hl-journal {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #2563eb;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.18);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
}
.hl-journal-nature {
  color: #dc2626;
  background: rgba(220,38,38,0.08);
  border-color: rgba(220,38,38,0.18);
}

.hl-read {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.2s;
}
.hl-read:hover { color: var(--accent-2); }

.hl-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.hl-metric { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hl-metric-n {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.hl-metric-l {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Body: text + figures */
.hl-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.hl-body-full { grid-template-columns: 1fr; }

.hl-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.hl-authors {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.hl-extract {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.75;
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  margin: 0;
  font-style: normal;
}

/* Figures */
.hl-fig-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hl-fig {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--off-white);
}
.hl-fig img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s var(--ease);
  cursor: zoom-in;
}
.hl-fig:hover img { transform: scale(1.02); }
.hl-fig figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.6rem;
  line-height: 1.4;
  border-top: 1px solid var(--border);
}

/* ── PUBLICATIONS ── */
.pubs { background: var(--white); }

.pub-block { margin-bottom: 3.5rem; }

.pub-block-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pub-scholar-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  transition: color 0.2s;
}
.pub-scholar-link:hover { color: var(--accent-2); }

.pub-block-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1.25rem;
  max-width: 680px;
  line-height: 1.65;
}

.pub-list { display: flex; flex-direction: column; }

.pub-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.1rem 0.5rem;
  border-bottom: 1px solid var(--off-white);
  transition: background 0.15s;
  border-radius: var(--radius);
}
.pub-item:last-child { border-bottom: none; }
.pub-item:hover { background: var(--off-white); }

.pub-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 82px;
  flex-shrink: 0;
  padding-top: 1px;
}
.pub-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}
.pub-venue {
  font-size: 0.71rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.pub-status {
  font-size: 0.69rem;
  font-weight: 500;
  color: var(--text-light);
  font-style: italic;
}

.pub-body { flex: 1; min-width: 0; }
.pub-title {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.3rem;
}
.pub-title em { font-style: italic; color: var(--text-mid); }
.co-first {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: normal;
}

.pub-link {
  display: inline-block;
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.25rem;
  transition: color 0.15s;
}
.pub-link:hover { color: var(--accent-2); }


/* ── CONTACT ── */
.contact {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.contact::after {
  content: '';
  position: absolute;
  top: -220px; left: -220px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.12), transparent 70%);
  pointer-events: none;
}

.h2-light {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.contact-intro {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact-col { display: flex; flex-direction: column; gap: 2rem; }

.contact-item { display: flex; flex-direction: column; gap: 0.35rem; }
.ci-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 0.2rem;
}
.ci-val {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
}
.ci-email {
  color: var(--accent-2);
  font-weight: 500;
  transition: color 0.2s;
}
.ci-email:hover { color: var(--white); }

.social-list { display: flex; flex-direction: column; margin-top: 0.35rem; }
.social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.social-row:last-child { border-bottom: none; }
.social-row:hover { color: var(--white); }
.social-arrow { font-size: 0.8rem; opacity: 0.5; }

.press-row { margin-top: 1.5rem; }
.press-link {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.press-link:hover { color: rgba(255,255,255,0.8); }

/* ── FOOTER ── */
.footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2rem 0;
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transform: scale(0.94);
  transition: transform 0.28s var(--ease);
}
.lightbox.open .lightbox-content { transform: scale(1); }

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
.lightbox-caption {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}
.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

/* ── TABLET (≤ 1024px) ── */
@media (max-width: 1024px) {
  .about-grid { gap: 3rem; }
  .cv-3col { column-count: 2; }
}

/* ── MOBILE/TABLET (≤ 860px) ── */
@media (max-width: 860px) {

  /* Nav */
  .nav-burger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(8,14,28,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.15rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius);
    display: block;
  }
  .nav-pill { text-align: center; }

  /* Hero */
  .hero-inner {
    flex-direction: column-reverse;
    justify-content: center;
    text-align: center;
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 5rem;
    gap: 2rem;
    align-items: center;
    min-height: 100svh;
  }
  .hero-text { max-width: 100%; }
  .hero-tag { justify-content: center; display: flex; }
  .hero-desc { margin: 0 auto 2rem; max-width: 400px; }
  .hero-ctas { justify-content: center; }

  /* Photo orbit — scaled down */
  .photo-orbit { width: 200px; height: 200px; }
  .orbit-ring-1 { inset: -18px; }
  .orbit-ring-2 { inset: -34px; }
  .orbit-dot-1 { top: -22px; transform-origin: 4px 122px; }
  .orbit-dot-2 { transform-origin: -142px 2.5px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Highlights */
  .hl-body { grid-template-columns: 1fr; gap: 2rem; }
  .hl-fig-grid { flex-direction: row; }
  .hl-metrics { gap: 1rem; }
  .hl-header { flex-direction: column; align-items: flex-start; }

  /* CV */
  .cv-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .cv-2col, .cv-3col { column-count: 1; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── MOBILE (≤ 600px) ── */
@media (max-width: 600px) {
  :root { --nav-h: 58px; }

  .section { padding: 3.5rem 0; }
  .container { padding: 0 1.1rem; }

  /* Hero */
  .hero-name { letter-spacing: -0.025em; }
  .hero-desc { font-size: 0.95rem; }
  .hero-ctas { flex-direction: column; align-items: center; gap: 0.75rem; }
  .hero-ctas .btn { width: 100%; max-width: 260px; justify-content: center; }
  .photo-orbit { width: 160px; height: 160px; }
  .orbit-ring-1 { inset: -16px; }
  .orbit-ring-2 { inset: -28px; }
  .orbit-dot-1 { width: 7px; height: 7px; top: -20px; transform-origin: 3.5px 100px; }
  .orbit-dot-2 { width: 5px; height: 5px; transform-origin: -118px 2.5px; }

  /* Research items */
  .r-item { gap: 1.25rem; padding: 1.25rem 0.75rem; }
  .r-text { font-size: 1rem; }

  /* Publications */
  .pub-item {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    padding: 1rem 0.25rem;
  }
  .pub-meta {
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    min-width: auto;
    width: 100%;
  }
  .pub-block-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  /* CV entries */
  .cv-entry { padding: 0.5rem 0.25rem; }

  /* Highlights */
  .hl-fig-grid { flex-direction: column; }
  .hl-card { padding: 1.5rem; }
  .hl-metric-n { font-size: 1.1rem; }

  /* Contact */
  .contact-intro { font-size: 0.95rem; }

  /* Footer */
  .footer p { font-size: 0.73rem; }
}

/* ── SMALL PHONES (≤ 390px) ── */
@media (max-width: 390px) {
  .hero-name { font-size: 2.8rem; }
  .section { padding: 3rem 0; }
  .container { padding: 0 1rem; }
  .photo-orbit { width: 140px; height: 140px; }
  .orbit-ring-1 { inset: -14px; }
  .orbit-ring-2 { inset: -24px; }
  .orbit-dot-1 { transform-origin: 3.5px 88px; }
  .orbit-dot-2 { transform-origin: -104px 2.5px; }
  .r-item { padding: 1rem 0.5rem; }
  .r-text { font-size: 0.95rem; }
  .cv-block { padding: 1.5rem 0; }
  .cv-year { min-width: 38px; font-size: 0.68rem; }
  .cv-entry span:last-child { font-size: 0.8rem; }
}
