/* ============================================================
   Alawi Alqushaibi – Academic Personal Homepage
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --primary:        #1e3a5f;
  --primary-dark:   #152a47;
  --secondary:      #0077b6;
  --accent:         #00b4d8;
  --accent-light:   #caf0f8;
  --bg:             #f0f4f8;
  --surface:        #ffffff;
  --surface-2:      #f7fafc;
  --text:           #1a202c;
  --text-secondary: #4a5568;
  --text-muted:     #718096;
  --border:         #e2e8f0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow:         0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:      0 12px 32px rgba(0,0,0,0.14);
  --radius:         14px;
  --radius-sm:      8px;
  --radius-xs:      4px;
  --transition:     all 0.25s ease;
  --nav-h:          64px;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:   'Playfair Display', Georgia, serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.3; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.2rem; }
p { margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout Helpers ──────────────────────────────────────── */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

/* ── Section Title ───────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--primary);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title span {
  position: relative;
  z-index: 1;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--accent-light);
  z-index: 0;
  border-radius: 4px;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(30, 58, 95, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  transition: var(--transition);
}

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

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  color: rgba(255,255,255,0.8);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.nav-pdf-btn {
  background: rgba(0,180,216,0.25);
  color: #fff !important;
  border: 1px solid rgba(0,180,216,0.5);
  display: flex; align-items: center; gap: 0.35rem;
}
.nav-pdf-btn:hover {
  background: rgba(0,180,216,0.45) !important;
  border-color: #00b4d8;
}

/* Album mosaic */
.alb-mosaic {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: inherit;
}
.alb-cell {
  overflow: hidden;
  background: #1a202c;
  position: relative;
}
.alb-cell img { width:100%;height:100%;object-fit:cover;display:block }
.alb-more {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--secondary) 100%);
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,180,216,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0,119,182,0.22) 0%, transparent 50%);
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.hero-photo {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  background: var(--primary);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-info { flex: 1; }

.hero-greeting {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.hero-affiliation {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
}
.hero-affiliation i { margin-right: 0.4rem; color: var(--accent); }

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.hero-btn.scholar  { background: #4285f4; color: #fff; }
.hero-btn.linkedin { background: #0a66c2; color: #fff; }
.hero-btn.github   { background: #24292e; color: #fff; }
.hero-btn.email    { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); }

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  color: #fff;
}

/* ── Tab Navigation ──────────────────────────────────────── */
.tab-nav {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  z-index: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tab-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--secondary); }
.tab-btn.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

.tab-badge {
  background: var(--secondary);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  font-weight: 700;
}

/* ── Tab Content ─────────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Metrics Section ─────────────────────────────────────── */
.metrics-section {
  background: var(--surface);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.metric-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, var(--surface-2) 0%, #eef4fb 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.metric-icon {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 0.6rem;
}

.metric-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.metric-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.metrics-updated {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.metrics-updated i { margin-right: 0.3rem; }
.metrics-updated a { color: var(--secondary); font-weight: 500; }

/* ── About Section ───────────────────────────────────────── */
.about-section {
  padding: 3rem 0;
}

.about-main p {
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.8;
}

.about-main p strong { color: var(--text); }

.subsection-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 0.75rem;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--accent-light);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(0,180,216,0.3);
  transition: var(--transition);
}
.tag:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Side Cards ──────────────────────────────────────────── */
.side-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.side-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.side-card h3 i { color: var(--accent); }

/* ── Timeline ────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 1.5rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-dot.phd  { background: var(--primary); }
.timeline-dot.ms   { background: var(--secondary); }
.timeline-dot.bs   { background: var(--accent); }

.timeline-content strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.timeline-content span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.timeline-content small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-style: italic;
}
.timeline-year {
  font-size: 0.75rem !important;
  color: var(--secondary) !important;
  font-weight: 600 !important;
}

/* ── Position Items ──────────────────────────────────────── */
.position-item {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.position-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.position-item strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
}
.position-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Awards ──────────────────────────────────────────────── */
.award-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.award-list li:last-child { border-bottom: none; }
.award-list li i { color: #f6ad55; margin-top: 3px; flex-shrink: 0; }

/* ── Projects Section ────────────────────────────────────── */
.projects-section {
  background: var(--surface);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  position: relative;
  transition: var(--transition);
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.project-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: #c6f6d5;
  color: #276749;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.project-card h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.project-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Publications Section ────────────────────────────────── */
.publications-section {
  padding: 3rem 0 4rem;
}

.pub-controls {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-search {
  position: relative;
}
.pub-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.pub-search input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  transition: var(--transition);
  outline: none;
}
.pub-search input:focus {
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,119,182,0.1);
}

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

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--secondary); color: var(--secondary); }
.filter-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}
.filter-count {
  background: rgba(0,0,0,0.12);
  border-radius: 50px;
  padding: 0 0.4rem;
  font-size: 0.72rem;
}
.filter-btn.active .filter-count { background: rgba(255,255,255,0.25); }

