/* --- New Showcase Section --- */
.showcase-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.showcase-item {
    background-color: var(--linkBg);
    border-radius: var(--borderRadius);
    border: 1px solid var(--borderColor);
    transition: all var(--transitionSpeed) ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Important for the expand/collapse animation */
}

.showcase-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.showcase-cover {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.showcase-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transitionSpeed) ease;
}

.showcase-item:hover .showcase-cover img {
    transform: scale(1.05);
}

.showcase-intro {
    flex-grow: 1;
}

.showcase-intro h3 {
    margin: 0 0 5px 0;
    color: var(--textColorHover);
    font-size: 1.1rem;
}

.showcase-intro p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--textColor);
}

.showcase-details {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: max-height 0.5s ease-in-out, opacity 0.4s ease-in-out, transform 0.4s ease-in-out, visibility 0s 0.5s linear, padding 0.5s ease-in-out;
    padding: 0 20px; /* No top/bottom padding when collapsed */
}

.showcase-item.expanded {
    border-color: var(--accentColorHover);
    box-shadow: 0 5px 15px var(--shadowColor);
}

.showcase-item.expanded .showcase-details {
    max-height: 1500px; /* A large value to allow content to expand */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s, 0.1s, 0.1s, 0s, 0s;
    padding: 0 20px 20px; /* Add padding back when expanded */
}

.showcase-details .long-description {
    margin-top: 0;
    padding-top: 15px;
    border-top: 1px solid var(--borderColor);
    font-size: 0.95rem;
    line-height: 1.6;
}

.showcase-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.showcase-screenshots img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid var(--borderColor);
}

/* --- New YouTube Preview Link Styles --- */
.youtube-preview {
    display: block;
    position: relative;
    border-radius: var(--borderRadius);
    overflow: hidden;
    border: 1px solid var(--borderColor);
    transition: all var(--transitionSpeed) ease;
    margin-top: 20px;
}

.youtube-preview:hover {
    border-color: var(--accentColor);
    transform: scale(1.02);
    box-shadow: 0 5px 15px var(--shadowColor);
}

.youtube-preview img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity var(--transitionSpeed) ease;
}

.youtube-preview:hover img {
    opacity: 0.85;
}

.youtube-preview .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all var(--transitionSpeed) ease;
    pointer-events: none;
}

.youtube-preview:hover .play-icon {
    color: #FF0000;
    transform: translate(-50%, -50%) scale(1.1);
}


/* --- Header Profile Picture Button --- */
.profile-picture-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 25px;
    position: relative;
    transition: transform var(--transitionSpeed) ease;
    -webkit-tap-highlight-color: transparent;
}

.profile-picture-button img {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--borderColor);
    transition: border-color var(--transitionSpeed) ease;
}

.profile-picture-button:hover img,
.profile-picture-button:focus img {
    border-color: var(--accentColor);
}

.profile-picture-button:focus {
    outline: 2px solid var(--accentColor);
    outline-offset: 4px;
}

.profile-picture-button:active {
    transform: scale(0.98);
}

/* --- Links Section --- */
.links-container {
    width: 100%;
}

.link-section {
    margin-bottom: 40px;
}

.link-section h2 {
    font-family: var(--fontSecondary);
    color: var(--textColorHover);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--borderColor);
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-section h2 i {
    color: var(--accentColor);
}

.link-section nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--linkBg);
    color: var(--textColor);
    border: 1px solid var(--borderColor);
    border-radius: var(--borderRadius);
    font-size: 1rem;
    padding: 14px 18px;
    text-decoration: none;
    transition: all var(--transitionSpeed) ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    opacity: 0; /* Initial state for JS animation */
    transform: translateY(10px); /* Initial state for JS animation */
}

.link-item i.fa-fw {
    width: 1.25em;
    text-align: center;
    color: var(--accentColor);
    transition: transform var(--transitionSpeed) ease;
}

.link-item:hover,
.link-item:focus {
    background-color: var(--linkBgHover);
    color: var(--textColorHover);
    border-color: var(--accentColorHover);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 15px var(--shadowColor);
    outline: none;
}

.link-item:hover i,
.link-item:focus i {
    transform: scale(1.1);
}

/* --- Footer Hashtag --- */
.animated-hashtag {
    font-family: var(--fontSecondary);
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(90deg, var(--accentColor), var(--textColorHover), var(--accentColorHover), var(--accentColor));
    background-size: 250% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShine 4s linear infinite;
}

@keyframes textShine {
    to { background-position: -250% center; }
}

/* --- Popup Modal --- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transitionSpeed) ease, visibility 0s var(--transitionSpeed) linear;
    padding: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.popup-content {
    position: relative;
    background-color: var(--bgColorEnd);
    border: 1px solid var(--borderColor);
    border-radius: var(--borderRadius);
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    opacity: 0;
    transition: transform var(--transitionSpeed) ease, opacity var(--transitionSpeed) ease;
    box-shadow: 0 10px 30px var(--shadowColor);
}

.popup-overlay.visible .popup-content {
    transform: scale(1);
    opacity: 1;
}

.popup-content img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 40px);
    object-fit: contain;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--textColorHover);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.6rem;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--transitionSpeed) ease, transform var(--transitionSpeed) ease;
    z-index: 10;
}

.popup-close:hover,
.popup-close:focus {
    background-color: var(--accentColor);
    transform: rotate(90deg);
    outline: none;
}