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

:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --border: #e8e8e8;
  --text: #0a0a0a;
  --muted: #666666;
  --faint: #999999;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --nav-h: 60px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Typography ────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 48px;
}

/* ─── Nav ───────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 80px);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-logo span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  animation: blink 1.2s step-end infinite;
}

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

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ─── Layout ────────────────────────────────────────── */
main { padding-top: var(--nav-h); }

section {
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 80px);
  max-width: 1100px;
  margin: 0 auto;
}

.divider {
  height: 1px;
  background: var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── Hero ──────────────────────────────────────────── */
#hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(40px, 8vw, 80px);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 28px;
}

.hero-role {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.hero-role .role-text {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--text);
  vertical-align: middle;
  animation: blink 0.9s step-end infinite;
}

.hero-summary {
  max-width: 620px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 12px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Experience ────────────────────────────────────── */
.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  padding-left: 32px;
  position: relative;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: none;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: var(--bg);
}

.timeline-item.current::before {
  background: var(--text);
}

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

.exp-company {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  margin-top: 3px;
}

.exp-role {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.current-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border: 1px solid var(--text);
  border-radius: 2px;
  margin-left: 10px;
  vertical-align: middle;
  text-transform: uppercase;
}

.exp-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-points li {
  font-size: 14px;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.exp-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--faint);
}

/* ─── Projects ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}

.project-card {
  padding: 28px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s;
}

.project-card.visible {
  opacity: 1;
  transform: none;
}

.project-card:hover { background: var(--surface); }

.project-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 16px;
}

.project-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.project-subtitle {
  font-size: 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  margin-bottom: 14px;
}

.project-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  padding-bottom: 1px;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.2s;
}

.project-link:hover::after { width: 100%; }

/* ─── Publications ──────────────────────────────────── */
.pub-list { display: flex; flex-direction: column; gap: 32px; }

.pub-item {
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pub-item.visible { opacity: 1; transform: none; }

.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pub-venue {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pub-venue::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--faint);
}

.pub-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-status--accepted {
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.pub-status--under-review {
  color: #a16207;
  background: #fefce8;
  border: 1px solid #fde68a;
}

.pub-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.pub-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-highlights li {
  font-size: 13.5px;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.pub-highlights li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--faint);
  font-size: 16px;
  line-height: 1.5;
}

/* ─── Skills ────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}

.skill-group {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.skill-group.visible { opacity: 1; transform: none; }

.skill-category {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-tag {
  font-size: 13px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  transition: all 0.18s;
  cursor: default;
}

.skill-tag:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ─── Achievements ──────────────────────────────────── */
.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.achievement-item:first-child { border-top: 1px solid var(--border); }

.achievement-item.visible { opacity: 1; transform: none; }

.achievement-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  min-width: 28px;
  padding-top: 2px;
}

.achievement-text { font-size: 15px; line-height: 1.6; }

/* ─── Education ─────────────────────────────────────── */
.edu-card {
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.edu-card.visible { opacity: 1; transform: none; }

.edu-inst {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.edu-degree {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.edu-spec {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.edu-meta { text-align: right; }

.edu-period {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.edu-cgpa {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-family: var(--font-mono);
}

.edu-cgpa span {
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
  display: block;
  margin-top: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Contact ───────────────────────────────────────── */
#contact {
  background: var(--surface);
  max-width: 100%;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 80px);
}

#contact .inner {
  max-width: 1100px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-intro {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-sub { font-size: 15px; color: var(--muted); }

.contact-links { display: flex; flex-direction: column; gap: 16px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.2s;
}

.contact-link:hover {
  border-color: var(--text);
  transform: translateX(4px);
}

.contact-link-icon {
  font-family: var(--font-mono);
  font-size: 16px;
  width: 24px;
  text-align: center;
}

.contact-link-label { font-size: 13px; color: var(--muted); display: block; }
.contact-link-val { font-size: 14px; font-weight: 500; }

/* ─── Footer ────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  border-top: 1px solid var(--border);
  letter-spacing: 0.08em;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 12px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { gap: 28px; }
}

@media (max-width: 540px) {
  .nav-links { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-meta { text-align: left; }
}
