@layer components {
  /* ==========================================================================
     Content components - matching Jekyll styles
     ========================================================================== */

  /* ==========================================================================
     Profile picture
     ========================================================================== */

.profile-picture {
  width: var(--profile-picture-size);
  height: var(--profile-picture-size);
  border-radius: var(--border-radius-percent);
  object-fit: cover;
  margin-bottom: var(--block-space);
  transition: transform 0.3s ease;

  @media (any-hover: hover) {
    &:hover {
      transform: scale(1.05);
    }
  }
}

/* ==========================================================================
   Post & Page containers
   ========================================================================== */

.post,
.page {
  margin-bottom: var(--block-space-triple);
}

.post-title,
.page-title {
  font-size: var(--text-title-1);
  margin-bottom: var(--block-space);
}

.post-meta {
  color: var(--color-ink-light);
  margin-bottom: var(--block-space);
  font-size: var(--text-footnote);
}

/* ==========================================================================
   Post list items
   ========================================================================== */

.post-item {
  display: flex;
  align-items: baseline;
  margin-bottom: var(--block-space);
  text-decoration: none;
  border-bottom: none;

  &:hover {
    border-bottom: none;
  }
}

.post-item-meta {
  color: var(--color-ink-light);
  font-size: var(--text-caption);
  font-weight: 200;
  min-width: calc(var(--block-space) * 4);
  margin-right: var(--block-space);
}

.post-item-title {
  font-size: var(--text-body);
  margin: 0 0 var(--block-space-half);
  color: var(--color-ink);
}

.post-item:hover .post-item-title {
  text-decoration: underline;
}

/* ==========================================================================
   Post cards
   ========================================================================== */

.post-card {
  padding: var(--block-space-1-5);
  margin-bottom: var(--block-space-double);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: box-shadow 0.3s ease;

  @media (any-hover: hover) {
    &:hover {
      box-shadow: var(--shadow-md);
    }
  }
}

.post-card__title {
  font-size: var(--text-title-2);
  margin-bottom: var(--block-space-half);
}

.post-card__meta {
  color: var(--color-ink-light);
  font-size: var(--text-caption);
  margin-bottom: var(--block-space);
}

.post-card__excerpt {
  color: var(--color-ink-light);
  line-height: 1.6;
}

/* ==========================================================================
   Linktree style
   ========================================================================== */

.linktree-container {
  display: flex;
  flex-direction: column;
  gap: var(--block-space-7-8);
  max-width: var(--content-width);
  margin: var(--block-space-double) auto;
  padding: 0 var(--block-space);
}

.linktree-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--block-space) var(--block-space-1-5);
  background-color: var(--color-ink-lightest);
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  text-align: center;
  min-height: var(--block-space-triple);
  position: relative;
  overflow: hidden;
  color: var(--color-ink);
  border-bottom: none;

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  &:hover {
    border-bottom: none;
  }
}

.linktree-text {
  font-size: var(--text-callout);
  font-weight: 600;
  color: inherit;
}

/* Hover effects only for devices with hover capability */
@media (any-hover: hover) and (pointer: fine) {
  .linktree-link:hover {
    background-color: var(--color-border);
    transform: scale(1.02);
  }
}

/* ==========================================================================
   Full width images
   ========================================================================== */

.full-width-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-percent);
  object-fit: cover;
  margin-bottom: var(--block-space);
  transition: transform 0.3s ease;

  @media (any-hover: hover) {
    &:hover {
      transform: scale(1.02);
    }
  }
}

/* ==========================================================================
   Responsive styles (small screens)
   ========================================================================== */

@media (max-width: 640px) {
  .linktree-container {
    padding: 0 var(--block-space);
    gap: var(--block-space-3-4);
  }

  .linktree-link {
    padding: var(--block-space-7-8) var(--block-space-1-25);
  }
}

} /* end @layer components */
