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

:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #52606d;
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --border: #e2e8f0;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --border: #1f2937;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.15), transparent 45%),
    radial-gradient(circle at 20% 40%, rgba(14, 165, 233, 0.12), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1440px, 94vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: 999px;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

body[data-theme="dark"] .site-header {
  background: rgba(11, 17, 32, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 0.7rem;
  border-radius: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: var(--border);
}

.nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--border);
}

.btn {
  border: 1px solid transparent;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.outline {
  border-color: var(--border);
  color: var(--text);
}

.btn.outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.ghost {
  border-color: var(--border);
  background: transparent;
}

.theme-toggle {
  gap: 0.6rem;
  padding: 0.4rem 0.8rem;
  min-height: 2.4rem;
}

.theme-toggle__icon {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.18);
  border: 1px solid var(--border);
  transition: background 0.2s ease;
}

.theme-toggle__icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}

body[data-theme="dark"] .theme-toggle__icon {
  background: rgba(96, 165, 250, 0.2);
}

body[data-theme="dark"] .theme-toggle__icon::before {
  transform: translate(18px, -50%);
  background: #111827;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.4);
}

.theme-toggle__text {
  font-size: 0.85rem;
  color: var(--muted);
}

.theme-toggle__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.theme-toggle__status svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__sun {
  display: block;
}

.theme-toggle__moon {
  display: none;
}

body[data-theme="dark"] .theme-toggle__sun {
  display: none;
}

body[data-theme="dark"] .theme-toggle__moon {
  display: block;
}

.btn.link {
  border: none;
  background: none;
  color: var(--primary);
  padding: 0;
  font-weight: 600;
}

.hero {
  padding: 4rem 0 3rem;
  scroll-margin-top: 90px;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent, #7c9ef8);
  margin-bottom: 1rem;
  min-height: 1.4em;
  text-shadow: 0 0 8px rgba(124, 158, 248, 0.6), 0 0 20px rgba(124, 158, 248, 0.3);
  animation: eyebrow-glow 2.5s ease-in-out infinite alternate;
}

@keyframes eyebrow-glow {
  from {
    text-shadow: 0 0 6px rgba(124, 158, 248, 0.5), 0 0 14px rgba(124, 158, 248, 0.25);
  }
  to {
    text-shadow: 0 0 12px rgba(124, 158, 248, 0.9), 0 0 28px rgba(124, 158, 248, 0.5), 0 0 40px rgba(124, 158, 248, 0.2);
  }
}

.eyebrow .cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: currentColor;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 38rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.hero-badges span {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.12);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  cursor: default;
}

.hero-badges span:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 1.5rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  align-items: center;
}

.hero-metrics {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.hero-metrics p {
  font-size: 0.9rem;
  color: var(--muted);
}

.metric {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.hero-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .glass-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.6));
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-links {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--primary);
  font-weight: 600;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-links a:hover {
  background: rgba(30, 64, 175, 0.1);
  color: var(--primary);
}

body[data-theme="dark"] .hero-links a:hover {
  background: rgba(96, 165, 250, 0.15);
}

.cert-card .hero-links {
  flex-direction: column;
  gap: 0.5rem;
}

.cert-card .hero-links a {
  display: inline-flex;
  align-items: center;
  padding-top: 0.4rem;
  white-space: nowrap;
}

.cert-card .hero-links a + a {
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

.hero-card ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

main ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

main ul li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

main ul li::before {
  content: "";
  flex: 0 0 auto;
  margin-top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--primary), #38bdf8);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.12);
}

.section {
  padding: 3.5rem 0;
  scroll-margin-top: 90px;
}

.section.alt {
  background: var(--surface);
}

.section-title {
  margin-bottom: 2rem;
}

.section-title p {
  color: var(--muted);
}

.publication-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.publication-profiles a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 6px;
  border: 1px solid rgba(30, 64, 175, 0.25);
  text-decoration: none;
  cursor: pointer;
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.publication-profiles a:hover,
.publication-profiles a:focus-visible {
  background: rgba(30, 64, 175, 0.14);
  border-color: rgba(30, 64, 175, 0.4);
  color: var(--primary);
}

.publication-profiles a:focus {
  outline: none;
}

.publication-profiles a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body[data-theme="dark"] .publication-profiles a {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--accent);
}

body[data-theme="dark"] .publication-profiles a:hover,
body[data-theme="dark"] .publication-profiles a:focus-visible {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.4);
  color: var(--primary);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.6rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.certifications-grid {
  align-items: start;
}

