/* ══════════════════════════════════════════════════════════════════
   SILICON VALLEY AI LAB — DESIGN SYSTEM (VERCEL / LINEAR STYLE)
   Complete Master Stylesheet for Md. Mehedi Hasan Portfolio
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Midnight Blue & Celestial Slate Foundation */
  --bg: #070b14;
  --bg-subtle: #0c1222;
  --bg-card: rgba(13, 21, 38, 0.72);
  --bg-card-hover: rgba(18, 30, 54, 0.88);
  --bg-card-solid: #0d1526;
  
  /* Precision Borders & Glassmorphism */
  --border: rgba(99, 140, 255, 0.12);
  --border-hover: rgba(147, 197, 253, 0.30);
  --border-accent: rgba(56, 189, 248, 0.45);
  --glass: blur(24px) saturate(190%);
  --glass-subtle: blur(14px) saturate(160%);
  --bevel: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --text-1: #f0f6fc;       /* Clean crisp icy white */
  --text-2: #94a3b8;       /* Cool slate secondary */
  --text-3: #64748b;       /* Muted slate blue */
  --text-faint: #334155;   /* Deep slate border/faint */

  /* Midnight Blue & Celestial Accents */
  --accent: #38bdf8;        /* Vivid Celestial Sky */
  --accent-light: #7dd3fc;  /* Ice Blue */
  --accent-glow: rgba(56, 189, 248, 0.28);
  --accent-bg: rgba(56, 189, 248, 0.12);

  --cyan: #38bdf8;          /* Cyber/Geospatial Cyan */
  --cyan-glow: rgba(56, 189, 248, 0.28);
  --cyan-bg: rgba(56, 189, 248, 0.12);

  --emerald: #10b981;       /* Accepted / Validated Emerald */
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --emerald-bg: rgba(16, 185, 129, 0.12);

  --amber: #fbbf24;         /* Celestial Gold / Star amber */
  --amber-glow: rgba(251, 191, 36, 0.25);
  --amber-bg: rgba(251, 191, 36, 0.12);

  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.12);

  /* Structural Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  /* Elevating Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 3, 10, 0.5);
  --shadow-md: 0 8px 28px -4px rgba(0, 5, 18, 0.65);
  --shadow-lg: 0 20px 48px -12px rgba(0, 7, 24, 0.85);
  --shadow-glow: 0 0 45px rgba(56, 189, 248, 0.22);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Extended palette (used throughout HTML) */
  --green: #34d399;
  --green-glow: rgba(52, 211, 153, 0.25);
  --green-bg: rgba(52, 211, 153, 0.10);
  --green-dim: rgba(52, 211, 153, 0.55);

  /* Surface aliases */
  --surface:   rgba(13, 21, 38, 0.65);
  --surface-2: rgba(19, 31, 56, 0.78);

  /* Font shorthand alias */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light Theme — Silicon Valley Clean Frost */
[data-theme="light"] {
  --bg: #fafafa;
  --bg-subtle: #f4f4f5;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-card-solid: #ffffff;

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.2);
  --border-accent: rgba(79, 70, 229, 0.35);
  --bevel: inset 0 1px 0 0 rgba(255, 255, 255, 1);

  --text-1: #09090b;       /* Zinc 950 */
  --text-2: #52525b;       /* Zinc 600 */
  --text-3: #71717a;       /* Zinc 500 */
  --text-faint: #d4d4d8;

  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.15);
  --accent-bg: rgba(79, 70, 229, 0.08);

  --cyan: #0284c7;
  --cyan-glow: rgba(2, 132, 199, 0.15);
  --cyan-bg: rgba(2, 132, 199, 0.08);

  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.15);
  --emerald-bg: rgba(5, 150, 105, 0.08);

  --amber: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.15);
  --amber-bg: rgba(217, 119, 6, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.12);

  /* Extended palette overrides for light mode */
  --green: #059669;
  --surface:   rgba(255, 255, 255, 0.7);
  --surface-2: rgba(244, 244, 245, 0.9);
}

