/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #050A14;
  --bg2: #080F1E;
  --bg3: #0D1929;
  --accent: #00D4FF;
  --accent2: #7B61FF;
  --text: #E8F4FD;
  --text-muted: #6B8BA4;
  --border: rgba(0,212,255,0.12);
  --card-bg: rgba(13,25,41,0.8);
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  background: #050A14;
}
html.light-mode {
  background: #F5F7FA;
  color-scheme: light;
}
html.theme-ready {
  transition: background-color 0.5s ease;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.6;
}
body.theme-ready {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.accent { color: var(--accent); }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ===== LIGHT MODE ===== */
/* html.light-mode catches inline-script (head) before body exists;
   body.light-mode catches main.js toggle — both needed */
html.light-mode, body.light-mode {
  --bg: #F5F7FA;
  --bg2: #ECEEF2;
  --bg3: #E2E5EB;
  --text: #0D1929;
  --text-muted: #4A5568;
  --border: rgba(0,100,150,0.30);
  --card-bg: rgba(255,255,255,0.92);
  --accent: #007AB8;
  --accent2: #5B46D6;
}
/* Navbar scroll state */
#navbar.scrolled { background: rgba(5,10,20,0.97); }
body.light-mode #navbar { background: #EBF0F6; border-bottom-color: rgba(0,120,180,0.25); backdrop-filter: none; }
body.light-mode #navbar.scrolled { background: #E4E9F2; }
body.light-mode .nav-logo { color: var(--text); }
body.light-mode .nav-links a { color: var(--text-muted); }
body.light-mode .nav-hamburger span { background: var(--text-muted); }
body.light-mode .hero-tag { background: rgba(0,122,184,0.08); }
body.light-mode .btn-ghost { background: rgba(0,0,0,0.04); }
body.light-mode .pub-item, body.light-mode .proj-card-new,
body.light-mode .award-item, body.light-mode .contact-card { background: white; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(5,10,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.5s ease, border-color 0.5s ease;
}
.nav-logo {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 600;
  color: var(--text); letter-spacing: 0.1em; text-decoration: none;
}
.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.875rem;
  font-weight: 500; transition: color 0.2s; letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 2rem; }

/* Theme toggle */
.theme-toggle {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: transparent; border: none;
  cursor: pointer; padding: 4px; width: 34px; height: 34px;
}
.nav-hamburger span {
  display: block; height: 2px; width: 22px;
  background: var(--text-muted); border-radius: 2px;
  transition: all 0.25s;
}
.nav-hamburger:hover span { background: var(--accent); }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: -100%; width: min(320px, 85vw); height: 100vh;
  background: var(--bg2); border-left: 1px solid var(--border);
  z-index: 200; padding: 5rem 2.5rem 2rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
}
.mobile-menu.open { right: 0; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-link {
  display: block; padding: 0.85rem 0;
  color: var(--text-muted); text-decoration: none;
  font-size: 1.05rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-link:hover, .mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--accent); }
.mobile-menu-close {
  position: absolute; top: 1.4rem; right: 1.4rem;
  background: transparent; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; padding: 0.4rem;
  transition: color 0.2s;
}
.mobile-menu-close:hover { color: var(--accent); }
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 199; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

/* ACIS venue tag */
.venue-tag.acis { color: #FF9F43; background: rgba(255,159,67,0.1); border-color: rgba(255,159,67,0.4); }

/* ===== HERO ===== */
#hero {
  position: relative; height: 100vh; min-height: 700px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: 100vw;
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.hero-tag {
  color: var(--accent); font-size: 0.78rem; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.9;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 2rem;
  background: rgba(0,212,255,0.05);
}
.hero-content h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted); letter-spacing: 0.05em;
  font-weight: 400;
}
.hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
}
.badge {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--text); border: 1px solid rgba(123,97,255,0.55);
  background: rgba(123,97,255,0.18);
  padding: 0.3rem 0.85rem; border-radius: 0.25rem;
  text-shadow: 0 0 10px rgba(123,97,255,0.6);
}
.badge:nth-child(odd) {
  border-color: rgba(0,212,255,0.5); background: rgba(0,212,255,0.12);
  text-shadow: 0 0 10px rgba(0,212,255,0.5);
}

