/* ==========================================================================
   FAED AHMED ARNOB - RESEARCH PORTFOLIO DESIGN SYSTEM
   Modern, responsive, accessible, dark/light theme support
   ========================================================================== */

/* --- CSS Variables & Color Palettes --- */
:root {
  /* Light Theme (Default fallback) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: #e2e8f0;
  --border-accent: #cbd5e1;
  --border-focus: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --badge-bg: rgba(2, 132, 199, 0.08);
  --badge-text: #0284c7;
  --badge-border: rgba(2, 132, 199, 0.2);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --glow-accent: 0 0 20px rgba(2, 132, 199, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark Theme (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #172033;
  --bg-card: #131d31;
  --bg-card-hover: #19253d;
  --bg-glass: rgba(11, 15, 25, 0.85);
  --border-subtle: #1e293b;
  --border-accent: #334155;
  --border-focus: #38bdf8;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --accent-cyan: #38bdf8;
  --accent-blue: #60a5fa;
  --accent-indigo: #818cf8;
  --accent-purple: #c084fc;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #fb7185;

  --badge-bg: rgba(56, 189, 248, 0.12);
  --badge-text: #38bdf8;
  --badge-border: rgba(56, 189, 248, 0.28);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --glow-accent: 0 0 25px rgba(56, 189, 248, 0.25);
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.section:last-of-type {
  border-bottom: none;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 720px;
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo), var(--accent-purple));
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease-out;
}

/* --- Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.brand-monogram {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.brand-name {
  display: flex;
  flex-direction: column;
}

.brand-name .name {
  font-weight: 700;
  line-height: 1.1;
}

.brand-name .role-micro {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--border-accent);
  transform: rotate(15deg);
}

.btn-cv-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
  transition: all var(--transition-normal);
}

.btn-cv-header:hover {
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.4rem;
}

/* --- Hero Section --- */
.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
  background: radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* Hero Bio Card (Left Column) */
.bio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 6rem;
  transition: border-color var(--transition-normal);
}

.avatar-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 1.5rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-accent);
  box-shadow: var(--shadow-md);
}

.status-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-accent);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.bio-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.bio-pronouns {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.bio-affiliation {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.bio-lab-link {
  font-weight: 600;
  color: var(--accent-cyan);
}

.bio-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.social-pill:hover {
  background: var(--badge-bg);
  color: var(--accent-cyan);
  border-color: var(--badge-border);
  transform: translateY(-2px);
}

.bio-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.92rem;
  font-weight: 700;
  transition: all var(--transition-normal);
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-accent);
  color: var(--accent-cyan);
}

/* Hero Content Area (Right Column) */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-headline {
  font-size: 2.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  font-family: var(--font-sans);
  color: var(--accent-cyan);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Research Pillars Highlights */
.hero-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pillar-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.pillar-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pillar-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- News / Milestones Section --- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
}

.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all var(--transition-fast);
}

.news-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-badge {
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--accent-cyan);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.news-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.news-text strong {
  color: var(--text-primary);
}

/* --- Filter Buttons --- */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.25rem;
}

.filter-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--badge-bg);
  color: var(--accent-cyan);
  border-color: var(--badge-border);
  font-weight: 700;
}

/* --- Research Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.project-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--bg-tertiary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-img {
  transform: scale(1.03);
}

.project-badge-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.project-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-header {
  margin-bottom: 0.75rem;
}

.project-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-highlights {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.25rem;
  font-size: 0.86rem;
  color: var(--text-primary);
  font-weight: 500;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.project-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.btn-project-link:hover {
  background: var(--badge-bg);
  border-color: var(--badge-border);
  color: var(--accent-cyan);
}

/* --- Publications Section --- */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.pub-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pub-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

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

