@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --black: #000;
  --red: #ff2d2d;
  --white: #ededed;
  --grey: #8f8f8f;
  --dim: #565656;
  --line: #262626;
  --ragnarok: #ff9a2e;

  --display: "Archivo", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--red);
  color: var(--black);
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--black);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

a {
  color: var(--white);
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--red);
}

a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

p {
  margin: 0 0 1.1rem;
}

/* Frame */

.page {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0;
  text-transform: lowercase;
}

.name {
  font-weight: 600;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--red);
}

nav {
  align-items: center;
}

nav .icon {
  display: flex;
}

nav .icon + .icon {
  margin-left: -0.5rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  text-transform: lowercase;
}

footer a {
  color: var(--grey);
  text-decoration: none;
}

.credits {
  margin: 0;
  padding-bottom: 2.5rem;
  color: #3d3d3d;
  font-size: 0.8rem;
}

/* Type */

h1 {
  margin: 0 0 1.5rem;
  color: var(--red);
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

h1 span {
  display: block;
}

h2 {
  margin: 0 0 1.5rem;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Home: title card */

.card {
  position: relative;
  display: flex;
  min-height: 100svh;
  background: var(--black) url("/photos/full/black-sand-coast.jpg") center / cover;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.9) 100%);
}

.card .page {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.title {
  margin-top: auto;
  padding-bottom: clamp(2rem, 7vw, 4.5rem);
}

.title h1 {
  margin: 0;
  font-size: clamp(2rem, 7.2vw, 6.25rem);
  line-height: 0.94;
}

.hello {
  margin: 0 0 1rem;
}

/* Home: sections */

.section {
  padding-top: clamp(3rem, 8vw, 5.5rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.about {
  max-width: 40rem;
}

.who {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.about .who ~ p + p {
  color: var(--grey);
}

.faces {
  display: flex;
  flex: none;
}

.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.faces .avatar:first-child {
  box-shadow: 0 0 0 2px var(--ragnarok);
}

.faces .avatar + .avatar {
  margin-left: -1rem;
  box-shadow: 0 0 0 2px var(--red);
}

.handle {
  white-space: nowrap;
}

.decode {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  color: var(--red);
  font-weight: 600;
}

.aside {
  margin: -0.75rem 0 1rem;
  color: var(--grey);
}

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

.projects li {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  align-items: start;
  gap: 0.25rem 2rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.projects .project {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.2;
  text-decoration: none;
  text-transform: lowercase;
}

.projects .logo {
  flex: none;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.projects .logo.tile {
  border-radius: 7px;
  box-shadow: 0 0 0 1px #333;
}

.projects p {
  max-width: 40rem;
  margin: 0;
  color: var(--grey);
}

.projects .where {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.projects .where + .where {
  margin-top: 0.3rem;
}

.projects .where a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
}

.projects .where a:hover {
  color: var(--red);
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Inner pages */

.prose {
  max-width: 42rem;
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
}

.prose h2 {
  margin: 2.75rem 0 0.6rem;
  color: var(--white);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.2;
  text-transform: lowercase;
}

.prose .faces {
  margin-bottom: 1.75rem;
}

.prose .avatar {
  width: 6.5rem;
  height: 6.5rem;
}

.prose .faces .avatar:first-child {
  box-shadow: 0 0 0 3px var(--ragnarok);
}

.prose .faces .avatar + .avatar {
  margin-left: -1.5rem;
  box-shadow: 0 0 0 3px var(--red);
}

.prose ul {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}

.prose li::marker {
  color: var(--red);
}

.meta {
  color: var(--grey);
  font-size: 0.85rem;
}

.gallery-intro {
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
}

.gallery-intro p {
  max-width: 38rem;
  color: var(--grey);
}

.gallery {
  columns: 3;
  column-gap: 0.5rem;
  margin-top: 2.25rem;
}

.gallery a {
  display: block;
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

.gallery img {
  width: 100%;
  background: var(--line);
}

.lost {
  max-width: 38rem;
  padding: clamp(3rem, 12vw, 8rem) 0 2rem;
}

.lost p {
  color: var(--grey);
}

@media (max-width: 60rem) {
  .gallery {
    columns: 2;
  }
}

@media (max-width: 48rem) {
  .projects li {
    grid-template-columns: 1fr;
  }

  .strip {
    grid-template-columns: 1fr 1fr;
  }

  .strip a:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 34rem) {
  .gallery {
    columns: 1;
  }
}