/* Hero profile photo */
.hero-profile {
  display: flex; align-items: center; justify-content: center;
}
#hero-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(0,212,255,0.7);
  box-shadow: 0 0 24px rgba(0,212,255,0.25), 0 0 60px rgba(0,212,255,0.1);
}
.hero-avatar-fallback {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--bg3); border: 2px solid rgba(0,212,255,0.7);
  display: none; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--accent);
  box-shadow: 0 0 24px rgba(0,212,255,0.25);
}
.hero-cta { display: flex; gap: 1rem; margin-top: 0.5rem; }
.btn-primary {
  padding: 0.75rem 2rem; background: var(--accent);
  color: var(--bg); font-weight: 600; font-size: 0.9rem;
  border-radius: 0.4rem; text-decoration: none;
  transition: all 0.2s; letter-spacing: 0.03em;
}
.btn-primary:hover { background: #33DEFF; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,212,255,0.3); }
.btn-ghost {
  padding: 0.75rem 2rem; border: 1px solid var(--border);
  color: var(--text); font-weight: 500; font-size: 0.9rem;
  border-radius: 0.4rem; text-decoration: none;
  transition: all 0.2s; letter-spacing: 0.03em;
  background: rgba(255,255,255,0.03);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-muted); z-index: 2;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.3;transform:scaleY(1)} 50%{opacity:1;transform:scaleY(1.2)} }

/* ===== SECTIONS ===== */
section { padding: 7rem 0; }
section:nth-child(even) { background: var(--bg2); }

.section-label {
  color: var(--accent); font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 1.2rem; opacity: 0.8;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 3rem; line-height: 1.2;
}

/* ===== ABOUT ===== */
.about-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem;
}

/* Tabs */
.about-tabs {
  display: flex; gap: 0; margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.atab {
  font-family: var(--font); font-size: 0.88rem; font-weight: 500;
  color: var(--text-muted); background: transparent; border: none;
  padding: 0.75rem 1.5rem; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s; letter-spacing: 0.02em;
}
.atab:hover { color: var(--text); }
.atab.active { color: var(--accent); border-bottom-color: var(--accent); }

.atab-content { display: none; }
.atab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

.about-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 5rem; align-items: start;
}
.about-text { width: 100%; }
.about-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; line-height: 1.3; margin-bottom: 1.5rem;
}
.about-text p {
  color: var(--text-muted); margin-bottom: 1rem; font-size: 1rem; line-height: 1.8;
  text-align: justify !important; hyphens: auto; overflow-wrap: break-word;
  -webkit-hyphens: auto; -ms-hyphens: auto;
}
.about-text strong { color: var(--text); }
.about-text em { color: var(--accent); font-style: normal; }
.about-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.link-pill {
  padding: 0.4rem 1rem; border: 1px solid var(--border);
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
  border-radius: 2rem; transition: all 0.2s; background: rgba(255,255,255,0.02);
}
.link-pill:hover { border-color: var(--accent); color: var(--accent); }
.cv-pill {
  color: var(--accent) !important; border-color: rgba(0,212,255,0.4) !important;
  background: rgba(0,212,255,0.08) !important; font-weight: 600;
}
.cv-pill:hover { background: rgba(0,212,255,0.16) !important; box-shadow: 0 0 14px rgba(0,212,255,0.2); }

/* Profile photo in About tab */
.about-photo-wrap {
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 0.5rem;
}
.about-profile-img {
  width: 210px; height: 210px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 2px solid rgba(0,212,255,0.55);
  box-shadow: 0 0 32px rgba(0,212,255,0.18), 0 0 80px rgba(0,212,255,0.07);
}

/* Experience tab two-column layout */
.exp-edu-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}
.edu-sidebar { padding-top: 0.25rem; }

/* Education sidebar */
.about-edu { padding-top: 0.5rem; }
.side-title { font-size: 0.78rem; font-family: var(--mono); color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1.5rem; opacity: 0.8; }
.edu-list { display: flex; flex-direction: column; gap: 1.5rem; }
.edu-item { display: flex; gap: 1rem; align-items: flex-start; }
.edu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 5px; box-shadow: 0 0 6px rgba(0,212,255,0.5); }
.edu-degree { font-size: 0.88rem; font-weight: 600; }
.edu-school { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }
.edu-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; opacity: 0.7; }

