/* Tsvi Tlusty · Theory of Life
   One palette, two type registers, no decorative components. */

:root {
  --paper: #ffffff;
  --ink: #1b1a18;
  --muted: #625f59;
  --quiet: #77736c;
  --accent: #9a2025;
  --accent-deep: #7d181c;
  --rule: #aaa69f;
  --hairline: #dedbd5;
  --soft: #f6f4ef;
  --chalk: #f3efe5;

  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  --font-identity: "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;

  --content: 1120px;
  --nav: 202px;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:visited {
  color: var(--accent-deep);
}

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

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.visually-hidden,
.page-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .55rem .8rem;
  color: var(--ink);
  background: var(--paper);
}

.skip-link:focus {
  left: .75rem;
  top: .75rem;
}

/* Site frame */

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  padding: 4px clamp(18px, 3.2vw, 52px) 0;
  border-bottom: 2px solid var(--rule);
}

.site-title,
.site-title:visited {
  color: var(--muted);
  font-family: var(--font-identity);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.2;
  text-decoration: none;
}

.site-title:hover,
.site-title:focus {
  color: var(--muted);
  text-decoration: none;
}

.site-title__name {
  color: var(--ink);
  font-weight: 700;
}

.site-title__separator {
  color: var(--rule);
}

.site-title__idea {
  color: var(--muted);
  font-weight: 400;
}

.site-shell {
  display: grid;
  grid-template-columns: var(--nav) minmax(0, 1fr);
  min-height: calc(100vh - 104px);
}

.site-nav {
  padding: 18px 0 34px;
  border-right: 2px solid var(--rule);
}

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

.site-nav a,
.site-nav a:visited {
  display: block;
  padding: 9px 18px 9px clamp(18px, 2vw, 30px);
  color: var(--muted);
  font-family: var(--font-identity);
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: .005em;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--accent);
  text-decoration: overline;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 700;
  border-bottom: 1px solid var(--hairline);
}

.site-main {
  min-width: 0;
  padding: clamp(34px, 4.6vw, 56px) clamp(24px, 5vw, 74px) 96px;
}

.page {
  max-width: var(--content);
}

.page--reading {
  max-width: 910px;
}

.page--wide {
  max-width: 1240px;
}

/* Typography */

h1,
h2,
h3 {
  line-height: 1.19;
  text-wrap: balance;
}

h1 {
  margin: 0 0 .72em;
  color: var(--accent);
  font-size: clamp(1.85rem, 2.75vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -.035em;
}

h2 {
  margin: 2.1em 0 .58em;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -.015em;
}

h3 {
  margin: 1.45em 0 .4em;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 600;
}

p,
ul,
ol,
table {
  max-width: 960px;
}

p {
  margin: 0 0 1.02em;
}

ul,
ol {
  margin: .5em 0 1.15em;
  padding-left: 1.35em;
}

li {
  margin-bottom: .32em;
}

.eyebrow {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-family: var(--font-identity);
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .115em;
  text-transform: uppercase;
}

.lead {
  max-width: 920px;
  margin: 0 0 1.6em;
  color: var(--ink);
  font-size: clamp(1.18rem, 1.85vw, 1.52rem);
  line-height: 1.53;
}

.large-statement {
  max-width: 980px;
  margin: 1.8em 0;
  padding: 1.1em 0 1.18em;
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--font-identity);
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  line-height: 1.46;
}

.card-link {
  color: var(--ink);
  font-family: var(--font-identity);
  font-weight: 700;
}

.card-link:hover,
.card-link:focus {
  color: var(--accent);
}

/* Homepage */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.blackboard {
  position: relative;
  display: block;
  overflow: hidden;
}

.blackboard img {
  display: block;
  width: 100%;
  pointer-events: none;
}

.blackboard-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.blackboard-hotspot {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}

.blackboard-map a:focus-visible .blackboard-hotspot {
  stroke: var(--chalk);
  stroke-width: 2;
  stroke-dasharray: 8 7;
  vector-effect: non-scaling-stroke;
}

.index-register {
  max-width: 980px;
  margin: 2rem 0 2.6rem;
  border-top: 2px solid var(--rule);
}

.index-register--single {
  max-width: 760px;
  margin-top: .15rem;
  border-top: 0;
}

.index-record {
  display: grid;
  grid-template-columns: minmax(210px, .42fr) minmax(0, 1fr);
  gap: 30px;
  padding: 1rem 0 1.08rem;
  border-bottom: 1px solid var(--hairline);
}

.index-record h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.index-record p {
  margin: 0;
  color: var(--muted);
}

.index-record p + p {
  margin-top: .28rem;
}

.index-record h2 a,
.index-record h2 a:visited {
  color: var(--ink);
}

.index-record h2 a:hover,
.index-record h2 a:focus {
  color: var(--accent);
}

/* Research */

.research-lead {
  max-width: 900px;
  margin: .35rem 0 1.95rem;
  padding-top: .35rem;
  font-size: clamp(1.18rem, 1.55vw, 1.4rem);
  line-height: 1.55;
}

.research-sequence {
  max-width: 930px;
  border-top: 2px solid var(--rule);
}

