/* ============================================================
   RISHI ARYAL PORTFOLIO — SHARED DESIGN SYSTEM
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-primary:    #0a0f1e;
  --bg-secondary:  #0d1526;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(99,102,241,0.5);

  --indigo:        #6366f1;
  --indigo-dark:   #4f52d4;
  --cyan:          #06b6d4;
  --cyan-light:    #22d3ee;
  --violet:        #8b5cf6;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;

  --gradient:      linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-soft: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.15));
  --glow-indigo:   0 0 40px rgba(99,102,241,0.3);
  --glow-cyan:     0 0 40px rgba(6,182,212,0.3);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-card:  0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 20px 60px rgba(0,0,0,0.6);

  --nav-height: 70px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Page fade-in */
body { animation: pageFadeIn 0.5s ease forwards; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--text-secondary); }
a  { text-decoration: none; color: inherit; }

/* Section heading */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}
.section-title h2 { color: var(--text-primary); }
.section-title .underline {
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}
.section-title p {
  margin-top: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* ── NAVBAR ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(10,15,30,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(10,15,30,0.95);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-links a.active {
  color: var(--indigo);
  background: rgba(99,102,241,0.1);
}

/* CV download pill in navbar */
.nav-links .cv-btn {
  background: var(--gradient) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 6px 16px !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(99,102,241,0.35);
  transition: var(--transition);
}
.nav-links .cv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99,102,241,0.55);
  background: var(--gradient) !important;
  color: #fff !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  border: none;
  background: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(10,15,30,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; width: 100%; }
}

/* ── PAGE WRAPPER ── */
.page-wrapper { padding-top: var(--nav-height); }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: var(--transition);
  border-radius: inherit;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card:hover::before { opacity: 1; }

/* Glass card */
.glass-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.6);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: rgba(99,102,241,0.08);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

/* ── BADGE / TAG ── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99,102,241,0.15);
  color: var(--indigo);
  border: 1px solid rgba(99,102,241,0.3);
}

.badge-cyan {
  background: rgba(6,182,212,0.12);
  color: var(--cyan);
  border-color: rgba(6,182,212,0.3);
}

.badge-violet {
  background: rgba(139,92,246,0.12);
  color: var(--violet);
  border-color: rgba(139,92,246,0.3);
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SKILL BAR ── */
.skill-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient);
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 48px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--indigo), var(--cyan));
  border-radius: 2px;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--gradient);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: var(--glow-indigo);
}

.timeline-item .tl-date {
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.timeline-item .tl-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-item .tl-org {
  font-size: 0.875rem;
  color: var(--indigo);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

/* ── SCROLL TO TOP ── */
#scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.6);
}

#scroll-top svg { width: 20px; height: 20px; fill: #fff; }

/* ── FOOTER ── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}

footer p { font-size: 0.875rem; color: var(--text-muted); }
footer a { color: var(--indigo); }
footer a:hover { color: var(--cyan); }

/* ── STAT COUNTER CARD ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── FILTER BUTTONS ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

/* ── SEARCH INPUT ── */
.search-wrap {
  position: relative;
  max-width: 400px;
  margin: 0 auto 2.5rem;
}

.search-wrap input {
  width: 100%;
  padding: 12px 20px 12px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-wrap input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.search-wrap input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #0d1526;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: var(--transition);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(239,68,68,0.2); color: #ef4444; }

/* ── CONTACT FORM ── */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

/* ── AOS override ── */
[data-aos] { transition-duration: 600ms !important; }

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
