@font-face {
  font-family: Inter;
  src: url("assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  font-family: Inter, system-ui, sans-serif;
  color: #101010;
  background: #fcfcfc;
  --muted: #646464;
  --section-space: clamp(5rem, 10.6vh, 8rem);
}

body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.3;
}

h1, h2, p {
  margin: 0;
}

h1, h2 {
  font-size: inherit;
  font-weight: 600;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
  border-radius: 1px;
}

.page {
  --identity-offset: max(0.5rem, calc(25svh - 8rem));
  box-sizing: border-box;
  width: min(100% - 3rem, 34.25rem);
  margin-inline: auto;
  padding-block: var(--identity-offset) clamp(2.5rem, 13.5vh, 10rem);
}

.home-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows:
    var(--identity-offset) auto
    minmax(0.5rem, 64fr) auto
    minmax(0.375rem, 30fr) auto
    minmax(0.375rem, 30fr) auto
    minmax(0.5rem, 64fr) auto
    minmax(0.5rem, 20fr);
  block-size: 100svh;
  padding-block: 0;
}

.home-page > .identity { grid-area: 2 / 1; }
.home-page > .profile { grid-area: 4 / 1; }
.home-page > .work-links { grid-area: 6 / 1; }
.home-page > .contact { grid-area: 8 / 1; }
.home-page > .footer { grid-area: 10 / 1; }

.home-page > .profile {
  margin-block-start: 0;
}

.footer {
  display: grid;
  max-width: 31.75rem;
  font-size: calc(1em - 0.125rem);
  row-gap: clamp(0.375rem, 1.8svh, 0.875rem);
}

.footer > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

#weather {
  text-align: end;
}

.contact {
  justify-self: start;
}

.muted {
  color: var(--muted);
}

.password-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
  width: min(100% - 3rem, 17rem);
  margin-inline: auto;
  padding-block: 1rem;
  gap: 0.75rem;
}

.password-form {
  width: 100%;
}

.password-controls {
  display: flex;
  align-items: center;
  border: 1px solid #acacac;
  border-radius: 999px;
  padding: 0.1875rem;
}

.password-controls input {
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  padding-inline: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

.password-controls input::placeholder {
  color: var(--muted);
  font-size: 0.875rem;
}

.password-controls button {
  flex: 0 0 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #393939;
  color: #fff;
  cursor: pointer;
  font: 600 0.6875rem/1 Inter, system-ui, sans-serif;
}

.password-controls button:hover {
  background: #dadada;
  color: #393939;
}

.password-controls:has(input:focus-visible),
.password-controls button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.password-controls input:focus-visible {
  outline: none;
}

.password-error {
  margin-top: 0.5rem;
  text-align: left;
}

.profile {
  max-width: 29.25rem;
  margin-top: var(--section-space);
}

.profile > section {
  margin-top: clamp(0.75rem, 2.8svh, 2rem);
}

.work-links {
  display: grid;
  justify-items: start;
  gap: clamp(0rem, 1svh, 0.75rem);
}

.work-links button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

.work-links > :is(a, button) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: clamp(1.5rem, 4.5svh, 2.5rem);
  min-inline-size: 8rem;
  font-weight: 600;
}

.work-arrow {
  flex: none;
  inline-size: 0.75rem;
  text-align: center;
  color: var(--muted);
  font-weight: 400;
}

.return-link {
  display: block;
  width: max-content;
  position: relative;
  font-weight: 600;
}

.return-link span {
  position: absolute;
  inset-inline-end: calc(100% + 0.25rem);
  color: var(--muted);
  font-weight: 400;
}

.subpage h1 {
  margin-bottom: 0.75rem;
}

@media (max-width: 36rem) {
  :root {
    --section-space: 4rem;
  }

  .page {
    --identity-offset: max(0.5rem, calc(25svh - 6.25rem));
    width: calc(100% - 3.375rem);
    font-size: 0.6875rem;
    line-height: 1.18;
  }

  .home-page .profile > section {
    margin-top: clamp(0.625rem, 4svh, 1.625rem);
  }

  .work-links {
    gap: 0;
  }

  .work-links > :is(a, button) {
    min-block-size: clamp(1.5rem, 6svh, 2.375rem);
    min-inline-size: 5.75rem;
    gap: 0.5rem;
  }

  .work-arrow {
    inline-size: 0.5rem;
  }

}

@media (max-width: 36rem) and (max-height: 34rem) {
  .page {
    width: calc(100% - 2rem);
  }
}

@media (width > 36rem) and (max-height: 29rem) {
  .page {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .home-page .profile > section {
    margin-block-start: 0.625rem;
  }

  .home-page .work-links {
    gap: 0;
  }
}
