/* Selbst gehostete Schriften (keine Google-Fonts-Anfragen) */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope/manrope-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope/manrope-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope/manrope-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope/manrope-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/playfair/playfair-display-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/playfair/playfair-display-latin-700-normal.woff2") format("woff2");
}

/* Basis ------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.4;
}

.page {
  width: 100%;
  max-width: 600px;
  padding: 0 0 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Profil ------------------------------------------------------------------ */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 28px;
}

.profile--classic {
  padding: 56px 24px 0;
  padding-top: max(56px, env(safe-area-inset-top));
  animation: rise 0.5s ease both;
}

.profile--hero {
  gap: 10px;
}

.hero {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: -80px;
  -webkit-mask-image: radial-gradient(
    110% 96% at 50% 0%,
    #000 50%,
    rgba(0, 0, 0, 0.99) 54.68%,
    rgba(0, 0, 0, 0.97) 58.79%,
    rgba(0, 0, 0, 0.94) 62.4%,
    rgba(0, 0, 0, 0.9) 65.61%,
    rgba(0, 0, 0, 0.85) 68.52%,
    rgba(0, 0, 0, 0.79) 71.2%,
    rgba(0, 0, 0, 0.72) 73.75%,
    rgba(0, 0, 0, 0.65) 76.25%,
    rgba(0, 0, 0, 0.57) 78.8%,
    rgba(0, 0, 0, 0.48) 81.48%,
    rgba(0, 0, 0, 0.39) 84.39%,
    rgba(0, 0, 0, 0.3) 87.6%,
    rgba(0, 0, 0, 0.2) 91.21%,
    rgba(0, 0, 0, 0.1) 95.32%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    110% 96% at 50% 0%,
    #000 50%,
    rgba(0, 0, 0, 0.99) 54.68%,
    rgba(0, 0, 0, 0.97) 58.79%,
    rgba(0, 0, 0, 0.94) 62.4%,
    rgba(0, 0, 0, 0.9) 65.61%,
    rgba(0, 0, 0, 0.85) 68.52%,
    rgba(0, 0, 0, 0.79) 71.2%,
    rgba(0, 0, 0, 0.72) 73.75%,
    rgba(0, 0, 0, 0.65) 76.25%,
    rgba(0, 0, 0, 0.57) 78.8%,
    rgba(0, 0, 0, 0.48) 81.48%,
    rgba(0, 0, 0, 0.39) 84.39%,
    rgba(0, 0, 0, 0.3) 87.6%,
    rgba(0, 0, 0, 0.2) 91.21%,
    rgba(0, 0, 0, 0.1) 95.32%,
    rgba(0, 0, 0, 0) 100%
  );
}

.hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--btn);
  box-shadow: 0 0 0 4px var(--accent), 0 16px 40px -12px rgba(0, 0, 0, 0.35);
}

.avatar--initials {
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.title--serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 9vw, 2.5rem);
}

.title--sans {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 7vw, 1.75rem);
}

.bio {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 24px;
  max-width: 48ch;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Links ------------------------------------------------------------------- */

.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px;
}

.link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 64px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--btn);
  border: 1px solid var(--btn-border);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
  animation: rise 0.5s ease both;
  animation-delay: calc(60ms + var(--i, 0) * 50ms);
}

.link:hover,
.link:focus-visible {
  background: var(--btn-hover);
  transform: scale(1.02);
  outline: none;
}

.link:focus-visible {
  box-shadow: var(--shadow), 0 0 0 2px var(--accent);
}

.link:active {
  transform: scale(0.99);
}

.link__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--text);
}

.link__icon svg {
  width: 28px;
  height: 28px;
}

.link__emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.link__text {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-wrap: anywhere;
}

.link__subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 0 24px;
}

/* Social-Icons ------------------------------------------------------------ */

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding: 0 24px;
}

.social {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text);
  transition: background 0.15s ease, transform 0.15s ease;
}

.social svg {
  width: 32px;
  height: 32px;
}

.social:hover,
.social:focus-visible {
  background: var(--btn);
  transform: scale(1.08);
  outline: none;
}

/* Footer ------------------------------------------------------------------ */

.footer {
  margin-top: auto;
  padding: 56px 24px 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text);
}

.footer__text {
  margin: 0 0 8px;
  color: var(--muted);
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.legal-links a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}

.legal-links a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Rechtliche Seiten ------------------------------------------------------- */

.page--legal {
  padding: 32px 24px 32px;
  padding-top: max(32px, env(safe-area-inset-top));
}

.back {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 20px;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
}

.back:hover {
  opacity: 1;
  text-decoration: underline;
}

.legal {
  background: var(--btn);
  border: 1px solid var(--btn-border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  line-height: 1.6;
  font-size: 0.95rem;
}

.legal h1 {
  margin: 0 0 16px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: 1.9rem;
}

.legal h2 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.legal p {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

/* Desktop ----------------------------------------------------------------- */

@media (min-width: 640px) {
  .page {
    padding-top: 40px;
  }
  .hero {
    border-radius: 24px 24px 0 0;
    overflow: hidden;
  }
  .page--legal {
    padding-top: 40px;
  }
}

/* Animation --------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile--classic,
  .link {
    animation: none;
    transition: none;
  }
  .link:hover,
  .social:hover {
    transform: none;
  }
}