.research-unit {
  padding: 1rem 0 1.08rem;
  border-bottom: 1px solid var(--hairline);
}

.research-unit h2 {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.58;
  letter-spacing: 0;
}

.research-unit h2::after {
  content: ". ";
}

.research-unit > div,
.research-unit > div > p:first-child {
  display: inline;
}

.research-unit > div > p:first-child {
  margin: 0;
  line-height: 1.58;
}

.theme-links {
  display: block;
  margin: .38rem 0 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.theme-links a,
.theme-links a:visited {
  color: var(--muted);
}

.theme-links a:hover,
.theme-links a:focus {
  color: var(--accent);
}

/* Figures and reading pages */

.figure-feature {
  display: grid;
  grid-template-columns: minmax(320px, 1.02fr) minmax(0, .98fr);
  gap: clamp(28px, 4.5vw, 58px);
  align-items: start;
  margin: 2rem 0 2.8rem;
}

.figure-feature figure {
  margin: 0;
}

.figure-feature img {
  display: block;
  width: 100%;
  border: 1px solid var(--hairline);
}

figcaption {
  margin-top: .7rem;
  color: var(--muted);
  font-size: .89rem;
  line-height: 1.48;
}

/* People and collaborations */

.people-section {
  max-width: 900px;
  margin-top: 2.2rem;
}

.people-section > h2 {
  margin-bottom: .7rem;
}

.people-section--current {
  margin-top: .15rem;
}

.current-person {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: .82rem 0;
  border-bottom: 1px solid var(--hairline);
}

.current-person__portrait {
  display: block;
  width: 72px;
  height: 82px;
  overflow: hidden;
  background: var(--soft);
}

.current-person__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(.12) saturate(.78);
}

.current-person__text h3 {
  margin: 0 0 .16rem;
  font-size: 1.08rem;
}

.current-person__text p {
  margin: 0;
  color: var(--muted);
}

.person-register {
  border-top: 2px solid var(--rule);
}

.person-record {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1fr);
  gap: 28px;
  padding: .72rem 0 .78rem;
  border-bottom: 1px solid var(--hairline);
}

.person-record h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.person-record p {
  margin: 0;
  color: var(--muted);
}

.current-person__text a,
.current-person__text a:visited,
.person-record a,
.person-record a:visited {
  color: var(--ink);
}

.current-person__text a:hover,
.current-person__text a:focus,
.person-record a:hover,
.person-record a:focus {
  color: var(--accent);
}

.collaboration-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0 34px;
  margin-top: .15rem;
}

.collaboration {
  padding: 1.25rem 0 1.35rem;
  border-bottom: 1px solid var(--hairline);
}

.collaboration h2 {
  margin: 0 0 .28rem;
  font-size: 1.28rem;
}

.collaboration p {
  margin: 0;
}

.collaboration .institution {
  color: var(--muted);
  font-size: .92rem;
}

.collaboration a,
.collaboration a:visited {
  color: var(--ink);
}

.collaboration a:hover,
.collaboration a:focus {
  color: var(--accent);
}

/* Teaching */

.teaching-current {
  max-width: 760px;
  margin: .15rem 0 2.35rem;
  padding: .1rem 0 1.05rem;
  border-bottom: 2px solid var(--rule);
}

.teaching-current h2 {
  margin: 0 0 .18rem;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.38;
}

.teaching-current h2 a,
.teaching-current h2 a:visited {
  color: var(--ink);
}

.teaching-current h2 a:hover,
.teaching-current h2 a:focus {
  color: var(--accent);
}

.teaching-current p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.teaching-selected {
  max-width: 760px;
}

