:root {
  --background: #ffffff;
  --text: #111111;
  --muted: #555555;
  --border: #1d1d1d;
  --hover-background: #111111;
  --hover-text: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--background);
  color: var(--text);

  font-family:
    Helvetica Neue,
    Helvetica,
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
  width: 100%;

  padding:
    clamp(32px, 5vw, 72px)
    clamp(24px, 7vw, 110px)
    32px;

  display: flex;
  flex-direction: column;
}

.hero {
  width: 100%;
  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.name {
  margin: 0;

  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.name span {
  display: block;
}

.intro {
  margin-top: clamp(40px, 5vw, 72px);
}

.tagline {
  margin: 0;

  font-size: clamp(1.7rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.location {
  margin: 28px 0 0;

  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.links {
  margin-top: clamp(48px, 6vw, 82px);

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.link-card {
  min-height: 88px;
  padding: 24px 22px;

  border: 1.5px solid var(--border);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  text-decoration: none;

  font-size: 1.05rem;
  font-weight: 600;

  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  background: var(--hover-background);
  color: var(--hover-text);
  transform: translateY(-3px);
}

.link-card:focus-visible {
  outline: 3px solid #999999;
  outline-offset: 4px;
}

.arrow {
  font-size: 1.5rem;
  font-weight: 400;

  transition: transform 180ms ease;
}

.link-card:hover .arrow,
.link-card:focus-visible .arrow {
  transform: translateX(5px);
}

.footer {
  margin-top: 56px;

  color: var(--muted);
  font-size: 0.8rem;
}

.footer p {
  margin: 0;
}

/* Tablet */

@media (max-width: 900px) {
  .links {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */

@media (max-width: 600px) {
  .page {
    padding:
      28px
      20px
      24px;
  }

  .hero {
    justify-content: flex-start;
    padding-top: 10vh;
  }

  .name {
    font-size: clamp(4rem, 20vw, 7rem);
    line-height: 0.85;
  }

  .intro {
    margin-top: 38px;
  }

  .tagline {
    font-size: 1.8rem;
    line-height: 1.05;
  }

  .location {
    margin-top: 22px;
  }

  .links {
    margin-top: 48px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .link-card {
    min-height: 72px;
  }

  .footer {
    margin-top: 42px;
  }
}

.thing-links {
  margin-top: 28px;

  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.thing-links a {
  color: inherit;

  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;

  transition: opacity 180ms ease;
}

.thing-links a:hover,
.thing-links a:focus-visible {
  opacity: 0.55;
}

/* 404 */

.error-page {
  min-height: 80vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.error-code {
  margin: 0 0 24px;

  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.07em;
}

.error-title {
  margin: 0;

  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.error-copy {
  max-width: 600px;
  margin: 28px 0 0;

  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.error-link {
  display: inline-block;
  width: fit-content;
  margin-top: 42px;
  padding: 18px 22px;

  border: 1.5px solid var(--border);

  color: var(--text);
  text-decoration: none;
  font-weight: 600;

  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.error-link:hover,
.error-link:focus-visible {
  background: var(--text);
  color: var(--background);
  transform: translateY(-3px);
}

/* 404 page */

.error-layout {
  flex: 1;

  min-height: calc(100vh - 120px);

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}

.error-content {
  max-width: 760px;
}

.error-code {
  margin: 0;

  font-size: clamp(7rem, 12vw, 11rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.07em;
}

.error-heading {
  max-width: 680px;
  margin: 48px 0 0;

  font-size: clamp(2.6rem, 4vw, 4.4rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.error-message {
  max-width: 560px;
  margin: 28px 0 0;

  color: var(--muted);

  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.5;
}

.error-home {
  width: fit-content;
  min-width: 200px;

  margin-top: 34px;
  padding: 18px 22px;

  border: 1.5px solid var(--border);

  color: var(--text);
  text-decoration: none;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  font-weight: 700;

  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.error-home:hover,
.error-home:focus-visible {
  background: var(--text);
  color: var(--background);
  transform: translateY(-3px);
}

.error-dog {
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-dog img {
  display: block;

  width: min(100%, 460px);
  height: auto;

  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.1));
}


/* Tablet */

@media (max-width: 900px) {
  .error-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 56px 0;
  }

  .error-dog {
    justify-content: flex-start;
  }

  .error-dog img {
    width: min(75%, 440px);
  }
}


/* Mobile */

@media (max-width: 600px) {
  .error-layout {
    padding: 42px 0;
    gap: 44px;
  }

  .error-code {
    font-size: clamp(6rem, 30vw, 8rem);
  }

  .error-heading {
    margin-top: 34px;

    font-size: clamp(2.3rem, 11vw, 3.6rem);
  }

  .error-message {
    margin-top: 22px;
  }

  .error-home {
    width: 100%;
  }

  .error-dog img {
    width: 100%;
    max-width: 420px;
  }
}

