/* ===== Portfolio page ===== */

/* Push the "Visit site" link to the bottom, so cards line up */
.portfolio .project-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.portfolio .project-info h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 0.25rem 0 0.75rem;
}

/* Client project / My own build: a tag hanging on a silk thread */
.project-tag {
    position: absolute;
    top: 0;
    right: 1.5rem;
    z-index: 3;                       /* above the screenshot and the shine */
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;     /* swings from where the thread is tied */
    animation: tag-sway 2.4s ease-in-out infinite alternate;
    pointer-events: none;
}

.tag-thread {
    height: 1.75rem;
    border-left: 1.5px dashed var(--off-white);
}

.tag-label {
    padding: 0.4rem 0.75rem 0.4rem 1.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    /* a gift-tag shape: pointed on the left */
    clip-path: polygon(0.6rem 0, 100% 0, 100% 100%, 0.6rem 100%, 0 50%);
}

.tag-client .tag-label { background: var(--mint); }
.tag-mine .tag-label   { background: var(--butter); }

@keyframes tag-sway {
    from { transform: rotate(-4deg); }
    to   { transform: rotate(4deg); }
}

/* Visitors who prefer less motion: the tag just hangs still */
@media (prefers-reduced-motion: reduce) {
    .project-tag {
        animation: none;
    }
}

/* Visit site ↗ */
.project-link {
    margin-top: auto;            /* sits at the bottom of the card */
    padding-top: 1rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    position: relative;
    z-index: 3;                  /* above the shine, so it's always clickable */
}

.project-link:hover,
.project-link:focus-visible {
    text-decoration-color: var(--mint);
}