/* ══════════════════════════════════════════════════════════════════
   RESET & SYSTEM BASICS
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .35s var(--ease), color .35s var(--ease);
  position: relative;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════
   ATMOSPHERIC LIGHTING & MICRO-GRID
   ══════════════════════════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 15%, #000 40%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 15%, #000 40%, transparent 95%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 550px;
  background: radial-gradient(50% 50% at 50% 0%, 
    rgba(56, 189, 248, 0.16) 0%, 
    rgba(30, 58, 138, 0.22) 45%, 
    transparent 100%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::after {
  background: radial-gradient(50% 50% at 50% 0%, 
    rgba(99, 102, 241, 0.08) 0%, 
    rgba(56, 189, 248, 0.04) 50%, 
    transparent 100%);
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
}

#motif-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

#motif-bg svg {
  position: absolute;
  opacity: 0.12;
}

.motif-line { stroke: var(--text-3); stroke-width: 1; fill: none; }
.motif-dim { stroke: var(--border); stroke-width: 0.75; fill: none; }
.motif-node { fill: var(--accent); }
.motif-dot { fill: var(--text-3); }

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  z-index: 10000;
  transition: width 0.1s linear;
}

#boot { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   FLOATING FROSTED GLASS NAVBAR (VERCEL / LINEAR STYLE)
   ══════════════════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(840px, 94vw);
  transition: transform .4s var(--ease), top .4s var(--ease), opacity .4s var(--ease);
}

#nav.hide {
  transform: translate(-50%, -100px);
  opacity: 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-md);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-1);
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--text-1);
  box-shadow: var(--bevel);
}

.nav-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  padding: 2px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse-emerald 2s infinite ease-in-out;
}

@keyframes pulse-emerald {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all .2s var(--ease);
}

.nav-link:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--bevel);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-1);
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: var(--bevel);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.toggle-icon { display: none; font-size: 13px; }
.toggle-icon.active { display: block; }

.nav-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════
   HERO SECTION (SILICON VALLEY AI LAB PRO)
   ══════════════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 70px;
}

.hero-inner {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  box-shadow: var(--bevel);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  transition: all .25s var(--ease);
}

.hero-badge-pill:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.07);
}

.badge-sparkle { color: var(--amber); font-size: 13px; }
.badge-tag-text { color: var(--text-1); font-weight: 600; }

.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #FFFFFF 0%, #e4e4e7 60%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: -6px;
}

[data-theme="light"] .hero-name {
  background: linear-gradient(180deg, #09090b 0%, #27272a 70%, #52525b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.caret {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1.1s infinite;
}

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

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 500;
  color: var(--accent-light);
  line-height: 1.5;
  letter-spacing: -0.015em;
}

[data-theme="light"] .hero-sub {
  color: var(--accent);
}

.hero-tagline {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 620px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #09090b !important;
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0,0,0,0.2);
  transition: all .25s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.4), 0 4px 8px rgba(0,0,0,0.3);
  background: #f4f4f5;
}

[data-theme="light"] .btn-primary {
  background: #09090b;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-primary:hover {
  background: #27272a;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-1) !important;
  font-weight: 500;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: var(--bevel);
  text-decoration: none;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  transition: all .25s var(--ease);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--bevel);
  backdrop-filter: var(--glass-subtle);
  transition: all .25s var(--ease);
}

.hero-stat:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.hero-stat-num {
  font-family: var(--font-sans);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
}

.hero-stat-num.accent { color: var(--accent-light); }

.hero-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Hero Portrait Frame */
.hero-photo-col {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-photo-wrap {
  position: relative;
  width: min(390px, 90vw);
}

.hero-photo-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.12);
  background: var(--bg-card-solid);
}

.hero-photo-frame img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  filter: contrast(104%) saturate(102%);
  transition: transform .5s var(--ease);
}

.hero-photo-wrap:hover .hero-photo-frame img {
  transform: scale(1.03);
}

