/* ============================================================
   Arpit Sharma — Personal Website
   Modern, professional, single-page theme.
   ============================================================ */

:root {
  --bg:            #0b1020;
  --bg-2:          #0e1530;
  --surface:       #ffffff;
  --surface-alt:   #f6f8fc;
  --text:          #0f172a;
  --text-soft:     #475569;
  --text-muted:    #64748b;
  --border:        #e5e8f0;
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --accent:        #7c3aed;
  --accent-2:      #06b6d4;
  --success:       #10b981;
  --shadow-sm:     0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow-md:     0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg:     0 20px 50px rgba(15, 23, 42, .14);
  --radius:        14px;
  --radius-sm:     10px;
  --radius-lg:     22px;
  --max:           1120px;
  --ease:          cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 16px; }

.nav-links {
  list-style: none;
  display: flex; gap: 6px;
  margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 14.5px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface-alt); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  display: block;
  position: absolute; left: 10px; right: 10px;
  height: 2px; background: var(--text);
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
  color: #e2e8f0;
  background: radial-gradient(1200px 600px at 80% -10%, #1e1b4b 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 30%, #0c4a6e 0%, transparent 55%),
              linear-gradient(180deg, #0b1020 0%, #0e1530 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 64px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #c7d2fe;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.hero-name {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  background: linear-gradient(120deg, #fff 0%, #c7d2fe 60%, #a5f3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tagline {
  font-size: clamp(16px, 1.4vw, 19px);
  color: #cbd5e1;
  max-width: 56ch;
  margin: 0 0 28px;
}
.hero-tagline strong { color: #fff; font-weight: 600; }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 30px rgba(37, 99, 235, .45); }
.btn-ghost {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
  color: #e2e8f0;
}
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.social {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 10px;
}
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #e2e8f0;
  font-size: 18px;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.social a:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); color: #fff; }

/* Portrait */
.hero-portrait { position: relative; justify-self: end; }
.portrait-ring {
  width: clamp(220px, 26vw, 320px);
  height: clamp(220px, 26vw, 320px);
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 220deg, #60a5fa, #a78bfa, #22d3ee, #60a5fa);
  box-shadow: 0 30px 60px rgba(2, 6, 23, .55);
  animation: spin 18s linear infinite;
}
.portrait-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #0e1530;
  animation: spin 18s linear infinite reverse; /* keeps photo upright */
}
@keyframes spin { to { transform: rotate(360deg); } }

.portrait-badge {
  position: absolute;
  left: -16px;
  bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
}
.portrait-badge i { color: var(--primary); }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 999px;
}
.scroll-hint span {
  display: block;
  width: 4px; height: 8px;
  background: #fff;
  border-radius: 2px;
  margin: 6px auto 0;
  animation: dot 1.6s var(--ease) infinite;
}
@keyframes dot {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 96px 0; }
.section-alt { background: var(--surface-alt); }

.section-head { margin-bottom: 40px; max-width: 760px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--primary);
  background: rgba(37, 99, 235, .08);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 10px;
  color: var(--text);
}
.section-sub {
  color: var(--text-soft);
  font-size: 17px;
  margin: 0;
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8def0;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
.card p { margin: 0 0 12px; color: var(--text-soft); }
.card p:last-child { margin-bottom: 0; }
.accent { color: var(--primary); }

/* Tag row */
.tag-row {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

/* Research */
.research-list {
  display: grid;
  gap: 16px;
}
.research-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.research-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.research-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.12));
  color: var(--primary);
  font-size: 22px;
}
.research-item h3 {
  margin: 2px 0 6px;
  font-size: 18px;
  letter-spacing: -.01em;
}
.research-item p {
  margin: 0 0 10px;
  color: var(--text-soft);
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  font-size: 14.5px;
}
.link-arrow.inline { font-size: inherit; }
.link-arrow i { transition: transform .15s var(--ease); }
.link-arrow:hover i { transform: translate(2px, -2px); }

/* Projects */
.projects { gap: 22px; }
.project {
  display: block;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.project:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8def0;
  color: var(--text);
}
.project-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.project-head i { color: var(--text); font-size: 22px; }
.project-head h3 { margin: 0; font-size: 20px; }
.project p { margin: 0 0 14px; color: var(--text-soft); }
.project-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14.5px;
}

/* Timeline (Experience) */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
  opacity: .35;
}
.tl-item {
  position: relative;
  padding: 0 0 22px 48px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-marker {
  position: absolute;
  left: 6px; top: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.tl-item:first-child .tl-marker {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(124,58,237,.18);
}
.tl-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.tl-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d8def0;
}
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.tl-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--text);
}
.tl-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--primary);
  background: rgba(37,99,235,.08);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.tl-company {
  margin: 4px 0 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.tl-bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}
.tl-bullets li { margin-bottom: 4px; }
.tl-bullets li:last-child { margin-bottom: 0; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8def0;
}
.skill-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.skill-head h3 {
  margin: 0;
  font-size: 16.5px;
  letter-spacing: -.005em;
}
.skill-head i { font-size: 20px; }
.chip-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chip-list li {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
}

/* Publications */
.pubs {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: pub;
  display: grid;
  gap: 14px;
}
.pub {
  counter-increment: pub;
  position: relative;
  padding: 22px 24px 22px 64px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.pub::before {
  content: counter(pub, decimal-leading-zero);
  position: absolute;
  left: 18px; top: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--primary);
  background: rgba(37,99,235,.08);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.pub:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d8def0; }
.pub h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.4;
}
.pub-authors { margin: 0; color: var(--text); font-size: 14.5px; }
.pub-venue { margin: 4px 0 10px; color: var(--text-muted); font-size: 14px; }
.pub-links {
  margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pub-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}
.pub-links a:hover { color: var(--primary); border-color: #c7d2fe; background: #eef2ff; }

/* Patents */
.patent-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 14px;
}
.patent {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.patent:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d8def0; }
.patent-id {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.10));
  border: 1px solid rgba(37,99,235,.18);
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  width: fit-content;
}
.patent-id i { color: var(--accent); }
.patent h3 {
  margin: 0 0 4px;
  font-size: 16.5px;
  letter-spacing: -.005em;
  line-height: 1.4;
}
.patent-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Plain list (Service & Awards cards) */
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  color: var(--text-soft);
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.plain-list li:last-child { border-bottom: 0; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* Contact */
.contact-card {
  margin: 0 auto;
  max-width: 620px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  text-align: center;
}
.contact-link {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.08));
}
.contact-link i { color: var(--primary); }
.contact-link:hover { color: var(--primary); }
.contact-socials {
  margin-top: 22px;
  display: flex; justify-content: center; gap: 12px;
}
.contact-socials a {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 18px;
  transition: transform .15s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.contact-socials a:hover { transform: translateY(-2px); color: var(--primary); background: #eef2ff; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 24px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.footer p { margin: 0; }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding: 120px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: left; }
  .hero-portrait { justify-self: start; }
  .portrait-badge { left: auto; right: -8px; }
  .grid-2 { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }

  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute;
    top: 64px; left: 16px; right: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    flex-direction: column;
    gap: 2px;
    transform-origin: top right;
    transform: scaleY(.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
  }
  .nav-links.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { display: block; padding: 10px 14px; }
}

@media (max-width: 720px) {
  .patent { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 540px) {
  .pub { padding-left: 22px; }
  .pub::before {
    position: static;
    display: inline-block;
    margin-bottom: 8px;
  }
  .skills-grid { grid-template-columns: 1fr; }
}

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