/* ============================================================
   TOKENS & RESET
   ============================================================ */
:root {
  --bg-base:        #06060f;
  --bg-navy:        #080d1c;
  --bg-indigo:      #0b0e28;
  --bg-panel:       rgba(12, 14, 38, 0.72);

  --accent-pink:    #ff3fa4;
  --accent-gold:    #f0c040;
  --accent-lavender:#b898ff;
  --accent-peach:   #ff8c60;
  --accent-magenta: #d040a0;
  --accent-yellow:  #f5e642;
  --accent-blue:    #5b8af5;
  --accent-lime:   #C7F36B;
  --accent-teal:   #2dd4bf;

  --text-primary:   #eeeaf8;
  --text-secondary: #a09abf;
  --text-muted:     #6b6488;
  --text-accent:    #c8b4ff;

  --border-glow:    rgba(184, 152, 255, 0.18);
  --border-subtle:  rgba(160, 140, 220, 0.10);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-pill:9999px;

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-color: var(--accent-pink) rgba(255, 63, 164, 0.08);
  scrollbar-width: thin;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 63, 164, 0.05); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-pink), var(--accent-magenta));
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-pink); }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Global noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.55;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-lavender) 0%, var(--accent-magenta) 55%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-pink {
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-lavender) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

.section {
  position: relative;
  z-index: 1;
  padding: 7rem 0;
  max-width: 100%;
  box-sizing: border-box;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-lavender);
  margin-bottom: 1.2rem;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

/* ============================================================
   GLOWING ORBS (background decoration)
   ============================================================ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-pink   { background: radial-gradient(circle, rgba(255,63,164,0.28) 0%, transparent 70%); }
.orb-lavender { background: radial-gradient(circle, rgba(184,152,255,0.22) 0%, transparent 70%); }
.orb-gold   { background: radial-gradient(circle, rgba(240,192,64,0.18) 0%, transparent 70%); }
.orb-peach  { background: radial-gradient(circle, rgba(255,140,96,0.20) 0%, transparent 70%); }
.orb-magenta{ background: radial-gradient(circle, rgba(208,64,160,0.18) 0%, transparent 70%); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(6, 6, 15, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: padding 0.3s var(--ease-out);
}

.nav.scrolled {
  padding: 0.75rem 2.5rem;
  border-bottom-color: var(--border-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent-lavender);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }

.drawer-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glow);
  background: rgba(184, 152, 255, 0.07);
  color: var(--text-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: all 0.25s var(--ease-out);
  box-shadow: 0 0 12px rgba(184, 152, 255, 0.08);
}

.drawer-btn:hover {
  background: rgba(184, 152, 255, 0.14);
  border-color: var(--accent-lavender);
  box-shadow: 0 0 20px rgba(184, 152, 255, 0.22);
  color: var(--text-primary);
}

.drawer-btn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-pink);
  box-shadow: 0 0 6px var(--accent-pink);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 5rem;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(255,63,164,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 75%, rgba(184,152,255,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255,140,96,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 20% 85%, rgba(240,192,64,0.07) 0%, transparent 60%),
    linear-gradient(160deg, #080d1c 0%, #06060f 50%, #0b0e22 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  width: 100%;
  box-sizing: border-box;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-lavender);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.4rem;
  color: var(--text-primary);
  max-width: 100%;
  overflow-wrap: break-word;
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--ease-out) 0.4s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  width: 100%;
  margin-bottom: 2.8rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--ease-out) 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 100%;
  opacity: 0;
  animation: fadeSlideUp 0.9s var(--ease-out) 0.8s forwards;
}

/* Floating orb elements */
.hero-orb-1 {
  width: 520px; height: 520px;
  top: -80px; right: -100px;
  animation: float-slow 10s ease-in-out infinite;
}
.hero-orb-2 {
  width: 360px; height: 360px;
  bottom: 60px; right: 160px;
  animation: float-slow 13s ease-in-out infinite reverse;
}
.hero-orb-3 {
  width: 280px; height: 280px;
  bottom: -40px; left: 30%;
  animation: float-slow 8s ease-in-out infinite 2s;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-24px) scale(1.02); }
}

