/* ==========================================================================
   Publieke linkpagina
   Kleuren via CSS-variabelen; stijl via classes op <body>:
   btn-{fill|outline|shadow|soft|glass|underline}  shape-{square|rounded|pill}
   bg-{color|gradient|image}  align-{center|left}
   avatar-{circle|rounded|square}  avatar-{sm|md|lg}
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); background-attachment: fixed; color: var(--text);
  font: 16px/1.5 var(--font-family); -webkit-font-smoothing: antialiased;
  min-height: 100vh; position: relative;
  --radius: 14px; --avatar: 104px;
}

/* Achtergrondfoto met vervaging en donkere laag */
.bg-photo { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg-solid); }
.bg-photo::before {
  content: ''; position: absolute; inset: calc(var(--bg-blur) * -2);
  background: var(--bg-image) center / cover no-repeat; filter: blur(var(--bg-blur));
}
.bg-photo::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--bg-dim)); }
body.bg-image { background: transparent; }

.page { width: min(580px, 100% - 32px); margin: 0 auto; padding: 56px 0 40px; display: flex; flex-direction: column; align-items: center; min-height: 100vh; }

/* Profiel ---------------------------------------------------------------- */
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
.avatar { width: var(--avatar); height: var(--avatar); border-radius: 50%; object-fit: cover; margin-bottom: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, .12); flex: none; }
.avatar-fallback { display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-text); font-size: calc(var(--avatar) * .34); font-weight: 700; border: 2px solid var(--text); }
body.btn-glass .avatar-fallback { background: rgba(255, 255, 255, .18); color: var(--text); border-color: rgba(255, 255, 255, .55); }
body.btn-outline .avatar-fallback, body.btn-underline .avatar-fallback { background: transparent; color: var(--text); }
body.avatar-sm { --avatar: 80px; }
body.avatar-lg { --avatar: 144px; }
body.avatar-rounded .avatar { border-radius: 24%; }
body.avatar-square .avatar { border-radius: 6px; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.bio { opacity: .85; margin: 0 0 22px; max-width: 32em; white-space: pre-line; font-size: 15px; }

body.align-left .profile { align-items: flex-start; text-align: left; }
body.align-left .socials { justify-content: flex-start; width: 100%; }
body.align-left .link { justify-content: flex-start; text-align: left; padding-left: 20px; }
body.align-left .link.has-media { padding-left: 64px; }
body.align-left .section-title { text-align: left; }

/* Socials ---------------------------------------------------------------- */
.socials { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 0 0 26px; padding: 0; list-style: none; }
.links + .socials { margin: 30px 0 0; }
.socials a { display: grid; place-items: center; width: 34px; height: 34px; color: var(--text); opacity: .9; transition: transform .15s, opacity .15s; border-radius: 50%; }
.socials a:hover { transform: translateY(-2px) scale(1.06); opacity: 1; }
.socials svg { width: 24px; height: 24px; }

/* Links ------------------------------------------------------------------ */
.links { list-style: none; margin: 0; padding: 0; width: 100%; }
.links li + li { margin-top: 14px; }
.section-title { padding-top: 14px; text-align: center; }
.links li.section-title + li { margin-top: 10px; }
.section-title h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }

body.shape-square { --radius: 4px; }
body.shape-rounded { --radius: 14px; }
body.shape-pill { --radius: 999px; }

.link {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 58px; padding: 12px 56px; color: var(--btn-text); text-decoration: none;
  font-weight: 600; font-size: 15.5px; border-radius: var(--radius); word-break: break-word;
  transition: transform .15s ease, box-shadow .15s ease, background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.link:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.link-icon, .link-thumb { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
.link-icon { width: 40px; height: 40px; display: grid; place-items: center; }
.link-icon svg { width: 22px; height: 22px; }
.link-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: calc(var(--radius) * .6); }
body.shape-pill .link-thumb { border-radius: 50%; }

/* Gevuld */
body.btn-fill .link { background: var(--btn-bg); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
body.btn-fill .link:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }

/* Omlijnd */
body.btn-outline .link { background: transparent; border: 2px solid var(--btn-text); }
body.btn-outline .link:hover { background: var(--btn-text); color: var(--bg-solid); }

/* Harde schaduw (brutalist) */
body.btn-shadow .link { background: var(--btn-bg); border: 2px solid var(--btn-shadow); box-shadow: 5px 5px 0 var(--btn-shadow); }
body.btn-shadow .link:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--btn-shadow); }
body.btn-shadow .link:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--btn-shadow); }

/* Zacht 3D */
body.btn-soft .link { background: var(--btn-bg); box-shadow: 0 6px 0 var(--btn-shadow), 0 10px 18px rgba(0, 0, 0, .12); margin-bottom: 6px; }
body.btn-soft .link:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--btn-shadow), 0 14px 22px rgba(0, 0, 0, .14); }
body.btn-soft .link:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--btn-shadow), 0 4px 8px rgba(0, 0, 0, .1); }

/* Glas */
body.btn-glass .link {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
body.btn-glass .link:hover { background: rgba(255, 255, 255, .26); transform: translateY(-2px); }

/* Onderstreept */
body.btn-underline .link { background: transparent; border-radius: 0; border-bottom: 2px solid var(--btn-text); min-height: 52px; }
body.btn-underline .link:hover { background: color-mix(in srgb, var(--btn-text) 8%, transparent); }
body.btn-underline .links li + li { margin-top: 6px; }

/* Uitgelichte links ------------------------------------------------------- */
.link.hl-pulse { animation: lp-pulse 2s ease-in-out infinite; }
.link.hl-wiggle { animation: lp-wiggle 3.2s ease-in-out infinite; }
.link.hl-shine { overflow: hidden; }
.link.hl-shine::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); animation: lp-shine 3s ease-in-out infinite;
}
@keyframes lp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes lp-wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-2.2deg); } 88% { transform: rotate(2.2deg); } 92% { transform: rotate(-1.4deg); } 96% { transform: rotate(1deg); } }
@keyframes lp-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

.empty { opacity: .7; text-align: center; font-size: 14px; }

.footer { margin-top: auto; padding-top: 48px; text-align: center; font-size: 12.5px; }
.footer a { color: var(--text); opacity: .7; text-decoration: none; font-weight: 600; }
.footer a:hover { opacity: 1; }

.owner-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10;
  display: flex; gap: 8px; align-items: center; background: #17161a; color: #f7f5f0; padding: 8px 8px 8px 16px;
  border-radius: 999px; font: 500 13px system-ui, sans-serif; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); white-space: nowrap;
}
.owner-bar a { color: #17161a; background: #f7f5f0; padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; }

.offline { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 32px; background: #f7f5f0; color: #17161a; font-family: system-ui, sans-serif; }
.offline h1 { font-size: 22px; }
.offline p { color: #4a4850; max-width: 26em; margin: 8px auto 20px; }
.offline a { display: inline-block; background: #17161a; color: #f7f5f0; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; }

@media (max-width: 420px) {
  .link { padding-left: 52px; padding-right: 52px; font-size: 15px; }
  body.align-left .link.has-media { padding-left: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .link, .socials a { transition: none; }
  .link.hl-pulse, .link.hl-wiggle, .link.hl-shine::after { animation: none; }
}