.scan-line, .scan-grid, .corner-tr, .corner-bl { display: none !important; }

.skill-tag-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(18, 18, 24, 0.85);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  z-index: 10;
  pointer-events: none;
  animation: float-soft 6s ease-in-out infinite alternate;
}

[data-theme="light"] .skill-tag-float {
  background: rgba(255, 255, 255, 0.9);
}

.skill-tag-float .dot { width: 7px; height: 7px; border-radius: 50%; }
.tag-ai { top: 24px; left: -20px; animation-delay: 0s; }
.tag-ai .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.tag-sem { bottom: 85px; left: -24px; animation-delay: 1.5s; }
.tag-sem .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.tag-cpc { top: 75px; right: -24px; animation-delay: 2.5s; }
.tag-cpc .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.tag-xai { bottom: 25px; right: -15px; animation-delay: 3.5s; }
.tag-xai .dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.tag-beh { display: none; }

@keyframes float-soft {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

/* ══════════════════════════════════════════════════════════════════
   CONTAINER & SECTION HEADERS
   ══════════════════════════════════════════════════════════════════ */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

section {
  padding: 100px 0;
  position: relative;
  z-index: 5;
}

.section-header {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cmd-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  background: var(--accent-bg);
  border: 1px solid var(--border-accent);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

[data-theme="light"] .cmd-line {
  color: var(--accent);
}

.cmd-line .p {
  color: var(--accent);
  font-weight: 700;
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text-1);
  line-height: 1.15;
}

.section-desc {
  font-size: 15.5px;
  color: var(--text-2);
  max-width: 680px;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   SPOTLIGHT CARDS (THE VERCEL / LINEAR EFFECT)
   ══════════════════════════════════════════════════════════════════ */
.spotlight-card, .about-card, .pub-card, .bento-cell, .bento-card, .award-hero-card, .leader-card, .leadership-card, .contact-card, .form-card, .scholar-banner {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}

.spotlight-card::before, .pub-card::before, .bento-cell::before, .bento-card::before, .award-hero-card::before, .leader-card::before, .scholar-banner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(255, 255, 255, 0.08),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 2;
}

.spotlight-card:hover::before, .pub-card:hover::before, .bento-cell:hover::before, .bento-card:hover::before, .award-hero-card:hover::before, .leader-card:hover::before, .scholar-banner:hover::before {
  opacity: 1;
}

.spotlight-card:hover, .pub-card:hover, .bento-cell:hover, .bento-card:hover, .award-hero-card:hover, .leader-card:hover, .scholar-banner:hover {
  border-color: var(--border-hover);
  box-shadow: var(--bevel), var(--shadow-md);
}

.scholar-banner {
  margin-bottom: 28px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.scholar-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: var(--bevel), 0 20px 48px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.15);
}

/* ══════════════════════════════════════════════════════════════════
   ABOUT SECTION
   ══════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start;
}

.about-card-bar { display: none; }

.about-card-body {
  padding: 32px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-2);
}

.about-card-body p strong {
  color: var(--text-1);
  font-weight: 600;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all .2s var(--ease);
}

.tag:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.07);
}

.tag.accent-tag {
  background: var(--accent-bg);
  border-color: var(--border-accent);
  color: var(--accent-light);
  font-weight: 600;
}

[data-theme="light"] .tag {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-2);
}

[data-theme="light"] .tag:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-1);
}

[data-theme="light"] .tag.accent-tag { 
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--cyan); 
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stat-box-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-box {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--bevel);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all .25s var(--ease);
}

.stat-box:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.stat-box-val {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
}

.stat-box-val.accent { color: var(--accent-light); }

.stat-box-label {
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.figure-wrap {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
}

.figure-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 12px;
}

.figure-svg-container { overflow-x: auto; }
.svg-box { fill: var(--bg-card); stroke: var(--border); stroke-width: 1; }
.svg-text { fill: var(--text-1); font-family: var(--font-mono); text-anchor: middle; }
.svg-line { stroke: var(--accent-light); stroke-width: 1.2; fill: none; }

/* ══════════════════════════════════════════════════════════════════
   PUBLICATIONS & RESEARCH
   ══════════════════════════════════════════════════════════════════ */
