/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-subtle: #111111;
  --border: #1f1f1f;
  --text-primary: #f0f0f0;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --accent: #f0f0f0;
  --accent-hover: #d4d4d8;
  --chip-bg: #1a1a1a;
  --chip-ai: #0f1729;
  --chip-ai-text: #60a5fa;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Container ─────────────────────────────────────────────── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header / Nav ──────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .15s, background .15s;
}

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

.btn-resume {
  background: #f0f0f0 !important;
  color: #0a0a0a !important;
  padding: 7px 14px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: background .15s !important;
}

.btn-resume:hover { background: #d4d4d8 !important; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 24px 16px;
  background: var(--bg);
}

.mobile-menu.open { display: block; }

.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .15s, background .15s;
}

.mobile-menu a:hover { color: var(--text-primary); background: var(--chip-bg); }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 72px;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(40px, 7vw, 58px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.dot { color: #6366f1; }

.hero-tagline {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 560px;
}

.hero-bio {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-bio strong { color: var(--text-primary); font-weight: 600; }

.inline-link {
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: border-color .15s;
}

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

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color .15s, color .15s, box-shadow .15s;
}

.social-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(17,24,39,.06);
}

.hero-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 5px 12px;
  background: var(--chip-bg);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: .2px;
}

/* ─── Sections ──────────────────────────────────────────────── */
.section {
  padding: 72px 24px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ─── Timeline / Jobs ───────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 28px; }

.job-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow .2s, border-color .2s;
}

.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #3f3f46;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.job-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.role-type {
  font-weight: 400;
  color: var(--text-secondary);
}

.job-company {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.company-name {
  font-weight: 500;
  color: var(--text-primary);
}

.job-location {
  color: var(--text-muted);
  font-size: 13px;
}

.job-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding-left: 0;
}

.job-bullets li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}

.job-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.job-bullets strong { color: var(--text-primary); font-weight: 600; }

.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  padding: 3px 10px;
  background: var(--chip-bg);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ─── Projects ──────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #3f3f46;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.project-stack {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.project-links { display: flex; gap: 8px; flex-shrink: 0; }

.icon-link {
  color: var(--text-muted);
  transition: color .15s;
  display: flex;
  align-items: center;
}

.icon-link:hover { color: var(--text-primary); }

.project-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-desc strong { color: var(--text-primary); font-weight: 600; }

.project-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  width: fit-content;
}

.project-badge.award { background: #2d2200; color: #fbbf24; }
.project-badge.paper { background: #0c1a2e; color: #60a5fa; }

.acquired-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #0a2218;
  color: #4ade80;
  white-space: nowrap;
}

/* ─── Skills ────────────────────────────────────────────────── */
.skills-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.skill-row:last-child { border-bottom: none; }
.skill-row:nth-child(odd) { background: var(--bg-subtle); }

.skill-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 120px;
  padding-top: 3px;
  flex-shrink: 0;
}

.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  padding: 4px 11px;
  background: var(--chip-bg);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: border-color .15s;
}

.chip.highlight {
  background: var(--chip-ai);
  color: var(--chip-ai-text);
  font-weight: 600;
}

/* ─── Achievements ──────────────────────────────────────────── */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.achievement-item:last-child { border-bottom: none; }
.achievement-item:hover { background: var(--bg-subtle); }

.achievement-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.achievement-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Education ─────────────────────────────────────────────── */
.edu-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.edu-degree {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.edu-school {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.edu-location {
  font-size: 13px;
  color: var(--text-muted);
}

.edu-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.edu-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.edu-cgpa {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  background: #0a2218;
  color: #4ade80;
  border-radius: var(--radius-sm);
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 36px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer strong { color: var(--text-primary); }

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: color .15s;
}

.footer-socials a:hover { color: var(--text-primary); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 56px 24px 56px; }
  .hero-name { letter-spacing: -1.5px; }

  .section { padding: 56px 24px; }

  .projects-grid { grid-template-columns: 1fr; }

  .skill-row { flex-direction: column; gap: 8px; }
  .skill-label { min-width: unset; }

  .job-header { flex-direction: column; gap: 4px; }
  .job-date { font-size: 12px; }

  .edu-header { flex-direction: column; }
  .edu-right { align-items: flex-start; }

  .footer { flex-direction: column; align-items: flex-start; }
}

/* ─── Scroll fade-in animation ──────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
