/* ==========================================================================
   MOHCINE BAALLA - ACADEMIC PORTFOLIO & RESUME WEBSITE
   Domain: https://mohcine.site
   Institution: ENSIAS, Mohammed V University in Rabat, Morocco
   Laboratory: Smart Systems Laboratory (SSL)
   Design System & Modern Interactive CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* --------------------------------------------------------------------------
   CSS VARIABLES & DESIGN TOKENS (ENSIAS BRAND IDENTITY)
   -------------------------------------------------------------------------- */
:root {
  /* ENSIAS Core Palette: Deep Academic Navy, Sapphire, Royal Azure, Moroccan Amber */
  --ensias-navy-950: #070d19;
  --ensias-navy-900: #0b1528;
  --ensias-navy-800: #0f2444;
  --ensias-navy-700: #15325b;
  --ensias-navy-600: #1a365d;
  --ensias-blue-500: #1d4ed8;
  --ensias-blue-400: #2563eb;
  --ensias-azure-400: #0284c7;
  --ensias-cyan-400: #00b4d8;
  --ensias-cyan-300: #38bdf8;
  
  /* Moroccan Accent & Status Badges */
  --amber-500: #d97706;
  --amber-400: #f59e0b;
  --amber-100: #fef3c7;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-100: #d1fae5;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-100: #ede9fe;
  --red-500: #ef4444;
  --red-400: #f87171;

  /* Fonts */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Light Theme (Default Academic Crisp Theme) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-subtle: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.95);
  --border-subtle: #e2e8f0;
  --border-card: rgba(226, 232, 240, 0.8);
  --border-glow: rgba(37, 99, 235, 0.2);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --text-light: #ffffff;
  --text-accent: #1d4ed8;

  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: rgba(226, 232, 240, 0.8);
  --card-shadow: 0 10px 30px -10px rgba(15, 36, 68, 0.08), 0 4px 6px -2px rgba(15, 36, 68, 0.04);
  --card-shadow-hover: 0 20px 40px -15px rgba(26, 54, 93, 0.15), 0 0 25px rgba(56, 189, 248, 0.15);

  --hero-glow-1: rgba(29, 78, 216, 0.1);
  --hero-glow-2: rgba(56, 189, 248, 0.08);

  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* --------------------------------------------------------------------------
   DARK THEME (HIGH-TECH CYBERSECURITY & SIoT AESTHETIC)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-body: #070d19;
  --bg-surface: #0b1528;
  --bg-surface-elevated: #0f1d36;
  --bg-surface-subtle: #132442;
  --bg-card: rgba(11, 21, 40, 0.85);
  --border-subtle: #1e3458;
  --border-card: rgba(30, 52, 88, 0.6);
  --border-glow: rgba(56, 189, 248, 0.3);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --text-light: #ffffff;
  --text-accent: #38bdf8;

  --nav-bg: rgba(7, 13, 25, 0.85);
  --nav-border: rgba(30, 52, 88, 0.8);
  --card-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.25);

  --hero-glow-1: rgba(37, 99, 235, 0.22);
  --hero-glow-2: rgba(56, 189, 248, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 960px;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY & UTILITY CLASSES
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.gradient-text {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 50%, #00b4d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent { color: var(--text-accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.78rem; }
.font-mono { font-family: var(--font-mono); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-sapphire {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .badge-sapphire {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-pill {
  padding: 2px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--ensias-azure-400);
  color: var(--ensias-azure-400);
  transform: translateY(-2px);
}

.btn-outline-ensias {
  background: transparent;
  color: var(--text-accent);
  border: 1.5px solid var(--text-accent);
}

.btn-outline-ensias:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   STICKY NAVBAR & HEADER
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nav-border);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-symbol {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0b1528 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

[data-theme="dark"] .brand-symbol {
  background: linear-gradient(135deg, #15325b 0%, #2563eb 100%);
  border-color: rgba(56, 189, 248, 0.6);
}

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

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 500;
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.nav-link.active {
  color: var(--text-accent);
  background: rgba(37, 99, 235, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--text-accent);
  border-radius: 2px;
}

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

.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--ensias-azure-400);
  transform: rotate(15deg);
}

.hamburger-btn {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.hamburger-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition-smooth);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 24px;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--text-accent);
}

/* --------------------------------------------------------------------------
   HERO SECTION (HOME)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  padding: 70px 0 60px 0;
  overflow: hidden;
}

#siotCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
  z-index: 1;
}

.hero-glow-bg {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--hero-glow-1) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-glow-bg-2 {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--hero-glow-2) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.institution-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-accent);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.4;
}

.hero-tagline {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  border-left: 3px solid var(--ensias-azure-400);
  padding-left: 16px;
  font-style: italic;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-item strong {
  color: var(--text-main);
}

/* Researcher Profile Card */
.researcher-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  transition: var(--transition-smooth);
}

