@font-face {
  font-family: "Söhne Buch";
  src: url("fonts/soehne-buch.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Söhne Mono Buch";
  src: url("fonts/soehne-mono-buch.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: light dark;

  /* Typography */
  --font-sans: "Söhne Buch", Arial, Helvetica, sans-serif;
  --font-mono: "Söhne Mono Buch", "Courier New", monospace;

  /* Layout and spacing */
  --content-width: 470px;
  --experience-width: 318px;
  --experience-label-width: 176px;
  --space-page: 32px;
  --space-page-mobile: 24px;
  --space-experience: 80px;
  --space-experience-mobile: 64px;
  --space-socials: 70px;
  --space-socials-mobile: 60px;
  --space-social-item: 12px;
  --row-height: 32px;

  /* Theme */
  --color-background: light-dark(#f5f5f5, #1e1e1e);
  --color-foreground: light-dark(#1e1e1e, #f5f5f5);
  --color-muted: light-dark(#b9b9b9, #505050);
  --color-decoration: light-dark(#cdcdcd, #3c3c3c);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  font-feature-settings: "ss02" 1;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  width: 100%;
  max-width: var(--content-width);
  min-height: 100svh;
  padding: var(--space-page);
}

h1,
p {
  margin: 0;
  font: inherit;
}

.experience {
  width: var(--experience-width);
  max-width: 100%;
  margin-top: var(--space-experience);
}

.row {
  display: grid;
  grid-template-columns: var(--experience-label-width) 1fr;
  align-items: center;
  min-height: var(--row-height);
}

.row span {
  font-family: var(--font-mono);
}

nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-social-item);
  margin-top: var(--space-socials);
}

a,
.copy-email__label--email {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--color-decoration);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 160ms ease;
}

a:hover,
.copy-email:not(.is-copied):hover .copy-email__label--email {
  text-decoration-color: var(--color-muted);
}

.changing-theme a,
.changing-theme .copy-email__label {
  transition: none;
}

a:focus-visible,
.copy-email:focus-visible {
  outline: 1px solid var(--color-foreground);
  outline-offset: 4px;
}

.copy-email {
  display: grid;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.copy-email__label {
  grid-area: 1 / 1;
  justify-self: start;
  transition: opacity 160ms ease;
}

.copy-email__label--email {
  transition:
    opacity 160ms ease,
    text-decoration-color 160ms ease;
}

.copy-email__label--copied,
.copy-email.is-copied .copy-email__label--email {
  opacity: 0;
}

.copy-email.is-copied .copy-email__label--copied {
  opacity: 1;
}

.copy-email.is-copied {
  cursor: default;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  main {
    padding: var(--space-page-mobile);
  }

  .experience {
    margin-top: var(--space-experience-mobile);
  }

  .row {
    grid-template-columns: var(--experience-label-width) 1fr;
  }

  nav {
    margin-top: var(--space-socials-mobile);
  }
}
