/* ===========================================================
   Arnav Batra — personal site
   Dark neutral background, violet accent, Inter + JetBrains Mono
   =========================================================== */

:root {
  --bg: #0a0a0d;
  --bg-raised: #131318;
  --bg-card: #15151c;
  --border: #232330;
  --border-light: #2c2c3a;

  --accent: #8b7cf6;
  --accent-bright: #a596ff;
  --accent-dim: #5d52a8;
  --accent-glow: rgba(139, 124, 246, 0.22);

  --text: #f3f3f7;
  --text-dim: #9a9aa8;
  --text-faint: #5f5f6e;

  --success: #6fcf97;
  --error: #e57373;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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

a {
  color: var(--accent-bright);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0d;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13.5px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .icon-btn:hover {
    transform: none;
  }
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 13, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 4px 9px;
}

.logo:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.topnav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 12px;
}

.topnav a {
  color: var(--text-dim);
  font-size: 14.5px;
  font-weight: 500;
}

.topnav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text-dim);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px 24px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: center;
}

.hero-name {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  line-height: 1.05;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-photo {
  width: 300px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--accent-glow), transparent 70%);
  border: 1px solid var(--border-light);
  overflow: hidden;
  flex-shrink: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- reveal-on-scroll ---------- */

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- sections ---------- */

.section {
  padding: 96px 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}

/* ---------- experience timeline ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.entry {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 20px;
  position: relative;
}

.entry::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: -36px;
  width: 1px;
  background: var(--border-light);
}

.entry:last-child::before {
  display: none;
}

.entry-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  margin-top: 4px;
}

.entry-current .entry-marker {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.entry-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.entry-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.entry-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-self: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.entry-logo:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .entry-logo:hover {
    transform: none;
  }
}

.entry-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 999px;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entry-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 12px;
}

.entry-roles {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 4px;
}

.entry-role {
  padding-left: 16px;
  border-left: 2px solid var(--border-light);
}

.entry-role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.entry-role-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.entry-role-head .entry-meta {
  margin: 0;
}

.entry ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
}

.entry li {
  margin-bottom: 8px;
  max-width: 660px;
}

.entry li::marker {
  color: var(--accent-dim);
}

/* ---------- projects ---------- */

.stack-line {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-dim);
  margin: 0;
}

.project-links {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
}

.project-links a {
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.project-links a:hover {
  border-bottom-color: var(--accent-bright);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .project-card:hover {
    transform: none;
  }
}

.project-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.project-card-wide {
  grid-column: 1 / -1;
}

.project-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.project-card-wide h3 {
  font-size: 1.3rem;
  margin: 0;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 16px;
}

.project-card h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 6px;
  font-weight: 600;
}

.project-card p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 12px;
}

/* ---------- skills ---------- */

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

.skill-group h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 14px;
  font-weight: 600;
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 13px;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------- education ---------- */

#education {
  --edu-red: #C5050C;
  --edu-red-light: #e0383f;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px var(--accent-glow);
}

@media (prefers-reduced-motion: reduce) {
  .edu-card:hover {
    transform: none;
  }
}

.edu-crest {
  display: block;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--edu-red);
  border: 1px solid var(--edu-red-light);
  overflow: hidden;
  transition: transform 0.15s ease;
}

.edu-crest:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .edu-crest:hover {
    transform: none;
  }
}

.edu-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edu-stripe {
  width: 56px;
  height: 4px;
  margin: 10px 0 14px;
  background: var(--accent);
  border-radius: 2px;
}

.edu-line {
  color: var(--text-dim);
  margin: 0 0 6px;
}

.edu-subhead {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 56px 0 32px;
}

.edu-branch-trunk {
  width: 1px;
  height: 28px;
  margin: 0 auto;
  background: var(--border-light);
}

.edu-courses {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.edu-course {
  position: relative;
}

.edu-course::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 1px;
  height: 24px;
  background: var(--border-light);
}

.edu-course summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.edu-course summary::-webkit-details-marker {
  display: none;
}

.edu-course summary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.edu-course[open] summary {
  border-color: var(--accent);
  color: var(--text);
}

.edu-course-code {
  font-size: 11px;
  color: var(--accent-bright);
}

.edu-course p {
  margin: 10px 4px 0;
  padding: 12px 14px;
  max-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dim);
}


/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 96px 24px 56px;
  text-align: center;
}

.footer-inner {
  max-width: 560px;
  margin: 0 auto;
}

.footer-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 12px;
}

.footer-sub {
  color: var(--text-dim);
  margin: 0 0 32px;
}

.footer-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.footer-end {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .topnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
  }

  .topnav.is-open {
    display: flex;
  }

  .topnav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .topnav a:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-photo {
    order: -1;
    width: 200px;
  }

  .edu-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .project-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
  }
}
