:root {
  color-scheme: light;
  --ink: #141414;
  --muted: #6f7378;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding-top: clamp(28px, 5svh, 58px);
  background: #fff;
  color: var(--ink);
  font-family: Avenir, "Avenir Next", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.constellation {
  position: relative;
  width: min(94vw, 1050px);
  min-height: calc(100svh - clamp(28px, 5svh, 58px));
  margin: 0 auto;
  isolation: isolate;
}

.node,
.center-node {
  position: absolute;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
}

.node {
  width: clamp(150px, 18vw, 210px);
  gap: 9px;
  padding: 14px 12px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  opacity: 1;
  transform: translate(-50%, -50%);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  appearance: none;
}

.node:hover,
.node:focus-visible {
  border-color: rgba(95, 108, 124, 0.14);
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 46, 57, 0.08);
  transform: translate(-50%, -50%) translateY(-3px);
}

.node:focus-visible {
  outline: 2px solid rgba(20, 20, 20, 0.28);
  outline-offset: 4px;
}

.center-node {
  top: 50%;
  left: 50%;
  gap: 16px;
  transform: translate(-50%, -47%);
}

.node-top {
  top: 8%;
  left: 50%;
}

.node-left {
  top: 50%;
  left: 16%;
}

.node-right {
  top: 50%;
  left: 84%;
}

.node-bottom {
  top: 84%;
  left: 50%;
}

.portrait {
  width: clamp(146px, 17vw, 182px);
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  border: 3px double rgba(18, 18, 18, 0.92);
  border-radius: 50%;
  padding: 2px;
  background: #fff;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.13),
    0 3px 10px rgba(0, 0, 0, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

h1,
.node-title,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(31px, 4.2vw, 52px);
  font-weight: 300;
  line-height: 1;
}

.node-title {
  display: block;
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 350;
  line-height: 1.05;
}

p {
  max-width: 18ch;
  color: var(--muted);
  font-size: clamp(13px, 1.25vw, 16px);
  font-weight: 400;
  line-height: 1.35;
}

.icon {
  width: 78px;
  height: 78px;
  display: block;
  object-fit: contain;
  filter: saturate(0.92);
}

.icon-gradebird {
  width: 92px;
  height: 92px;
}

.icon-ua {
  width: 82px;
  height: 82px;
}

.icon-clef {
  width: 64px;
  height: 104px;
}

.icon-scroll {
  width: 82px;
  height: 82px;
  margin-bottom: 4px;
}

@media (max-width: 820px) {
  .constellation {
    width: min(96vw, 760px);
  }

  .node {
    width: 150px;
  }

  .node-left {
    left: 12%;
  }

  .node-right {
    left: 88%;
  }
}

@media (max-width: 640px) {
  .constellation {
    display: grid;
    gap: 28px;
    min-height: auto;
    padding: 42px 22px 46px;
  }

  .node,
  .center-node {
    position: static;
    width: auto;
    transform: none;
  }

  .center-node {
    order: -1;
  }

  .node {
    gap: 7px;
    transform: none;
  }

  .node:hover,
  .node:focus-visible {
    transform: translateY(-3px);
  }

  .portrait {
    width: min(62vw, 210px);
  }

  p {
    max-width: 24ch;
  }
}
