/* HiBio Public Page — Base Styles (theme-agnostic) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; color: var(--hb-text, #fff); font-family: var(--hb-font, system-ui, sans-serif); font-weight: var(--hb-fontWeight, 400); letter-spacing: var(--hb-letterSpacing, normal); background-size: cover; background-position: center; background-attachment: fixed; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Page Shell ─────────────────────────────────────────────────────────────── */
.hbio-page { display: flex; flex-direction: column; min-height: 100dvh; }
.hbio-main { width: min(100%, var(--hb-contentWidth, 560px)); margin: 0 auto; padding: 0 0 100px; }

/* ── Profile Header ─────────────────────────────────────────────────────────── */
.hbio-header { text-align: center; }

.hbio-cover {
  width: 100%;
  height: var(--hb-coverHeight, 160px);
  background: linear-gradient(135deg, var(--hb-primary, #ff5420), var(--hb-secondary, #31333d));
  background-size: cover;
  background-position: center;
}
.hbio-cover--empty {
  background: linear-gradient(135deg, var(--hb-primary, #ff5420) 0%, var(--hb-surface, #1b1c22) 100%);
}

.hbio-header-body { padding: 0 20px 16px; }

.hbio-avatar-wrap { margin-top: calc(var(--hb-avatarSize, 88px) / -2); margin-bottom: 10px; }
.hbio-avatar {
  width: var(--hb-avatarSize, 88px);
  height: var(--hb-avatarSize, 88px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--hb-background, #101114);
  background: var(--hb-surface, #1b1c22);
  margin: 0 auto;
}
.hbio-avatar--placeholder {
  width: var(--hb-avatarSize, 88px);
  height: var(--hb-avatarSize, 88px);
  border-radius: 50%;
  background: var(--hb-surface, #1b1c22);
  border: 4px solid var(--hb-background, #101114);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--hb-muted, #888);
}
.hbio-avatar--placeholder i { width: 36px; height: 36px; }

.hbio-title {
  font-size: var(--hb-titleSize, clamp(22px, 5vw, 28px));
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--hb-text, #fff);
}

/* İlgili metinlere büyük/küçük harf dönüşümü (text-transform) */
.hbio-title, .hbio-bio, .hbio-link-label,
.hbio-heading h1, .hbio-heading h2 { text-transform: var(--hb-textTransform, none); }

.hbio-bio {
  font-size: var(--hb-bioSize, 14px);
  line-height: 1.55;
  color: var(--hb-muted, #888);
  max-width: 360px;
  margin: 0 auto;
}

/* ── Blocks Container ───────────────────────────────────────────────────────── */
.hbio-blocks { display: flex; flex-direction: column; gap: var(--hb-blockGap, 10px); padding: 20px 16px 0; }
.hbio-block { width: 100%; }

/* ── Link Card ──────────────────────────────────────────────────────────────── */
.hbio-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  background: var(--hb-surface, #1b1c22);
  border-radius: var(--hb-radius, 14px);
  border: var(--hb-linkBorderWidth, 1px) solid rgba(255,255,255,.08);
  text-decoration: none;
  color: var(--hb-text, #fff);
  font-weight: 600;
  font-size: var(--hb-linkSize, 15px);
  transition: transform .15s, opacity .15s, box-shadow .15s, background .15s, border-color .15s;
  cursor: pointer;
}
.hbio-link-card:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,.25); opacity: .92; }
.hbio-link-card:active { transform: translateY(0); }

.hbio-link-thumb { flex-shrink: 0; width: 40px; height: 40px; border-radius: calc(var(--hb-radius, 14px) - 4px); overflow: hidden; }
.hbio-link-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hbio-link-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: rgba(255,255,255,.1); border-radius: 8px; }
.hbio-link-icon i { width: 18px; height: 18px; }

.hbio-link-label { flex: 1; text-align: center; }

.hbio-link-arrow { flex-shrink: 0; opacity: .4; }
.hbio-link-arrow i { width: 16px; height: 16px; }

/* ── Collection Block ───────────────────────────────────────────────────────── */
.hbio-collection { width: 100%; }
.hbio-collection-title {
  font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--hb-muted, #888); margin-bottom: 10px; padding: 0 2px;
}
.hbio-coll-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--hb-surface, #1b1c22);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--hb-radius, 14px);
  color: var(--hb-text, #fff);
  text-decoration: none;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hbio-coll-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.hbio-coll-thumb {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); overflow: hidden;
}
.hbio-coll-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hbio-coll-thumb--empty i { width: 22px; height: 22px; color: var(--hb-muted, #888); }
.hbio-coll-thumb--empty i[class*="cib-"] { width: auto; height: auto; font-size: 22px; }
.hbio-coll-label { font-weight: 600; font-size: 14px; }

/* Grid */
.hbio-collection--grid .hbio-collection-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hbio-collection--grid .hbio-coll-item { flex-direction: column; align-items: stretch; gap: 0; }
.hbio-collection--grid .hbio-coll-thumb { width: 100%; aspect-ratio: 16 / 10; }
.hbio-collection--grid .hbio-coll-label { padding: 10px 12px; text-align: center; }

/* Stack */
.hbio-collection--stack .hbio-collection-items { display: flex; flex-direction: column; gap: 8px; }
.hbio-collection--stack .hbio-coll-item { padding: 8px 12px; min-height: 56px; }
.hbio-collection--stack .hbio-coll-thumb { width: 40px; height: 40px; border-radius: 8px; }
.hbio-collection--stack .hbio-coll-label { flex: 1; }

/* Carousel (yatay kaydırma + snap) */
.hbio-collection--carousel .hbio-collection-items {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; -webkit-overflow-scrolling: touch;
}
.hbio-collection--carousel .hbio-coll-item {
  flex: 0 0 62%; flex-direction: column; align-items: stretch; gap: 0; scroll-snap-align: start;
}
.hbio-collection--carousel .hbio-coll-thumb { width: 100%; aspect-ratio: 16 / 10; }
.hbio-collection--carousel .hbio-coll-label { padding: 10px 12px; }

/* Showcase (büyük görsel kartlar) */
.hbio-collection--showcase .hbio-collection-items { display: flex; flex-direction: column; gap: 14px; }
.hbio-collection--showcase .hbio-coll-item { position: relative; flex-direction: column; align-items: stretch; gap: 0; }
.hbio-collection--showcase .hbio-coll-thumb { width: 100%; aspect-ratio: 16 / 9; }
.hbio-collection--showcase .hbio-coll-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 14px 12px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
}

/* ── Social Icons Row ───────────────────────────────────────────────────────── */
.hbio-block--socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.hbio-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hb-surface, #1b1c22);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--hb-text, #fff);
  text-decoration: none;
  transition: transform .15s, background .15s;
}
.hbio-social-icon:hover { transform: scale(1.1); background: var(--hb-primary, #ff5420); }
.hbio-social-icon i { width: 22px; height: 22px; }
/* CoreUI brand glyph'leri (font-glyph) font-size ile boyutlanır */
.hbio-social-icon i[class*="cib-"] { width: auto; height: auto; font-size: 22px; line-height: 1; }
.hbio-share-btn i[class*="cib-"] { width: auto; height: auto; font-size: 18px; line-height: 1; }

/* ── Heading Block ──────────────────────────────────────────────────────────── */
.hbio-heading { padding: 8px 4px 2px; }
.hbio-heading h1, .hbio-heading h2, .hbio-heading h3 {
  color: var(--hb-text, #fff);
  font-weight: 700;
  line-height: 1.2;
}
.hbio-heading h1 { font-size: 24px; }
.hbio-heading h2 { font-size: 20px; }
.hbio-heading h3 { font-size: 16px; letter-spacing: .5px; text-transform: uppercase; color: var(--hb-muted, #888); }

.hbio-heading--line hr { margin-top: 8px; border: none; border-top: 1px solid rgba(255,255,255,.12); }

/* ── Text Block ─────────────────────────────────────────────────────────────── */
.hbio-text { padding: 4px 0; }
.hbio-text p { color: var(--hb-muted, #888); font-size: 14px; line-height: 1.7; }

/* ── Embed Block ────────────────────────────────────────────────────────────── */
.hbio-embed { border-radius: var(--hb-radius, 14px); overflow: hidden; background: var(--hb-surface, #1b1c22); }
.hbio-embed iframe { width: 100%; display: block; border: none; }
.hbio-embed--empty { padding: 20px; text-align: center; color: var(--hb-muted, #888); font-size: 13px; }

/* ── Media Block ────────────────────────────────────────────────────────────── */
.hbio-media { border-radius: var(--hb-radius, 14px); overflow: hidden; background: var(--hb-surface, #1b1c22); }
.hbio-media--image img { width: 100%; }
.hbio-media--video video { width: 100%; }
.hbio-media-caption { padding: 8px 12px; font-size: 12px; color: var(--hb-muted, #888); }

/* ── Form Block ─────────────────────────────────────────────────────────────── */
.hbio-form-block {
  background: var(--hb-surface, #1b1c22);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--hb-radius, 14px);
  padding: 20px 16px;
}
.hbio-form-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--hb-text, #fff);
}
.hbio-contact-form { display: flex; flex-direction: column; gap: 10px; }
.hbio-contact-form input,
.hbio-contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--hb-text, #fff);
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  resize: vertical;
}
.hbio-contact-form input::placeholder,
.hbio-contact-form textarea::placeholder { color: var(--hb-muted, #666); }
.hbio-contact-form input:focus,
.hbio-contact-form textarea:focus { border-color: var(--hb-primary, #ff5420); }
.hbio-contact-form button {
  background: var(--hb-primary, #ff5420);
  color: #fff;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 14px;
  transition: opacity .15s;
}
.hbio-contact-form button:hover { opacity: .85; }
.hbio-contact-form button:disabled { opacity: .5; cursor: not-allowed; }
.hbio-form-status { font-size: 13px; color: var(--hb-primary, #ff5420); text-align: center; }

/* ── Divider Block ──────────────────────────────────────────────────────────── */
.hbio-divider { padding: 4px 0; }
.hbio-divider--line hr { border: none; border-top: 1px solid rgba(255,255,255,.12); }
.hbio-divider--dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0; }
.hbio-divider--dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.2); }
.hbio-divider--space { height: 24px; }

/* ── Branding ───────────────────────────────────────────────────────────────── */
.hbio-powered { text-align: center; padding: 20px 0 8px; }
.hbio-powered a { font-size: 11px; color: rgba(255,255,255,.3); text-decoration: none; letter-spacing: .5px; }
.hbio-powered a:hover { color: rgba(255,255,255,.6); }

/* ── Share Buttons ──────────────────────────────────────────────────────────── */
.hbio-share {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hbio-share-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.hbio-share.is-open .hbio-share-actions {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.hbio-share-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hb-primary, #ff5420);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: transform .2s ease, background .15s;
}
.hbio-share-fab:hover { transform: scale(1.06); }
.hbio-share.is-open .hbio-share-fab { transform: rotate(90deg); }
.hbio-share-fab i { width: 20px; height: 20px; }
.hbio-share-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s;
}
.hbio-share-copy:hover { background: rgba(255,255,255,.2); }
.hbio-share-copy i { width: 16px; height: 16px; }
.hbio-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  font-size: 13px;
  transition: background .15s;
}
.hbio-share-btn:hover { background: rgba(255,255,255,.22); }
.hbio-share-btn i { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   Kişiselleştirme Varyantları (body[data-*] preset'leri)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Avatar şekli ────────────────────────────────────────────────────────────── */
body[data-avatar-shape="rounded"] .hbio-avatar,
body[data-avatar-shape="rounded"] .hbio-avatar--placeholder { border-radius: 24%; }
body[data-avatar-shape="square"] .hbio-avatar,
body[data-avatar-shape="square"] .hbio-avatar--placeholder { border-radius: 14px; }

/* ── Link stili ──────────────────────────────────────────────────────────────── */
body[data-link-style="outline"] .hbio-link-card {
  background: transparent;
  border-color: var(--hb-primary, #ff5420);
}
body[data-link-style="outline"] .hbio-link-icon { background: rgba(255,255,255,.06); }
body[data-link-style="soft"] .hbio-link-card {
  background: color-mix(in srgb, var(--hb-primary, #ff5420) 14%, transparent);
  border-color: color-mix(in srgb, var(--hb-primary, #ff5420) 28%, transparent);
}

/* ── Link taban gölgesi ──────────────────────────────────────────────────────── */
body[data-link-shadow="soft"] .hbio-link-card { box-shadow: 0 4px 14px rgba(0,0,0,.18); }
body[data-link-shadow="strong"] .hbio-link-card { box-shadow: 0 10px 30px rgba(0,0,0,.35); }

/* ── Link hover efektleri ────────────────────────────────────────────────────── */
body[data-link-hover="none"] .hbio-link-card:hover {
  transform: none; box-shadow: none; opacity: 1;
}
body[data-link-hover="scale"] .hbio-link-card:hover {
  transform: scale(1.025); box-shadow: 0 6px 22px rgba(0,0,0,.22); opacity: 1;
}
body[data-link-hover="glow"] .hbio-link-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px var(--hb-primary, #ff5420), 0 8px 28px color-mix(in srgb, var(--hb-primary, #ff5420) 45%, transparent);
  opacity: 1;
}
body[data-link-hover="fill"] .hbio-link-card:hover {
  transform: translateY(-1px);
  background: var(--hb-primary, #ff5420);
  border-color: var(--hb-primary, #ff5420);
  color: #fff;
  opacity: 1;
}
body[data-link-hover="fill"] .hbio-link-card:hover .hbio-link-icon { background: rgba(255,255,255,.22); }

/* ── Sosyal ikon şekli ───────────────────────────────────────────────────────── */
body[data-social-shape="rounded"] .hbio-social-icon { border-radius: 14px; }
body[data-social-shape="square"] .hbio-social-icon { border-radius: 8px; }

/* ── Sosyal ikon stili ───────────────────────────────────────────────────────── */
body[data-social-style="outline"] .hbio-social-icon {
  background: transparent;
  border-color: var(--hb-primary, #ff5420);
}
body[data-social-style="outline"] .hbio-social-icon:hover {
  background: var(--hb-primary, #ff5420);
}
