/* Harsh Vardhan — researcher profile */

:root {
  --bg: #fef9f8;
  --fg: #2c2428;
  --muted: #7d6b73;
  --faint: #8a7a82;
  --accent: #b8436a;
  --accent-soft: #e8c1d0;
  --rule: #f0e4e6;
}

[data-theme="dark"] {
  --bg: #161214;
  --fg: #e4dce0;
  --muted: #a0929a;
  --faint: #978a92;
  --accent: #d4628a;
  --accent-soft: #3d2230;
  --rule: #2a2026;
}

/* Theme toggle */

.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.3rem;
  z-index: 100;
  background: none;
  border: 1.5px solid var(--rule);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease;
  padding: 0;
  line-height: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: var(--accent-soft);
  color: var(--fg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 39rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 5rem;
}

/* Shared mono chrome */

.links,
h2,
.venue,
.pub-links,
.code,
dl.edu dd,
footer {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Header */

h1 {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
}

.subtitle {
  color: var(--muted);
  margin: 0.4rem 0 0;
  font-size: 1rem;
}

.subtitle a {
  color: inherit;
  border-bottom-color: var(--rule);
}

.subtitle a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.links {
  margin-top: 1.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.links a+a {
  margin-left: 1.15rem;
}

.links a.icon {
  border-bottom: none;
  vertical-align: -0.22em;
  line-height: 0;
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.header-text {
  flex: 1;
  min-width: 0;
}

.portrait {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
  border: 3px solid var(--accent);
  padding: 3px;
  background: var(--bg);
}

/* Sections */

section {
  margin-top: 2.75rem;
}

h2 {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

h2::before {
  content: "";
  width: 1.15rem;
  height: 2px;
  background: var(--accent);
  flex: none;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.15s ease;
}

a:hover {
  border-bottom-color: var(--accent);
}

/* Lists */

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

ul.plain li {
  padding-left: 1.35rem;
  position: relative;
  margin-bottom: 0.4rem;
}

ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.5rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.65;
}

.lead-in {
  margin-bottom: 0.6rem;
}

.code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8em;
  color: var(--faint);
}

/* Publications */

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

ol.pubs li {
  border-left: 2px solid var(--accent-soft);
  padding-left: 1.1rem;
  margin-bottom: 1.25rem;
}

.pub-title {
  font-weight: 500;
}

.authors {
  font-size: 0.93rem;
  color: var(--muted);
}

.venue {
  font-size: 0.78rem;
  color: var(--faint);
}

.pub-links {
  font-size: 0.78rem;
  margin-left: 0.5rem;
}

.pub-links a+a {
  margin-left: 0.7rem;
}

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

/* Education */

dl.edu {
  margin: 0;
}

dl.edu dt {
  font-weight: 500;
}

dl.edu dd {
  margin: 0.1rem 0 1rem;
  font-size: 0.78rem;
  color: var(--faint);
}

dl.edu dd:last-child {
  margin-bottom: 0;
}

/* Footer */

footer {
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

@media (max-width: 480px) {
  main {
    padding-top: 3.25rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  body {
    font-size: 16px;
  }

  header {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .portrait {
    width: 5.5rem;
    height: 5.5rem;
  }
}