.pub-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: 32px;
  box-shadow: var(--bevel);
}

.pub-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.pub-tab:hover { color: var(--text-1); }

.pub-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-1);
  box-shadow: var(--bevel);
}

[data-theme="light"] .pub-tab.active {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.pub-list {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.pub-list.active { display: flex; }

.pub-card {
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.pub-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  opacity: 0.6;
  min-width: 24px;
  padding-top: 2px;
}

.pub-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.pub-badge.accepted {
  background: var(--emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald);
}

.pub-badge.review {
  background: var(--cyan-bg);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
}

.pub-badge.ongoing {
  background: var(--amber-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber);
}

.pub-venue {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
}

.pub-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin: 2px 0;
  transition: color .2s var(--ease);
}

.pub-card:hover .pub-title {
  color: var(--accent-light);
}

.pub-authors {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.pub-authors .me {
  color: var(--text-1);
  font-weight: 600;
}

.pub-cite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.pub-cite-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--text-1);
}

.pub-cite-btn.accent {
  background: var(--accent-bg);
  border-color: var(--border-accent);
  color: var(--accent-light);
}

/* ══════════════════════════════════════════════════════════════════
   PROJECTS BENTO GRID
   ══════════════════════════════════════════════════════════════════ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-cell {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--bevel), var(--shadow-sm);
  padding: 28px;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: all .3s var(--ease);
}

.bento-cell:hover {
  border-color: var(--border-hover);
  box-shadow: var(--bevel), var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.08);
  transform: translateY(-3px);
}

.bento-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-2);
  transition: all .2s;
}

.bento-cell:hover .bento-arrow {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  transform: translate(2px, -2px);
}

.bento-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.bento-badge.research {
  background: var(--accent-bg);
  border-color: var(--border-accent);
  color: var(--accent-light);
}

.bento-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.bento-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bento-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════════════════════
   AWARDS & LEADERSHIP
   ══════════════════════════════════════════════════════════════════ */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.leader-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all .3s var(--ease);
}

.leader-card.featured {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(13, 21, 38, 0.85) 100%);
  box-shadow: var(--bevel), 0 0 40px rgba(251, 191, 36, 0.08);
}

[data-theme="light"] .leader-card.featured {
  border-color: rgba(217, 119, 6, 0.25);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.5) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 4px 20px -2px rgba(217, 119, 6, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .award-icon {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.award-icon {
  font-size: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.award-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.award-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.35;
}

.award-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}

.side-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.leader-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.leader-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.leader-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.leader-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.leader-org {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   SKILLS & MARQUEE
   ══════════════════════════════════════════════════════════════════ */
.marquee-container {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  padding: 10px 0;
}

.marquee-track {
  display: flex;
  gap: 12px;
  white-space: nowrap;
  animation: marquee-scroll 40s linear infinite;
  width: max-content;
}

.marquee-track.reverse {
  animation: marquee-scroll-reverse 45s linear infinite;
}

.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  backdrop-filter: var(--glass-subtle);
  border: 1px solid var(--border);
  box-shadow: var(--bevel);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s var(--ease);
}

.skill-pill:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.skill-pill.hl {
  background: var(--accent-bg);
  border-color: var(--border-accent);
  color: var(--accent-light);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   CONTACT & FOOTER
   ══════════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-headline {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-1);
  line-height: 1.15;
  margin: 12px 0;
}

.contact-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 440px;
}

.contact-email {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
  transition: color .2s;
}

.contact-email:hover { color: #ffffff; }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--text-1);
  transform: translateY(-2px);
}

.form-card {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-md);
  overflow: hidden;
}

