/* ==========================================================================
   Personal & Academic Website Stylesheet
   Prof. Dr. Basanta Prasad Adhikari
   Domain: basantaadhikari.com.np
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #c27803;
  --accent-hover: #9e5e00;
  --secondary: #1d4ed8;
  --secondary-hover: #1e40af;
  --success: #047857;
  
  --bg-main: #fafaf9;
  --bg-card: #ffffff;
  --bg-alt: #f3f4f6;
  
  --text-main: #1c1917;
  --text-muted: #57534e;
  --text-inverse: #ffffff;
  
  --border: #e7e5e4;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 6px 24px -4px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 36px -6px rgba(15, 23, 42, 0.12);
  
  --transition: all 0.25s ease-in-out;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body.dark-mode {
  --primary: #020617;
  --primary-light: #0f172a;
  --accent: #fbbf24;
  --accent-hover: #d97706;
  --secondary: #60a5fa;
  
  --bg-main: #0c0a09;
  --bg-card: #1c1917;
  --bg-alt: #292524;
  
  --text-main: #f5f5f4;
  --text-muted: #a8a29e;
  --text-inverse: #0c0a09;
  
  --border: #44403c;
  --shadow: 0 6px 30px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  letter-spacing: -0.01em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 700;
}

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

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

body.dark-mode .site-header {
  background-color: rgba(28, 25, 23, 0.94);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-badge {
  background: linear-gradient(135deg, var(--accent), #9e5e00);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  white-space: nowrap;
}

.nav-links li {
  white-space: nowrap;
  display: inline-block;
}

.nav-links a {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: -0.01em;
  position: relative;
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.icon-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.mobile-menu-btn {
  display: none;
}

/* Hero Section */
.hero-section {
  padding: 5rem 0 4.5rem 0;
  background: linear-gradient(135deg, var(--bg-main) 50%, var(--bg-alt));
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
  align-items: center;
}

.hero-title {
  font-size: 3.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.25rem;
  font-family: var(--font-heading);
}

.hero-affiliations {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.affiliation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.affiliation-item i {
  color: var(--accent);
  width: 20px;
  text-align: center;
}

.hero-bio {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: var(--text-main);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-profile-card {
  text-align: center;
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.profile-img-wrap {
  width: 220px;
  height: 220px;
  margin: 0 auto 1.25rem auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.profile-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.profile-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.orcid-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #a6ce39;
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Stats Banner */
.stats-banner {
  background: var(--primary);
  color: var(--text-inverse);
  padding: 2.75rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.75rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
}

.stat-item p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-alt);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* Section Shared Layouts */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.25rem auto;
}

.section-subtitle {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.65rem;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Timeline Layout */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2rem;
  border-left: 3px solid var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.6rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
}

.timeline-date {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.timeline-content {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.timeline-content h4 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline-content h5 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* Research Cards */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.research-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.research-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.research-icon {
  width: 54px;
  height: 54px;
  background: rgba(194, 120, 3, 0.12);
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.research-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.research-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Global Network Grid */
.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.network-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.network-flag {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.network-card h4 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.network-collaborators, .network-focus {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* Publications Module */
.pub-toolbar {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pub-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.pub-count {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.pub-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.pub-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pub-year {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

body.dark-mode .pub-year {
  background: var(--accent);
}

.pub-cat-tag {
  background: rgba(29, 78, 216, 0.1);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.pub-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.pub-authors, .pub-journal {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.pub-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem 0;
}

.tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.pub-actions {
  display: flex;
  gap: 0.75rem;
}

/* Feature Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 650px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.citation-box {
  background: var(--bg-main);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin: 0.75rem 0 1rem 0;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-icon {
  width: 44px;
  height: 44px;
  background: rgba(194, 120, 3, 0.1);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-text h4 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.info-text p, .info-text a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: none;
}

.alert-success {
  background: rgba(4, 120, 87, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
}

.alert-error {
  background: rgba(225, 29, 72, 0.15);
  color: #e11d48;
  border: 1px solid #e11d48;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #ffffff;
  padding: 3.5rem 0 2rem 0;
  border-top: 1px solid var(--border);
}

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

.footer-brand h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.footer-links h4 {
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
  .nav-links {
    gap: 0.75rem;
  }
  .nav-links a {
    font-size: 0.85rem;
    padding: 0.3rem 0.1rem;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-affiliations {
    align-items: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
    gap: 1rem;
  }
  .nav-links.active {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Print Stylesheet - Isolate CV Document
   ========================================================================== */
@media print {
  header, footer, .hero-section, .stats-banner, #about, #research, #publications, #teaching, #achievements, #news, #contact, .nav-controls {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  #cv {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }
  #cv .btn {
    display: none !important;
  }
}