.researcher-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-glow);
}

.researcher-photo-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 20px auto;
  aspect-ratio: 4 / 5;
  background: #0f2444;
  border: 2px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.researcher-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%; /* Perfectly positions the face and shoulders regardless of photo dimensions */
  display: block;
  transition: transform 0.5s ease;
}

.researcher-card:hover .researcher-photo {
  transform: scale(1.03);
}

.card-status-chip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(11, 21, 40, 0.85);
  backdrop-filter: blur(8px);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.card-info-row {
  text-align: center;
}

.card-name {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.card-role {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 14px;
}

.social-pills-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.social-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text-accent);
  border-color: var(--ensias-azure-400);
}

/* --------------------------------------------------------------------------
   STATS COUNTER SECTION
   -------------------------------------------------------------------------- */
.metrics-section {
  padding: 30px 0 60px 0;
  position: relative;
  z-index: 2;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--card-shadow-hover);
}

.metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.metric-number {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
}

.metric-suffix {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-accent);
}

.metric-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.metric-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   SECTION HEADERS
   -------------------------------------------------------------------------- */
.section {
  padding: 70px 0;
  position: relative;
}

.section-alt {
  background-color: var(--bg-surface-elevated);
}

.section-header {
  margin-bottom: 48px;
}

.section-header.text-center {
  text-align: center;
}

.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

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

.section-header.text-center .section-subtitle {
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   ABOUT SECTION & BIO
   -------------------------------------------------------------------------- */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.bio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

.bio-card:hover {
  border-color: var(--border-glow);
}

.bio-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bio-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

.bio-card p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   TIMELINE / RECENT NEWS
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 2px;
  background: linear-gradient(180deg, #2563eb 0%, #38bdf8 50%, var(--border-subtle) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  top: 6px;
  left: -28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--ensias-azure-400);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  transform: translateX(4px);
  border-color: var(--border-glow);
  box-shadow: var(--card-shadow-hover);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.timeline-date {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-faint);
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.timeline-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   RESEARCH PILLARS (RESEARCH PAGE)
   -------------------------------------------------------------------------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #1d4ed8, #38bdf8);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pillar-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--card-shadow-hover);
}

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

.pillar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pillar-number {
  font-size: 1.5rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--ensias-azure-400);
}

.pillar-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.pillar-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.pillar-tagline {
  font-size: 0.88rem;
  color: var(--ensias-azure-400);
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.pillar-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.pillar-highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.pillar-highlight-item {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pillar-highlight-item::before {
  content: '▸';
  color: var(--ensias-azure-400);
  font-weight: 700;
}

/* Research Architecture Showcase Card */
.architecture-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-top: 50px;
}

.arch-media-wrap {
  position: relative;
  max-height: 460px;
  overflow: hidden;
  background: #070d19;
}

.arch-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.architecture-showcase:hover .arch-media-img {
  transform: scale(1.02);
}

.arch-details-wrap {
  padding: 36px 32px;
}

.arch-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   PUBLICATIONS SECTION & FILTERS
   -------------------------------------------------------------------------- */
.pub-toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.pub-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-tab:hover {
  color: var(--text-main);
  border-color: var(--ensias-azure-400);
  background: var(--bg-surface-elevated);
}

.filter-tab.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.filter-count-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.filter-tab:not(.active) .filter-count-badge {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
}

.search-input-wrap {
  position: relative;
  max-width: 480px;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--ensias-azure-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.search-icon-box {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

/* Publication Card */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  position: relative;
}

.pub-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.pub-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.pub-year-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-faint);
}

