/* content inside the revealed overlay */

.content {
  --gap: clamp(1.25rem, 4vw, 3rem);
  --line: rgba(255, 255, 255, 0.18);
  --dim: rgba(255, 255, 255, 0.55);

  box-sizing: border-box;
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--gap) var(--gap) calc(var(--gap) * 3);
  font-family: system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
}

.heading {
  margin: 0 0 1.5rem;
  font-family: "zeplin-vf", sans-serif;
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 100;
  line-height: 1;
  font-variation-settings:
    "CONX" 476,
    "CONY" 1000;
}

/* heading with something beside it (e.g. a "see more" link), sharing its baseline */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
}

.section-head .heading {
  margin-bottom: 0;
}

/* leave room for the fixed site map when the viewport is too narrow to fit it beside the content */
@media (min-width: 48rem) and (max-width: 80rem) {
  .content {
    padding-right: calc(var(--gap) + 8rem);
  }
}

/* bio */

.intro {
  display: flex;
  /* photo stacks above the text on narrow screens */
  flex-wrap: wrap-reverse;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 70vh;
  padding-top: 12vh;
  box-sizing: border-box;
}

.intro > div {
  flex: 1 1 22rem;
}

.bio {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

/* paragraphs from content/*.md stack with no gap, like a line break */
.bio p {
  margin: 0;
}

.portrait {
  width: clamp(8rem, 22vw, 16rem);
  height: auto;
}

/* list rows: projects, contact */

.section {
  margin-top: calc(var(--gap) * 2);
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  /* name | description | meta | link arrow (see links.css) */
  grid-template-columns: min(18rem, 35%) 1fr auto auto;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.row-name {
  font-size: 1.25rem;
}

.row-desc,
.row-meta {
  color: var(--dim);
}

/* dim the other rows while one is hovered (not on touch, where hover sticks after a tap) */
@media (hover: hover) {
  .rows:hover .row:not(:hover) {
    opacity: 0.45;
  }
}

.row:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 36rem) {
  .row {
    grid-template-columns: 1fr auto auto;
  }

  .row-desc {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .row {
    transition: none;
  }
}