.section-label {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.course-list {
  list-style: none;
  padding: 0;
}

.course-list--selected {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.course-list li {
  padding: .74rem 0;
  border-top: 1px solid var(--hairline);
}

.course-list li:first-child {
  border-top: 0;
}

.course-list--selected li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: baseline;
}

.course-list a,
.course-list a:visited {
  color: var(--ink);
}

.course-list a:hover,
.course-list a:focus {
  color: var(--accent);
}

.course-year {
  display: block;
  color: var(--muted);
  font-size: .88rem;
}

.course-list--selected .course-year {
  text-align: right;
  white-space: nowrap;
}

.teaching-archive {
  max-width: 760px;
  margin: 1.55rem 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.55;
}

.teaching-archive > span:first-child {
  margin-right: .65rem;
  color: var(--ink);
  font-weight: 600;
}

.teaching-archive a,
.teaching-archive a:visited {
  color: var(--muted);
}

.teaching-archive a:hover,
.teaching-archive a:focus {
  color: var(--accent);
}

/* Publications */

.publication-list,
.talk-list {
  list-style: none;
  max-width: 1080px;
  margin: .35rem 0 0;
  padding: 0;
}

.publication-entry {
  padding: .92rem 0 1rem;
  border-top: 1px solid var(--hairline);
  line-height: 1.5;
}

.publication-entry:first-child {
  border-top: 0;
}

.publication-main {
  min-width: 0;
}

.publication-title {
  max-width: 980px;
  margin: 0 0 .22rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 0;
  text-wrap: pretty;
}

.publication-title a,
.publication-title a:visited {
  color: var(--ink);
}

.publication-title a:hover,
.publication-title a:focus {
  color: var(--accent);
}

.publication-meta {
  margin: 0;
  color: var(--muted);
  font-size: .89rem;
  line-height: 1.45;
}


.publication-meta__separator {
  color: var(--rule);
}

.publication-authors {
  color: var(--muted);
}

.publication-venue {
  color: var(--ink);
  font-style: italic;
  font-weight: 400;
}

.publication-links {
  margin: .16rem 0 0;
  color: var(--quiet);
  font-size: .82rem;
  line-height: 1.4;
}

.publication-links a,
.publication-links a:visited {
  color: var(--quiet);
}

.publication-links a:hover,
.publication-links a:focus {
  color: var(--accent);
}

.publication-year-mark {
  color: var(--quiet);
  font-size: .79rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.publication-external {
  max-width: 1080px;
  margin: 1.25rem 0 0;
  color: var(--quiet);
  font-size: .78rem;
  line-height: 1.5;
  text-align: right;
}

.publication-external a,
.publication-external a:visited {
  color: var(--quiet);
  font-weight: 400;
}

.publication-external a:hover,
.publication-external a:focus {
  color: var(--accent);
}

/* Talks */

.talk-entry {
  padding: .82rem 0 .9rem;
  border-top: 1px solid var(--hairline);
  line-height: 1.5;
}

.talk-entry:first-child {
  border-top: 0;
}

.talk-title {
  margin: 0 0 .2rem;
  font-size: 1.01rem;
  font-weight: 600;
  line-height: 1.43;
  text-wrap: pretty;
}

.talk-title a,
.talk-title a:visited {
  color: var(--ink);
}

.talk-title a:hover,
.talk-title a:focus {
  color: var(--accent);
}

.talk-meta {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.45;
}

.talk-meta__separator {
  color: var(--rule);
}

.talk-action,
.talk-action:visited {
  color: var(--quiet);
  font-size: .82rem;
  font-weight: 400;
}

.talk-action:hover,
.talk-action:focus {
  color: var(--accent);
}

/* Course archives, profile, and position */

.course-content table {
  width: 100%;
  max-width: 960px;
  border-collapse: collapse;
}

.course-content th,
.course-content td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.course-content img {
  max-width: 100%;
}

.course-content font {
  color: inherit;
  font: inherit;
}

.profile-header {
  display: grid;
  grid-template-columns: minmax(190px, 245px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: start;
}

.profile-header img {
  width: 100%;
}

.cv-list {
  list-style: none;
  max-width: 980px;
  padding: 0;
}

.cv-list li {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 20px;
  padding: .7rem 0;
  border-top: 1px solid var(--hairline);
}

.position-header {
  margin-bottom: 2rem;
}

.position-header h1 {
  max-width: 900px;
}

.position-subtitle {
  color: var(--muted);
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
}

.position-support {
  max-width: 840px;
  margin: .72rem 0 0;
  color: var(--muted);
  font-size: .87rem;
  font-weight: 400;
  line-height: 1.5;
}

.position-lead {
  font-weight: 400;
}

.position-posted {
  color: var(--quiet);
  font-size: .82rem;
}

.statcounter {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Responsive */

@media (max-width: 900px) {
  .site-shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }

  .site-nav a {
    font-size: 18px;
  }

  .hero-grid,
  .figure-feature {
    grid-template-columns: 1fr;
  }

  .hero-grid .blackboard {
    max-width: 760px;
  }
}

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

  .site-header {
    min-height: 76px;
    padding: 3px 17px 0;
  }

  .site-title,
  .site-title:visited {
    font-size: 23px;
  }

  .site-shell {
    display: block;
    min-height: 0;
  }

  .site-nav {
    padding: 5px 8px;
    border-right: 0;
    border-bottom: 2px solid var(--rule);
  }

  .site-nav ul {
    display: flex;
    flex-wrap: wrap;
  }

  .site-nav a,
  .site-nav a:visited {
    padding: 8px 9px;
    font-size: 17px;
  }

  .site-nav a[aria-current="page"] {
    color: var(--accent);
    border-bottom: 0;
  }

  .site-main {
    padding: 32px 20px 52px;
  }

  .page-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 1.15rem;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    color: var(--accent-deep);
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  h1 {
    font-size: clamp(1.95rem, 10vw, 2.65rem);
  }

  .lead {
    font-size: 1.16rem;
  }

  .index-record,
  .person-record {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .current-person {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

  .current-person__portrait {
    width: 58px;
    height: 68px;
  }

  .profile-header {
    grid-template-columns: 1fr;
  }

  .profile-header img {
    max-width: 260px;
  }

  .cv-list li,
  .course-list--selected li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .course-list--selected .course-year {
    text-align: left;
  }


  .figure-feature {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-nav,
  .skip-link,
  .page-label,
  .statcounter {
    display: none;
  }

  .site-shell {
    display: block;
  }

  .site-main {
    padding: 20px;
  }

  a {
    color: var(--ink);
  }
}
