/* ===========================
   Sidebar
=========================== */
.sidebar {
  width: 140px;
  padding: 2rem;
  margin-left: 6rem;
  background: #ffffff;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #444;
  text-align: center;

  position: sticky;
  top: 80px;  
  transform: scale(0.87);
  transform-origin: top center;
}

/* Name */
.sidebar h3 {
  margin: 0.5rem 0 0;
}

/* Tagline */
.sidebar .tagline {
  margin: 0.5rem 0 1.5rem;
  font-size: 0.85rem;
  color: #666;
}

/* Contact section */
.sidebar .contact {
  margin-top: 1.5rem;
  padding-left: 1rem;
}

/* Contact items */
.sidebar .contact .contact-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 0.4rem 0;
  font-size: 0.8rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.sidebar .contact .contact-item svg {
  width: 14px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar .contact a.contact-item:hover {
  color: #000;
  text-decoration: underline;
}

/* ===========================
   Follow Button (Desktop Hidden)
=========================== */
.sidebar details.follow {
  display: none; /* hide on desktop */
}

/* ===========================
   Mobile Styles
=========================== */
@media (max-width: 768px) {

  .sidebar {
    width: 100%;
    max-height: none;
    margin: 0 0 1rem 0;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    position: relative;
    z-index: 100;
  }

  .sidebar img.profile-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
  }

  .sidebar .text-content { flex: 1; min-width: 0; padding-top: 0.5rem; }
  .sidebar h3 { margin: 0 0 4px 0; font-size: 1rem; font-weight: 700; line-height: 70%; }
  .sidebar .tagline { margin: 0; font-size: 0.8rem; line-height: 100%; }

  /* Mobile Follow button */
  .sidebar details.follow {
    display: block;
    margin-right: 33px;
    margin-top: 15px;
    cursor: pointer;
  }

  .sidebar details.follow summary {
    padding: 6px 12px;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    background: #000;
    border-radius: 4px;
    border: 1px solid #fff;
    list-style: none;
  }

  .sidebar details.follow summary::-webkit-details-marker,
  .sidebar details.follow summary::marker { display: none; }

  .sidebar details.follow[open] summary { background: #f0f0f0; color: #000; }

  /* Hide desktop contact on mobile */
  .sidebar .desktop-only { display: none; }

  /* Mobile fixed contact dropdown */
  .contact.mobile-fixed {
    display: none;
    position: fixed;
    top: 230px;
    right: 28px;
    flex-direction: column;
    gap: 3px;
    background: #fff;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 99999;
  }

  /* Show dropdown when open */
  .follow[open] .contact.mobile-fixed {
    display: flex;
    animation: fadeIn 0.2s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .contact.mobile-fixed .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
  }

  .contact.mobile-fixed .contact-item:hover {
    background: #f5f7fa;
  }

  .contact.mobile-fixed .contact-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
}
