:root {
  --primary-color: #5ea8f0; /* Derived from the light blue image */
  --primary-dark: #3b8bdd;
  --primary-light: #92cbf5; /* The exact color from image 2 */
  --bg-color: #f4f7fb;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Navbar */
.navbar {
  background: var(--surface-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-brand img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-color);
}

/* Header */
.header-hero {
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1.5px, transparent 1.5px),
                    linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  background-size: 20px 20px, 100% 100%;
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.header-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  padding-left: 3rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  outline: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
}

/* Main Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
}

/* Sidebar */
.sidebar {
  background: var(--surface-color);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  height: fit-content;
  order: 2;
}

.filter-section {
  margin-bottom: 2rem;
}

.filter-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input {
  accent-color: var(--primary-color);
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.badge {
  background: var(--bg-color);
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-left: auto;
}

/* Grid & Cards */
.results {
  order: 1;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

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

.card {
  background: var(--surface-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform 0.3s;
  transform-origin: bottom;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card:hover::before {
  transform: scaleY(1);
}

.card-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.card-title {
  padding-right: 80px;
}

.card-title h2 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  word-wrap: break-word;
}

.card-title p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.h-index-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.card-links {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-links a {
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-color);
  color: var(--primary-dark);
  font-weight: 600;
}

.card-links a:hover {
  background: var(--primary-light);
  color: white;
}

.card-department {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stat-item i {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* Detail Page */
.detail-container {
  max-width: 1200px;
  grid-template-columns: 1fr;
  align-items: start;
}

.detail-card {
  background: var(--surface-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.profile-left {
  display: flex;
  gap: 1.5rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f0f0f0;
}

.profile-info h1 {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.profile-info .title {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.profile-links {
  display: flex;
  gap: 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-links a {
  text-decoration: none;
}

.profile-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.h-index-large {
  background: #f1f5f9;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.btn-message {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s;
}

.btn-message:hover {
  background: #f8fafc;
  box-shadow: var(--shadow-sm);
}

.profile-affiliation {
  color: var(--primary-dark);
  font-weight: 500;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dot-separator {
  color: var(--text-secondary);
}

/* Metric Grid */
.metric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.metric-box {
  flex: 1;
  min-width: 180px;
  padding: 1.2rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  position: relative;
}

.metric-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.metric-title strong {
  font-size: 1.3rem;
  margin-right: 0.3rem;
}

.sparkline-mock {
  height: 40px;
  width: 100%;
  margin-bottom: 0.5rem;
}

.metric-years {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.bg-blue-light { background-color: #f0f7fb; }
.bg-green-light { background-color: #f2f9f4; }
.bg-orange-light { background-color: #fff6ee; }
.bg-teal-light { background-color: #f0fcf9; }
.bg-purple-light { background-color: #f7f4fc; }

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-family: inherit;
}

.mt-4 { margin-top: 2rem; }

/* SDGs */
.sdg-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sdg-box {
  width: 95px;
  height: 95px;
  color: white;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  padding: 6px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.sdg-header {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}

.sdg-number {
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1;
}

.sdg-text {
  font-size: 0.45rem;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 2px;
}

.sdg-box i {
  font-size: 2.2rem;
  margin-top: auto;
  align-self: center;
  opacity: 0.95;
}

/* Topics */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.topic-item {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topic-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0E77A3;
  border: 1px solid #0E77A3;
}

.topic-name {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.show-more {
  margin-top: 1rem;
}

.show-more a {
  color: #0E77A3;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Network Card */
.network-card {
  background: var(--surface-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
}

.network-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

#network-graph {
  flex-grow: 1;
  width: 100%;
  height: 400px;
  min-height: 400px;
  border-radius: 8px;
  background-color: #fafbfc;
  border: 1px dashed var(--border-color);
}

