/* ====================================================
   Academic Portfolio Design — Overlay on styles.css
   Inspired by reference/ academic portfolio layout
   ==================================================== */

/* ── Import academic font ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────── */
:root {
  --academic-font: 'Inter', 'Segoe UI', sans-serif;
  --academic-serif: 'Crimson Pro', Georgia, serif;
  --academic-primary: #1a1a2e;
  --academic-accent: #4f8ef7;
  --academic-accent2: #7c3aed;
  --academic-white: #ffffff;
  --academic-light: #f8f9fc;
  --academic-border: #e2e8f0;
  --academic-text: #2d3748;
  --academic-muted: #718096;
  --academic-hero-height: 100vh;
  --section-padding: 90px 0;
}

/* ── Neural Network AI Hero ───────────────────────── */
.hero {
  position: relative;
  height: var(--academic-hero-height);
  min-height: 600px;
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b3e 40%, #1a0a2e 70%, #0a1628 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Animated AI neural network canvas overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(79, 142, 247, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(79, 142, 247, 0.05) 0%, transparent 70%);
  animation: bgPulse 8s ease-in-out infinite alternate;
  z-index: 0;
}

/* Neural network dot grid */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(79, 142, 247, 0.3) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.4;
  z-index: 0;
  animation: gridMove 20s linear infinite;
}

@keyframes bgPulse {
  0%   { opacity: 0.6; }
  100% { opacity: 1; }
}

