/* ==========================================================================
   Ajeet Kumar - Portfolio
   Modern, responsive, light/dark aware single-page portfolio
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-card: #ffffff;
  --surface-border: #e6e8ef;
  --text: #14161c;
  --text-soft: #4a5060;
  --text-mute: #7a8092;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-soft: #eef0ff;
  --hero-bg-1: #111528;
  --hero-bg-2: #1f2547;
  --hero-text: #eef1ff;
  --hero-mute: #a7adce;
  --chip-bg: #eef0ff;
  --chip-text: #3b34c9;
  --shadow: 0 1px 2px rgba(16,18,30,.04), 0 8px 24px rgba(16,18,30,.06);
  --shadow-lg: 0 12px 40px rgba(16,18,30,.12);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e16;
    --bg-soft: #10131f;
    --bg-card: #141826;
    --surface-border: #232838;
    --text: #eceef5;
    --text-soft: #b3b9cc;
    --text-mute: #858ba3;
    --accent: #8b83ff;
    --accent-2: #38bdf8;
    --accent-soft: #1b1e33;
    --hero-bg-1: #080a12;
    --hero-bg-2: #161c39;
    --chip-bg: #1b1e33;
    --chip-text: #b7b2ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 84px 0; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

h2.section-title {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}

.section-lead {
  color: var(--text-soft);
  max-width: 640px;
  font-size: 17px;
  margin: 0 0 44px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--surface-border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 18px; color: var(--text); }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--text-soft);
  font-size: 14.5px;
  font-weight: 600;
}
.nav-links a:hover { color: var(--accent); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(79,70,229,.35), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(14,165,233,.22), transparent 55%),
    linear-gradient(160deg, var(--hero-bg-1), var(--hero-bg-2));
  color: var(--hero-text);
  padding: 96px 0 88px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
}
.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 8px;
}
.hero .role {
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 600;
  color: #c7cbf0;
  margin: 0 0 20px;
}
.hero .role b { color: #fff; }
.hero p.lede {
  color: var(--hero-mute);
  font-size: 17px;
  max-width: 560px;
  margin: 0 0 28px;
}
@media (max-width: 820px) { .hero p.lede { margin-left: auto; margin-right: auto; } }
.hero .pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
@media (max-width: 820px) { .hero .pills { justify-content: center; } }
.pill {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #dfe2f7;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .cta-row { justify-content: center; } }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #6d64ff, #4f46e5); color: #fff; box-shadow: 0 8px 24px rgba(79,70,229,.4); }
.btn-primary:hover { color: #fff; }
.btn-ghost { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: #eef1ff; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.14); }

/* Neon glowing LinkedIn button */
.btn-linkedin {
  position: relative;
  z-index: 0;
  background: #0b0d18;
  color: #fff;
  border: none;
  isolation: isolate;
}
.btn-linkedin::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(90deg, #ff2fd0, #8b5cff, #2f6bff, #ff2fd0);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: neon-shift 4s linear infinite;
  z-index: -1;
}
.btn-linkedin::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(90deg, #ff2fd0, #8b5cff, #2f6bff);
  background-size: 300% 100%;
  filter: blur(14px);
  opacity: .65;
  animation: neon-shift 4s linear infinite;
  z-index: -2;
}
.btn-linkedin:hover { color: #fff; transform: translateY(-2px); }
.btn-linkedin:hover::after { opacity: .9; }
@keyframes neon-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-linkedin::before, .btn-linkedin::after { animation: none; }
}
.btn svg { width: 17px; height: 17px; fill: currentColor; }

.hero-photo { display: flex; justify-content: center; }
.hero-photo .frame {
  width: 240px; height: 240px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, #6d64ff, #38bdf8);
  box-shadow: var(--shadow-lg);
}
.hero-photo img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}

/* ---------- Stats strip ---------- */
.stats {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--surface-border);
  padding: 34px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat .num { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.stat .lbl { font-size: 13.5px; color: var(--text-soft); font-weight: 600; margin-top: 2px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { color: var(--text-soft); font-size: 17px; }
.fact-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.fact-card h4 { margin: 0 0 14px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-mute); }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; color: var(--text-soft); border-bottom: 1px dashed var(--surface-border); }
.fact-list li:last-child { border-bottom: 0; }
.fact-list li b { color: var(--text); font-weight: 700; }
.dot { color: var(--accent); font-weight: 800; }

/* ---------- Experience timeline ---------- */
.timeline { border-left: 2px solid var(--surface-border); margin-left: 6px; padding-left: 28px; }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -37px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.tl-role { font-size: 19px; font-weight: 800; margin: 0; }
.tl-co { color: var(--accent); font-weight: 700; }
.tl-date { margin-left: auto; color: var(--text-mute); font-size: 14px; font-weight: 600; }
.tl-meta { color: var(--text-mute); font-size: 13.5px; margin: 4px 0 10px; font-style: italic; }
.tl-item ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-soft); }
.tl-item ul li { margin-bottom: 5px; }
.tl-item ul li b { color: var(--text); }

/* ---------- Project cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .card-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--surface-border)); }
.card .kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.card h3 { margin: 6px 0 10px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.card p { margin: 0 0 14px; color: var(--text-soft); font-size: 15px; }
.metric-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.metric {
  background: var(--chip-bg);
  color: var(--chip-text);
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
}
.card.wide { grid-column: 1 / -1; }

/* ---------- Publications ---------- */
.pub-list { display: grid; gap: 14px; }
.pub {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.pub .badge {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
}
.pub .pt { font-weight: 700; color: var(--text); }
.pub .pv { color: var(--text-mute); font-size: 14px; }

/* ---------- Achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .ach-grid { grid-template-columns: 1fr; } }
.ach {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.ach .ico { font-size: 22px; line-height: 1.2; flex: none; }
.ach .at { font-weight: 700; color: var(--text); font-size: 15.5px; }
.ach .ad { color: var(--text-soft); font-size: 14px; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .edu-grid { grid-template-columns: 1fr; } }
.edu {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.edu .yr { font-weight: 800; color: var(--accent); font-size: 13px; letter-spacing: .05em; }
.edu h4 { margin: 8px 0 4px; font-size: 17px; }
.edu .inst { color: var(--text-soft); font-size: 14.5px; }
.edu .extra { color: var(--text-mute); font-size: 13.5px; margin-top: 6px; }

/* ---------- Skills ---------- */
.skill-group { margin-bottom: 22px; }
.skill-group h4 { margin: 0 0 12px; font-size: 15px; color: var(--text); font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag {
  border: 1px solid var(--surface-border);
  background: var(--bg-card);
  color: var(--text-soft);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- Contact / footer ---------- */
.contact {
  background:
    radial-gradient(900px 400px at 50% -30%, rgba(79,70,229,.3), transparent 60%),
    linear-gradient(160deg, var(--hero-bg-1), var(--hero-bg-2));
  color: var(--hero-text);
  text-align: center;
}
.contact h2 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.contact p { color: var(--hero-mute); max-width: 520px; margin: 0 auto 28px; font-size: 17px; }
.contact .cta-row { justify-content: center; }
.footer {
  background: var(--hero-bg-1);
  color: var(--hero-mute);
  text-align: center;
  padding: 30px 24px 40px;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer .shloka { font-style: italic; color: #c7cbf0; margin-bottom: 10px; }
.footer a { color: #c7cbf0; }
.footer a:hover { color: #fff; }