.form-bar { display: none; }
.form-body { padding: 32px; }
.form-row { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-label .p {
  color: var(--accent-light);
  margin-right: 4px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all .2s var(--ease);
}

[data-theme="light"] .form-input, [data-theme="light"] .form-textarea {
  background: #ffffff;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.06);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  padding: 13px 24px;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: #09090b;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.form-submit:hover {
  background: #f4f4f5;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .form-submit {
  background: #09090b;
  color: #ffffff;
}

.form-note {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  margin-top: 10px;
}

footer {
  padding: 40px 0 60px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-3);
}

.footer-text a {
  color: var(--text-2);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════
   LIVE STATUS TICKER
   ══════════════════════════════════════════════════════════════════ */
#ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-top: 1px solid var(--border);
  box-shadow: var(--bevel);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
}

#ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
  padding-left: 100%;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--text-3);
  font-family: var(--font-mono);
}

#ticker-track span.hl { color: var(--text-1); font-weight: 600; }
#ticker-track span.amber { color: var(--amber); font-weight: 600; }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ══════════════════════════════════════════════════════════════════
   MODAL & TOAST
   ══════════════════════════════════════════════════════════════════ */
.paper-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .3s var(--ease);
  padding: 24px;
}

.paper-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.paper-modal-box {
  width: min(720px, 94vw);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0,0,0,0.8);
  padding: 32px;
  position: relative;
  transform: scale(0.96);
  transition: transform .3s var(--ease);
}

.paper-modal-backdrop.active .paper-modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.modal-close-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.12);
}

.paper-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
}

.paper-modal-body {
  display: flex;
  flex-direction: column;
}

.paper-modal-title, .modal-paper-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.025em;
  margin: 14px 0 8px;
  line-height: 1.35;
}

.paper-modal-authors, .modal-paper-authors {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 18px;
}

.paper-modal-authors b, .modal-paper-authors b {
  color: var(--text-1);
  font-weight: 600;
}

.paper-modal-abstract, .modal-paper-abstract {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.paper-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.bento-cell.handbook {
  border-color: rgba(99, 102, 241, 0.25);
}

.bento-cell.nasa {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(18, 18, 24, 0.75) 100%);
}

.bibtex-code-block {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #000000;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: #d4d4d8;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 20px;
}

#toast {
  position: fixed;
  bottom: 50px;
  right: 24px;
  z-index: 10000;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: rgba(18, 18, 24, 0.95);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all .25s var(--ease);
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

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

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ══════════════════════════════════════════════════════════════════
   SIDE CARDS, EDUCATION, STATS & DETAILS
   ══════════════════════════════════════════════════════════════════ */
.side-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--bevel), var(--shadow-sm);
  margin-bottom: 20px;
  transition: all .25s var(--ease);
}

.side-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--bevel), var(--shadow-md);
  transform: translateY(-2px);
}

.side-card-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-light);
  margin-bottom: 16px;
}

[data-theme="light"] .side-card-title {
  color: var(--accent);
}

.edu-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.edu-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.edu-sub {
  font-size: 13px;
  color: var(--accent-light);
  margin: 3px 0;
}

