/* Persona / marketing pages */
.persona-hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft, #1e2430);
}
.persona-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(111,179,210,.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(158,203,140,.08), transparent 50%);
  pointer-events: none;
}
.persona-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: .8rem;
  color: var(--accent, #6fb3d2);
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.persona-title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  max-width: 18ch;
}
.persona-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted, #9aa3b5);
  max-width: 42ch;
  margin-bottom: 1.75rem;
}
.persona-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* —— Author public profile (/author/{user}) —— */
.author-profile {
  margin-bottom: 3rem;
}

.author-hero {
  position: relative;
  padding: 2.5rem 0 0;
  overflow: hidden;
}
.author-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7.5rem;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent, #e3b341) 8%, transparent),
      transparent
    );
  pointer-events: none;
}
.author-hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  text-align: center;
}

.author-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.1rem;
}
.author-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border, #232838);
  background: var(--surface, #12161f);
  display: block;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .28);
}
.author-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 650;
  color: var(--accent, #e3b341);
  background: color-mix(in srgb, var(--accent, #e3b341) 12%, var(--surface, #12161f));
}
.author-badge {
  position: absolute;
  bottom: 2px;
  inset-inline-end: 2px;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--bg, #0b0e14);
  border: 2px solid var(--border, #232838);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #e3b341);
}
.author-badge.is-super { color: #e3b341; }
.author-badge.is-author { color: var(--accent, #e3b341); }
.author-badge-svg { width: .85rem; height: .85rem; }

.author-name {
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 .2rem;
  line-height: 1.2;
  color: var(--text, #e6e9f0);
}
.author-handle {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .85rem;
  color: var(--text-muted, #8b93a7);
  margin: 0 0 .85rem;
}

.author-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
  margin-bottom: 1rem;
}
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .72rem;
  font-weight: 500;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft, var(--border, #232838));
  background: transparent;
  color: var(--text-muted, #8b93a7);
}
.author-chip svg {
  width: .8rem;
  height: .8rem;
  opacity: .85;
}
.author-chip.super,
.author-chip.role {
  color: var(--accent, #e3b341);
  border-color: color-mix(in srgb, var(--accent, #e3b341) 35%, var(--border));
  background: color-mix(in srgb, var(--accent, #e3b341) 8%, transparent);
}
.author-chip.muted {
  border-color: transparent;
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.author-bio {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-muted, #8b93a7);
  max-width: 36rem;
  margin: 0 auto 1.15rem;
}
.author-bio-empty {
  opacity: .5;
  font-style: italic;
}

.author-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}
.author-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--border-soft, var(--border, #232838));
  background: var(--surface, #12161f);
  color: var(--text-muted, #8b93a7);
  text-decoration: none;
  transition: color .12s, border-color .12s, background .12s;
}
.author-social svg { width: 1rem; height: 1rem; display: block; }
.author-social:hover {
  color: var(--text, #e6e9f0);
  border-color: var(--border, #232838);
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
}
.author-social.as-x:hover { color: #e7e9ea; }
.author-social.as-linkedin:hover { color: #5b9fd4; }
.author-social.as-telegram:hover { color: #5bbcff; }
.author-social.as-github:hover { color: #c9d1d9; }
.author-social.as-instagram:hover { color: #e1306c; }
.author-social.as-web:hover { color: #34d399; }
.author-social.as-phone:hover { color: #a78bfa; }

.author-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.author-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.author-follow-btn svg {
  width: .95rem;
  height: .95rem;
}

.author-stats {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 28rem;
  margin: 0 auto;
  border: 1px solid var(--border-soft, var(--border, #232838));
  border-radius: 14px;
  background: var(--surface, #12161f);
  overflow: hidden;
}
.author-stat {
  flex: 1;
  padding: .9rem .75rem;
  text-align: center;
  border-inline-start: 1px solid var(--border-soft, var(--border, #232838));
}
.author-stat:first-child { border-inline-start: 0; }
.author-stat .num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text, #e6e9f0);
  line-height: 1.2;
}
.author-stat .lbl {
  font-size: .7rem;
  color: var(--text-muted, #8b93a7);
  margin-top: .2rem;
  letter-spacing: .02em;
}
.author-stat-icon { display: none; }

.author-body {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 1.75rem !important;
}
.author-posts-head {
  margin-bottom: 1rem;
}
.author-posts-head h2 {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 .2rem;
  color: var(--text, #e6e9f0);
}
.author-section-icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--accent, #e3b341);
  opacity: .9;
}

.author-empty {
  padding: 2.75rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--border-soft, var(--border, #232838));
  border-radius: 14px;
  color: var(--text-muted, #8b93a7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
}
.author-empty-icon {
  width: 2.25rem;
  height: 2.25rem;
  opacity: .35;
}

.author-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-soft, var(--border, #232838));
  background: var(--surface, #12161f);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.author-post-card:hover {
  border-color: color-mix(in srgb, var(--accent, #e3b341) 35%, var(--border));
  transform: translateY(-2px);
}
.author-post-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  min-height: 0;
}
.author-post-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg, #0b0e14);
}
.author-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.author-post-card:hover .author-post-cover img {
  transform: scale(1.03);
}
.author-post-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #e3b341) 6%, var(--bg, #0b0e14));
  color: var(--text-muted, #8b93a7);
  opacity: .5;
}
.author-post-cover-empty svg { width: 1.75rem; height: 1.75rem; }

.author-post-body {
  padding: 1rem 1.05rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.author-post-body .eyebrow {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent, #e3b341);
  opacity: .9;
}
.author-post-title {
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.35;
  margin: 0;
  color: var(--text, #e6e9f0);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.author-post-summary {
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-muted, #8b93a7);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.author-post-meta {
  font-size: .72rem;
  color: var(--text-faint, #5c6478);
  margin-top: .35rem;
}

.author-post-actions {
  display: flex;
  gap: .35rem;
  padding: 0 1.05rem 0.9rem;
}
.author-iv-link {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .2rem .5rem;
  border-radius: 6px;
  border: 1px solid var(--border-soft, var(--border));
  color: var(--text-muted, #8b93a7);
  text-decoration: none;
  transition: color .12s, border-color .12s;
}
.author-iv-link:hover {
  color: var(--accent, #e3b341);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

@media (max-width: 576px) {
  .author-hero-inner { padding-bottom: 1.5rem; }
  .author-avatar { width: 88px; height: 88px; }
  .author-stats { max-width: 100%; }
}

html[data-theme="light"] .author-hero::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
}
html[data-theme="light"] .author-social {
  background: var(--surface, #fff);
}

/* —— Author contribution graph (GitHub-style) —— */
.author-contrib {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}
.author-contrib-card {
  border: 1px solid var(--border-soft, var(--border, #232838));
  border-radius: 14px;
  background: var(--surface, #12161f);
  padding: 1rem 1.1rem 1.1rem;
}
.author-contrib-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}
.author-contrib-summary {
  margin: 0;
  font-size: .9rem;
  color: var(--text-muted, #8b93a7);
}
.author-contrib-summary strong {
  color: var(--text, #e6e9f0);
  font-weight: 650;
}
.author-contrib-years {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
@media (min-width: 720px) {
  .author-contrib-years { flex-direction: row; gap: .25rem; }
}
.author-contrib-year {
  font-size: .78rem;
  font-weight: 600;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  padding: .28rem .65rem;
  border-radius: 8px;
  color: var(--text-muted, #8b93a7);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color .12s, background .12s, border-color .12s;
}
.author-contrib-year:hover {
  color: var(--text, #e6e9f0);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.author-contrib-year.is-active {
  color: #fff;
  background: #238636;
  border-color: color-mix(in srgb, #238636 60%, transparent);
}
.author-contrib-graph-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .25rem;
}
.author-contrib-graph { display: inline-block; min-width: 100%; }
.author-contrib-months {
  display: grid;
  grid-template-columns: repeat(var(--weeks, 53), 12px);
  gap: 3px;
  margin: 0 0 .35rem 28px;
  font-size: .65rem;
  color: var(--text-muted, #8b93a7);
  height: 1rem;
}
.author-contrib-month { white-space: nowrap; overflow: visible; }
.author-contrib-body { display: flex; gap: 6px; }
.author-contrib-dowl {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  font-size: .6rem;
  color: var(--text-muted, #8b93a7);
  width: 22px;
  flex-shrink: 0;
  align-items: center;
}
.author-contrib-dowl span { line-height: 12px; height: 12px; }
.author-contrib-cells {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  grid-auto-columns: 12px;
  gap: 3px;
}
.author-contrib-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 8%, var(--bg, #0b0e14));
  border: 1px solid color-mix(in srgb, var(--text) 4%, transparent);
  box-sizing: border-box;
}
.author-contrib-cell.is-out { opacity: .35; }
.author-contrib-cell.level-0 { background: color-mix(in srgb, var(--text) 7%, var(--bg, #0b0e14)); }
.author-contrib-cell.level-1 { background: #0e4429; border-color: transparent; }
.author-contrib-cell.level-2 { background: #006d32; border-color: transparent; }
.author-contrib-cell.level-3 { background: #26a641; border-color: transparent; }
.author-contrib-cell.level-4 { background: #39d353; border-color: transparent; }
html[data-theme="light"] .author-contrib-cell.level-0 { background: #ebedf0; border-color: rgba(27,31,35,.06); }
html[data-theme="light"] .author-contrib-cell.level-1 { background: #9be9a8; }
html[data-theme="light"] .author-contrib-cell.level-2 { background: #40c463; }
html[data-theme="light"] .author-contrib-cell.level-3 { background: #30a14e; }
html[data-theme="light"] .author-contrib-cell.level-4 { background: #216e39; }
.author-contrib-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: .75rem;
  font-size: .68rem;
  color: var(--text-muted, #8b93a7);
}
.author-contrib-legend .author-contrib-cell { width: 11px; height: 11px; }
.author-activity { margin-top: 1.75rem; }
.author-activity-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 1rem;
  color: var(--text, #e6e9f0);
}
.author-activity-month { margin-bottom: 1.5rem; }
.author-activity-month-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted, #8b93a7);
  margin: 0 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border-soft, var(--border, #232838));
}
.author-activity-item { display: flex; gap: .75rem; padding: .35rem 0 .85rem; }
.author-activity-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-soft, var(--border, #232838));
  background: var(--surface, #12161f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #8b93a7);
  margin-top: .1rem;
}
.author-activity-headline {
  margin: 0 0 .4rem;
  font-size: .9rem;
  font-weight: 550;
  color: var(--text, #e6e9f0);
}
.author-activity-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.author-activity-posts li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .75rem;
  font-size: .85rem;
}
.author-activity-posts a {
  color: var(--accent, #58a6ff);
  text-decoration: none;
}
.author-activity-posts a:hover { text-decoration: underline; }
.author-activity-date {
  font-size: .72rem;
  color: var(--text-faint, #5c6478);
}
@media (max-width: 576px) {
  .author-contrib-years { flex-direction: row; flex-wrap: wrap; }
  .author-contrib-card { padding: .85rem; }
}