/* Experience timeline */
.exp-timeline { display: flex; flex-direction: column; gap: 0; max-width: 820px; }
.exp-item { display: grid; grid-template-columns: 100px 1fr; gap: 1.5rem; position: relative; }
.exp-left { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.exp-year { font-size: 0.68rem; color: var(--accent); opacity: 0.8; margin-bottom: 0.6rem; white-space: nowrap; }
.exp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--border); flex-shrink: 0; }
.exp-dot.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(0,212,255,0.5); }
.exp-line { flex: 1; width: 1px; background: var(--border); margin: 4px 0; min-height: 40px; }
.exp-body { padding: 0 0 2.5rem 0; }
.exp-role { font-size: 1rem; font-weight: 600; }
.exp-org { font-size: 0.875rem; color: var(--accent); margin-top: 0.2rem; }
.exp-loc { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; opacity: 0.7; margin-bottom: 0.75rem; }
.exp-body p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.75rem; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.exp-tags span { font-family: var(--mono); font-size: 0.62rem; color: var(--accent); background: rgba(0,212,255,0.07); border: 1px solid rgba(0,212,255,0.2); padding: 0.18rem 0.5rem; border-radius: 0.2rem; }

.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.5rem; text-align: center;
  backdrop-filter: blur(8px);
}
.stat-num { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.stat-plus { font-size: 1.5rem; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.4rem; font-family: var(--mono); }

/* ===== RESEARCH ===== */
.research-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  max-width: 100%;
}
.research-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 2rem;
  transition: all 0.3s; position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
}
.research-card::before {
  content: attr(data-index); position: absolute; top: 1rem; right: 1.2rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--accent); opacity: 0.4;
}
.research-card:hover {
  border-color: rgba(0,212,255,0.3); transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,212,255,0.08);
}
.rc-icon { width: 48px; height: 48px; margin-bottom: 1.25rem; }
.rc-icon svg { width: 100%; height: 100%; }
.research-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.75rem; }
.research-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.25rem; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rc-tags span {
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--accent); background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 0.2rem 0.5rem; border-radius: 0.2rem;
}

/* ===== PUBLICATIONS ===== */
.pub-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.pub-header .section-title { margin-bottom: 0; }
.pub-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pf-btn {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  padding: 0.35rem 0.9rem; border-radius: 2rem;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.pf-btn:hover { border-color: var(--accent); color: var(--accent); }
.pf-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,0.08); }
.pf-btn.hidden-filter { display: none; }

.pub-list { display: flex; flex-direction: column; gap: 1.25rem; }
.pub-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 0.75rem; overflow: hidden;
  display: grid; grid-template-columns: 140px 1fr;
  transition: all 0.3s; backdrop-filter: blur(8px);
}
.pub-item:hover {
  border-top-color: rgba(0,212,255,0.25);
  border-right-color: rgba(0,212,255,0.25);
  border-bottom-color: rgba(0,212,255,0.25);
  border-left-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 4px 0 20px rgba(0,212,255,0.05);
}
.pub-item.pub-hidden { display: none; }