.pub-badge.badge-ieee {
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

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

.pub-badge.badge-poster {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pub-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.pub-authors {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.pub-authors .author-self {
  font-weight: 800;
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-pub-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.btn-pub-action:hover {
  background: var(--badge-bg);
  border-color: var(--badge-border);
  color: var(--accent-cyan);
}

/* Expandable Abstract & BibTeX Accordions */
.pub-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, margin-top 0.3s ease-out;
}

.pub-collapse.open {
  max-height: 500px;
  margin-top: 1rem;
}

.abstract-box {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-cyan);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.bibtex-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
}

.bibtex-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  display: block;
}

.btn-copy-bibtex {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--accent-cyan);
  border: 1px solid var(--border-subtle);
}

.btn-copy-bibtex:hover {
  background: var(--accent-cyan);
  color: #ffffff;
}

/* --- Experience & Education Timeline --- */
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.timeline-column-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
}

.timeline-container {
  position: relative;
  border-left: 2px solid var(--border-subtle);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  top: 0.25rem;
  left: calc(-2rem - 6px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline-org {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.timeline-desc ul {
  padding-left: 1.25rem;
  margin-top: 0.4rem;
}

.timeline-desc li {
  margin-bottom: 0.35rem;
}

/* --- Teaching & Talks Section --- */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.teaching-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.teaching-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.teaching-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.teaching-role {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.teaching-org {
  font-size: 0.88rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.teaching-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.teaching-list li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.teaching-list li:last-child {
  border-bottom: none;
}

.teaching-item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.teaching-item-header i {
  color: var(--accent-cyan);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.teaching-item-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  border: 1px solid var(--badge-border);
  transition: all var(--transition-fast);
}

.link-badge:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

/* --- Blog Tile on Homepage --- */
.blog-tile-section {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  margin: 4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.blog-tile-section:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.blog-tile-content {
  max-width: 680px;
}

.blog-tile-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.blog-tile-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.btn-blog-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all var(--transition-normal);
}

.btn-blog-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

/* --- Dedicated Blog Page Styles --- */
.blog-header {
  padding: 8rem 0 3rem;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(2, 132, 199, 0.1) 0%, transparent 70%);
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.25rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.blog-card-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--bg-tertiary);
  position: relative;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-read-story {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-cyan);
  transition: color var(--transition-fast);
}

.btn-read-story:hover {
  color: var(--accent-blue);
  transform: translateX(3px);
}

/* Modal Story Reader */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid var(--border-subtle);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.post-full-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

.post-full-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.post-full-body p {
  margin-bottom: 1.25rem;
}

.post-full-body blockquote {
  border-left: 4px solid var(--accent-cyan);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  margin: 1.5rem 0;
  background: var(--bg-tertiary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.post-photo-grid img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* --- Skills Matrix Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.skill-category-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.skill-pill:hover {
  background: var(--badge-bg);
  color: var(--accent-cyan);
  border-color: var(--badge-border);
}

/* --- Awards & Scholastic Achievements --- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.award-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.award-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.award-trophy {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.award-content {
  flex-grow: 1;
}

.award-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.award-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* --- Contact Section --- */
.contact-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.contact-card .section-title {
  margin-bottom: 1rem;
}

.contact-card .section-subtitle {
  margin: 0 auto 2.5rem;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-method-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.contact-method-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
}

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

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .bio-card {
    position: static;
    max-width: 500px;
    margin: 0 auto;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-pillars-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 4.25rem;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-xl);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-headline {
    font-size: 2.2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
  }

  .modal-content-wrap {
    padding: 1.75rem 1.25rem;
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-headline {
    font-size: 1.85rem;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .bio-card {
    padding: 1.75rem 1.25rem;
  }

  .pub-card {
    padding: 1.25rem 1rem;
  }

  .social-pill {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .modal-content-wrap {
    padding: 1.5rem 1rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Print Stylesheet for Clean Resume Printing --- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .navbar, #scroll-progress, .theme-toggle-btn, .mobile-menu-btn,
  .filter-container, .btn-pub-action, .social-pill, .footer {
    display: none !important;
  }

  .hero {
    padding-top: 1rem !important;
  }

  .hero-grid {
    display: block !important;
  }

  .bio-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .section {
    padding: 1.5rem 0 !important;
    page-break-inside: avoid;
  }
}
