/* ============================================================
   ACADEMIC PORTFOLIO — style.css
   ✏️ EDIT: CSS variables at the top control colors and spacing.
   Organized sections:
   1. CSS Variables & Reset
   2. Typography
   3. Layout Utilities
   4. Header / Navigation
   5. Hero / Profile
   6. Publications
   7. BibTeX Modal
   8. Experience Timeline
   9. Contact
   10. Footer
   11. Responsive Media Queries
   12. Reduced Motion
============================================================ */

/* ============================================================
   1. CSS VARIABLES & RESET
   ✏️ EDIT: Change --accent to alter the main accent color.
   ✏️ EDIT: Change --bg and --card to alter background colors.
============================================================ */
:root {
  /* ── Accent color ─────────────────────────────────────── */
  --accent:          #2563eb;
  --accent-hover:    #1d4ed8;
  --accent-soft:     #dbeafe;
  --accent-text:     #1e40af;

  /* ── Backgrounds ─────────────────────────────────────── */
  --bg:              #f8fafc;
  --bg-alt:          #f1f5f9;
  --card:            #ffffff;
  --card-border:     #e2e8f0;

  /* ── Text ────────────────────────────────────────────── */
  --text:            #1f2937;
  --text-muted:      #6b7280;
  --text-faint:      #9ca3af;

  /* ── Header ──────────────────────────────────────────── */
  --header-bg:       rgba(248, 250, 252, 0.92);
  --header-border:   #e2e8f0;
  --header-h:        72px;

  /* ── Shadows ─────────────────────────────────────────── */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:       0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:       0 10px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-hover:    0 16px 48px rgba(37,99,235,0.12), 0 4px 16px rgba(0,0,0,0.08);

  /* ── Borders ──────────────────────────────────────────── */
  --radius:          18px;
  --radius-sm:       10px;
  --radius-pill:     100px;

  /* ── Spacing ─────────────────────────────────────────── */
  --section-pad:     90px;
  --container-w:     1120px;
  --gap:             28px;

  /* ── Transitions ────────────────────────────────────── */
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --transition:      0.22s var(--ease);
}

/* ── Dark Mode Variables ─────────────────────────────────── */
[data-theme="dark"] {
  --accent:          #3b82f6;
  --accent-hover:    #60a5fa;
  --accent-soft:     #1e3a5f;
  --accent-text:     #93c5fd;

  --bg:              #0f172a;
  --bg-alt:          #1e293b;
  --card:            #111827;
  --card-border:     #1f2d3d;

  --text:            #e5e7eb;
  --text-muted:      #9ca3af;
  --text-faint:      #6b7280;

  --header-bg:       rgba(15, 23, 42, 0.94);
  --header-border:   #1f2d3d;

  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:       0 4px 16px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-lg:       0 10px 40px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.25);
  --shadow-hover:    0 16px 48px rgba(59,130,246,0.18), 0 4px 16px rgba(0,0,0,0.3);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::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: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* Visible focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ============================================================
   2. TYPOGRAPHY
============================================================ */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.section-header {
  margin-bottom: 48px;
}

.section-header::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 14px;
}


/* ============================================================
   3. LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 28px;
}

section:not(.section-hero) {
  padding: var(--section-pad) 0;
}

.section-publications { background: var(--bg); }
.section-experience   { background: var(--bg-alt); }
.section-contact      { background: var(--bg); }


/* ============================================================
   4. HEADER / NAVIGATION
============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

/* Added when user scrolls */
#site-header.scrolled {
  border-bottom-color: var(--header-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--container-w);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand / name */
.site-brand {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-brand:hover { color: var(--accent); }

/* Desktop nav links */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Header controls (theme toggle + hamburger) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Show/hide sun/moon icons based on theme */
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

/* Hamburger button (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 9px 8px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s var(--ease), opacity 0.15s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav-mobile {
  display: flex;
  flex-direction: column;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--header-border);
  padding: 12px 20px 16px;
  gap: 4px;
}
.nav-mobile[hidden] { display: none; }
.nav-mobile .nav-link {
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}


/* ============================================================
   5. HERO / PROFILE SECTION
============================================================ */
.section-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 80px;
  overflow: hidden;
  background: var(--bg);
}

/* Canvas lives behind everything */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}

/* ── Profile Card ──────────────────────────────────────────── */
.profile-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.profile-photo {
  width: 164px;
  height: 164px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-soft);
  box-shadow: 0 0 0 5px var(--card), 0 4px 20px rgba(37,99,235,0.15);
  margin-bottom: 4px;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.profile-title {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.profile-affil {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Social icons row */
.profile-icons {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.profile-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  background: var(--bg);
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.profile-icon-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.18);
}

/* ── Biography Column ─────────────────────────────────────── */
.bio-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}

.bio-tagline {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.01em;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.bio-text {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Interests + Education mini-grid */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: 8px;
}

.bio-block {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
}

.bio-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.bio-block-title svg { color: var(--accent); flex-shrink: 0; }

.bio-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bio-list li {
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}
.bio-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 1px;
}

