/* Skip to Comments Button - Matching dark mode toggle style */
.skip-to-comments {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--text-heading-secondary), var(--text-heading));
  color: var(--bg-primary);
  border: 2px solid var(--border-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, pointer-events 0.5s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  opacity: 0.8;
  text-decoration: none;
}

.skip-to-comments:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 3px 6px rgba(0, 0, 0, 0.15);
  opacity: 1;
  text-decoration: none;
}

.skip-to-comments:active {
  transform: scale(0.95);
}

.skip-to-comments:focus {
  outline: 2px solid var(--text-link, var(--copper, #a8763e));
  outline-offset: 2px;
}

.skip-to-comments::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skip-to-comments:hover::before {
  opacity: 1;
}

/* Dark mode styling - no changes needed, uses CSS variables */

/* Lights-out mode */
[data-theme="lights-out"] .skip-to-comments {
  background: #000000;
  border: 2px solid #333333;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

[data-theme="lights-out"] .skip-to-comments:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.08);
}

/* Hide on pages without comments */
body:has(.comments-section) .skip-to-comments {
  display: flex;
}

body:not(:has(.comments-section)) .skip-to-comments {
  display: none;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .skip-to-comments {
    bottom: 1.5rem;
    left: 1.5rem;
    /* Use viewport width for responsive sizing on mobile */
    width: calc(12vw + 2rem);  /* Minimum 2rem, scales with viewport */
    height: calc(12vw + 2rem);
    max-width: 5rem;  /* Cap at 5rem for tablets */
    max-height: 5rem;
  }
}

/* Extra small devices (phones in portrait) */
@media screen and (max-width: 480px) {
  .skip-to-comments {
    width: calc(15vw + 2rem);  /* Even larger on very small screens */
    height: calc(15vw + 2rem);
  }
}

/* Icon styling */
.skip-to-comments .icon-comments {
  font-size: 1.3rem;
}