@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: #0d0d0d;
  color: #e8e8e8;
  font-family: "Source Serif 4", Georgia, serif;
  font-optical-sizing: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
}

main {
  position: relative;
  width: min(100%, 44rem);
  padding: 3rem 1.5rem;
  text-align: center;
}

p {
  max-width: 38ch;
  margin: 0 auto;
  color: #c2c2c2;
  font-size: clamp(1.125rem, 1.25vw + 0.875rem, 1.375rem);
  line-height: 1.6;
  text-wrap: pretty;
}

a {
  padding-block: 0.2rem;
  color: #e8e8e8;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

.email-contact {
  position: relative;
  display: inline-block;
}

.copy-tooltip {
  --tooltip-radius: 2px;
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  z-index: 1;
  width: max-content;
  padding: 0.25rem 0.5rem;
  border-radius: var(--tooltip-radius);
  background: #c2c2c2;
  color: #0d0d0d;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
}

.copy-tooltip:not(:empty) {
  opacity: 1;
}

.copy-tooltip::after {
  position: absolute;
  top: calc(100% - var(--tooltip-radius) * 0.5);
  left: 50%;
  width: calc(var(--tooltip-radius) * 8);
  height: calc(var(--tooltip-radius) * 3);
  background: inherit;
  clip-path: path("M0 0H16V1H14A2 2 0 0 0 12.5857864376 1.5857864376L9.4142135624 4.7573593129A2 2 0 0 1 6.5857864376 4.7573593129L3.4142135624 1.5857864376A2 2 0 0 0 2 1H0Z");
  content: "";
  transform: translateX(-50%);
}

.copy-feedback {
  position: absolute;
  top: calc(100% - 2.25rem);
  left: 1.5rem;
  right: 1.5rem;
  color: #c2c2c2;
  font-size: 0.875rem;
  line-height: 1.5;
}

#email-address {
  width: 100%;
  max-width: 20rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #c2c2c2;
  border-radius: 0.25rem;
  background: #0d0d0d;
  color: #e8e8e8;
  font: inherit;
  text-align: center;
}

::selection {
  background: #e8e8e8;
  color: #0d0d0d;
}
