/* ==========================================================================
   Dhruv Prajapati - Professional Medical Portfolio Master Stylesheet
   Academic yet Modern Clinical Aesthetic with Clean Symmetrical Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Tokens - Modern Clinical Blue Slate & Teal */
  --primary: #4a778e;
  --primary-dark: #2c4e61;
  --primary-light: #6797b0;
  --primary-bg: #eaf1f5;
  --secondary-bg: #d7e4ec;
  
  --accent-teal: #0d9488;
  --accent-blue: #2563eb;
  --accent-gold: #d97706;
  --accent-purple: #7c3aed;
  
  --slate-dark: #0f172a;
  --slate-body: #334155;
  --slate-light: #64748b;
  --slate-border: #e2e8f0;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-hero: linear-gradient(135deg, #e4eff5 0%, #f0f6fa 100%);
  --bg-services-section: #4a778e;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(74, 119, 142, 0.08);
  --shadow-md: 0 10px 25px rgba(74, 119, 142, 0.12);
  --shadow-lg: 0 20px 40px rgba(44, 78, 97, 0.18);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Cover Photo Customizer Tokens */
  --cover-height: 380px;
  --cover-object-fit: cover;
  --cover-position: center 25%;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --slate-dark: #f8fafc;
  --slate-body: #cbd5e1;
  --slate-light: #94a3b8;
  --slate-border: #334155;
  
  --bg-main: #0b1324;
  --bg-card: #152238;
  --bg-header: rgba(11, 19, 36, 0.94);
  --bg-hero: linear-gradient(135deg, #152238 0%, #0b1324 100%);
  --primary-bg: #1e2d42;
  --secondary-bg: #2a3c54;
  --bg-services-section: #152238;
}

/* Global Reset & Base Rules */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--slate-dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;

  /* Disable text selection across site */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Image Shimmer Loading Background */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
  content-visibility: auto;
}

.post-media-item, .cover-photo-container, .hero-image-wrapper {
  background: linear-gradient(90deg, var(--primary-bg) 25%, var(--secondary-bg) 50%, var(--primary-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--slate-dark);
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Symmetrical Clean Navigation Bar
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-border);
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
  background: white;
}

.brand-text h2 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

[data-theme="dark"] .brand-text h2 {
  color: #7dd3fc;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-top: -2px;
}

/* Symmetrical 5-Link Center Nav */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-body);
  transition: var(--transition);
  position: relative;
  padding: 6px 4px;
  cursor: pointer;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  color: var(--slate-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--secondary-bg);
  transform: scale(1.05);
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  background: var(--secondary-bg);
}

.btn-primary {
  background: var(--primary-dark);
  color: white;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

[data-theme="dark"] .btn-outline {
  color: #7dd3fc;
  border-color: #7dd3fc;
}

.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-2px);
}

/* Mobile Slide-Out Drawer Navigation Overlay */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 340px;
  height: 100vh;
  background: var(--bg-card);
  z-index: 999;
  box-shadow: -10px 0 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-border);
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--slate-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Page Views Router
   ========================================================================== */
.page-view {
  display: none;
  animation: fadeIn 0.4s ease-in-out forwards;
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Profile Cover Banner & Header Avatar (Manipulable Full View)
   ========================================================================== */
.profile-cover-section {
  position: relative;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cover-photo-container {
  height: var(--cover-height);
  width: 100%;
  position: relative;
  background: #0f172a;
  transition: var(--transition);
}

.cover-photo-img {
  width: 100%;
  height: 100%;
  object-fit: var(--cover-object-fit);
  object-position: var(--cover-position);
  transition: var(--transition);
}

.cover-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.35) 0%, transparent 60%);
}

.profile-info-banner {
  padding: 0 1.5rem 1.15rem 1.5rem;
  position: relative;
  background: var(--bg-card);
}

.profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -65px;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
  gap: 1rem;
}

.cover-action-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
}

.cover-action-btns .btn-outline {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.cover-action-btns .btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-2px);
}

.profile-avatar-wrap {
  position: relative;
}

.profile-avatar-img {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  object-fit: cover;
  object-position: center 15%;
  box-shadow: var(--shadow-md);
  background: white;
}

.online-status-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid white;
}

.profile-details-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--slate-dark);
  line-height: 1.15;
}

.profile-headline {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}