.pub-title {
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text-main);
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pub-authors .author-highlight {
  font-weight: 700;
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--ensias-azure-400);
  text-underline-offset: 3px;
}

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

.pub-venue strong {
  font-style: normal;
  color: var(--text-main);
}

/* Expandable Abstract & Contributions */
.pub-abstract-drawer {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid var(--border-subtle);
  display: none;
}

.pub-abstract-drawer.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pub-abstract-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pub-contributions-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pub-contributions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pub-contribution-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.pub-contribution-item::before {
  content: '✓';
  color: var(--emerald-500);
  font-weight: bold;
}

.pub-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.pub-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-tag {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-tag:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text-accent);
  border-color: var(--ensias-azure-400);
}

/* --------------------------------------------------------------------------
   PROJECTS & TESTBEDS (PROJECTS PAGE)
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--card-shadow-hover);
}

.project-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 750;
  margin-bottom: 6px;
  line-height: 1.3;
}

.project-subtitle {
  font-size: 0.88rem;
  color: var(--ensias-azure-400);
  font-weight: 600;
  margin-bottom: 14px;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-metrics-box {
  background: var(--bg-surface-elevated);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  border-left: 3px solid var(--emerald-500);
  margin-bottom: 16px;
}

.tech-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tech-pill {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-faint);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   CURRICULUM VITAE & COMPETENCES (CV / COMPETENCES PAGE)
   -------------------------------------------------------------------------- */
.cv-banner {
  background: linear-gradient(135deg, #0b1528 0%, #1a365d 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: 0 15px 35px -10px rgba(11, 21, 40, 0.4);
  margin-bottom: 50px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.cv-banner-text h3 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.cv-banner-text p {
  color: #cbd5e1;
  font-size: 0.98rem;
  max-width: 600px;
}

.cv-download-btn {
  background: #ffffff;
  color: #0b1528;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.cv-download-btn:hover {
  background: #38bdf8;
  color: #0b1528;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.4);
}


/* Skills Matrix */
.skills-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-category-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--text-main);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skill-name {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-main);
}

.skill-tag-pill {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.skill-bar-outer {
  height: 7px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.skill-bar-inner {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #1d4ed8, #00b4d8);
  transition: width 1s ease-in-out;
}

/* Education & Experience Timeline */
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.edu-card:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.edu-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.edu-degree {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--text-main);
}

.edu-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  font-weight: 600;
}

.edu-institution {
  font-size: 0.96rem;
  color: var(--ensias-azure-400);
  font-weight: 600;
  margin-bottom: 12px;
}

.edu-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.edu-detail-item {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.edu-detail-item::before {
  content: '▸';
  color: var(--ensias-azure-400);
  font-weight: bold;
}

/* Teaching Table / Cards */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.teaching-course-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.course-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.course-level {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

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

/* --------------------------------------------------------------------------
   CONTACT PAGE
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 40px;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
}

.contact-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.1);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item-title {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-item-val {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
}

.contact-item-val a:hover {
  color: var(--ensias-azure-400);
  text-decoration: underline;
}

/* Contact Form Card */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--card-shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--ensias-azure-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

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

/* --------------------------------------------------------------------------
   BIBTEX MODAL & TOAST SYSTEM
   -------------------------------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 13, 25, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.bibtex-code-block {
  background: #070d19;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid #1e3458;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin-bottom: 18px;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0b1528;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideToast 0.3s ease forwards;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: fadeToastOut 0.3s ease forwards;
}

@keyframes fadeToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

/* Scroll-to-top Floating Button */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background: var(--ensias-azure-400);
  color: #ffffff;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 400px;
}

.footer-heading {
  font-size: 0.92rem;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-item a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-link-item a:hover {
  color: var(--ensias-azure-400);
  padding-left: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.morocco-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .researcher-card {
    max-width: 480px;
    margin: 0 auto;
  }
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
  .mobile-drawer {
    display: block;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bio-grid {
    grid-template-columns: 1fr;
  }
  .pub-actions-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .cv-banner {
    padding: 28px 20px;
  }
}