/* Publication thumbnail */
.pub-thumb {
  position: relative; overflow: hidden;
  background: var(--bg3); min-height: 140px;
}
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.75) saturate(0.9); transition: all 0.3s; }
.pub-item:hover .pub-thumb img { filter: brightness(0.9) saturate(1.1); transform: scale(1.05); }
.pub-thumb-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 0.75rem; padding: 1rem;
}
.pt-icon { width: 52px; height: 52px; }
.pt-icon svg { width: 100%; height: 100%; }
.pt-venue {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.5;
}
.pub-thumb-chi { background: linear-gradient(135deg, #050A14 0%, #0a1a2e 100%); }
.pub-thumb-caadria { background: #060d1a; }
.pub-thumb-sigspatial { background: linear-gradient(135deg, #080814 0%, #110a1e 100%); }
.pub-thumb-ieee { background: linear-gradient(135deg, #0d0a00 0%, #1a1200 100%); }

.pub-body { padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.pub-meta-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.venue-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.82rem;
  font-weight: 700; padding: 0.35rem 0.75rem; border-radius: 0.3rem;
  letter-spacing: 0.06em;
}
.venue-tag.chi { background: rgba(0,212,255,0.15); color: var(--accent); border: 1px solid rgba(0,212,255,0.3); }
.venue-tag.caadria { background: rgba(0,212,255,0.1); color: #60B8D4; border: 1px solid rgba(0,212,255,0.2); }
.venue-tag.sigspatial { background: rgba(123,97,255,0.1); color: #9B8BFF; border: 1px solid rgba(123,97,255,0.2); }
.venue-tag.ieee { background: rgba(255,180,0,0.1); color: #FFB400; border: 1px solid rgba(255,180,0,0.2); }
.pub-badge {
  font-family: var(--mono); font-size: 0.62rem;
  color: var(--accent2); background: rgba(123,97,255,0.1);
  border: 1px solid rgba(123,97,255,0.25);
  padding: 0.2rem 0.55rem; border-radius: 0.25rem; white-space: nowrap;
}
.pub-body h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.45; color: var(--text); }
.pub-authors { color: var(--text-muted); font-size: 0.8rem; }
.pub-authors strong { color: var(--accent); font-weight: 600; }
.pub-abstract { color: var(--text-muted); font-size: 0.82rem; line-height: 1.65; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.2rem; }
.pub-tags span {
  font-family: var(--mono); font-size: 0.6rem;
  color: var(--text-muted); background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.18rem 0.5rem; border-radius: 0.2rem;
}

/* ===== PROJECTS NEW ===== */
.projects-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}
.proj-card-new {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 0.875rem; overflow: hidden;
  transition: all 0.35s; backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
}
.proj-card-new:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-5px); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.proj-card-new.large-left { grid-column: span 2; flex-direction: row; }

/* Image wrap */
.proj-img-wrap {
  position: relative; overflow: hidden; flex-shrink: 0;
  background: var(--bg3); height: 200px;
}
.proj-card-new.large-left .proj-img-wrap { height: 100%; min-height: 260px; width: 55%; }
.proj-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease; filter: brightness(0.8) saturate(0.85);
}
.proj-card-new:hover .proj-img-wrap img { transform: scale(1.06); filter: brightness(0.95) saturate(1); }
.proj-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,10,20,0.85) 0%, rgba(5,10,20,0.1) 60%, transparent 100%);
  z-index: 1;
}
.proj-img-content { position: absolute; bottom: 0.75rem; left: 0.85rem; z-index: 2; }
.proj-venue-badge {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.08em;
  color: var(--accent); background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  padding: 0.25rem 0.65rem; border-radius: 2rem;
}

/* Ghost scene placeholder */
.ghost-placeholder { background: linear-gradient(135deg, #07091a 0%, #0d0820 100%); }
.ghost-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ghost-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(123,97,255,0.25); animation: ringExpand 3s ease-in-out infinite;
}
.ghost-ring.r1 { width: 120px; height: 120px; }
.ghost-ring.r2 { width: 180px; height: 180px; animation-delay: 0.8s; border-color: rgba(0,212,255,0.15); }
@keyframes ringExpand { 0%,100%{transform:scale(1);opacity:0.4} 50%{transform:scale(1.08);opacity:0.8} }

.ghost-hand-l, .ghost-hand-r {
  position: absolute; width: 38px; height: 52px;
  border: 1.5px solid rgba(123,97,255,0.55);
  border-radius: 8px 8px 6px 6px;
  box-shadow: 0 0 20px rgba(123,97,255,0.2);
  animation: ghostFloat 2.5s ease-in-out infinite;
}
.ghost-hand-l { left: calc(50% - 55px); }
.ghost-hand-r { right: calc(50% - 55px); animation-delay: 0.4s; }
.ghost-hand-l::before, .ghost-hand-r::before {
  content:''; position: absolute; top: -14px; left: 5px;
  width: 28px; height: 14px;
  border-top: 1.5px solid rgba(123,97,255,0.35);
  border-left: 1.5px solid rgba(123,97,255,0.35);
  border-right: 1.5px solid rgba(123,97,255,0.35);
  border-radius: 4px 4px 0 0;
}
@keyframes ghostFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.ghost-keys {
  position: absolute; bottom: 28%; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, transparent 0px, transparent 12px, rgba(0,212,255,0.08) 12px, rgba(0,212,255,0.08) 14px);
}

/* Card info */
.proj-card-info { padding: 1.3rem 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }
.proj-card-new.large-left .proj-card-info { padding: 1.75rem; justify-content: center; }
.proj-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.proj-card-year { color: var(--accent); font-size: 0.7rem; opacity: 0.7; }
.proj-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.proj-card-tags span {
  font-family: var(--mono); font-size: 0.6rem;
  color: var(--accent); background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.18);
  padding: 0.18rem 0.55rem; border-radius: 0.2rem;
}
.proj-card-info h3 { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.proj-card-new.large-left .proj-card-info h3 { font-size: 1.2rem; }
.proj-card-info p { color: var(--text-muted); font-size: 0.845rem; line-height: 1.7; }
.proj-authors { font-size: 0.75rem !important; opacity: 0.7; margin-top: 0.2rem; }

/* Extra projects hidden by default */
.proj-extra { display: none !important; }
.proj-extra.visible { display: flex !important; }

.proj-more-row { display: flex; justify-content: center; margin-top: 2.5rem; }
.proj-more-btn {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--accent); background: transparent;
  border: 1px solid rgba(0,212,255,0.35); border-radius: 2rem;
  padding: 0.55rem 1.75rem; cursor: pointer;
  transition: all 0.2s;
}
.proj-more-btn:hover { background: rgba(0,212,255,0.08); border-color: var(--accent); }
.proj-more-btn.hidden { display: none; }

/* ===== AWARDS ===== */
.awards-list { display: flex; flex-direction: column; gap: 0; }
.award-item {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}
.award-item:last-child { border-bottom: none; }
.award-item:hover { padding-left: 0.5rem; }
.award-year { color: var(--accent); min-width: 50px; font-size: 0.78rem; }
.award-body { flex: 1; }
.award-title { font-weight: 600; font-size: 0.95rem; }
.award-org { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.2rem; }
.award-icon { font-size: 1.3rem; }

/* ===== CONTACT ===== */
.contact-header { margin-bottom: 3rem; }
.contact-header h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
.contact-header p { color: var(--text-muted); font-size: 1rem; max-width: 540px; }
.contact-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.85rem; text-align: center;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.75rem 1rem;
  text-decoration: none; color: var(--text);
  transition: all 0.3s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,212,255,0.1); }