.profile-affiliation {
  font-size: 0.85rem;
  color: var(--slate-light);
  line-height: 1.35;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: var(--bg-hero);
  padding: 2.5rem 2rem 3.5rem 2rem;
  position: relative;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  border: 1px solid var(--slate-border);
}

[data-theme="dark"] .hero-badge-pill {
  background: var(--bg-card);
  color: #7dd3fc;
}

.badge-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

[data-theme="dark"] .hero-title {
  color: #e0f2fe;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--slate-body);
  margin-bottom: 1.75rem;
  max-width: 620px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-search-box {
  background: white;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  border: 1px solid var(--slate-border);
  cursor: pointer;
}

[data-theme="dark"] .hero-search-box {
  background: var(--bg-card);
}

.search-icon-bg {
  width: 42px;
  height: 42px;
  background: var(--primary-dark);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.hero-search-input-wrap {
  flex: 1;
}

.hero-search-input-wrap strong {
  display: block;
  font-size: 0.95rem;
  color: var(--slate-dark);
}

.hero-search-input-wrap span {
  font-size: 0.8rem;
  color: var(--slate-light);
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-shape-bg {
  position: absolute;
  width: 360px;
  height: 360px;
  background: var(--primary-light);
  opacity: 0.35;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-img {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  max-height: 420px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  object-position: center 15%;
  box-shadow: var(--shadow-lg);
}

.hero-floating-badge {
  position: absolute;
  top: 20px;
  right: -10px;
  z-index: 3;
  background: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
}

[data-theme="dark"] .hero-floating-badge {
  background: var(--bg-card);
  color: #7dd3fc;
}

/* ==========================================================================
   Stats Bar Section
   ========================================================================== */
.stats-card-row {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border: 1px solid var(--slate-border);
  margin-bottom: 3rem;
}

[data-theme="dark"] .stats-card-row {
  background: var(--bg-card);
}

.stat-item {
  text-align: center;
  padding: 0 1rem;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  border-right: 1px solid var(--slate-border);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  display: block;
}

[data-theme="dark"] .stat-number {
  color: #7dd3fc;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-light);
}

/* ==========================================================================
   Posts & Activity Feed Styles
   ========================================================================== */
.posts-feed-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.post-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

[data-theme="dark"] .post-card {
  background: var(--bg-card);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slate-border);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--primary-light);
  background: white;
}

.post-author-info h4 {
  font-size: 1rem;
  font-weight: 700;
}

.post-author-info span {
  font-size: 0.8rem;
  color: var(--slate-light);
}

.post-date-badge {
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

[data-theme="dark"] .post-date-badge {
  background: var(--secondary-bg);
  color: #7dd3fc;
}

.post-content {
  font-size: 0.98rem;
  color: var(--slate-body);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  white-space: pre-line;
}

.post-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.hashtag-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(74, 119, 142, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Post Media Gallery Grids */
.post-media-grid {
  display: grid;
  gap: 12px;
  margin-top: 1.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-media-grid.grid-1 {
  grid-template-columns: 1fr;
}

.post-media-grid.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.post-media-grid.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.post-media-grid.grid-4 {
  grid-template-columns: 1fr 1fr;
}

.post-media-item {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  cursor: pointer;
}

.post-media-grid.grid-1 .post-media-item {
  height: 380px;
}

.post-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.4s ease;
}

.post-media-item:hover .post-media-img {
  transform: scale(1.04);
}

/* Video Player Container */
.post-video-container {
  margin-top: 1.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-sm);
}

.post-video-player {
  width: 100%;
  max-height: 420px;
  display: block;
  outline: none;
}

/* Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 25px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Figure 2 Side Card Styling */
.figure2-side-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

[data-theme="dark"] .figure2-side-card {
  background: var(--bg-card);
}

.figure2-side-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Publications Card Styles
   ========================================================================== */
.pub-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
  transition: var(--transition);
}

[data-theme="dark"] .pub-card {
  background: var(--bg-card);
}

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

.pub-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.pub-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-dark);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--slate-light);
  margin-bottom: 1rem;
}

.pub-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-border);
}

.pub-btn-link {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  border: 1px solid var(--slate-border);
  background: var(--bg-main);
  color: var(--slate-dark);
}

.pub-btn-link:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

