/* mattcree.fyi
   A composition: blocks of yellow and black, separated by black bars.
   The grid gap is the black line. Pink is for headings only, at display size.
   One typeface. Nothing decorative. */

:root {
  --yellow: #ffd600;
  --pink: #ff2d95;
  --black: #0a0a0a;
  --line: 10px;
  color-scheme: light only;
}

* { box-sizing: border-box; }

html { background: var(--black); }

body {
  margin: 0;
  background: var(--black);
  color: var(--black);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
a:hover { text-decoration-color: var(--pink); }
a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: 30em; }
p:last-child { margin-bottom: 0; }

/* The composition. Columns 5:3:4, rows: hero, caption row, thick bar, list. */
.comp {
  display: grid;
  gap: var(--line);
  grid-template-columns: 5fr 3fr 4fr;
  grid-template-rows: minmax(52vh, auto) minmax(9rem, auto) 22px auto;
  min-height: 100vh;
}
.cell { padding: 1.5rem; background: var(--yellow); min-width: 0; }

.c-name { grid-column: 1 / 3; grid-row: 1; display: flex; align-items: flex-end; container-type: inline-size; }
.c-lede { grid-column: 3; grid-row: 1; background: var(--black); color: var(--yellow); display: flex; flex-direction: column; justify-content: space-between; }
.c-tag  { grid-column: 1 / 3; grid-row: 2; display: flex; align-items: flex-end; }
.c-bar  { grid-column: 1 / 3; grid-row: 3; background: var(--black); padding: 0; }
.c-things { grid-column: 1 / 3; grid-row: 4; }
.c-contact { grid-column: 3; grid-row: 2 / 5; background: var(--black); color: var(--yellow); }

/* Type. */
.name {
  margin: 0;
  font-size: clamp(2.8rem, 16cqw, 13rem);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  line-height: 0.84;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--pink);
}
.name span { display: block; }
.name span + span { margin-left: 0.08em; }

.lede { font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.3; font-weight: 500; max-width: 22em; }
.c-lede .cv { font-size: 0.95rem; font-weight: 500; margin-top: 2rem; text-decoration-color: var(--yellow); }
.c-lede .cv:hover { text-decoration-color: var(--pink); }

.tag {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-decoration: none;
}
.tag:hover { color: var(--pink); }

.contact { list-style: none; margin: 0; padding: 0; font-size: clamp(1.1rem, 1.5vw, 1.4rem); font-weight: 700; line-height: 1.25; }
.contact li { margin-bottom: 0.65em; overflow-wrap: anywhere; }
.contact li small { display: block; font-weight: 500; font-size: 0.72em; margin-bottom: 0.15em; }
.contact a { color: var(--yellow); text-decoration-color: var(--yellow); }
.contact a:hover { text-decoration-color: var(--pink); }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 0 0 1rem;
}
.c-things > p { margin-bottom: 1.25rem; }

.things { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--black); }
.things li { padding: 0.9rem 0 1rem; border-bottom: 2px solid var(--black); display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 2rem; align-items: baseline; }
.things a { font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.things a:hover { text-decoration: underline; text-decoration-color: var(--pink); }
.things span { grid-column: 1; max-width: 34em; }
.things time { grid-column: 2; grid-row: 1; font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.things.empty { padding: 1rem 0; border-bottom: 2px solid var(--black); }
.more { margin-top: 1.25rem; font-weight: 700; }

/* Pages other than home reuse the composition with different cell contents. */
.c-name .page {
  margin: 0;
  font-size: clamp(2.6rem, 14cqw, 11rem);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--pink);
}

@media (min-width: 60rem) {
  .cell { padding: 2rem; }
  .c-name { padding-bottom: 1.6rem; }
}

@media (max-width: 52rem) {
  .comp { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .comp > .cell { grid-column: 1; grid-row: auto; }
  .c-name { min-height: 34vh; order: 1; }
  .c-lede { order: 2; }
  .c-contact { order: 3; }
  .c-bar { order: 4; height: 22px; }
  .c-things { order: 5; }
  .c-tag { order: 7; align-items: center; }
  .tag { writing-mode: horizontal-tb; transform: none; }
  .things li { grid-template-columns: 1fr; }
  .things time { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
