/* Author bio box at the bottom of V2 pages. Reskins the slotfruit_author_box
   shortcode markup with CCS design tokens so it sits in the page rhythm.
   Markup we're styling:
     <div class="sf-author-box">
       <div class="sf-avatar"><img ... /></div>
       <div class="sf-meta">
         <div class="sf-name">…</div>
         <div class="sf-title">…</div>
         <div class="sf-bio">…</div>
         <button class="sf-bio-toggle">Read more</button>
         <div class="sf-links"><a>View author profile</a></div>
       </div>
     </div>
*/

body.ccs-rev-fullwidth .ccs-author-box-wrap {
  margin: 0 0 32px;
}

body.ccs-rev-fullwidth .sf-author-box {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: start;
  background: #fff;
  border: 0;
  border-radius: var(--ccs-radius-xl);
  box-shadow: var(--ccs-shadow-card);
  padding: 32px;
  margin: 0;
}

body.ccs-rev-fullwidth .sf-author-box .sf-avatar {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ccs-primary-fixed, #f3e9ff);
}
body.ccs-rev-fullwidth .sf-author-box .sf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

body.ccs-rev-fullwidth .sf-author-box .sf-meta {
  min-width: 0;
  font-family: var(--ccs-font-display, "Hanken Grotesk"), system-ui, sans-serif;
  line-height: 1.5;
}

body.ccs-rev-fullwidth .sf-author-box .sf-name {
  font-family: var(--ccs-font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ccs-primary);
  margin: 0 0 4px;
  line-height: 1.2;
}

body.ccs-rev-fullwidth .sf-author-box .sf-title {
  font-family: var(--ccs-font-label, "Inter"), system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ccs-outline);
  margin: 0 0 16px;
  opacity: 1;
}

body.ccs-rev-fullwidth .sf-author-box .sf-bio {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ccs-on-surface-variant);
  max-height: 6.6em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}
body.ccs-rev-fullwidth .sf-author-box .sf-bio p {
  margin: 0 0 12px;
}
body.ccs-rev-fullwidth .sf-author-box .sf-bio p:last-child { margin-bottom: 0; }
body.ccs-rev-fullwidth .sf-author-box .sf-bio.sf-bio-expanded {
  max-height: 200em;
}
body.ccs-rev-fullwidth .sf-author-box .sf-bio:not(.sf-bio-expanded)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2em;
  background: linear-gradient(transparent, #fff);
}

body.ccs-rev-fullwidth .sf-author-box .sf-bio-toggle {
  display: inline-block;
  background: none;
  border: 0;
  padding: 0;
  margin: 8px 0 0;
  cursor: pointer;
  color: var(--ccs-primary);
  font-family: var(--ccs-font-display);
  font-size: 14px;
  font-weight: 700;
}
body.ccs-rev-fullwidth .sf-author-box .sf-bio-toggle:hover {
  text-decoration: underline;
}

body.ccs-rev-fullwidth .sf-author-box .sf-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}
body.ccs-rev-fullwidth .sf-author-box .sf-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ccs-primary);
  font-family: var(--ccs-font-display);
  font-weight: 700;
  text-decoration: none;
}
body.ccs-rev-fullwidth .sf-author-box .sf-links a::before {
  content: "→";
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.15s ease;
}
body.ccs-rev-fullwidth .sf-author-box .sf-links a:hover {
  text-decoration: underline;
}
body.ccs-rev-fullwidth .sf-author-box .sf-links a:hover::before {
  transform: translateX(2px);
}

/* Tablet/mobile: stack avatar above text */
@media (max-width: 600px) {
  body.ccs-rev-fullwidth .sf-author-box {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
    text-align: left;
  }
  body.ccs-rev-fullwidth .sf-author-box .sf-avatar {
    width: 72px;
    height: 72px;
  }
  body.ccs-rev-fullwidth .sf-author-box .sf-name {
    font-size: 18px;
  }
}
