/* ========================================
   AI Learning Portfolio — Tech/Sci-Fi Theme
   ======================================== */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --bg-card-hover: #222847;
  --accent-cyan: #00f0ff;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-pink: #ec4899;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-glow: rgba(0, 240, 255, 0.15);
  --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.1);
  --gradient-main: linear-gradient(135deg, #00f0ff, #8b5cf6);
  --gradient-card: linear-gradient(145deg, #1a1f35, #0f1525);
}

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

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

/* --- Animated Grid Background --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* --- Links --- */
a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #66f7ff;
}

/* --- Navbar --- */
.navbar {
  background: rgba(10, 14, 26, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  padding: 0.8rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1.2rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-cyan) !important;
  background: rgba(0, 240, 255, 0.08);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.navbar-nav .nav-link:hover::after {
  width: 60%;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  padding: 6rem 0 4rem;
  position: relative;
}

.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #00f0ff 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2rem;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.1); }
  50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.2); }
}

/* --- Tech Stats Bar --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 0;
  margin: 2rem 0;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Section Titles --- */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-main);
  border-radius: 2px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), var(--shadow-neon);
}

.card-header {
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.card-header.header-cyan {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.1)) !important;
  color: var(--accent-cyan) !important;
}

.card-header.header-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1)) !important;
  color: var(--accent-purple) !important;
}

.card-header.header-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.1)) !important;
  color: var(--accent-green) !important;
}

.card-body {
  padding: 1.5rem;
}

.card-body .card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card-body .card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Tag Badges --- */
.tech-tag {
  display: inline-block;
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(0, 240, 255, 0.15);
}

.tech-tag.purple {
  background: rgba(139, 92, 246, 0.08);
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.15);
}

.tech-tag.green {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.15);
}

/* --- Buttons --- */
.btn-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-tech-cyan {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.15));
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.btn-tech-cyan:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(59, 130, 246, 0.25));
  color: #66f7ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

.btn-tech-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-tech-purple:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
  color: #a78bfa;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.btn-tech-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-tech-green:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.25));
  color: #34d399;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

/* --- Feature Grid (3 columns on homepage) --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* --- Icon Boxes --- */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.icon-box.cyan {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
}

.icon-box.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
}

.icon-box.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
}

/* --- Timeline / Learning Path --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  transform: translateX(-4px);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-title {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.3rem 0;
}

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

/* --- Code Blocks --- */
pre {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem !important;
  position: relative;
  overflow-x: auto;
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  border-radius: 12px 12px 0 0;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88rem;
}

/* --- Tables --- */
.table {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.06);
}

.table thead th {
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-color: rgba(255, 255, 255, 0.06);
}

.table td {
  border-color: rgba(255, 255, 255, 0.06);
  padding: 0.8rem 1rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

/* --- Footer --- */
footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
  padding: 2rem 0;
  margin-top: 4rem;
}

footer .container {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer .footer-brand {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* --- Particle Canvas --- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Floating Orbs --- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(0, 240, 255, 0.06);
  top: 10%;
  right: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(139, 92, 246, 0.06);
  bottom: 10%;
  left: -10%;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(59, 130, 246, 0.05);
  top: 50%;
  left: 40%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.4);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .stats-bar {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Utility: Glow text --- */
.glow-text {
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* --- Animation: Fade In Up --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }

/* --- Project Page Specific --- */
.project-hero {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  margin-bottom: 2rem;
}

.project-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.innovation-card {
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.innovation-card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.06);
}

.innovation-card h5 {
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.innovation-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.metric-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.5rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
