/* -----------------------------------------------------------------
   1. RESET AND BASE STYLES
------------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

 :root {
  --bg: #f7f8fa;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #007acc;
  --accent-600: #005fa3;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Utility container for centering content */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* -----------------------------------------------------------------
   2. HEADER STYLES
------------------------------------------------------------------ */
header {
  background-color: var(--card-bg);
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  background-color: rgba(255, 255, 255, 0.85);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.site-title {
  font-size: 2em;
  margin-bottom: 10px;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
}

nav li {
  margin: 0;
}

nav a {
  text-decoration: none;
  font-weight: bold;
  color: var(--text);
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 5px;
  transition: 0.3s;
  position: relative;
}

nav a:hover,
nav a.active {
  background-color: var(--accent);
  color: #fff;
}

/* Animated underline for nav links on hover (desktop) */
@media (min-width: 769px) {
  nav a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms ease;
    border-radius: 2px;
    opacity: 0.9;
  }
  nav a:hover::after {
    transform: scaleX(1);
  }
}

/* Social Links in Header */
.social-links {
  margin-top: 10px;
  text-align: center;
}

.social-links a {
  margin: 0 10px;
  display: inline-block;
}

.social-icon {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

/* -----------------------------------------------------------------
   3. CONTENT LAYOUT (SIDEBAR + MAIN)
------------------------------------------------------------------ */
.content-container {
  display: flex;
  gap: 20px;
  align-items: stretch; /* Ensure children share the same height */
}

/* Sidebar */
.sidebar {
  flex: 0 0 300px; /* Adjust width to your preference */
  background-color: transparent;
  padding: 0;
  display: flex; /* Allow inner card to stretch */
}

/* Card container (in sidebar) */
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
  text-align: center;
}

/* Make the sidebar card fill the available height to match main content */
.sidebar .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* center photo and content horizontally */
}

/* Profile photo */
.profile-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 10px;
  border: 3px solid var(--accent);
}

/* Role badges under profile photo */
.role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: rgba(0, 122, 204, 0.08);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85em;
  white-space: nowrap;
}

.badge svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Make role badges (Ph.D Candidate, GRA, UF) more salient than research interests */
.role-badges {
  gap: 10px;
  margin-bottom: 14px;
}

.role-badges .badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-sm);
  font-size: 0.95em;
  font-weight: 700;
  padding: 6px 14px;
}

/* Card headings */
.card h2 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: var(--text);
}

/* Bold label for "Research Interests:" */
.research-label {
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--muted);
}

/* Clean bullet list for research interests */
.research-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 0;
  justify-content: center;
}

.research-list li {
  display: inline-block;
  background-color: rgba(0, 122, 204, 0.08);
  color: var(--accent);
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 0.9em;
}

/* -----------------------------------------------------------------
   4. MAIN CONTENT AREA
------------------------------------------------------------------ */
.main-content {
  flex: 1;
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
}

.main-content h2 {
  margin-bottom: 10px;
  color: var(--accent);
}

/* Hero section */
.hero {
  background: linear-gradient(180deg, #ffffff, var(--bg));
  padding: 20px 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 0;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

/* .hero-text removed (unused empty ruleset) */

.hero-title {
  font-size: 1.6em;
  margin-bottom: 4px;
}

.hero-subtitle {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 1.05em;
}

/* Publications */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.pub-top-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.pub-item {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

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

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #fdba74; /* light orange border */
  background: #fff7ed; /* light orange background */
  color: #c2410c; /* orange-700 text */
  font-weight: 600;
  font-size: 0.85em;
}

.author-me {
  color: var(--accent-600);
  font-weight: 700;
}

.pub-actions {
  display: flex;
  gap: 8px;
}

.pub-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn .icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  line-height: 0;
}

.btn .icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.venue {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #f3f4f6; /* gray-100 */
  color: var(--muted);
  font-weight: 600;
  border: 1px solid var(--card-border);
}

.hero-actions {
  display: flex;
  gap: 10px;
}

/* -----------------------------------------------------------------
   5. FEATURED PROJECTS PAGE STYLES
------------------------------------------------------------------ */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.project-card {
  /* A consistent border for the entire card */
  border: 1px solid var(--card-border); 
  border-radius: 8px;
  background-color: var(--card-bg);
  /* Same shadow as before, if desired */
  box-shadow: var(--shadow-sm);
  width: calc(33.333% - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* ensures content doesn't spill out of the rounded corners */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* New thumbnail container with fixed aspect ratio */
.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef2f7;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.project-thumb object {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

/* Updated PDF thumbnail styles: The .project-thumbnail now works for both <img> and <object> elements */
.project-thumbnail {
  width: 100%;
  height: 220px;
  /* Remove any default border from this container */
  border: none;
  overflow: hidden; /* hide scrollbars for embedded PDFs */
}

.project-thumbnail object {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.project-details {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-details h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #007acc;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.project-details p {
  font-size: 0.95em;
  margin-bottom: 10px;
  color: #555;
}

.project-buttons {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn {
  flex: 1;
  text-align: center;
  background-color: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-size: 0.9em;
  background-image: linear-gradient(135deg, var(--accent), var(--accent-600));
  box-shadow: 0 6px 16px rgba(0, 122, 204, 0.25);
}

.btn:hover {
  background-color: var(--accent-600);
  filter: brightness(0.98);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-600);
  border: 1.5px solid var(--accent);
  background-color: #fff;
  font-weight: 600;
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #fff;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* -----------------------------------------------------------------
   6. FOOTER
------------------------------------------------------------------ */
footer {
  text-align: center;
  background-color: var(--card-bg);
  padding: 10px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.9em;
}

/* -----------------------------------------------------------------
   7. RESPONSIVE DESIGN
------------------------------------------------------------------ */
@media (max-width: 768px) {
  .header-container {
    padding: 0 10px;
    flex-direction: column;
    align-items: center;
  }
  
  nav ul {
    flex-direction: column;
    gap: 10px;
  }
  
  .content-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .main-content {
    width: 100%;
  }
  
  .project-card {
    width: 100%;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* MODAL POPUP STYLES */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 999; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
  background-color: #fff;
  margin: 5% auto; /* 5% from the top, auto center */
  padding: 20px;
  width: 640px; /* or your desired width */
  max-width: 90%; /* responsive */
  position: relative;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Close button (top-right corner) */
.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 20px;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
}

/* -----------------------------------------------------------------
   8. LIST UTILITIES
------------------------------------------------------------------ */
.project-list {
  list-style-type: none;
  padding-left: 0;
}

.project-list li {
  margin-bottom: 1em;
}