/* Education special styling */
.edu-list li {
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.edu-list li::before { display: none; }
.edu-degree { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.edu-school  { font-size: 0.84rem; color: var(--text-muted); }
.edu-year    { font-size: 0.8rem; color: var(--text-faint); }


/* ============================================================
   6. PUBLICATIONS
============================================================ */
/* Filter buttons */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

/* Year group label */
.pub-year-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pub-year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.pub-year-group { margin-bottom: 8px; }
.pub-year-group[hidden] { display: none; }

/* Publication card */
.pub-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  overflow: hidden;
}
.pub-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: rgba(37,99,235,0.2);
}
.pub-card[hidden] { display: none; }

.pub-card-body { padding: 24px 26px; }

.pub-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pub-venue {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.pub-year-badge {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 500;
}

.pub-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
}
.pub-title a {
  color: var(--text);
  transition: color var(--transition);
}
.pub-title a:hover { color: var(--accent); }

.pub-authors {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.pub-authors strong { color: var(--text); }

.pub-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Publication action buttons */
.pub-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  text-decoration: none;
}
.pub-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.pub-btn-bibtex { background: none; }


/* ============================================================
   7. BIBTEX MODAL
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s var(--ease);
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  animation: slideUp 0.22s var(--ease);
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--card-border);
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.bibtex-block {
  margin: 0;
  padding: 18px 24px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-alt);
  overflow-x: auto;
  white-space: pre;
}

.modal-footer {
  padding: 14px 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--card-border);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}
.copy-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.copy-feedback {
  font-size: 0.82rem;
  color: #22c55e;
  font-weight: 500;
}


/* ============================================================
   8. EXPERIENCE TIMELINE
============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connecting line */
.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--card-border));
  border-radius: 2px;
  z-index: 0;
}

.timeline-item {
  display: flex;
  gap: 22px;
  position: relative;
  padding-bottom: 32px;
}
.timeline-item:last-child { padding-bottom: 0; }

/* Circle icon on timeline */
.timeline-icon {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  z-index: 1;
  margin-top: 2px;
  overflow: hidden;        /* ← ADD THIS */
  padding: 0; 
}

/* Timeline card */
.timeline-content {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.timeline-content:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-org {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.timeline-date,
.timeline-location {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.timeline-date { font-weight: 600; }

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.65;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.timeline-bullets li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.timeline-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}


/* ============================================================
   9. CONTACT
============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* Contact form wrapper */
.contact-form-wrap {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

/* Form elements */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.form-label span { color: var(--accent); }

.form-input {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.form-error {
  display: block;
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 5px;
  min-height: 16px;
}

/* Hidden honeypot */
.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.25);
}
.submit-btn:active { transform: translateY(0); }

.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  color: #166534;
  font-size: 0.9rem;
  font-weight: 500;
}
[data-theme="dark"] .form-success {
  background: #14532d;
  border-color: #166534;
  color: #bbf7d0;
}
.form-success[hidden] { display: none; }

/* Contact info sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

.contact-info-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}
a.contact-info-value:hover { color: var(--accent); }

.contact-social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.contact-social-btn {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
}
.contact-social-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}


/* ============================================================
   10. FOOTER
============================================================ */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-built {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 3px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-link {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--accent); }


/* ============================================================
   11. RESPONSIVE MEDIA QUERIES
============================================================ */

/* ── Tablet (≤ 900px) ─────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --section-pad: 64px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .profile-card {
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
  }

  .bio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before { left: 20px; }
}

/* ── Mobile (≤ 640px) ─────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --section-pad: 48px;
  }

  .container { padding: 0 18px; }

  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }
  .nav-desktop { display: none; }

  /* Hero stacks */
  .section-hero {
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 52px;
    min-height: auto;
  }

  .hero-inner { gap: 28px; }

  .profile-card {
    max-width: 100%;
    padding: 28px 20px;
  }

  .profile-photo {
    width: 130px;
    height: 130px;
  }

  /* Bio grid stacks on small mobile */
  .bio-grid {
    grid-template-columns: 1fr;
  }

  /* Publication cards */
  .pub-filters { gap: 6px; }
  .filter-btn { padding: 6px 13px; font-size: 0.8rem; }

  .pub-card-body { padding: 18px 18px; }

  /* Timeline */
  .timeline-header { flex-direction: column; gap: 6px; }
  .timeline-meta { align-items: flex-start; }

  /* Contact form */
  .contact-form-wrap { padding: 24px 18px; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { gap: 14px; }
}

/* ── Very small (≤ 380px) ─────────────────────────────────── */
@media (max-width: 380px) {
  .profile-icons { gap: 7px; }
  .profile-icon-link { width: 36px; height: 36px; }
}


/* ============================================================
   12. REDUCED MOTION
   Users who prefer reduced motion will not see animations.
============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  #hero-canvas { display: none; }
}
