/* ============================================================
   NIKITA MAHAJAN – Portfolio
   ============================================================ */

/* ---------- reset & variables ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080d1a;
  --surface:   #0d1526;
  --card:      #111e35;
  --border:    #1e2d4a;
  --cyan:      #00d4ff;
  --purple:    #8b5cf6;
  --green:     #10b981;
  --text:      #e2e8f0;
  --muted:     #7a8a9e;
  --heading:   #f8fafc;
  --radius:    12px;
  --trans:     0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

/* ---------- typography ---------- */
h1,h2,h3,h4 { color: var(--heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -1px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
a  { color: var(--cyan); text-decoration: none; transition: opacity var(--trans); }
a:hover { opacity: 0.8; }
p  { color: var(--text); }

/* ---------- layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.section-title { margin-bottom: 48px; }
.section-title h2 { position: relative; display: inline-block; }
.section-title h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 2px;
  margin-top: 10px;
}

/* ---------- NAV ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8,13,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--trans);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.5px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo span { color: var(--cyan); }
.nav-logo-tagline {
  font-size: 0.58rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a.active { color: var(--cyan); }
.nav-cta {
  background: var(--cyan);
  color: #080d1a !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}
.nav-cta:hover { opacity: 0.9 !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- HERO ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 64px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.25);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.hero-badge .dot { width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; animation: pulse 2s infinite; }
.hero-name { margin-bottom: 16px; }
.hero-name .gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 60%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 24px;
}
.hero-intro {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.8;
}
.hero-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.cert-badge {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.cert-badge.highlight {
  border-color: rgba(0,212,255,0.4);
  color: var(--cyan);
  background: rgba(0,212,255,0.06);
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--trans);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #0099cc);
  color: #080d1a;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,212,255,0.25); opacity: 1; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); opacity: 1; }

/* hero terminal card */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.terminal-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-header .dot.red   { background: #ff5f57; }
.terminal-header .dot.amber { background: #febc2e; }
.terminal-header .dot.green { background: #28c840; }
.terminal-title { color: var(--muted); font-size: 0.78rem; margin-left: auto; font-family: monospace; }
.terminal-body { padding: 24px; font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace; font-size: 0.82rem; }
.t-line { margin-bottom: 10px; }
.t-prompt { color: var(--green); }
.t-cmd    { color: var(--text); }
.t-key    { color: var(--cyan); }
.t-val    { color: #a78bfa; }
.t-str    { color: #34d399; }
.t-comment{ color: var(--muted); font-style: italic; }
.t-cursor { display: inline-block; width: 2px; height: 14px; background: var(--cyan); animation: blink 1s infinite; vertical-align: middle; margin-left: 2px; }

/* grid dots background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(30,45,74,0.6) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}

/* ---------- ABOUT / RESEARCH ---------- */
#about { background: var(--surface); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text { font-size: 1.05rem; line-height: 1.9; color: var(--text); }
.about-text p + p { margin-top: 16px; }
.highlight { color: var(--cyan); font-weight: 600; }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color var(--trans);
}
.stat-card:hover { border-color: var(--cyan); }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* ---------- EXPERIENCE ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--cyan), var(--purple), transparent);
}
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -38px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px var(--cyan);
}
.timeline-item:nth-child(even)::before { background: var(--purple); box-shadow: 0 0 12px var(--purple); }
.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: all var(--trans);
}
.job-card:hover { border-color: rgba(0,212,255,0.3); transform: translateX(4px); }
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.job-company { font-size: 1.1rem; font-weight: 700; color: var(--heading); }
.job-role { color: var(--cyan); font-size: 0.9rem; font-weight: 500; margin-top: 2px; }
.job-date {
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--cyan);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.job-bullets { list-style: none; }
.job-bullets li {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.job-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.75rem;
  top: 6px;
}

/* ---------- SKILLS ---------- */
#skills { background: var(--surface); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.skill-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--trans);
}
.skill-category:hover { border-color: rgba(139,92,246,0.4); }
.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.skill-icon {
  width: 36px; height: 36px;
  background: rgba(0,212,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.skill-cat-name { font-size: 0.9rem; font-weight: 600; color: var(--heading); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  background: rgba(30,45,74,0.8);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--trans);
}
.skill-tag:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- CERTIFICATIONS ---------- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}
.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity var(--trans);
}
.cert-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); }
.cert-card:hover::before { opacity: 1; }
.cert-logo {
  width: 72px; height: 72px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.cert-logo img {
  width: 72px; height: 72px;
  object-fit: contain;
  border-radius: 8px;
}
.cert-name { font-size: 0.95rem; font-weight: 700; color: var(--heading); }
.cert-issuer { font-size: 0.82rem; color: var(--muted); }
.cert-date {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--cyan);
  font-weight: 500;
}

/* ---------- BLOG ---------- */
#blog { background: var(--surface); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--trans);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.blog-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.blog-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--card));
}
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.blog-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(0,212,255,0.1);
  color: var(--cyan);
}
.blog-tag.purple { background: rgba(139,92,246,0.1); color: var(--purple); }
.blog-tag.green  { background: rgba(16,185,129,0.1); color: var(--green); }
.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 12px;
  line-height: 1.4;
}
.blog-card-excerpt { font-size: 0.875rem; color: var(--muted); line-height: 1.7; flex: 1; }
.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.blog-date { font-size: 0.78rem; color: var(--muted); }
.read-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 4px;
}
.blog-all-link {
  text-align: center;
  margin-top: 48px;
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color var(--trans);
}
.contact-item:hover { border-color: var(--cyan); }
.contact-icon {
  width: 40px; height: 40px;
  background: rgba(0,212,255,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.contact-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.contact-value { font-size: 0.95rem; color: var(--text); font-weight: 500; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.form-input, .form-textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--trans);
  outline: none;
  resize: vertical;
}
.form-input:focus, .form-textarea:focus { border-color: var(--cyan); }
.form-textarea { min-height: 120px; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy { font-size: 0.85rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: var(--muted); }
.footer-links a:hover { color: var(--cyan); opacity: 1; }

/* ---------- BLOG PAGE ---------- */
.blog-page-header {
  padding: 120px 0 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.blog-page-header h1 { margin-bottom: 12px; }
.blog-page-header p { color: var(--muted); max-width: 520px; }
.blog-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,212,255,0.06);
}
.blog-listing { padding: 64px 0; }

/* ---------- BLOG POST PAGE ---------- */
.post-header {
  padding: 120px 0 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-width: 760px;
  margin: 0 auto;
  padding-left: 24px; padding-right: 24px;
}
.post-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; margin-bottom: 32px; }
.post-back:hover { color: var(--cyan); opacity: 1; }
.post-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.post-date, .post-readtime { font-size: 0.82rem; color: var(--muted); }
.post-content {
  max-width: 760px;
  margin: 64px auto;
  padding: 0 24px;
}
.post-content h2 { margin: 48px 0 20px; color: var(--heading); }
.post-content h3 { margin: 32px 0 16px; color: var(--cyan); }
.post-content p { margin-bottom: 20px; line-height: 1.85; }
.post-content ul, .post-content ol { margin: 16px 0 20px 24px; }
.post-content li { margin-bottom: 8px; color: var(--text); }
.post-content code {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--cyan);
}
.post-content pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  margin: 24px 0;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.7;
}
.post-content blockquote {
  border-left: 3px solid var(--cyan);
  padding: 16px 24px;
  background: rgba(0,212,255,0.04);
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  color: var(--muted);
  font-style: italic;
}

/* ---------- animations ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-terminal { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }
  .hamburger { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-btns { flex-direction: column; }
  .btn { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}