/* Constellation decoration */
.constellation {
  position: absolute;
  top: 15%; right: 8%;
  width: 320px; height: 320px;
  z-index: 1;
  opacity: 0;
  animation: fadeIn 1.5s var(--ease-out) 1s forwards;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-magenta));
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 63, 164, 0.35), 0 4px 16px rgba(0,0,0,0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 0 40px rgba(255, 63, 164, 0.55), 0 6px 24px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.btn-primary:hover::before { opacity: 1; }

.btn-secondary {
  background: transparent;
  color: var(--text-accent);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 12px rgba(184, 152, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(184, 152, 255, 0.08);
  border-color: var(--accent-lavender);
  box-shadow: 0 0 24px rgba(184, 152, 255, 0.2);
  transform: translateY(-2px);
  color: var(--text-primary);
}

/* ============================================================
   RESEARCH & PROJECTS LIST
   ============================================================ */
.list-section {
  background: transparent;
}

.section-header {
  margin-bottom: 3.5rem;
}

.list-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-lavender), transparent);
  margin-top: 0.8rem;
  margin-bottom: 0;
}

.item-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.list-item:first-child {
  border-top: 1px solid var(--border-subtle);
}

.list-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(184,152,255,0.04) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: var(--radius-sm);
}

.list-item:hover::before { opacity: 1; }

.list-item:hover {
  padding-left: 0.8rem;
  border-bottom-color: var(--border-glow);
}

.list-item-left {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Item thumbnail ─────────────────────────────────── */
.item-thumb {
  width: 120px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-indigo);
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
  opacity: 0.88;
}

.list-item:hover .item-thumb {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(184,152,255,0.15);
}

.project-item:hover .item-thumb {
  box-shadow: 0 0 20px rgba(255,63,164,0.15);
}

.list-item:hover .item-thumb img {
  transform: scale(1.05);
  opacity: 1;
}

/* Fallback gradient shown when no image provided */
.item-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(184,152,255,0.12) 0%, rgba(255,63,164,0.06) 100%);
}

.project-item .item-thumb-fallback {
  background: linear-gradient(135deg, rgba(255,63,164,0.12) 0%, rgba(240,192,64,0.06) 100%);
}

.item-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.55rem;
  box-shadow: 0 0 8px currentColor;
  transition: box-shadow 0.25s;
}

.research-item .item-dot { color: var(--accent-lavender); background: var(--accent-lavender); }
.project-item  .item-dot { color: var(--accent-pink);    background: var(--accent-pink); }

.list-item:hover .item-dot {
  box-shadow: 0 0 16px currentColor;
}

.item-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.list-item:hover .item-title { color: var(--accent-lavender); }

.project-item:hover .item-title { color: var(--accent-pink); }

.item-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.item-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.2rem;
  transition: all 0.2s var(--ease-out);
}

.list-item:hover .item-link {
  color: var(--accent-lavender);
  gap: 0.65rem;
}

.project-item:hover .item-link { color: var(--accent-pink); }

.item-arrow {
  transition: transform 0.2s var(--ease-out);
}

.list-item:hover .item-arrow { transform: translateX(4px); }

/* ============================================================
   SIDE DRAWER
   ============================================================ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 4, 14, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 201;
  width: min(400px, 92%);
  max-width: 100%;
  background: rgba(9, 9, 28, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid var(--border-glow);
  box-shadow: -20px 0 80px rgba(184, 152, 255, 0.08), -4px 0 24px rgba(0,0,0,0.5);
  clip-path: inset(0 0 0 100%);
  opacity: 0;
  pointer-events: none;
  transition: clip-path 0.42s var(--ease-out), opacity 0.25s var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 2.5rem;
}

.drawer.open {
  clip-path: inset(0);
  opacity: 1;
  pointer-events: all;
}

/* Drawer glow accent border */
.drawer::before {
  content: '';
  position: absolute;
  top: 0; left: -1px; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-lavender), var(--accent-pink), var(--accent-lavender), transparent);
  opacity: 0.5;
}

.drawer-close {
  align-self: flex-end;
  width: 36px; height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
  margin-bottom: 2rem;
}