.contact-card-cv {
  border-color: rgba(0,212,255,0.35); background: rgba(0,212,255,0.06);
}
.contact-card-cv:hover { background: rgba(0,212,255,0.12) !important; }
.contact-card-cv .cc-value { color: var(--accent); }
.cc-icon {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: var(--accent);
}
.cc-icon svg { width: 18px; height: 18px; }
.cc-label { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 0.15rem; font-family: var(--mono); letter-spacing: 0.05em; }
.cc-value { font-size: 0.85rem; font-weight: 500; word-break: break-word; }

/* ===== FOOTER ===== */
footer {
  padding: 2.5rem 0; border-top: 1px solid var(--border);
  text-align: center;
}
.btn-ar {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.8rem;
  border: 1px solid rgba(0,212,255,0.35);
  color: var(--accent); font-size: 0.88rem; font-weight: 600;
  border-radius: 2rem; text-decoration: none;
  background: rgba(0,212,255,0.07);
  transition: all 0.25s; letter-spacing: 0.05em;
}
.btn-ar:hover { background: rgba(0,212,255,0.15); box-shadow: 0 0 20px rgba(0,212,255,0.2); }
.ar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: arBlink 1.5s ease-in-out infinite;
}
@keyframes arBlink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Nav AR link */
.nav-ar {
  color: var(--accent) !important;
  border: 1px solid rgba(0,212,255,0.3);
  padding: 0.25rem 0.7rem; border-radius: 1rem;
  background: rgba(0,212,255,0.07);
  transition: all 0.2s;
}
.nav-ar:hover { background: rgba(0,212,255,0.15) !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .projects-grid-new { grid-template-columns: repeat(2, 1fr); }
  .proj-card-new.large-left { grid-column: span 2; flex-direction: column; }
  .proj-card-new.large-left .proj-img-wrap { width: 100%; height: 220px; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .exp-edu-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .pub-item { grid-template-columns: 100px 1fr; }
  .pub-header { flex-direction: column; align-items: flex-start; }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .projects-grid-new { grid-template-columns: 1fr; }
  .proj-card-new.large-left { grid-column: span 1; }
  .pub-item { grid-template-columns: 1fr; }
  .pub-thumb { height: 120px; min-height: unset; }
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-card {
    flex-direction: row; align-items: center;
    text-align: left; gap: 1rem; padding: 1.1rem 1.4rem;
  }
}
@media (max-width: 600px) {
  #navbar { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .pub-abstract { display: none; }
  .hero-cta { flex-direction: column; }
  .research-grid { grid-template-columns: 1fr; }
  .exp-edu-layout { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { flex-direction: row; align-items: center; text-align: left; gap: 1rem; padding: 1rem 1.2rem; }
  .about-stats-row { grid-template-columns: repeat(2, 1fr); }
  .exp-edu-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .hero-badges { gap: 0.4rem; }
  .badge { font-size: 0.65rem; padding: 0.25rem 0.6rem; }
  .hero-sub { padding: 0 0.5rem; font-size: 0.95rem; white-space: nowrap; }
  .container { padding: 0 1.25rem; }
  section { padding: 4rem 0; }
  .about-photo-wrap { display: none; }
}

/* Prevent any child from breaking out of viewport */
*, *::before, *::after {
  max-width: 100%;
  box-sizing: border-box;
}
