/* ==================== COMPONENTS ==================== */

.skip-link {
  position: fixed;
  z-index: 20;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-text);
  color: var(--color-page);
  font-size: var(--font-size-sm);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.profile-avatar {
  display: grid;
  width: clamp(5.5rem, 10vw, 7.5rem);
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: var(--color-surface-hover);
  box-shadow: 0 1rem 3rem var(--color-shadow);
}

.profile-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar__fallback {
  color: var(--color-text-subtle);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3rem 0.65rem;
  border: 1px solid rgb(16 185 129 / 24%);
  border-radius: var(--radius-pill);
  background: var(--color-brand-soft);
  color: var(--color-brand-emphasis);
  font-size: var(--font-size-xs);
  font-weight: 500;
  white-space: nowrap;
}

.status-badge__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-brand);
}

.theme-toggle {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  cursor: pointer;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.theme-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.theme-toggle__icon--moon,
[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

.content-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: 0 0.75rem 2.5rem transparent;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.card-meta {
  display: block;
  color: var(--color-brand-emphasis);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-link-label {
  display: block;
  margin-top: auto;
  padding-top: var(--space-8);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25rem;
  transition: text-decoration-color var(--transition-fast);
}

.empty-state {
  display: grid;
  min-height: 13rem;
  place-items: center;
  padding: var(--space-6);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--color-surface) 55%, transparent);
  text-align: center;
}

.empty-state p {
  max-width: 18rem;
  color: var(--color-text-subtle);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

@media (hover: hover) {
  .theme-toggle:hover {
    border-color: var(--color-border);
    background: var(--color-surface);
  }

  .content-card:hover {
    border-color: rgb(16 185 129 / 42%);
    background: var(--color-card-hover);
    box-shadow: 0 0.75rem 2.5rem var(--color-shadow);
    transform: translateY(-2px);
  }

  .content-card:hover .card-link-label {
    text-decoration-color: currentColor;
  }
}
