/* mohit-1710.github.io — academic single page.
   Slab-serif, panel-board layout, light theme. All colors live in the tokens below. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #17191d;
  --muted: #56606b;
  --subtle: #66707c;
  --line: #20242a;
  --line-soft: #e7eaee;
  --accent: #007c89;
  --accent-warm: #b4471d;
}

* {
  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: Arvo, Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.62;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

.shell {
  width: min(1020px, calc(100% - 40px));
  margin: 0 auto;
}

/* keep anchor targets clear of the sticky header */
main[id],
section[id],
article[id],
aside[id] {
  scroll-margin-top: 84px;
}

/* ---------- links ---------- */

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus {
  color: var(--accent-warm);
  text-decoration: underline;
}

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

/* ---------- sticky nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
}

.brand:hover,
.brand:focus {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 7px 12px;
}

.nav-links a:hover,
.nav-links a:focus {
  border-color: var(--line);
  color: var(--text);
  text-decoration: none;
}

/* ---------- board (identity / photo / about / contact) ---------- */

.board {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: 26px;
  padding-top: 46px;
  padding-bottom: 10px;
}

.panel {
  border-radius: 8px;
}

.identity-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 230px;
  padding-right: 8px;
}

/* Utility: makes the identity panel span the full board when the photo panel is removed. */
.span-full {
  grid-column: 1 / -1;
  min-height: auto;
  padding: 26px 0 6px;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.06;
}

.lead {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 1.14rem;
}

.lead-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.profile-panel {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  min-height: 230px;
}

.profile-panel img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.95) contrast(1.02);
}

.about-panel {
  border: 1px solid var(--line-soft);
  padding: 28px;
}

.links-panel {
  border: 1px solid var(--line-soft);
  padding: 24px;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.12;
}

.about-panel p,
.links-panel p {
  color: var(--muted);
}

.about-panel p {
  margin: 16px 0 0;
}

.contact-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.contact-links a {
  min-height: 40px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 8px 12px;
}

.contact-links a span {
  min-width: 0;
  overflow-wrap: break-word;
}

.contact-links a:hover,
.contact-links a:focus {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.contact-links svg {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: currentColor;
}

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

.section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 44px;
  border-top: 1px solid var(--line-soft);
  margin-top: 56px;
  padding-top: 48px;
  padding-bottom: 8px;
}

main > .section:last-of-type {
  padding-bottom: 56px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-warm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-body > p:first-child {
  margin-top: 0;
}

.section-body p {
  color: var(--muted);
}

/* ---------- chips (dates / venues) ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

/* ---------- news ---------- */

.news-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.news-list li {
  display: grid;
  grid-template-columns: 6.8rem minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  color: var(--muted);
}

.news-list .chip {
  justify-self: start;
}

/* ---------- cards (focus / experience / education / projects / pubs) ---------- */

.card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 22px;
}

.card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.28;
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.section-body .item + .item {
  margin-top: 14px;
}

.item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.item-role {
  color: var(--subtle) !important;
  font-size: 0.92rem;
  margin-top: 8px !important;
}

/* ---------- publications (used once the section is uncommented) ---------- */

.pub-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.pub-item .chip {
  margin-bottom: 12px;
}

.pub-authors {
  font-size: 0.92rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pub-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 10px;
}

.pub-links a:hover,
.pub-links a:focus {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

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

.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 56px;
  padding: 30px 0;
  color: var(--subtle);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-content p {
  margin: 0;
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .shell {
    width: min(100% - 28px, 1020px);
  }

  /* the stacked nav is taller on small screens */
  main[id],
  section[id],
  article[id],
  aside[id] {
    scroll-margin-top: 150px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .board {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .identity-panel {
    min-height: auto;
  }

  h1 {
    font-size: 2.2rem;
  }

  .profile-panel {
    max-width: 340px;
  }

  .profile-panel img {
    min-height: auto;
    aspect-ratio: 1 / 1;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 36px;
  }

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

@media (max-width: 520px) {
  .about-panel,
  .links-panel {
    padding: 20px;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .item-head {
    align-items: flex-start;
  }
}
