body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Instrument Serif", serif;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow-x: hidden;
  padding: 0.75rem 0 max(1.25rem, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

* {
  box-sizing: inherit;
}

/* prevent selection only on decorative/icon elements */
.logo-wrap,
.logo,
.github-link,
.github-icon {
  user-select: none;
  -webkit-user-select: none;
}

/* prevent image dragging/long-press */
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #1a1a1a;
  padding: 1rem;
  max-width: 90vw;
  box-sizing: border-box;
}

.logo-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem auto;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #eeeeee;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.logo {
  width: 60px;
  height: 60px;
  display: block;
  object-fit: contain;
}

h1 {
  font-size: 4rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.02em;
}

.content p {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: #666;
  font-style: italic;
  line-height: 1.2;
}

.footer {
  width: min(100%, 56rem);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  box-sizing: border-box;
}

.footer-text {
  font-family:
    "Instrument Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: clamp(0.82rem, 0.78rem + 0.35vw, 0.95rem);
  font-style: normal;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
}

.footer-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  white-space: nowrap;
}

.footer-divider {
  color: #eee;
  margin: 0 0.25rem;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  text-align: center;
}

.email-link {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.email-link:hover {
  color: #1a1a1a;
}

.email-link:focus-visible,
.github-link:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 3px;
  border-radius: 4px;
}

.github-link {
  display: flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.github-icon {
  width: 1.2rem;
  height: 1.2rem;
  filter: grayscale(1) opacity(0.6);
  transition: filter 0.3s ease;
}

.github-link:hover {
  transform: scale(1.1) rotate(5deg);
}

.github-link:hover .github-icon {
  filter: grayscale(0) opacity(1);
}

@media (max-width: 860px) {
  .footer-text {
    flex-wrap: wrap;
  }

  .footer-line {
    flex-wrap: wrap;
    white-space: normal;
  }
}

@media (max-width: 736px) {
  .footer-divider {
    display: none;
  }

  .footer-line,
  .footer-contact {
    flex-basis: 100%;
    justify-content: center;
    text-align: center;
  }

  .footer-contact {
    display: flex;
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .logo {
    width: 40px;
    height: 40px;
  }

  .logo-wrap {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .content p {
    font-size: 1.1rem;
  }

  .footer {
    padding: 0 1.25rem;
  }

  .footer-text {
    font-size: clamp(0.68rem, 0.6rem + 0.7vw, 0.8rem);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    line-height: 1.3;
  }

  .footer-line {
    flex-basis: auto;
    max-width: 30ch;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
    gap: 0.3rem;
    text-wrap: balance;
  }

  .footer-contact {
    flex-basis: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .footer-divider {
    display: none;
  }

  .email-link {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .github-icon {
    width: 1.1rem;
    height: 1.1rem;
  }
}

@media (max-width: 420px) {
  .footer-text {
    font-size: clamp(0.62rem, 0.58rem + 0.6vw, 0.72rem);
    line-height: 1.2;
  }

  .github-icon {
    width: 1rem;
    height: 1rem;
  }
}