.pub-sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pub-sort label {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.pub-sort select {
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.pub-sort select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.1);
}

/* ── Publication Cards ───────────────────────────────────── */
.pub-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  transition: var(--transition);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.pub-item:hover {
  box-shadow: var(--shadow);
  border-left-color: var(--secondary);
  transform: translateX(2px);
}

.pub-item[data-type="journal"]    { border-left-color: var(--secondary); }
.pub-item[data-type="conference"] { border-left-color: #9b59b6; }
.pub-item[data-type="book"]       { border-left-color: #e67e22; }

.pub-rank {
  flex-shrink: 0;
  width: 38px;
  text-align: center;
}
.pub-rank-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.4rem;
  display: block;
}

.pub-body { flex: 1; min-width: 0; }

.pub-title {
  font-size: 0.965rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.pub-authors {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  line-height: 1.5;
}
.pub-authors strong { color: var(--primary); }

.pub-venue {
  font-size: 0.83rem;
  color: var(--secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-year     { background: #ebf4ff; color: #2b6cb0; }
.badge-q1       { background: #fefce8; color: #92400e; border: 1px solid #fcd34d; }
.badge-q2       { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.badge-q3       { background: #faf5ff; color: #6b21a8; border: 1px solid #c084fc; }
.badge-indexed  { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-type-journal    { background: #ebf4ff; color: #2b6cb0; }
.badge-type-conference { background: #faf5ff; color: #6b21a8; }
.badge-type-book       { background: #fff7ed; color: #c2410c; }

.pub-citations {
  flex-shrink: 0;
  text-align: center;
  min-width: 70px;
}
.citation-count {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  display: block;
}
.citation-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-top: 0.15rem;
}
.citation-icon { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.2rem; display: block; }

.pub-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.pub-empty i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; display: block; }

/* ── CV Section ──────────────────────────────────────────── */
.cv-section {
  padding: 3rem 0 4rem;
}

.cv-actions {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}
.cv-btn.download {
  background: var(--primary);
  color: #fff;
}
.cv-btn.download:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cv-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.cv-embed iframe {
  display: block;
  border: none;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.footer-info strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.footer-info p {
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
  color: rgba(255,255,255,0.6);
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.footer-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.footer-links a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.footer-copy {
  text-align: right;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease both;
}

.pub-item {
  animation: fadeInUp 0.3s ease both;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .about-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .about-side .side-card { margin-bottom: 0; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; text-align: center; }
  .footer-copy { text-align: center; }
}

@media (max-width: 680px) {
  .hero-container { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-name { font-size: 2rem; }
  .hero-links { justify-content: center; }
  .tab-btn { padding: 0.85rem 0.9rem; font-size: 0.84rem; }
  .about-side { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-item { flex-direction: column; }
  .pub-citations { flex-direction: row; gap: 0.5rem; align-items: center; }
  .citation-count { font-size: 1.2rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--primary-dark); padding: 1rem; gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-photo { width: 130px; height: 130px; }
  h2 { font-size: 1.6rem; }
}

@media (max-width: 420px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-btn span { display: none; }
  .cv-embed iframe { height: 600px !important; }
}
