/* ============================================================
   Jaideep Singh — Portfolio
   ============================================================ */

:root {
  --bg: #08090e;
  --bg-soft: #0d0f17;
  --surface: #12141d;
  --surface-2: #171a25;
  --border: #232735;
  --border-soft: #1b1e2a;

  --text: #e9ebf2;
  --text-dim: #a3a9bd;
  --text-faint: #6e7488;

  --accent: #6ea8ff;
  --accent-2: #2ee6c5;
  --accent-3: #a78bff;
  --grad: linear-gradient(120deg, #6ea8ff 0%, #a78bff 50%, #2ee6c5 100%);
  --grad-soft: linear-gradient(120deg, rgba(110,168,255,.18), rgba(46,230,197,.14));

  --maxw: 1080px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }
::selection { background: rgba(110,168,255,.3); color: #fff; }

/* ---------- Animated background ---------- */
.bg-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.blob-1 { width: 520px; height: 520px; background: #2a4cff; top: -160px; left: -120px; animation: float1 22s ease-in-out infinite; }
.blob-2 { width: 460px; height: 460px; background: #7a3cff; top: 10%; right: -160px; animation: float2 26s ease-in-out infinite; }
.blob-3 { width: 420px; height: 420px; background: #0fae8e; bottom: -180px; left: 30%; animation: float3 30s ease-in-out infinite; opacity: .35; }
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,80px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-70px,60px)} }
@keyframes float3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,-60px)} }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 110px 0; position: relative; }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.section-num { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); opacity: .8; }
.section-title { font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; }
.section-lead { color: var(--text-dim); max-width: 620px; margin: -28px 0 40px; font-size: 1.02rem; }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .95rem; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #07101f; box-shadow: 0 10px 30px -8px rgba(110,168,255,.5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(110,168,255,.65); }
.btn-ghost { background: rgba(255,255,255,.03); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); background: rgba(110,168,255,.08); }
.btn-lg { font-size: 1.05rem; padding: 15px 30px; font-family: var(--font-mono); }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(8,9,14,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--border-soft); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.logo-mark {
  font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: var(--grad); color: #07101f; letter-spacing: -.02em;
}
.logo-text { font-family: var(--font-head); letter-spacing: -.01em; }
.nav-links { margin-left: auto; display: flex; gap: 26px; }
.nav-links a { font-size: .92rem; color: var(--text-dim); position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--grad); transition: width .25s ease; border-radius: 2px; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-resume { padding: 9px 18px; font-size: .9rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; flex-direction: column; background: rgba(10,11,17,.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); padding: 8px 28px 20px; }
.nav-mobile a { padding: 13px 0; color: var(--text-dim); border-bottom: 1px solid var(--border-soft); font-size: 1rem; }
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile.open { display: flex; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: safe center; position: relative; padding: 130px 0 80px; }
.hero-inner { display: flex; flex-direction: column; align-items: flex-start; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: .82rem;
  color: var(--text-dim); padding: 7px 15px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.02); margin-bottom: 28px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(46,230,197,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(46,230,197,.5)} 70%{box-shadow:0 0 0 9px rgba(46,230,197,0)} 100%{box-shadow:0 0 0 0 rgba(46,230,197,0)} }
