/* ============================================================
   Vivek Murugesh — personal site
   Light, clean, minimal. System fonts, content-first.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --text-faint: #8a8a8a;
  --border: #e8e8e8;
  --accent: #0a66c2;
  --accent-underline: rgba(10, 102, 194, 0.25);
  --link: #1a1a1a;
  --max-w: 680px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #0f0f10;
  --bg-soft: #151516;
  --text: #e8e8e8;
  --text-muted: #a3a3a3;
  --text-faint: #767676;
  --border: #262627;
  --accent: #4d9fff;
  --accent-underline: rgba(77, 159, 255, 0.3);
  --link: #e8e8e8;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}

::selection { background: var(--accent-underline); }

a { color: var(--link); text-decoration: none; border-bottom: 1px solid var(--border); transition: border-color 0.15s ease, color 0.15s ease; }
a:hover { border-bottom-color: var(--accent); color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

ul { list-style: none; }
.mono { font-family: var(--font-mono); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo { font-size: 15.5px; font-weight: 650; border-bottom: none; }
.logo:hover { color: var(--accent); border-bottom: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: none;
  border-radius: 6px;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); border-bottom: none; }

.theme-toggle {
  margin-left: 6px;
  padding: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-soft); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 64px; }
.hero-name {
  font-size: clamp(34px, 5.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin-bottom: 14px;
}
.hero-role {
  font-size: 19px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 26px;
}
.hero-bio {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 26px;
}
.hero-meta {
  font-size: 14.5px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.hero-meta a { border-bottom: none; color: var(--text); }
.hero-meta a:hover { color: var(--accent); }
.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-faint);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
[data-theme="dark"] .dot { background: #4ade80; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 34px;
}

/* ---------- Jobs ---------- */
.job { margin-bottom: 40px; }
.job:last-child { margin-bottom: 0; }
.job-head { margin-bottom: 14px; }
.job-head h3 {
  font-size: 18.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.at { color: var(--text-faint); font-weight: 400; }
.job-date {
  font-size: 13.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.job-points { display: flex; flex-direction: column; gap: 9px; }
.job-points li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.6;
}
.job-points li::before {
  content: "–";
  position: absolute;
  left: 2px;
  color: var(--text-faint);
}

/* ---------- Projects ---------- */
.project h3 { font-size: 18.5px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 4px; }
.project-desc { color: var(--text-muted); margin: 16px 0 12px; max-width: 62ch; }
.project-tags { font-size: 13px; color: var(--text-faint); }

/* ---------- Skills ---------- */
.skills { border-top: 1px solid var(--border); }
.skill-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.skill-row dt { font-weight: 600; font-size: 15px; }
.skill-row dd { color: var(--text-muted); font-size: 15px; }

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
}
.edu-item h3 { font-size: 16.5px; font-weight: 650; margin-bottom: 3px; }
.edu-school { color: var(--text-muted); font-size: 14.5px; margin-bottom: 6px; }

/* ---------- Misc ---------- */
.plain-text { color: var(--text-muted); max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ---------- Reveal (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .skill-row { grid-template-columns: 1fr; gap: 6px; }
  .edu-grid { grid-template-columns: 1fr; }
  .nav a { padding: 6px 8px; font-size: 13.5px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 44px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}
