/* shivesh777.github.io
   Colours come from the portrait: navy suit, petrol tie, white shirt.
   Newsreader for names and titles, IBM Plex Sans for everything else. */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-italic.woff2") format("woff2");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #142033;
  --ink-2: #344155;
  --slate: #5c6677;
  --rule: #e3e7ed;
  --mist: #f4f7f8;
  --petrol: #0b6b70;
  --petrol-deep: #06494d;
  --petrol-wash: rgba(11, 107, 112, 0.08);
  --amber: #d4952a;
  --amber-ink: #8a5b0d;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 60rem;
  --gutter: 1.5rem;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--petrol);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--petrol-deep);
}

:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: #cfe6e4;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.875rem;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
  color: #fff;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.5rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .brand {
    transition: opacity 0.2s ease;
  }
}

.brand:hover {
  color: var(--ink);
}

.js .brand[data-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.js .brand[data-hidden="true"]:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.topbar nav a {
  color: var(--slate);
  font-size: 0.9375rem;
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--petrol);
}

.topbar nav a.cv {
  color: var(--petrol);
  font-weight: 500;
}

/* ---------- intro ---------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14.5rem;
  gap: 3.5rem;
  align-items: start;
  padding-top: 4.25rem;
  padding-bottom: 3.75rem;
}

.intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.4vw, 3.375rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.tagline {
  margin: 0.625rem 0 1.875rem;
  color: var(--slate);
  font-size: 1.1875rem;
  line-height: 1.4;
}

.intro p.bio {
  max-width: 38rem;
  margin: 0 0 1rem;
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.intro p.bio a {
  color: inherit;
  text-decoration-color: rgba(52, 65, 85, 0.35);
}

.intro p.bio a:hover {
  color: var(--petrol);
  text-decoration-color: currentColor;
}

.intro p.availability {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  padding: 0.125rem 0 0.125rem 1rem;
  border-left: 2px solid var(--petrol);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.contact a {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 107, 112, 0.28);
  padding-bottom: 0.0625rem;
}

.contact a:hover {
  border-bottom-color: currentColor;
}

.portrait {
  margin: 0.5rem 0 0;
}

.portrait img {
  width: 100%;
  border-radius: 4px;
  background: var(--mist);
}

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

.section,
.footer {
  background-image: linear-gradient(var(--rule), var(--rule));
  background-position: center top;
  background-repeat: no-repeat;
  background-size: calc(100% - 2 * var(--gutter)) 1px;
}

.section {
  padding-top: 3.25rem;
  padding-bottom: 1.5rem;
}

.section > h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.section-note {
  max-width: 40rem;
  margin: 0 0 1.75rem;
  color: var(--slate);
  font-size: 1rem;
}

/* ---------- research ---------- */

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

.work {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 2rem;
  padding: 1.5rem 0;
}

.work-fig {
  display: block;
  align-self: start;
  margin-top: 0.25rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--mist);
}

a.work-fig:hover {
  border-color: #c7d3d8;
}

.work-fig img {
  width: 100%;
  height: 100%;
}

.work-body {
  min-width: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  margin: 0 0 0.375rem;
  color: var(--amber-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.status::before {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--amber);
}

.work h3 {
  margin: 0 0 0.375rem;
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

.work h3 a {
  color: var(--ink);
  text-decoration: none;
}

.work h3 a:hover {
  color: var(--petrol);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.byline,
.venue {
  margin: 0;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.byline b {
  color: var(--ink);
  font-weight: 600;
}

.byline a,
.venue a {
  color: inherit;
  text-decoration: none;
}

.byline a:hover,
.venue a:hover {
  color: var(--petrol);
  text-decoration: underline;
}

.venue {
  color: var(--ink-2);
}

.summary {
  max-width: 40rem;
  margin: 0.625rem 0 0.625rem;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.work-links a {
  font-weight: 500;
  text-decoration: none;
}

.work-links a:hover {
  text-decoration: underline;
}

.also {
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.also li {
  max-width: 46rem;
  margin: 0 0 0.625rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.also b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- experience & education ---------- */

.timeline {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline > li {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1.875rem;
  padding: 1.125rem 0;
}

.when {
  margin: 0.125rem 0 0;
  color: var(--slate);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.when span {
  display: block;
}

.timeline h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.45;
}

.timeline h3 span {
  color: var(--slate);
  font-weight: 400;
}

.position {
  margin: 0.125rem 0 0;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.5;
}

.timeline ul {
  max-width: 42rem;
  margin: 0.5rem 0 0;
  padding-left: 1.125rem;
  list-style: disc;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.timeline ul li {
  margin: 0 0 0.3125rem;
  padding-left: 0.125rem;
}

.timeline ul li::marker {
  color: #9aa3b2;
}

.timeline .note {
  max-width: 42rem;
  margin: 0.4375rem 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ---------- competitions ---------- */

.results {
  width: 100%;
  margin: 1.25rem 0 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.results th {
  padding: 0 1.5rem 0.625rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--slate);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
}

.results td {
  padding: 0.9375rem 1.5rem 0.9375rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  vertical-align: top;
}

.results td.event {
  color: var(--ink);
  font-weight: 600;
  width: 34%;
}

.results td.rank {
  color: var(--petrol);
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  width: 19%;
}

.rank small {
  display: block;
  color: var(--slate);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 400;
  white-space: normal;
}

.honors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem 2.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.honors li {
  position: relative;
  padding-left: 1.125rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.honors li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--petrol);
}

.honors b {
  color: var(--ink);
  font-weight: 600;
}

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

.footer {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  padding-bottom: 3rem;
  color: var(--slate);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--slate);
}

.footer a:hover {
  color: var(--petrol);
}

/* ---------- not-found page ---------- */

.notfound {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.notfound h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.notfound p {
  max-width: 34rem;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

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

@media (max-width: 52rem) {
  .intro {
    grid-template-columns: minmax(0, 1fr) 11rem;
    gap: 2rem;
  }

  .work {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 1.5rem;
  }

  .timeline > li {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 40rem) {
  :root {
    --gutter: 1.125rem;
  }

  .brand {
    display: none;
  }

  .topbar nav {
    flex: 1;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .topbar nav a {
    font-size: 0.9375rem;
  }

  .intro {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 2.75rem;
  }

  .portrait {
    width: 8.5rem;
    margin: 0;
  }

  .intro h1 {
    font-size: 2.375rem;
  }

  .tagline {
    margin-bottom: 1.375rem;
    font-size: 1.0625rem;
  }

  .intro p.bio,
  .intro p.availability {
    font-size: 1rem;
  }

  .section {
    padding-top: 2.5rem;
  }

  .section > h2 {
    font-size: 1.625rem;
  }

  .work {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1.25rem 0 1.5rem;
  }

  .work-fig {
    margin-top: 0;
  }

  .work h3 {
    font-size: 1.1875rem;
  }

  .timeline > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
    padding: 1rem 0;
  }

  .when span {
    display: inline;
  }

  .when span::before {
    content: ", ";
  }

  .results,
  .results tbody,
  .results tr,
  .results td {
    display: block;
    width: auto;
  }

  .results thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .results tr {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .results td {
    padding: 0;
    border: 0;
  }

  .results td.event {
    width: auto;
  }

  .results td.rank {
    width: auto;
    margin: 0.125rem 0 0.25rem;
    white-space: normal;
  }

  .rank small {
    display: inline;
    margin-left: 0.375rem;
  }

  .honors {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .topbar,
  .skip {
    display: none;
  }

  .section {
    break-inside: avoid-page;
  }

  a {
    color: inherit;
  }
}
