/* =========================================================================
   Portfolio — shared styles
   ========================================================================= */

:root {
  --bg-0: #0b0d1a;
  --bg-1: #141831;
  --bg-2: #1d2148;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: #f5f7ff;
  --text-strong: #1a1f36;
  --text: #2d3748;
  --text-muted: #5a6378;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-soft: #eef0ff;
  --border: #e5e8f5;
  --shadow-sm: 0 4px 12px rgba(15, 18, 60, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 18, 60, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 18, 60, 0.16);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --transition: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.25), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(139, 92, 246, 0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 60%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Nav ---------------- */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 12, 28, 0.7);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
nav.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #a5b4fc, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-menu {
  display: flex;
  gap: 6px;
  list-style: none;
}
.nav-menu a {
  color: #cbd0e0;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: var(--transition);
  cursor: pointer;
}
.nav-menu a:hover { color: white; background: rgba(255, 255, 255, 0.06); }
.nav-menu a.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ---------------- Surface / cards ---------------- */
.surface {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
  margin: 28px 0;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 24px;
  position: relative;
  padding-left: 18px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ---------------- Hero ---------------- */
.hero {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 56px 44px;
  margin: 32px 0;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 220px at 12% 0%, rgba(99, 102, 241, 0.10), transparent 60%),
    radial-gradient(380px 220px at 88% 0%, rgba(139, 92, 246, 0.10), transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; }
.profile-img {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  margin: 0 auto 24px;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 18px 40px rgba(99, 102, 241, 0.25);
  transition: transform var(--transition);
}
.profile-img:hover { transform: scale(1.04); }
.hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: var(--text-strong);
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.hero h2 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}
.hero h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 500;
}
.about-content {
  font-size: 1.02rem;
  color: var(--text);
  text-align: left;
  max-width: 760px;
  margin: 0 auto 28px;
}
.about-content p + p { margin-top: 14px; }

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 24px 0;
}
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text);
}
.contact-item i { color: var(--accent); }

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 1.05rem;
  transition: var(--transition);
}
.social-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(99, 102, 241, 0.4);
}

/* ---------------- Cards (research / awards / experience) ---------------- */
.card-list { display: grid; gap: 18px; }
.card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.card h3 {
  color: var(--text-strong);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.card-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-style: italic;
}
.card ul { padding-left: 20px; color: var(--text); }
.card ul li { margin-bottom: 4px; }

/* Publications row */
.pub-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: grid;
  gap: 8px;
  transition: var(--transition);
}
.pub-card:hover { box-shadow: var(--shadow-sm); border-color: #cfd5ee; }
.pub-card h3 {
  color: var(--text-strong);
  font-size: 1.05rem;
  line-height: 1.45;
}
.pub-meta { color: var(--text-muted); font-size: 0.92rem; }
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(99, 102, 241, 0.35); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); transform: translateY(-2px); box-shadow: none; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #545b63; }
.btn-danger { background: #e53e3e; }
.btn-danger:hover { background: #c53030; }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; }

/* ---------------- Skills ---------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.skill-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.skill-card h3 {
  color: var(--text-strong);
  font-size: 1.05rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-soft);
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pill {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: 999px;
  transition: var(--transition);
}
.skill-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- News ---------------- */
.news-list { display: grid; gap: 14px; max-height: 50vh; overflow-y: auto; padding-right: 6px; }
.news-item {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.news-item h3 { color: var(--text-strong); font-size: 1rem; margin-bottom: 4px; }
.news-item .news-date { color: var(--accent); font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; display: block; }
.news-item p { color: var(--text); font-size: 0.95rem; }

/* ---------------- Travel ---------------- */
.travel-gallery { display: grid; gap: 28px; }
.travel-item {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.travel-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.travel-item-content { padding: 18px 22px; }
.travel-item-content h3 { color: var(--text-strong); font-size: 1.1rem; margin-bottom: 4px; }
.travel-date { color: var(--text-muted); font-size: 0.88rem; }
.travel-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 8px;
}
.travel-images img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform var(--transition), opacity var(--transition);
}
.travel-images img:hover { transform: scale(1.02); opacity: 0.92; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}
.modal.show { display: flex; }
.modal img { max-width: 92vw; max-height: 92vh; border-radius: 6px; }
.modal .close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Visitor stats ---------------- */
.visitor-stats {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.visitor-stats h4 { color: var(--text-strong); margin-bottom: 6px; font-size: 1rem; }
#visitor-count { font-weight: 600; color: var(--accent); margin-bottom: 8px; }
#visitor-map { width: 100%; height: 280px; border-radius: 10px; }

footer.site-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  padding: 28px 0 36px;
}
footer.site-footer a { color: rgba(255, 255, 255, 0.75); }

/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
  .surface, .hero { padding: 28px 22px; border-radius: var(--radius); }
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav-menu {
    display: none;
    position: absolute;
    right: 16px;
    top: calc(100% + 8px);
    background: rgba(20, 24, 49, 0.96);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 200px;
  }
  .nav-menu.show { display: flex; }
  nav.site-nav .container { position: relative; }
  .profile-img { width: 132px; height: 132px; }
  .travel-images img { height: 150px; }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #eef0ff 0%, #f8f9ff 50%, #eef0ff 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 10px;
  height: 80px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
