@font-face {
  font-family: "DM Sans";
  src: url("./assets/fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #0f1016;
  --ink: #fbfbfc;
  --muted: #929aa5;
  --accent: #a5a6ff;
  --accent-surface: #4040ce2e;
  --accent-border: #6f79cd;
  --accent-shadow: #4040ce47;
  --line: #ffffff1a;
  --surface: #1b1c25;
  --display: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.5 var(--body);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  width: min(70rem, calc(100% - clamp(2.5rem, 9vw, 8rem)));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.045em;
}

.wordmark span {
  color: var(--accent);
}

.header-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--muted);
  text-underline-offset: .3em;
}

.header-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(2.5rem, 5vw, 4.75rem);
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 1rem;
  background: var(--surface);
  object-fit: cover;
}

.role {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .115em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
}

h1 {
  font-size: clamp(4.5rem, 9.5vw, 9rem);
  line-height: .92;
  letter-spacing: -.042em;
  word-spacing: .065em;
}

h1 span {
  color: var(--accent);
}

.bio {
  max-width: 33ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.8vw, 1.375rem);
  line-height: 1.48;
  text-wrap: balance;
}

.profiles {
  scroll-margin-top: 1.25rem;
  padding-bottom: clamp(2rem, 6vw, 5rem);
}

.profiles h2 {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  margin-bottom: 1.25rem;
  font-size: clamp(2.125rem, 3.3vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.025em;
}

.profiles h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile {
  display: flex;
  min-height: 8.75rem;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .75rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: .875rem;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  place-items: center;
  border-radius: .65rem;
  background: var(--accent-surface);
  color: var(--accent);
}

.profile-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.profile-text {
  display: grid;
  gap: .125rem;
  min-width: 0;
}

.platform {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.handle {
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
  text-underline-offset: .2em;
}

@media (hover: hover) {
  .profile:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    box-shadow: 0 6px 18px var(--accent-shadow);
  }

  .profile:hover .handle {
    text-decoration: underline;
  }
}

@media (max-width: 56rem) {
  .profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile {
    min-height: 4.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: .75rem 1rem;
  }
}

@media (max-width: 45rem) {
  .site-header {
    min-height: 4.125rem;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.35rem;
    padding-block: 1.75rem 2.25rem;
  }

  .portrait {
    width: 8rem;
    border-radius: .875rem;
  }

  .role {
    margin-bottom: .7rem;
    letter-spacing: .08em;
  }

  h1 {
    font-size: clamp(3.75rem, 12.8vw, 6.5rem);
  }

  .bio {
    margin-top: .95rem;
  }
}

@media (max-width: 31rem) {
  .profile-list {
    grid-template-columns: minmax(0, 1fr);
    gap: .625rem;
  }
}

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

  .profile:hover {
    transform: none;
  }
}