.education-cards .education-card {
  position: relative;
  padding-top: 2.5rem;
}

.education-card__badges {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.edu-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: default;
}

.edu-badge:focus {
  outline: none;
}

.edu-badge:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.edu-badge--msc {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.15), rgba(59, 130, 246, 0.12));
  color: var(--primary);
  border-color: rgba(30, 64, 175, 0.35);
}

.edu-badge--msc:hover,
.edu-badge--msc:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.25);
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(59, 130, 246, 0.18));
}

.edu-badge--honours {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.15), rgba(59, 130, 246, 0.12));
  color: var(--primary);
  border-color: rgba(30, 64, 175, 0.35);
}

body[data-theme="dark"] .edu-badge--honours {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.15), rgba(59, 130, 246, 0.12));
  border-color: rgba(30, 64, 175, 0.35);
}

.edu-badge--honours:hover,
.edu-badge--honours:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.25);
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(59, 130, 246, 0.18));
}

body[data-theme="dark"] .edu-badge--honours:hover,
body[data-theme="dark"] .edu-badge--honours:focus-visible {
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.3);
  border-color: var(--primary);
}

body[data-theme="dark"] .edu-badge--msc:hover,
body[data-theme="dark"] .edu-badge--msc:focus-visible {
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.3);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.stats .card {
  text-align: center;
}

.stat {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.stat-link {
  text-decoration: none;
  position: relative;
  text-align: center;
}

.stat-link:hover {
  border-color: var(--primary);
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-badge svg {
  flex-shrink: 0;
}

.so-badge {
  background: rgba(244, 128, 36, 0.12);
  color: #d2691e;
}

body[data-theme="dark"] .so-badge {
  background: rgba(244, 128, 36, 0.18);
  color: #f48024;
}

.scholar-badge {
  background: rgba(66, 133, 244, 0.12);
  color: #1a56db;
  border-radius: 6px;
}

body[data-theme="dark"] .scholar-badge {
  background: rgba(66, 133, 244, 0.18);
  color: #76a7fa;
}

.profile-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 2rem;
}

.profile-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.profile-pills span {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--border);
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
}

.spotlight {
  border: 1px solid rgba(30, 64, 175, 0.2);
  background: linear-gradient(140deg, rgba(30, 64, 175, 0.1), transparent);
}

.services .card {
  display: grid;
  gap: 0.6rem;
}

.cert-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  justify-items: start;
}

.accordion {
  display: grid;
  gap: 1rem;
}

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.2rem 1.2rem;
  box-shadow: var(--shadow);
}

.accordion-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  font-weight: 600;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s;
}

.accordion-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.accordion-item[open] .accordion-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.exp-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.exp-company {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.exp-designation {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.exp-meta {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 500;
}

.accordion-body {
  padding: 0 0 1.2rem;
  display: grid;
  gap: 1rem;
}

.exp-highlight {
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  margin: 0;
  font-weight: 500;
}

.accordion-body ul {
  display: grid;
  gap: 0.6rem;
}

.projects .card {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.project-card {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-card.is-hidden {
  display: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  gap: 0.5rem;
}

.tags span,
.pill-grid span {
  background: var(--border);
  color: var(--text);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: fit-content;
  min-height: 1.75rem;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  cursor: default;
}

.tags span:hover,
.pill-grid span:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.skills-grid .card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.skill-icon {
  width: 46px;
  height: 46px;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  gap: 0.7rem;
  margin-top: 2rem;
}

.contact {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}

.contact-card {
  display: grid;
  gap: 0.8rem;
}

.muted {
  color: var(--muted);
}

.site-footer {
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .brand {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-header .container.nav {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    border-radius: 8px;
  }

  .theme-toggle__icon--hidden-mobile {
    display: none !important;
  }

  .theme-toggle--icon-only {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }

  .theme-toggle--icon-only .theme-toggle__status {
    width: 24px;
    height: 24px;
  }

  .theme-toggle--icon-only .theme-toggle__status svg {
    width: 22px;
    height: 22px;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-links {
    gap: 0.75rem;
  }

  .accordion-item summary {
    flex-wrap: wrap;
  }

  .exp-meta {
    width: 100%;
    margin-top: 0.25rem;
  }
}

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

  .edu-badge:hover,
  .edu-badge:focus-visible {
    transform: none;
  }
}