.pub-btn-link.primary-link {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

.pub-btn-link.primary-link:hover {
  background: var(--primary);
}

/* ==========================================================================
   Section Headers & Common Layouts
   ========================================================================== */
.section-header-center {
  max-width: 650px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--slate-dark);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--slate-light);
}

/* ==========================================================================
   Footer & Contact Layout
   ========================================================================== */
.footer {
  background: var(--slate-dark);
  color: white;
  padding: 4rem 0 2rem 0;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-title {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.85rem;
}

/* ==========================================================================
   Responsive Layout System Grids & Elements
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.skills-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .skills-card {
  background: var(--bg-card);
}

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

.honors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.posts-filter-bar {
  display: flex;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto 2rem auto;
  flex-wrap: wrap;
}

.posts-filter-select {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--slate-border);
  font-weight: 600;
  background: var(--bg-card);
  color: var(--slate-dark);
  font-family: inherit;
}

.posts-search-input {
  flex: 1;
  min-width: 240px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--slate-border);
  background: var(--bg-card);
  color: var(--slate-dark);
  font-family: inherit;
}

/* ==========================================================================
   Comprehensive Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid, 
  .footer-grid, 
  .about-grid, 
  .education-grid, 
  .projects-grid, 
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .stats-card-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
  }
  .stat-item:not(:last-child)::after {
    display: none;
  }
  .stat-item {
    padding: 1rem;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
  }
  .nav-menu {
    gap: 1.25rem;
  }
  .nav-link {
    font-size: 0.88rem;
  }
}

@media (max-width: 820px) {
  .header-container {
    height: 70px;
  }
  .brand-text span {
    font-size: 0.65rem;
  }
  .nav-menu {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .header-actions .btn-primary {
    display: none;
  }
  
  .cover-photo-container {
    height: 200px;
  }
  .profile-avatar-row {
    margin-top: -50px;
    margin-bottom: 0.5rem;
  }
  .cover-action-btns {
    margin-bottom: 8px;
  }
  .profile-avatar-img {
    width: 95px;
    height: 95px;
  }
  .profile-name {
    font-size: 1.6rem;
  }
  .profile-headline {
    font-size: 0.9rem;
  }
  
  .hero {
    padding: 2rem 1.25rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-img {
    max-width: 300px;
  }
  .hero-floating-badge {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 12px;
    display: inline-flex;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-media-grid.grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 15px;
  }
  .container {
    padding: 0 1rem;
  }
  .hero {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
  }
  .hero-badge-pill {
    font-size: 0.78rem;
    padding: 4px 12px;
    line-height: 1.4;
  }
  .hero-title, .section-title {
    font-size: 1.55rem;
  }
  .hero-subtitle, .section-desc {
    font-size: 0.9rem;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn-primary, 
  .hero-ctas .btn-outline {
    width: 100%;
    justify-content: center;
  }
  .hero-search-box {
    max-width: 100%;
    padding: 10px 14px;
    gap: 10px;
  }
  .search-icon-bg {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .stats-card-row {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.75rem;
  }
  .stat-number {
    font-size: 1.75rem;
  }
  .profile-avatar-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: -45px;
  }
  .cover-action-btns {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .cover-action-btns .btn-primary,
  .cover-action-btns .btn-outline {
    flex: 1;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.6rem 0.6rem;
  }
  .skills-card {
    padding: 1.25rem;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .honors-grid {
    grid-template-columns: 1fr;
  }
  .pub-card {
    padding: 1.25rem;
  }
  .pub-title {
    font-size: 1.15rem;
  }
  .pub-links-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .pub-btn-link {
    justify-content: center;
  }
  .pub-links-grid span {
    margin-left: 0 !important;
    align-self: flex-start;
  }
  .posts-filter-bar {
    flex-direction: column;
  }
  .posts-filter-select,
  .posts-search-input {
    width: 100%;
    min-width: 100%;
  }
  .post-card {
    padding: 1.25rem;
  }
  .post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .post-date-badge {
    align-self: flex-start;
  }
  .post-media-grid.grid-2,
  .post-media-grid.grid-3,
  .post-media-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .post-media-item {
    height: 150px;
  }
  .post-media-grid.grid-1 .post-media-item {
    height: 220px;
  }
  .footer {
    padding: 3rem 0 1.5rem 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .brand-text span {
    display: none;
  }
  .hero-title, .section-title {
    font-size: 1.35rem;
  }
  .profile-name {
    font-size: 1.35rem;
  }
}