[data-theme="light"] .edu-sub {
  color: var(--accent);
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mini-stat {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-stat-num {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-1);
}

.mini-stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.achv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.achv-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

[data-theme="light"] .achv-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .mini-stat {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.achv-item b {
  color: var(--text-1);
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.bento-icon {
  font-size: 22px;
  margin-bottom: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
}

.marquee-wrapper {
  display: flex;
  gap: 12px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 12px;
}

.term-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.term-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-hover);
}

.term-dots span:nth-child(1) { background: #ef4444; }
.term-dots span:nth-child(2) { background: #f59e0b; }
.term-dots span:nth-child(3) { background: #10b981; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--emerald);
  margin-top: 14px;
}

.status-line::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.svg-accent {
  stroke: var(--accent);
}

.k {
  color: var(--accent-light);
  font-weight: 700;
}

.ok {
  color: var(--emerald);
  font-weight: 600;
}

#back-top {
  position: fixed;
  bottom: 50px;
  left: 24px;
  z-index: 500;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: all .25s var(--ease);
}

#back-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-top:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE DESIGN SYSTEM
   ══════════════════════════════════════════════════════════════════ */

/* ── Keyframes for mobile menu ── */
@keyframes navFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 1. Tablets & Small Laptops (<= 1024px) ── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }

  .hero-badge-pill, .cmd-line {
    align-self: center;
  }

  .hero-tagline {
    margin: 0 auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-photo-wrap {
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .leadership-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .leader-card[style*="grid-column: span 2"] {
    grid-column: span 1 !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ── 2. Tablets & Smartphones (<= 768px) ── */
@media (max-width: 768px) {
  html, body {
    font-size: 14.5px;
  }

  section {
    padding: 56px 0;
  }

  .container {
    width: min(1200px, calc(100% - 32px));
  }

  /* Decorative SVG Motifs on Mobile */
  #motif-bg {
    opacity: 0.35;
  }

  #motif-bg svg {
    max-width: 90vw;
    height: auto;
  }

  /* Navigation Bar */
  #nav {
    top: 12px;
    width: calc(100% - 24px);
    max-width: 100%;
  }

  .nav-container {
    padding: 6px 14px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(14, 14, 20, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-xl);
    padding: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), var(--bevel);
    gap: 4px;
    z-index: 1001;
  }

  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), var(--bevel);
  }

  .nav-links.open {
    display: flex;
    animation: navFadeSlideIn 0.22s var(--ease);
  }

  .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
  }

  .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
  }

  [data-theme="light"] .nav-link.active {
    background: rgba(0, 0, 0, 0.06);
  }

  .nav-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
  }

  /* Hero Section */
  #hero {
    padding: 95px 16px 48px;
    min-height: auto;
  }

  .hero-content {
    gap: 18px;
  }

  .hero-name {
    font-size: clamp(2rem, 7vw, 3rem);
    letter-spacing: -0.03em;
    word-break: break-word;
  }

  .hero-sub {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .hero-tagline {
    font-size: 14px;
    line-height: 1.65;
    max-width: 100%;
  }

  .hero-badge-pill {
    font-size: 11px;
    padding: 5px 12px;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
    padding-top: 18px;
  }

  .hero-stat {
    padding: 12px 10px;
  }

  .hero-stat-num {
    font-size: 1.35rem;
  }

  .hero-stat-label {
    font-size: 10px;
  }

  .hero-photo-wrap {
    width: min(300px, 86vw);
  }

  .hero-photo-frame img {
    height: 360px;
  }

  /* Floating tags safe positioning */
  .skill-tag-float {
    font-size: 11px;
    padding: 6px 10px;
    gap: 6px;
  }

  .tag-ai { top: 10px; left: 0px; }
  .tag-sem { bottom: 58px; left: -4px; }
  .tag-cpc { top: 50px; right: -4px; }
  .tag-xai { bottom: 12px; right: 0px; }

  /* Section Headers */
  .section-header {
    margin-bottom: 28px;
    gap: 8px;
  }

  .section-title {
    font-size: clamp(1.65rem, 5.5vw, 2.2rem);
  }

  .section-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  /* About */
  .about-card-body {
    padding: 20px 16px;
    font-size: 14px;
    line-height: 1.65;
  }

  .stat-box-grid {
    gap: 10px;
  }

  .stat-box {
    padding: 14px;
  }

  .stat-box-val {
    font-size: 1.45rem;
  }

  .stat-box-label {
    font-size: 10.5px;
  }

  /* Publications */
  .pub-tabs {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    flex-wrap: nowrap;
    padding: 4px;
    margin-bottom: 20px;
  }

  .pub-tabs::-webkit-scrollbar {
    display: none;
  }

  .pub-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 12px;
  }

  .pub-card {
    padding: 16px 14px;
    gap: 12px;
  }

  .pub-index {
    font-size: 11.5px;
    min-width: 18px;
  }

  .pub-title {
    font-size: 1.02rem;
    line-height: 1.4;
  }

  .pub-authors {
    font-size: 12px;
    line-height: 1.5;
  }

  .pub-meta {
    gap: 6px;
  }

  .pub-venue {
    font-size: 11.5px;
  }

  .pub-cite-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* Bento / Projects */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bento-cell {
    padding: 20px 16px;
    gap: 14px;
  }

  .bento-title {
    font-size: 1.15rem;
  }

  .bento-desc {
    font-size: 13px;
    line-height: 1.55;
  }

  .figure-wrap {
    padding: 12px;
    margin-top: 10px;
    overflow-x: auto;
  }

  .figure-svg-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .figure-svg {
    max-width: 100%;
    height: auto;
  }

  /* Skills & Architecture cards */
  #skills .container > div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Leadership & Awards */
  .leadership-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .leader-card {
    padding: 20px 16px;
    gap: 14px;
  }

  .achv-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .achv-item {
    padding: 12px;
    font-size: 12px;
  }

  .award-title {
    font-size: 1.15rem;
  }

  .award-desc {
    font-size: 13px;
    line-height: 1.6;
  }

  /* Contact & Form */
  .contact-headline {
    font-size: clamp(1.8rem, 6vw, 2.3rem);
  }

  .contact-sub {
    font-size: 14px;
  }

  .form-body {
    padding: 20px 16px;
  }

  .form-input, .form-textarea {
    padding: 10px 14px;
    font-size: 13.5px;
  }

  /* Paper Details Modal */
  .paper-modal-box {
    padding: 20px 16px;
    width: min(720px, 94vw);
    border-radius: var(--radius-lg);
  }

  .paper-modal-title, .modal-paper-title {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .paper-modal-abstract, .modal-paper-abstract {
    padding: 12px;
    font-size: 13px;
  }

  .paper-modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
    width: 100%;
  }

  .paper-modal-footer .btn-primary,
  .paper-modal-footer .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Back to Top & Toast */
  #back-top {
    bottom: 44px;
    left: 14px;
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  #toast {
    bottom: 44px;
    right: 14px;
    font-size: 12px;
    padding: 8px 14px;
    max-width: calc(100vw - 28px);
  }

  footer {
    padding: 36px 16px 65px;
  }
}