.hero-title { font-family: var(--font-head); font-size: clamp(2.3rem, 6.5vw, 4.3rem); line-height: 1.08; font-weight: 700; letter-spacing: -.03em; margin-bottom: 24px; }
.hero-sub { font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--text-dim); max-width: 640px; margin-bottom: 38px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-socials { display: flex; gap: 8px; }
.hero-socials a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); color: var(--text-dim); background: rgba(255,255,255,.02);
  transition: .2s;
}
.hero-socials a:hover { color: #fff; border-color: var(--accent); transform: translateY(-3px); background: rgba(110,168,255,.08); }
.scroll-cue { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 14px; display: grid; justify-items: center; padding-top: 7px; }
.scroll-cue span { width: 4px; height: 8px; border-radius: 4px; background: var(--accent); animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0%{opacity:0; transform:translateY(-2px)} 40%{opacity:1} 80%{opacity:0; transform:translateY(10px)} 100%{opacity:0} }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 54px; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 1.05rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; transition: .25s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-num { display: block; font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; line-height: 1; margin-bottom: 7px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: .82rem; color: var(--text-faint); }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: .25s; }
.skill-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.skill-card h3 { font-family: var(--font-head); font-size: 1.02rem; margin-bottom: 16px; color: var(--text); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim);
  padding: 5px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-soft);
  transition: .2s;
}
.skill-card:hover .chips li { border-color: var(--border); }
.chips.small li { font-size: .72rem; padding: 4px 9px; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--accent-3), transparent); opacity: .5; }
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-marker { position: absolute; left: -30px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(110,168,255,.12); }
.tl-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; transition: .25s; }
.tl-content:hover { border-color: var(--accent); }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.tl-head h3 { font-family: var(--font-head); font-size: 1.18rem; }
.tl-date { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); white-space: nowrap; }
.tl-org { color: var(--text-dim); font-size: .92rem; margin-bottom: 14px; }
.tl-points { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tl-points li { position: relative; padding-left: 20px; color: var(--text-dim); font-size: .95rem; }
.tl-points li::before { content: '▹'; position: absolute; left: 0; color: var(--accent-2); }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter {
  font-family: var(--font-mono); font-size: .82rem; color: var(--text-dim);
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,.02); cursor: pointer; transition: .2s;
}
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.active { color: #07101f; background: var(--grad); border-color: transparent; font-weight: 600; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; transition: transform .3s ease, border-color .3s, box-shadow .3s, opacity .3s;
  position: relative; overflow: hidden;
}
.project-card::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .3s; pointer-events: none; }
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-card:hover::before { opacity: 1; }
.project-card.hide { display: none; }
.pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pc-icon { font-size: 1.7rem; line-height: 1; }
.pc-link { color: var(--text-faint); transition: .2s; position: relative; z-index: 1; }
.pc-link:hover { color: var(--accent); transform: scale(1.1); }
.project-card h3 { font-family: var(--font-head); font-size: 1.16rem; margin-bottom: 4px; position: relative; z-index: 1; }
.pc-tagline { font-size: .85rem; color: var(--accent); margin-bottom: 13px; font-family: var(--font-mono); position: relative; z-index: 1; }
.pc-desc { font-size: .92rem; color: var(--text-dim); margin-bottom: 18px; flex-grow: 1; position: relative; z-index: 1; }
.project-card .chips { position: relative; z-index: 1; }

/* ---------- Leadership ---------- */
.lead-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: .25s; }
.lead-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.lead-date { font-family: var(--font-mono); font-size: .76rem; color: var(--accent); margin-bottom: 12px; }
.lead-card h3 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 5px; }
.lead-org { color: var(--text-dim); font-size: .88rem; margin-bottom: 12px; }
.lead-card p:last-child { color: var(--text-dim); font-size: .93rem; }

/* ---------- Education ---------- */
.edu-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; margin-bottom: 14px; transition: .25s;
}
.edu-card:hover { border-color: var(--accent); }
.edu-main h3 { font-family: var(--font-head); font-size: 1.12rem; margin-bottom: 6px; }
.edu-honor { color: var(--text-faint); font-weight: 400; font-size: .9rem; }
.edu-org { color: var(--text-dim); font-size: .95rem; }
.edu-note { color: var(--accent-2); font-size: .85rem; margin-top: 6px; }
.edu-date { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); white-space: nowrap; }

/* ---------- Contact ---------- */
.section-contact { padding: 120px 0 90px; }
.contact-inner { text-align: center; max-width: 660px; margin: 0 auto; }
.contact-inner .section-num { display: block; margin-bottom: 14px; }
.contact-title { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 20px; }
.contact-sub { color: var(--text-dim); font-size: 1.08rem; margin-bottom: 34px; }
.contact-links { display: flex; justify-content: center; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.contact-links a { color: var(--text-dim); font-family: var(--font-mono); font-size: .9rem; transition: .2s; }
.contact-links a:hover { color: var(--accent); }
.contact-loc { color: var(--text-faint); font-size: .9rem; margin-top: 26px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-soft); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--text-faint); font-size: .85rem; }
.footer-built { font-family: var(--font-mono); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links, .nav-resume { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 88px 0; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 14px 20px; }
  .logo-text { display: none; }
  .hero { padding: 110px 0 70px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .edu-card { flex-direction: column; align-items: flex-start; }
  .tl-head { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
}