.drawer-close:hover {
  color: var(--accent-pink);
}

.drawer-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin-bottom: 1.4rem;
  box-shadow: 0 0 32px rgba(184, 152, 255, 0.3);
  flex-shrink: 0;
  overflow: hidden;
}

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

.drawer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.drawer-tagline {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-lavender);
  letter-spacing: 0.12em;
  margin-bottom: 1.8rem;
  opacity: 0.8;
}

.drawer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 1.6rem 0;
}

.drawer-section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.drawer-bio {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.drawer-bio strong {
  color: var(--text-primary);
  font-weight: 600;
}

.drawer-bio a {
  color: var(--accent-magenta);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(184, 152, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
}

.drawer-link:hover {
  background: rgba(184, 152, 255, 0.09);
  border-color: var(--border-glow);
  color: var(--text-primary);
  transform: translateX(4px);
}

.drawer-link-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.drawer-link-icon.linkedin  { background: rgba(10, 102, 194, 0.2); }
.drawer-link-icon.github    { background: rgba(255,255,255,0.06); }
.drawer-link-icon.email     { background: rgba(255, 140, 96, 0.15); }
.drawer-link-icon.scholar   { background: rgba(66, 133, 244, 0.15); }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   LISTING PAGE HERO (research.html / projects.html)
   ============================================================ */
.listing-hero {
  position: relative;
  padding: 9rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 80% 30%, rgba(184,152,255,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 70%, rgba(255,63,164,0.07) 0%, transparent 60%),
    linear-gradient(160deg, #080d1c 0%, #06060f 60%, #0b0e22 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.listing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.listing-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.listing-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 540px;
}

/* ============================================================
   HOME PAGE PREVIEW SECTIONS
   ============================================================ */
.preview-section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.preview-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  padding-bottom: 0.15rem;
  transition: color 0.2s, gap 0.2s;
}

.preview-more-link:hover { color: var(--accent-lavender); gap: 0.65rem; }
.preview-more-link.projects:hover { color: var(--accent-pink); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.footer-text span {
  color: var(--accent-lavender);
  opacity: 0.7;
}

/* ============================================================
   DETAIL PAGE LAYOUT
   ============================================================ */
.detail-page {
  padding-top: 7rem;
  min-height: 100vh;
}

.detail-hero {
  position: relative;
  padding: 5rem 0 3.5rem;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(184,152,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 20% 70%, rgba(255,63,164,0.08) 0%, transparent 60%);
  z-index: 0;
}

.detail-hero-content { position: relative; z-index: 1; }

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}

.detail-breadcrumb a { color: var(--accent-lavender); transition: color 0.2s; }
.detail-breadcrumb a:hover { color: var(--text-primary); }

.detail-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.detail-summary {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.detail-tag {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.tag-research { background: rgba(184,152,255,0.12); color: var(--accent-lavender); border: 1px solid rgba(184,152,255,0.2); }
.tag-project  { background: rgba(255,63,164,0.10); color: var(--accent-pink);    border: 1px solid rgba(255,63,164,0.2); }
.tag-active   { background: rgba(240,192,64,0.10); color: var(--accent-gold);    border: 1px solid rgba(240,192,64,0.2); }
.tag-in-progress { background: rgba(255,140,96,0.10); color: var(--accent-peach); border: 1px solid rgba(255,140,96,0.2); }

.detail-body {
  padding: 4rem 0 6rem;
}

.detail-section {
  margin-bottom: 3.5rem;
}

.detail-section-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.detail-section-heading::before {
  content: '';
  display: block;
  width: 4px; height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-lavender), var(--accent-pink));
  flex-shrink: 0;
}

.detail-text {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.detail-text + .detail-text { margin-top: 1rem; }

.detail-text strong { color: var(--text-primary); font-weight: 600; }

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ============================================================
   GLASSY PANEL
   ============================================================ */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   NAV RIGHT GROUP & HAMBURGER
   ============================================================ */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glow);
  background: rgba(184, 152, 255, 0.07);
  color: var(--text-accent);
  transition: all 0.25s var(--ease-out);
}

.hamburger-btn:hover {
  background: rgba(184, 152, 255, 0.14);
  border-color: var(--accent-lavender);
}

.hamburger-icon line {
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
  transform-origin: center;
}

.hamburger-btn.active .ham-top    { transform: translateY(5px) rotate(45deg); }
.hamburger-btn.active .ham-mid    { opacity: 0; }
.hamburger-btn.active .ham-bottom { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU DROPDOWN
   ============================================================ */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 5rem 1.5rem 1.5rem;
  background: rgba(6, 6, 15, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glow);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out), opacity 0.3s var(--ease-out);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(184, 152, 255, 0.04);
  transition: all 0.2s var(--ease-out);
}

