:root {
  color-scheme: light;
  --paper: #efede8;
  --ink: #121212;
  --soft-ink: #5c5a55;
  --line: #c9c4ba;
  --line-dark: #121212;
  --accent: #8f1f16;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(18, 18, 18, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 80px 80px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body::before,
body::after {
  position: fixed;
  left: 0;
  right: 0;
  z-index: -1;
  height: 1px;
  background: var(--line-dark);
  content: "";
}

body::before {
  top: 24px;
}

body::after {
  bottom: 24px;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--line-dark);
}

.school,
.subtitle {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.school {
  grid-column: 1 / -1;
  align-self: start;
  margin-bottom: 44px;
}

.intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5rem;
  font-weight: 400;
  line-height: 0.78;
}

.subtitle {
  padding-bottom: 0.55em;
  text-align: right;
  white-space: nowrap;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px;
  padding-top: 34px;
}

.class-column {
  min-width: 0;
}

.column-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-dark);
}

.column-heading h2 {
  margin: 0;
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 0.95;
}

.column-heading span,
.number,
.portfolio-list small,
.empty-state {
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portfolio-list {
  display: grid;
}

.portfolio-list a {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  gap: 6px 18px;
  align-items: start;
  min-height: 72px;
  padding: 18px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.portfolio-list a::after {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  content: "->";
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0;
  text-transform: uppercase;
  transition: opacity 160ms ease, transform 160ms ease;
}

.portfolio-list a:hover::after,
.portfolio-list a:focus-visible::after {
  opacity: 1;
  transform: translateX(4px);
}

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

.portfolio-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}

.number {
  align-self: start;
  padding-top: 0.22em;
}

.student {
  overflow-wrap: break-word;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 0.95;
  transition: color 160ms ease;
}

.portfolio-list small {
  grid-column: 2;
  overflow-wrap: anywhere;
  text-align: left;
  text-transform: none;
}

.empty-state {
  min-height: 72px;
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 860px) {
  body {
    background-size: 56px 56px;
  }

  .page {
    width: min(100% - 28px, 1180px);
    padding: 32px 0 44px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .school {
    margin-bottom: 28px;
  }

  .subtitle {
    text-align: left;
  }

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

  .columns {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .portfolio-list a {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
  }

  .portfolio-list small {
    grid-column: 2;
    text-align: left;
  }

  .portfolio-list a::after {
    display: none;
  }
}

@media (max-width: 520px) {
  body::before {
    top: 14px;
  }

  body::after {
    bottom: 14px;
  }

  .page {
    width: min(100% - 24px, 1180px);
    padding: 34px 0;
  }

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

  .column-heading h2 {
    font-size: 2.1rem;
  }

  .student {
    font-size: 1.55rem;
  }

  .portfolio-list a {
    min-height: 82px;
  }
}
