/* =============================================
   ATUL SINGH PORTFOLIO — NISHUL.DEV INSPIRED
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Parkinsans:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg: #0a0a0a;
  --bg-card: rgba(255,255,255,0.02);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --accent: #00c758;
  --accent-glow: rgba(0,199,88,0.25);
  --font-body: 'Parkinsans', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --nav-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow-x: hidden;
}

/* corner glow */
body::before, body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.12;
}
body::before {
  top: -200px; left: -200px;
  background: radial-gradient(circle, #00c758, transparent 70%);
}
body::after {
  bottom: -200px; right: -200px;
  background: radial-gradient(circle, #0066ff, transparent 70%);
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10,10,10,0.8);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 99px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--fg);
  background: rgba(255,255,255,0.06);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn-hire {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  background: linear-gradient(135deg, #14de5e 0%, #00f068 50%, #10592c 100%);
  border: none;
  border-radius: 99px;
  padding: 8px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-hire:hover { opacity: 0.85; transform: translateY(-1px); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  align-items: center;
  justify-content: center;
}

/* ---- Main Wrapper ---- */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  position: relative;
  z-index: 1;
}

/* ---- Section Spacing ---- */
.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.2;
}

.section-sub {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 40px;
}

/* ---- Hero Section ---- */
.hero { padding: 60px 0 80px; }

/* ---- Hero Card (nishul.dev style) ---- */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: visible;
  transition: border-color 0.25s;
  position: relative;
}
.hero-card:hover { border-color: var(--border-hover); }

/* Banner */
.hero-banner {
  width: 100%;
  height: 160px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg,
    #0d1b0f 0%,
    #0e2a14 20%,
    #1a4a25 45%,
    #2d7d44 65%,
    #4dab68 80%,
    #c8e6b0 100%);
}
.hero-banner-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(0,199,88,0.35) 0%, transparent 65%),
              radial-gradient(ellipse at 20% 70%, rgba(0,102,255,0.2) 0%, transparent 50%);
}

/* Avatar overlapping banner */
.hero-avatar-wrap {
  position: relative;
  margin-top: -52px;
  margin-left: 28px;
  width: fit-content;
  z-index: 2;
}
.hero-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #0a0a0a;
  display: block;
  background: #111;
}

/* Card body */
.hero-card-body {
  padding: 12px 28px 28px;
}

/* Name row */
.hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.hero-name {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.2;
}
.hero-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* Subtitle */
.hero-subtitle {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

/* Bio */
.hero-bio {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 22px;
}

/* CTA buttons */
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }

.btn-resume {
  padding: 10px 22px;
  font-size: 0.88rem;
}

/* Social links */
.hero-socials-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-socials-label {
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.hero-socials-label strong { color: var(--fg); }
.hero-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.social-pill:hover {
  color: var(--fg);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.08);
}

/* ---- Shared Buttons (kept for other sections) ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  background: linear-gradient(135deg, #14de5e, #00f068);
  border: none;
  border-radius: 99px;
  padding: 12px 24px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 12px 24px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }

/* ---- Card Base ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border-hover); }

/* ---- Project Cards ---- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Show All Projects Button */
.show-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.show-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 10px 24px;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}
.show-all-btn:hover {
  color: var(--fg);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
  gap: 12px;
}
.show-all-btn i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}
.show-all-btn:hover i { transform: translateX(3px); }

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.project-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }

/* browser-frame mockup */
.project-mockup {
  position: relative;
  background: #111;
  border-bottom: 1px solid var(--border);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #1a1a1a;
}
.browser-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.browser-dot:nth-child(1) { background: #ff5f57; }
.browser-dot:nth-child(2) { background: #febc2e; }
.browser-dot:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1;
  background: #0d0d0d;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.7rem;
  color: var(--fg-muted);
}

.project-screenshot {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.project-card:hover .project-screenshot { transform: scale(1.03); }

.project-body { padding: 18px 20px 20px; }

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.project-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
}
.project-links { display: flex; gap: 6px; flex-shrink: 0; }

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
  text-decoration: none;
  transition: all 0.2s;
}
.pill-link:hover { color: var(--fg); background: rgba(255,255,255,0.06); border-color: var(--border-hover); }