.mobile-menu-link:hover {
  background: rgba(184, 152, 255, 0.09);
  border-color: var(--border-glow);
  color: var(--text-primary);
  transform: translateX(4px);
}

.mobile-menu-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── Tablet ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-body { padding: 2.5rem 0 4rem; }
  .detail-section { margin-bottom: 2.5rem; }
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1.2rem; }
  .nav-links .nav-link-home,
  .nav-links .nav-link-research,
  .nav-links .nav-link-projects,
  .nav-links .nav-link-cv { display: none; }

  .hamburger-btn { display: flex; }

  .section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }
  .constellation { display: none; }

  /* Hero */
  .hero { min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); padding-top: 4rem; }
  .hero-orb-1 { width: 280px; height: 280px; right: -60px; top: -20px; }
  .hero-orb-2 { display: none; }
  .hero-orb-3 { display: none; }
  .hero-content { max-width: 100%; transform: none; }
  .hero-eyebrow { overflow-wrap: break-word; }
  .hero-title { margin-bottom: 1rem; }
  .hero-subtitle { margin-bottom: 2rem; }
  .hero-actions { gap: 0.75rem; }
  .hero-actions .btn { padding: 0.7rem 1.5rem; font-size: 0.85rem; }

  /* List items */
  .item-list,
  .list-item,
  .list-item-left,
  .item-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .list-item {
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.5rem 0;
  }
  .list-item:hover { padding-left: 0; }
  .list-item-left {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    flex: 0 1 auto;
    min-width: 0;
  }
  .item-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .item-thumb img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
  }
  .item-title,
  .item-desc {
    overflow-wrap: anywhere;
  }
  .item-link {
    padding-top: 0;
    align-self: flex-start;
    white-space: normal;
  }

  /* Preview header (index page) */
  .preview-section { padding: 3rem 0; }
  .preview-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Listing hero (research.html / projects.html) */
  .listing-hero { padding: 7rem 0 3rem; }

  /* Detail page */
  .detail-page { padding-top: 4rem; }
  .detail-hero { padding: 3rem 0 2rem; }
  .detail-body { padding: 2rem 0 3rem; }
  .detail-section { margin-bottom: 2rem; }
  .detail-title { margin-bottom: 0.75rem; }
  .detail-breadcrumb { margin-bottom: 1.2rem; flex-wrap: wrap; }
  .detail-links { flex-direction: column; }
  .detail-links .btn { justify-content: center; }

  /* Detail grids — collapse to single column */
  .detail-text [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Glass panels on mobile */
  .glass-panel { padding: 1.25rem; }

  /* Prevent orbs from causing horizontal overflow */
  .orb { max-width: 100%; }
}

/* ── Small phones (≤ 400px) ────────────────────────── */
@media (max-width: 400px) {
  .container { padding: 0 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-title { font-size: clamp(2.1rem, 10vw, 2.6rem); }
  .btn { padding: 0.7rem 1.2rem; font-size: 0.85rem; }
  .drawer { padding: 2rem 1.5rem; }
  .listing-hero { padding: 6rem 0 2.5rem; }
  .item-thumb {
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .nav { padding: 0.85rem 1rem; }
  .drawer-btn { padding: 0.4rem 0.75rem; font-size: 0.72rem; }
}

@media (min-width: 769px) {
  .nav-links .nav-link-home,
  .nav-links .nav-link-research,
  .nav-links .nav-link-projects { display: inline; }

  .mobile-menu { display: none; }
}
