/* Faradj Koliev — personal site
   Black and white. One stylesheet for every page. */

:root {
  color-scheme: light;
  --ink: #101010;
  --ink-soft: #3a3a3a;
  --muted: #6e6e6e;
  --rule: #dcdcdc;
  --rule-strong: #101010;
  --paper: #ffffff;
  --wash: #f4f4f4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 40rem;
  --wide: 52rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color .15s ease, background-color .15s ease;
}
a:hover { border-bottom-color: var(--rule-strong); }

.shell {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- masthead ---------- */

.masthead {
  padding: 3.5rem 0 0;
}

.masthead__name {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  font-weight: 400;
}
.masthead__name a { border: 0; }

.masthead__role {
  margin: .7rem 0 0;
  font-size: .95rem;
  color: var(--muted);
  letter-spacing: .01em;
}

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

.nav {
  margin-top: 1.9rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--rule-strong);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.nav a {
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: .5rem 1.05rem;
  font-size: .82rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  white-space: nowrap;
}
.nav a:hover { background: var(--ink); color: var(--paper); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ---------- layout ---------- */

main { padding: 3rem 0 1rem; }

.lede { max-width: var(--measure); }

.lede p { margin: 0 0 1.15rem; }
.lede p:last-child { margin-bottom: 0; }

.intro {
  display: grid;
  grid-template-columns: 1fr 16.5rem;
  gap: 3.25rem;
  align-items: start;
}

.portrait figure { margin: 0; }
.portrait img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  filter: grayscale(100%);
}
.portrait figcaption {
  margin-top: .6rem;
  font-size: .76rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- headings ---------- */

h2 {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 1.4rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule-strong);
}

h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 .5rem;
  line-height: 1.3;
}

.section { margin-top: 3.6rem; }
.section--tight { margin-top: 2.6rem; }

/* ---------- publications ---------- */

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

.pubs > li {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0 1.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.pubs > li:first-child { padding-top: 0; }
.pubs > li:last-child { border-bottom: 0; }

.pubs .year {
  font-variant-numeric: tabular-nums;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--muted);
  padding-top: .3rem;
}

.pubs .title {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.35;
  display: block;
  margin-bottom: .25rem;
}

.pubs .authors {
  display: block;
  font-size: .9rem;
  color: var(--ink-soft);
}

.pubs .venue {
  display: block;
  font-size: .9rem;
  color: var(--muted);
  font-style: italic;
  margin-top: .1rem;
}

.pubs .links {
  margin-top: .45rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .18rem .5rem;
  color: var(--ink-soft);
}
a.tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

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

/* ---------- plain lists ---------- */

.stack { list-style: none; margin: 0; padding: 0; }
.stack > li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}
.stack > li:first-child { padding-top: 0; }
.stack > li:last-child { border-bottom: 0; }
.stack p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.stack .meta {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}

/* ---------- callout ---------- */

.note {
  background: var(--wash);
  border-left: 2px solid var(--ink);
  padding: 1.05rem 1.25rem;
  font-size: .92rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.note p { margin: 0 0 .6rem; }
.note p:last-child { margin-bottom: 0; }

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

.elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}
.elsewhere a {
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .4rem .85rem;
  font-size: .8rem;
  letter-spacing: .06em;
}
.elsewhere a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: .9rem 1.5rem;
  max-width: var(--measure);
  font-size: .97rem;
}
.contact-grid dt {
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .2rem;
}
.contact-grid dd { margin: 0; }

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

footer {
  margin-top: 5rem;
  padding: 1.6rem 0 3rem;
  border-top: 1px solid var(--rule-strong);
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  justify-content: space-between;
}
footer a { border-bottom-color: var(--rule); }

/* ---------- narrow screens ---------- */

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .masthead { padding-top: 2.25rem; }
  .intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .portrait { order: -1; max-width: 12rem; }
  .pubs > li { grid-template-columns: 1fr; gap: .15rem; }
  .pubs .year { padding-top: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: .2rem 0; }
  .contact-grid dd { margin-bottom: .9rem; }
  .nav a { padding: .45rem .8rem; font-size: .76rem; }
}

@media print {
  .nav, footer { display: none; }
  a { border: 0; }
}
