/* avive.tech — öffentliche Seite */

:root {
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, .78);
  --tint: #79838d;
  --tint-2: #b9c2c9;

  --shell: min(400px, 100% - 3rem);
  --pill-h: 54px;

  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  background: #151a1e;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255, 255, 255, .82); color: #151a1e; }

:focus-visible { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: 3px; }

img { max-width: 100%; display: block; }
svg { display: block; }

/* ───────────── Hintergrund ───────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #151a1e;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(1.12) contrast(1.06);
}

/* Kräftig genug abdunkeln, dass die helleren Knöpfe darauf klar hervortreten */
.scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 17, 21, .74) 0%, rgba(13, 17, 21, .60) 32%, rgba(11, 15, 18, .58) 66%, rgba(9, 12, 15, .78) 100%),
    radial-gradient(120% 66% at 50% 0%, rgba(8, 11, 14, .34), transparent 62%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────────── Gerüst ───────────── */

.shell {
  position: relative;
  width: var(--shell);
  margin-inline: auto;
  min-height: 100svh;
  padding: clamp(3.25rem, 9vh, 5rem) 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Zurückhaltender Auftritt — nur ein weiches Aufblenden, sonst nichts */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.head > *,
.stack > *,
.socials,
.foot {
  animation: rise .7s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 55ms + 60ms);
}

/* ───────────── Kopf ───────────── */

.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.head > *:nth-child(1) { --i: 0; }
.head > *:nth-child(2) { --i: 1; }
.head > *:nth-child(3) { --i: 2; }

.avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .82), 0 8px 26px -12px rgba(0, 0, 0, .8);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-letter {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
}

.name {
  margin: 1.05rem 0 0;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}

.tagline {
  margin: .55rem 0 0;
  max-width: 30ch;
  font-size: .845rem;
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink-soft);
  text-wrap: balance;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}

/* ───────────── Knöpfe ───────────── */

.stack {
  width: 100%;
  margin-top: 2.15rem;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: var(--pill-h);
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: color-mix(in srgb, var(--tint) 72%, transparent);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .95);
  transition: background .28s var(--ease), transform .28s var(--ease), border-color .28s var(--ease);
}

.pill-label {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.3;
}

.pill-sub {
  font-size: .74rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, .68);
}

@media (hover: hover) {
  .pill:hover {
    background: color-mix(in srgb, var(--tint) 88%, transparent);
    border-color: rgba(255, 255, 255, .24);
    transform: translateY(-2px);
  }
}

.pill:active { transform: scale(.985); }

.pill.is-highlight {
  background: rgba(255, 255, 255, .9);
  border-color: transparent;
  color: #14191d;
}
.pill.is-highlight .pill-sub { color: rgba(20, 25, 29, .66); }

@media (hover: hover) {
  .pill.is-highlight:hover { background: #fff; }
}

/* Kleines Symbol links, nur wenn eines hinterlegt ist */
.pill-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  opacity: .9;
}
.pill-icon img { width: 100%; height: 100%; object-fit: contain; }

/* ───────────── Überschrift und Trennlinie ───────────── */

.b-header {
  width: 100%;
  margin: 1.5rem 0 .1rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, .62);
}

.stack > .b-header:first-child { margin-top: 0; }

.b-divider {
  width: 46px;
  height: 1px;
  margin: 1.15rem auto;
  background: rgba(255, 255, 255, .34);
}
.b-divider span { display: none; }

/* ───────────── Projektkacheln ───────────── */

.tile-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

@media (max-width: 380px) { .tile-grid { grid-template-columns: minmax(0, 1fr); } }

.tile {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  background: color-mix(in srgb, var(--tint) 40%, transparent);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  color: var(--ink);
  text-decoration: none;
  transition: transform .3s var(--ease), border-color .28s var(--ease);
}

@media (hover: hover) {
  .tile:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .28); }
}

.tile-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, .07);
  position: relative;
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; }

.tile-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .4);
}

.tile-body { padding: 11px 14px 13px; text-align: center; }

.tile-title {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-sub {
  display: -webkit-box;
  margin-top: 2px;
  font-size: .7rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .66);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ───────────── Profil-Symbole ───────────── */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-top: 2.15rem;
}

.social {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
  color: var(--ink);
  text-decoration: none;
  opacity: .94;
  transition: transform .28s var(--ease), opacity .25s;
}

.social svg { width: 100%; height: 100%; }

/* Geholte Symbole werden zur weissen Silhouette, damit die Reihe einheitlich bleibt */
.social img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.social > span {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
}

@media (hover: hover) {
  .social:hover { transform: translateY(-2px) scale(1.06); opacity: 1; }
}
.social:active { transform: scale(.92); }

/* ───────────── Leerer Zustand und Fuss ───────────── */

.empty-state {
  width: 100%;
  margin-top: 2.15rem;
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255, 255, 255, .6);
  border: 1px dashed rgba(255, 255, 255, .22);
  border-radius: 20px;
}
.empty-state p { margin: 0; }
.empty-dot { display: none; }

.foot {
  margin-top: auto;
  padding-top: 2.5rem;
}

.share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, .72);
  font: inherit;
  font-size: .72rem;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .28s var(--ease);
}

.share svg { width: 13px; height: 13px; }

@media (hover: hover) {
  .share:hover { background: rgba(255, 255, 255, .13); color: #fff; border-color: rgba(255, 255, 255, .3); }
}
.share:active { transform: scale(.96); }

/* ───────────── Hinweis ───────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  padding: 9px 17px;
  border-radius: 999px;
  background: rgba(18, 23, 27, .9);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: .76rem;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ───────────── Rücksichtnahmen ───────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .1s !important;
  }
}