.project-desc {
  font-size: 0.84rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.tech-bubbles { display: flex; gap: 6px; flex-wrap: wrap; }
.tech-pill {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 99px;
  padding: 3px 10px;
}

/* ---- About / Skills Section ---- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.skill-card:hover { border-color: var(--border-hover); }
.skill-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 99px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s, border-color 0.2s;
}
.skill-tag:hover { color: var(--fg); border-color: rgba(255,255,255,0.2); }

/* ---- Experience / Achievements ---- */
.experience-list { display: flex; flex-direction: column; gap: 4px; }

.exp-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.exp-item:hover { border-color: var(--border-hover); }

.exp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  gap: 12px;
}
.exp-color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.exp-info { flex: 1; }
.exp-title { font-weight: 600; font-size: 0.95rem; color: var(--fg); }
.exp-sub { font-size: 0.8rem; color: var(--fg-muted); margin-top: 2px; }
.exp-arrow {
  color: var(--fg-muted);
  font-size: 0.85rem;
  transition: transform 0.3s;
}
.exp-item.open .exp-arrow { transform: rotate(180deg); }

.exp-body {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.65;
}
.exp-item.open .exp-body { display: block; }

/* ---- Stats Section ---- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card.github-span { grid-column: span 2; overflow: visible; }
.stat-card.github-span .stat-card-label {
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.stat-card.github-span .stat-card-label #github-streak {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Competitive card */
.competitive-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.competitive-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color 0.2s;
}
.competitive-row:hover { border-color: var(--border-hover); }
.competitive-row-icon {
  font-size: 0.95rem;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.competitive-platform {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
}
.view-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(0,199,88,0.35);
  border-radius: 99px;
  padding: 4px 12px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.view-profile-btn:hover {
  background: rgba(0,199,88,0.1);
  border-color: var(--accent);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
  overflow: hidden;
  min-width: 0; /* prevent card from overflowing grid */
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.stat-big {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-sub { font-size: 0.8rem; color: var(--fg-muted); margin-top: 4px; }

.lc-bars { margin-top: 16px; }
.lc-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 7px;
}
.bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}
.bar-fill { height: 100%; border-radius: 99px; transition: width 1.2s ease; }

.github-cal-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 12px;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
.github-cal-wrap::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.calendar-body {
  transform-origin: left top;
}

/* calendar dot colors */
.graph-day[data-level="0"] { background: rgba(255,255,255,0.05); }
.graph-day[data-level="1"] { background: rgba(0,199,88,0.25); }
.graph-day[data-level="2"] { background: rgba(0,199,88,0.45); }
.graph-day[data-level="3"] { background: rgba(0,199,88,0.7); }
.graph-day[data-level="4"] { background: var(--accent); }

.calendar-body { display: flex; gap: 3px; }
.months-header { display: flex; gap: 3px; margin-bottom: 4px; height: 15px; font-size: 0.7rem; color: var(--fg-muted); }

/* ---- Contact Section ---- */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
}
.contact-box h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.contact-box p { color: var(--fg-muted); font-size: 1rem; max-width: 440px; margin: 0 auto 32px; line-height: 1.6; }

.contact-socials { display: flex; justify-content: center; gap: 14px; margin-top: 32px; }
.social-icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.2s;
}
.social-icon:hover { border-color: var(--border-hover); color: var(--fg); background: rgba(255,255,255,0.04); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px clamp(16px,4vw,48px);
  text-align: center;
  font-size: 0.82rem;
  color: var(--fg-muted);
  position: relative;
  z-index: 1;
}

/* ---- Mobile Overlay Nav ---- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(16px);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.mobile-nav-overlay.active { display: flex; }
.mobile-nav-overlay a {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-nav-overlay a:hover { color: var(--fg); }
.close-mobile-nav {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  /* Stats: GitHub full-width, LeetCode + Competitive side by side */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card.github-span { grid-column: span 2; }
  .contact-box { padding: 40px 24px; }
  .hero { padding: 40px 0 60px; }
  /* Hero card mobile */
  .hero-banner { height: 120px; }
  .hero-avatar-wrap { margin-left: 20px; margin-top: -44px; }
  .hero-avatar { width: 84px; height: 84px; }
  .hero-card-body { padding: 10px 20px 24px; }
  .hero-name { font-size: 1.2rem; }
  .hero-socials { gap: 6px; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  /* Stack all stats vertically */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card.github-span { grid-column: span 1; }

  /* GitHub card label: keep icon+title LEFT, streak badge RIGHT on same row */
  .stat-card.github-span .stat-card-label {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }
  .stat-card.github-span .stat-card-label #github-streak {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.68rem;
    gap: 6px;
    white-space: nowrap;
  }
  /* Compact the stat card padding on very small screens */
  .stat-card { padding: 18px 16px; }
}