/* Vaibhav Saxena — personal site */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --text: #1f2328;
  --text-soft: #5b6672;
  --link: #1a5fb4;
  --link-hover: #0f3d78;
  --rule: #e3e6ea;
  --accent: #b3a369; /* Georgia Tech gold */
  --maxw: 860px;
  --font: "Lato", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

html[data-theme="dark"] {
  --bg: #14171a;
  --bg-soft: #1c2024;
  --text: #e6e8ea;
  --text-soft: #a4adb6;
  --link: #7fb0ef;
  --link-hover: #a9c9f6;
  --rule: #2c3238;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

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

a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px;
  z-index: 10;
  background: var(--bg);
  padding: 8px 12px;
  border: 2px solid var(--link);
  border-radius: 6px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 58px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; color: var(--text); }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.site-nav a { color: var(--text-soft); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.theme-toggle {
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.theme-toggle:hover { border-color: var(--accent); }

/* Intro ------------------------------------------------------------------- */

.intro {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 34px;
  align-items: start;
  padding-top: 46px;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  object-position: 50% 22%; /* the face sits high in the frame; bias the crop up */
  background: var(--bg-soft);
  border: 1px solid var(--rule);
}

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.4px;
}

.lede { margin-top: 0; }

.intro-text p { margin: 0 0 14px; }

.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 18px 0 0;
  font-size: 0.94rem;
}

/* Sections ---------------------------------------------------------------- */

section.wrap { padding-top: 40px; }

h2 {
  font-size: 1.4rem;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.h2-note {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-soft);
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
  line-height: 1.35;
}

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin-bottom: 8px; }

/* News ------------------------------------------------------------------- */

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.97rem;
}
.news-list li:last-child { border-bottom: 0; }

.news-list .date {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-right: 4px;
}

/* Publications ----------------------------------------------------------- */

.pub {
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg);
}

.pub.featured {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
}

.pub p { margin: 0 0 4px; }

.authors { font-size: 0.94rem; color: var(--text-soft); }
.authors strong { color: var(--text); }

.venue {
  font-size: 0.88rem;
  color: var(--text-soft);
  font-style: italic;
}

.links {
  margin-top: 10px !important;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.9rem;
}

/* Timeline (experiences) -------------------------------------------------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.timeline li {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 4px 22px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.timeline li:last-child { border-bottom: 0; }

.timeline .when {
  grid-row: span 2;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.timeline .what { margin: 0; }
.timeline .org { font-weight: 700; }
.timeline .role { color: var(--text-soft); font-size: 0.93rem; }
.timeline .desc { margin: 0; font-size: 0.95rem; color: var(--text-soft); }

.courses li { font-size: 0.97rem; }

.note { font-size: 0.93rem; color: var(--text-soft); }

/* Footer ----------------------------------------------------------------- */

.site-footer {
  margin-top: 56px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--rule);
  color: var(--text-soft);
  font-size: 0.88rem;
}
.site-footer p { margin: 0; }

/* Small screens ---------------------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 16px; }

  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 32px;
    text-align: left;
  }
  .avatar { width: 132px; height: 132px; }

  h1 { font-size: 1.7rem; }

  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .timeline .when { grid-row: auto; }
}

@media print {
  .site-header, .theme-toggle, .site-footer { display: none; }
  a { color: inherit; text-decoration: underline; }
}
