/* ==========================================================================
   Prof. Aditya Tripathi - Academic Portfolio Stylesheet
   Modern, Accessible, Responsive & Themeable (Light/Dark)
   ========================================================================== */

:root {
  --primary: #1e3a8a;
  --primary-light: #2563eb;
  --primary-dark: #172554;
  --primary-subtle: #eff6ff;
  --secondary: #0d9488;
  --accent: #d97706;
  --accent-light: #fef3c7;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --bg-alt: #f8fafc;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Cambria", "Times New Roman", Times, serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

[data-theme="dark"] {
  --primary: #38bdf8;
  --primary-light: #60a5fa;
  --primary-dark: #0284c7;
  --primary-subtle: #0c4a6e;
  --secondary: #2dd4bf;
  --accent: #fbbf24;
  --accent-light: #451a03;
  
  --bg-main: #0b1120;
  --bg-card: #151e32;
  --bg-surface: #1e293b;
  --bg-alt: #0f172a;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0b1120;
  
  --border-subtle: #1e293b;
  --border-strong: #334155;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-secondary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-family: var(--font-serif);
  line-height: 1.25;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Top Notification / Affiliation Bar */
.top-bar {
  background: linear-gradient(90deg, #1e3a8a 0%, #0f172a 100%);
  color: #e2e8f0;
  font-size: 0.825rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar a {
  color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.top-bar a:hover {
  color: #38bdf8;
  text-decoration: none;
}

/* Main Navigation */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .header-nav {
  background-color: rgba(21, 30, 50, 0.95);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-light);
  background-color: var(--primary-subtle);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background-color: var(--primary-subtle);
  color: var(--primary);
  transform: rotate(15deg);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: radial-gradient(circle at top right, var(--primary-subtle) 0%, transparent 60%),
              radial-gradient(circle at bottom left, rgba(13, 148, 136, 0.05) 0%, transparent 50%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-badge span.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.35rem;
  font-family: var(--font-serif);
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item h3 {
  font-size: 1.85rem;
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: 0.15rem;
}

.stat-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  font-weight: 600;
}

/* Hero Image Card */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 4px solid var(--bg-card);
  max-width: 360px;
  background-color: var(--bg-card);
  transition: var(--transition);
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15);
}

.hero-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: top center;
}

.hero-card-caption {
  padding: 1.25rem;
  background-color: var(--bg-card);
  text-align: center;
}

.hero-card-caption h4 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.hero-card-caption p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-floating-badge {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

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

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

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

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

/* Page Header (for subpages) */
.page-header {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-main) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 800px;
  line-height: 1.6;
}

/* Footer */
.footer {
  margin-top: auto;
  background-color: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  border-top: 1px solid #1e293b;
}

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

.footer-brand h3 {
  color: #f8fafc;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

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

.footer-col h4 {
  color: #f8fafc;
  font-size: 1rem;
  font-family: var(--font-sans);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.65rem;
}

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

.footer-col a:hover {
  color: #38bdf8;
  text-decoration: none;
  padding-left: 4px;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.5rem;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.15rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .top-bar {
    display: none;
  }
}
