:root {
  --bg-page: #f1f5f9;
  --bg-block: #ffffff;
  --text: #0f172a;
  --accent: #2563eb;
  --gray: #64748b;
  --border: #e2e8f0;
  --light-bg: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-page);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 50px 20px;
  line-height: 1.6;
}

.main-block {
  background: var(--bg-block);
  width: 100%;
  max-width: 1050px;
  display: flex;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.sidebar {
  width: 180px;
  padding: 50px 30px;
  background: #fafafa;
  border-right: 1px solid var(--border);
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  position: sticky;
  top: 50px;
}
.sidebar a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.sidebar a:hover {
  color: var(--accent);
}

.content {
  flex: 1;
  padding: 60px 70px;
}
.hero {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  margin-bottom: 2rem;
}
.profile-circle {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.hero-info {
  flex: 1;
  width: 100%;
}

h1 {
  font-size: 2.1rem;
  letter-spacing: -1px;
  margin-bottom: 0.2rem;
}
.subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}
.institution {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Metrics Styling */
.metrics-container {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.metric-item {
  background: var(--light-bg);
  padding: 10px 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border);
  min-width: 100px;
}
.metric-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}
.metric-label {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.research-interests {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
}
.social-icons {
  display: flex;
  gap: 1.2rem;
}
.icon {
  font-size: 1.3rem;
  transition: 0.2s;
}
.icon:hover {
  transform: translateY(-2px);
}
.github {
  color: #333;
}
.linkedin {
  color: #0077b5;
}
.scholar {
  color: #4285f4;
}

/* --- Social Icons Update --- */
.social-icons {
  display: flex;
  gap: 30px; /* Adds space between icons */
  margin-top: 20px;
}

.social-icons a {
  font-size: 1.8rem; /* This makes them bigger (standard was likely 1rem or 1.2rem) */
  transition:
    transform 0.2s ease,
    color 0.2s ease;
  color: var(--gray); /* Default color before hover */
}

.social-icons a:hover {
  transform: translateY(-3px); /* Lifts icon slightly on hover */
}

/* Brand Colors on Hover */
.social-icons a.github:hover {
  color: #333;
}
.social-icons a.linkedin:hover {
  color: #0077b5;
}
.social-icons a.scholar:hover {
  color: #4285f4;
}
.social-icons a.researchgate:hover {
  color: #00ccbb;
} /* ResearchGate Green/Teal */
.social-icons a.youtube:hover {
  color: #ff0000;
} /* YouTube Red */

/* --- Full-Width Side-by-Side Charts --- */
.hero-images-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 3rem;
  width: 100%;
}

.hero-promo-img {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  background: #fff;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}
.section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #94a3b8;
  margin: 2rem 0;
  font-weight: 600;
}

.paper {
  margin-bottom: 2.5rem;
}
.paper-title {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.4;
}
.authors {
  font-size: 0.9rem;
  color: #334155;
}
.venue {
  font-size: 0.85rem;
  color: var(--gray);
  font-style: italic;
}

.paper-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.doi-link,
.btn-cite {
  font-size: 0.8rem;
  color: var(--gray);
  text-decoration: none;
  border: none;
  background: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: color 0.2s;
}
.doi-link:hover,
.btn-cite:hover {
  color: var(--accent);
}

.bibtex-box {
  display: none;
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.75rem;
  margin-top: 10px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  overflow-x: auto;
}

.contact-details {
  font-size: 0.95rem;
  line-height: 2;
}
.contact-details i {
  color: var(--accent);
  margin-right: 10px;
  width: 20px;
}

footer {
  margin-top: 5rem;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
}

/* --- Mobile Responsiveness (Phones & Tablets) --- */
@media (max-width: 800px) {
  body {
    padding: 15px 10px;
  } /* Shrinks the empty space outside the block */

  .main-block {
    flex-direction: column;
    border-radius: 15px;
  }

  /* Top Navigation bar for mobile */
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 15px;
  }
  .sidebar nav {
    flex-direction: row;
    justify-content: center;
    position: static;
    flex-wrap: wrap;
    gap: 15px;
  }

  /* Shrinks huge padding so text uses full screen width */
  .content {
    padding: 30px 20px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1.5rem;
  }
  .profile-circle {
    width: 140px;
    height: 140px;
  } /* Slightly smaller profile image */

  .metrics-container {
    justify-content: center;
  }
  .social-icons {
    justify-content: center;
  }

  /* Stacks the a.png and b.png images vertically on small screens */
  .hero-images-container {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 2rem;
  }
  .hero-promo-img {
    width: 100%;
  }
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #0f172a;
    --bg-block: #1e293b;
    --text: #f1f5f9;
    --accent: #60a5fa;
    --gray: #94a3b8;
    --border: #334155;
    --light-bg: #1e293b;
  }

  .sidebar {
    background: #111827;
    border-right-color: var(--border);
  }
  .sidebar a {
    color: #cbd5e1;
  }
  .paper-title {
    color: var(--accent);
  }

  .authors {
    color: #cbd5e1;
  }
  .venue {
    color: #94a3b8;
  }

  .bibtex-box {
    background: #0f172a;
    color: #94a3b8;
  }
  .github {
    color: #f1f5f9;
  }
}

/* Gallery Container - 2 columns */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Exactly 2 equal columns */
  gap: 20px; /* Space between photos */
  align-items: start; /* Keeps photos at their natural height */
}

/* Individual Gallery Item */
.gallery-item {
  background: var(--light-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* The Image - No Crop */
.gallery-item img {
  width: 100%; /* Fills the 1/2 row width */
  height: auto; /* Height adjusts automatically (No cropping) */
  display: block; /* Removes bottom whitespace gaps */
  object-fit: contain; /* Extra safety to ensure the whole image fits */
}

/* Responsive: 1 column on small phones so photos aren't too tiny */
@media (max-width: 600px) {
  .gallery-container {
    grid-template-columns: 1fr;
  }
}
