/* ============================================
   Amandeep Srivastava - Portfolio v2
   Dark theme, bento grid, terminal aesthetic
   ============================================ */

:root {
  --bg: #09090b;
  --bg-subtle: #111113;
  --bg-card: #101014;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(59, 130, 246, 0.4);
  --text: #d4d4d8;
  --text-muted: #71717a;
  --text-heading: #fafafa;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #22c55e;
  --glow-blue: rgba(59, 130, 246, 0.15);
  --glow-purple: rgba(139, 92, 246, 0.1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; background: var(--bg); }

body {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

/* ---- Section Headers ---- */

.section-header { margin-bottom: 48px; }

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.03em;
}

/* ---- Nav ---- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-dot { color: var(--accent-blue); }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 32px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-heading); }

/* ---- Hero ---- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 900px;
  height: 600px;
  top: 40%;
  left: 50%;
  background: radial-gradient(ellipse at center, var(--glow-blue), var(--glow-purple), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

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

.site-net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: 5rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan), var(--accent-blue));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Hero entrance animations */
.hero-badge    { animation: fade-up 0.7s ease both 0.2s; }
.hero h1       { animation: fade-up 0.7s ease both 0.4s; }
.hero-tagline  { animation: fade-up 0.7s ease both 0.6s; }
.hero-desc     { animation: fade-up 0.7s ease both 0.8s; }
.hero-cta      { animation: fade-up 0.7s ease both 1.0s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Floating glow animation */
.hero-glow {
  animation: float-glow 8s ease-in-out infinite;
}

@keyframes float-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -52%) scale(1.05); }
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

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

.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.03);
}

/* ---- Metrics ---- */

.metrics {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 16, 0.9);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.metric-card {
  text-align: center;
}

.counter {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---- Projects (Bento Grid) ---- */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
}

.project-card:hover {
  border-color: var(--border-hover);
  background: #16161c;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.08);
  transform: translateY(-2px);
}

.project-card.featured {
  grid-column: span 2;
}

.project-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
}

/* ---- Experience ---- */

.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: all 0.3s ease;
}

.exp-card:hover {
  border-color: var(--border-hover);
  background: #16161c;
}

.exp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-green);
  margin-bottom: 12px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.exp-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.exp-company {
  display: block;
  font-size: 0.9rem;
  color: var(--accent-blue);
  font-weight: 500;
  margin-bottom: 2px;
}

.exp-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.exp-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- About (Terminal) ---- */

.terminal {
  background: #0c0c0e;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-body p { margin-bottom: 2px; }

.prompt {
  color: var(--accent-green);
  font-weight: 500;
  margin-right: 8px;
}

.terminal-output {
  color: var(--text-muted);
  padding-left: 20px;
}

.cursor {
  color: var(--accent-green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- Contact ---- */

.contact {
  text-align: center;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(9, 9, 11, 0.92) 30%, rgba(9, 9, 11, 0) 75%);
}

.contact .section-tag { display: block; margin-bottom: 8px; }

.contact p {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Footer ---- */

footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- Scroll Reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.bento-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.bento-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.bento-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.bento-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.bento-grid .reveal:nth-child(6) { transition-delay: 0.4s; }
.bento-grid .reveal:nth-child(7) { transition-delay: 0.48s; }
.bento-grid .reveal:nth-child(8) { transition-delay: 0.56s; }

.exp-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.exp-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero h1 { font-size: 3rem; }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card.featured {
    grid-column: span 2;
  }

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

  section { padding: 72px 0; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 2.25rem; }
  .hero-tagline { font-size: 1.15rem; }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

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

  .project-card.featured {
    grid-column: span 1;
  }

  .nav-links a {
    margin-left: 16px;
    font-size: 0.8rem;
  }

  section { padding: 56px 0; }

  .terminal-body { font-size: 0.75rem; padding: 16px; }
}