/* ── 3. Compact Phones & iPhone Mini / SE (<= 480px) ── */
@media (max-width: 480px) {
  #hero {
    padding: 85px 12px 36px;
  }

  .container {
    width: calc(100% - 20px);
  }

  .nav-brand {
    gap: 8px;
  }

  .nav-status-badge {
    padding: 3px 6px;
  }

  .nav-status-badge span:not(.status-dot) {
    display: none;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 11px 16px;
    font-size: 13px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .hero-stat {
    padding: 10px 8px;
  }

  .hero-stat-num {
    font-size: 1.25rem;
  }

  .hero-stat-label {
    font-size: 9.5px;
  }

  .hero-photo-wrap {
    width: min(250px, 86vw);
  }

  .hero-photo-frame img {
    height: 300px;
  }

  .skill-tag-float {
    font-size: 10px;
    padding: 5px 8px;
    gap: 5px;
  }

  .tag-ai { top: 6px; left: 4px; }
  .tag-sem { bottom: 42px; left: 4px; }
  .tag-cpc { top: 42px; right: 4px; }
  .tag-xai { bottom: 8px; right: 4px; }

  .stat-box-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-box-val {
    font-size: 1.3rem;
  }

  .stat-box-label {
    font-size: 10px;
  }

  .mini-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mini-stat-num {
    font-size: 1.15rem;
  }

  .social-links {
    gap: 6px;
  }

  .social-link {
    padding: 6px 12px;
    font-size: 11.5px;
  }

  .bibtex-code-block, pre#modalPaperBib {
    font-size: 10px;
    padding: 10px;
  }

  .about-card-body div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  #ticker-track {
    gap: 28px;
    font-size: 11px;
  }
}

