/* ─── Nitendra Gautam · Portfolio ─────────────────────────────── */
:root {
  --bg: #070b14;
  --bg-soft: #0b1120;
  --card: #0e1628;
  --card-border: rgba(56, 189, 248, 0.14);
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --text: #e8eef7;
  --muted: #93a1b8;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .nav-brand {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }

section { scroll-margin-top: 70px; }

/* ─── Nav ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.nav-brand {
  font-weight: 700; font-size: 1.25rem; color: var(--text);
  border: 2px solid var(--accent); border-radius: 10px;
  width: 42px; height: 42px; display: grid; place-items: center;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

/* ─── Hero ─── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px; overflow: hidden;
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(110px); opacity: 0.35; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; background: #0ea5e9; top: -160px; left: -120px; }
.hero::after { width: 460px; height: 460px; background: #6366f1; bottom: -160px; right: -100px; }

.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero-eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--card-border); border-radius: 999px;
  padding: 6px 18px; margin-bottom: 24px; background: rgba(34, 211, 238, 0.06);
}
.hero-name { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 700; margin-bottom: 16px; }
.hero-name .glow {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-headline { font-size: clamp(1rem, 2.4vw, 1.3rem); color: var(--muted); font-weight: 500; margin-bottom: 20px; }
.hero-summary { color: var(--muted); max-width: 720px; margin: 0 auto 36px; font-size: 1.02rem; }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #04121a; box-shadow: 0 6px 28px rgba(34, 211, 238, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(34, 211, 238, 0.5); }
.btn-ghost { border: 1px solid var(--card-border); color: var(--text); background: rgba(14, 22, 40, 0.6); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); }

.hero-contact { display: flex; gap: 10px 26px; justify-content: center; flex-wrap: wrap; font-size: 0.92rem; color: var(--muted); }
.hero-contact a { color: var(--muted); }
.hero-contact a:hover { color: var(--accent); }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1; }
.scroll-hint span {
  display: block; width: 26px; height: 44px; border: 2px solid var(--muted);
  border-radius: 14px; position: relative; opacity: 0.7;
}
.scroll-hint span::after {
  content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 9px;
  margin-left: -2px; border-radius: 3px; background: var(--accent);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ─── Sections ─── */
.section { max-width: 1080px; margin: 0 auto; padding: 96px 24px 24px; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 56px; }

/* ─── Stats ─── */
.stats { border-top: 1px solid rgba(148, 163, 184, 0.12); border-bottom: 1px solid rgba(148, 163, 184, 0.12); background: var(--bg-soft); }
.stats-grid {
  max-width: 1080px; margin: 0 auto; padding: 56px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat { text-align: center; }
.stat-value {
  font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

/* ─── Timeline ─── */
.timeline { position: relative; padding: 10px 0 40px; }
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px;
  transform: translateX(-50%); border-radius: 3px;
  background: rgba(148, 163, 184, 0.15);
}
.timeline-progress {
  position: absolute; top: 0; left: 50%; width: 3px; height: 100%;
  transform: translateX(-50%) scaleY(0); transform-origin: top; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
}
.tl-item { position: relative; width: 50%; padding: 0 44px 48px 0; }
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 48px 44px; }
.tl-dot {
  position: absolute; top: 6px; right: -9px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.8); z-index: 2;
}
.tl-item:nth-child(even) .tl-dot { right: auto; left: -9px; }
.tl-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 26px 26px 22px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.tl-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 14px 40px rgba(2, 8, 20, 0.7); }
.tl-period {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--accent); background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25); border-radius: 999px; padding: 4px 14px; margin-bottom: 12px;
}
.tl-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.tl-company { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.tl-highlights { list-style: none; margin-bottom: 16px; }
.tl-highlights li { position: relative; padding-left: 20px; margin-bottom: 8px; color: #c7d2e4; font-size: 0.95rem; }
.tl-highlights li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.tl-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-tech span {
  font-size: 0.75rem; color: var(--muted); border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px; padding: 3px 12px;
}

/* ─── Skills ─── */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 40px; }
.skill-name { display: flex; justify-content: space-between; font-weight: 500; margin-bottom: 8px; font-size: 0.95rem; }
.skill-name em { font-style: normal; color: var(--muted); font-size: 0.85rem; }
.skill-bar { height: 8px; border-radius: 6px; background: rgba(148, 163, 184, 0.15); overflow: hidden; }
.skill-fill {
  height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

/* ─── Education ─── */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.edu-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 30px; transition: transform 0.25s, border-color 0.25s;
}
.edu-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.45); }
.edu-date { color: var(--accent); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; margin-bottom: 10px; }
.edu-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.edu-card p { color: var(--muted); font-size: 0.95rem; }

/* ─── Contact ─── */
.contact { text-align: center; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 720px; margin: 0 auto; text-align: left; }
.contact-card {
  display: block; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px 24px; transition: transform 0.25s, border-color 0.25s;
}
.contact-card:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.45); }
.contact-card small { display: block; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.contact-card strong { color: var(--text); font-weight: 600; font-size: 1rem; word-break: break-all; }

.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 60px 24px 36px; }

/* ─── Reveal defaults (JS enhances) ─── */
.reveal { opacity: 0; }
.no-anim .reveal { opacity: 1; }

/* ─── Blog ─── */
.page-hero { text-align: center; padding: 150px 24px 16px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 18px 0 12px; }
.blog-list { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.center { text-align: center; margin-top: 36px; }

.post-card {
  display: block; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.post-card:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 14px 40px rgba(2, 8, 20, 0.7); }
.post-card h3 { color: var(--text); font-size: 1.2rem; margin: 8px 0 10px; }
.post-card p { color: var(--muted); font-size: 0.93rem; }
.post-meta { color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.read-more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }

.post-wrap { max-width: 760px; }
.post-wrap h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 6px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 0.92rem; }
.back-link:hover { color: var(--accent); }

.post-content { margin-top: 30px; color: #c7d2e4; }
.post-content h2, .post-content h3 { color: var(--text); margin: 1.7em 0 0.6em; line-height: 1.3; }
.post-content p { margin: 0 0 1.1em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em 1.4em; }
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
  border-left: 3px solid var(--accent); padding: 4px 18px; margin: 0 0 1.2em; color: var(--muted);
}
.post-content code {
  background: rgba(34, 211, 238, 0.1); color: var(--accent);
  padding: 2px 7px; border-radius: 6px; font-size: 0.88em;
}
.post-content pre {
  background: #0a1222; border: 1px solid var(--card-border); border-radius: 10px;
  padding: 18px; overflow-x: auto; margin: 0 0 1.3em;
}
.post-content pre code { background: none; padding: 0; color: #c7d2e4; font-size: 0.9em; }
.post-content a { color: var(--accent); }
.post-content img { max-width: 100%; border-radius: 10px; }
.post-content hr { border: none; border-top: 1px solid rgba(148, 163, 184, 0.2); margin: 2em 0; }

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .timeline::before, .timeline-progress { left: 9px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 36px 38px; }
  .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 1px; right: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid, .edu-grid, .contact-cards { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav { padding: 12px 18px; }
}