@keyframes gridMove {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Floating AI neural nodes */
.ai-neural-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Hero content above overlays */
.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.hero-content {
  flex: 1;
  max-width: 650px;
}

/* ── Academic Hero Title ───────────────────────────── */
.hero-title {
  font-family: var(--academic-font);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-title::after {
  content: none; /* remove glitch duplicate */
}

.hero-subtitle {
  font-family: var(--academic-font);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 18px;
}

.hero-description {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 560px;
}

/* ── Hero elements that use CSS vars (dark in light mode) — force white on dark hero ── */
.hero-research-focus {
  color: rgba(255, 255, 255, 0.72);
}

.hero-location .location-info span {
  color: rgba(255, 255, 255, 0.9);
}

.hero-location .location-info {
  background: rgba(79, 142, 247, 0.12);
  border-color: rgba(79, 142, 247, 0.25);
}

/* ── Academic Credential Bar ─────────────────────── */
.academic-credential-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.credential-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 6px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.credential-item:hover {
  background: rgba(79, 142, 247, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

.credential-item i,
.credential-item svg {
  font-size: 1rem;
  width: 16px;
  text-align: center;
}

.credential-item.github:hover    { color: #f0f6fc; background: rgba(36,41,46,0.5); }
.credential-item.linkedin:hover  { color: #0a66c2; background: rgba(10,102,194,0.15); }
.credential-item.scholar:hover   { color: #4285f4; background: rgba(66,133,244,0.15); }
.credential-item.kaggle:hover    { color: #20beff; background: rgba(32,190,255,0.15); }
.credential-item.huggingface:hover { color: #ff9d00; background: rgba(255,157,0,0.15); }
.credential-item.facebook:hover    { color: #1877F2; background: rgba(24,119,242,0.15); }
.credential-item.email:hover     { color: #ea4335; background: rgba(234,67,53,0.15); }

.credential-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.3);
  margin: 0 2px;
}

/* ── Animated navbar (transparent → solid) ─────────── */
.navbar {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  transition: all 0.35s ease !important;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1) !important;
  border-bottom: 1px solid var(--academic-border) !important;
  backdrop-filter: blur(12px) !important;
}

.nav-logo a {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.navbar.scrolled .nav-logo a {
  color: var(--academic-primary) !important;
}

.nav-menu a {
  color: rgba(255,255,255,0.88) !important;
  letter-spacing: 0.06em;
  font-size: 0.84rem;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar.scrolled .nav-menu a {
  color: var(--academic-text) !important;
}
.nav-menu a:hover,
.navbar.scrolled .nav-menu a:hover {
  color: var(--academic-accent) !important;
  background: none !important;
}

/* Dropdown items must stay readable (white bg) — override the global .nav-menu a white rule */
.dropdown-menu li a {
  color: var(--text-primary) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
}
.dropdown-menu li a:hover {
  color: var(--academic-accent) !important;
  background: rgba(102, 126, 234, 0.1) !important;
}

/* hamburger in dark hero */
.hamburger span {
  background: #ffffff !important;
}
.navbar.scrolled .hamburger span {
  background: var(--academic-text) !important;
}

/* theme toggle btn */
.theme-toggle {
  color: rgba(255,255,255,0.85) !important;
}
.navbar.scrolled .theme-toggle {
  color: var(--academic-text) !important;
}

/* ── Section headers — academic underline style ──── */
.section-title {
  font-family: var(--academic-font);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--academic-primary);
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--academic-accent), var(--academic-accent2));
  border-radius: 3px;
  margin-top: 8px;
  transition: width 0.3s ease;
}

.section-title:hover::after {
  width: 100%;
}

/* ── Section alternating backgrounds ─────────────── */
.about          { background: var(--academic-white); }
.skills-section { background: var(--academic-light); }
.education      { background: var(--academic-white); }
.experience     { background: var(--academic-light); }
.projects       { background: var(--academic-white); }
.honors         { background: var(--academic-light); }
.activities     { background: var(--academic-white); }
.contact        { background: var(--academic-light); }

/* ── Academic card style ─────────────────────────── */
.project-card,
.honor-card,
.activity-item,
.experience-item {
  background: var(--academic-white);
  border: 1px solid var(--academic-border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover,
.honor-card:hover,
.activity-item:hover {
  box-shadow: 0 8px 32px rgba(79,142,247,0.12);
  transform: translateY(-3px);
  border-color: rgba(79,142,247,0.3);
}

/* ── "View All" section footer button ────────────── */
.section-view-all {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--academic-border);
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: linear-gradient(135deg, var(--academic-accent), var(--academic-accent2));
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(79,142,247,0.3);
}

.btn-view-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79,142,247,0.4);
  color: #ffffff;
  text-decoration: none;
}

.btn-view-all i {
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.btn-view-all:hover i {
  transform: translateX(4px);
}

/* ── Page hero for sub-pages (awards, projects etc) ─ */
.page-hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b3e 50%, #1a0a2e 100%);
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(79, 142, 247, 0.25) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
  animation: gridMove 20s linear infinite;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 20px;
}

.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-top: 16px;
}

.page-hero-breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.page-hero-breadcrumb a:hover {
  color: var(--academic-accent);
}

/* ── Sub-page back link ───────────────────────────── */
.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  margin-top: 12px;
  transition: all 0.2s;
}

.back-to-home:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

/* ── Section preview counter badge ──────────────── */
.section-preview-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--academic-accent), var(--academic-accent2));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 12px;
  vertical-align: middle;
}

/* ── About section academic tweak ───────────────── */
.about .about-text p {
  font-size: 0.98rem;
  line-height: 1.82;
  color: var(--academic-text);
}

/* ── Tech tag academic style ─────────────────────── */
.tech-tag {
  background: rgba(79,142,247,0.08);
  color: var(--academic-accent);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  transition: all 0.2s;
}

.tech-tag:hover {
  background: var(--academic-accent);
  color: #ffffff;
}

/* ── Horizontal scrolling AI chip animation (hero) ── */
@keyframes slideChips {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ai-chips-track {
  display: flex;
  gap: 12px;
  overflow: hidden;
  margin: 16px 0;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.ai-chips-inner {
  display: flex;
  gap: 12px;
  animation: slideChips 18s linear infinite;
  white-space: nowrap;
}

.ai-chip {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.92);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ── Dark mode compat ────────────────────────────── */
body.dark-mode .section-title {
  color: #e8e8e8;
}

body.dark-mode .project-card,
body.dark-mode .honor-card,
body.dark-mode .activity-item,
body.dark-mode .experience-item {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

body.dark-mode .btn-view-all {
  box-shadow: 0 4px 15px rgba(79,142,247,0.2);
}

body.dark-mode .page-hero {
  background: linear-gradient(135deg, #050510 0%, #080d1e 50%, #0d0515 100%);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .academic-credential-bar {
    gap: 2px;
    padding: 8px;
  }

  .credential-item {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .credential-item span {
    display: none;
  }

  .hero-container {
    padding: 0 20px;
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .ai-chips-track {
    display: none;
  }

  .section-view-all {
    margin-top: 1.5rem;
  }
}
