/* ==========================================================================
   COMPONENTS — Buttons, Cards, Forms, Badges
   ========================================================================== */

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-family: var(--font-body);
    font-size: var(--fs-small);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn--primary {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border: 2px solid var(--accent-gold);
}

@media (hover: hover) {

    .btn--primary:hover,
    .btn--primary:focus-visible {
        background: transparent;
        color: var(--accent-gold);
        box-shadow: var(--shadow-gold);
    }
}

.btn--outline {
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

@media (hover: hover) {

    .btn--outline:hover,
    .btn--outline:focus-visible {
        background: var(--accent-gold);
        color: var(--bg-primary);
        box-shadow: var(--shadow-gold);
    }
}

.btn--ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

@media (hover: hover) {

    .btn--ghost:hover,
    .btn--ghost:focus-visible {
        border-color: var(--accent-gold);
        color: var(--accent-gold);
    }
}

.btn--icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ── Portfolio Card ───────────────────────────────────────────────────────── */

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
    }
}

.project-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card__link--no-click {
    cursor: default;
}

.project-card__image {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

@media (hover: hover) {
    .project-card:hover .project-card__image {
        transform: scale(1.05);
    }
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.75) 40%,
            rgba(0, 0, 0, 0.4) 70%,
            transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-md);
    /* Always visible - no opacity transition */
}

.project-card__category {
    font-size: var(--fs-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.6);
}

.project-card__title {
    font-family: var(--font-heading);
    font-size: var(--fs-h4);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.5);
}

.project-card__meta {
    font-size: var(--fs-small);
    color: var(--text-secondary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ── News List Item (Google News Style) ────────────────────────────────────────────────────────────── */

.news-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: var(--space-md);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

@media (hover: hover) {
    .news-list-item:hover {
        border-color: var(--accent-gold);
        background: rgba(255, 255, 255, 0.02);
    }

    .news-list-item:hover .news-list-item__title {
        text-decoration: underline;
    }
}

.news-list-item__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.news-list-item__source {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.news-list-item__favicon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    padding: 3px;
    border: 1px solid var(--border);
}

.news-list-item__source-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.news-list-item__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.news-list-item__excerpt {
    font-size: var(--fs-small);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-list-item__date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Removed .news-list-item__image since we use an RSS text feed. */

@media (max-width: 767px) {
    .news-list-item {
        padding: 1rem;
    }

    .news-list-item__title {
        font-size: 1.05rem;
    }
}

/* ── Utility Classes ─────────────────────────────────────────────────────── */
.is-hidden {
    display: none !important;
}

/* ── Resume Timeline ──────────────────────────────────────────────────────── */

.resume-table {
    width: 100%;
    border-collapse: collapse;
}

.resume-table th {
    font-family: var(--font-body);
    font-size: var(--fs-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--accent-gold);
    text-align: left;
    padding: var(--space-sm) var(--space-sm) var(--space-sm) 0;
    border-bottom: 1px solid var(--accent-gold);
}

.resume-table td {
    font-size: var(--fs-body);
    padding: var(--space-sm) var(--space-sm) var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
}

.resume-table tr:hover td {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.resume-table td:first-child {
    color: var(--text-primary);
    font-weight: 500;
}

.resume-table td:last-child {
    color: var(--text-muted);
    font-size: var(--fs-small);
}

/* ── Badge ────────────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    font-size: var(--fs-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    background: var(--accent-glow);
}

/* ── Social Icons ─────────────────────────────────────────────────────────── */

.social-links {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

@media (hover: hover) {

    .social-link:hover,
    .social-link:focus-visible {
        border-color: var(--accent-gold);
        color: var(--accent-gold);
        box-shadow: var(--shadow-gold);
        transform: translateY(-3px);
    }
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ── Video Facade (Lazy YouTube) ──────────────────────────────────────────── */

.video-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.video-facade__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

@media (hover: hover) {
    .video-facade:hover .video-facade__thumbnail {
        transform: scale(1.03);
    }
}

.video-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

@media (hover: hover) {
    .video-facade:hover .video-facade__play {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 60px rgba(201, 168, 76, 0.4);
    }
}

.video-facade__play svg {
    width: 28px;
    height: 28px;
    fill: var(--bg-primary);
    margin-left: 4px;
    /* Visual centering for play triangle */
}

.video-facade__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    transition: background var(--transition-base);
}

@media (hover: hover) {
    .video-facade:hover .video-facade__overlay {
        background: rgba(0, 0, 0, 0.15);
    }
}

.video-facade iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Gallery Grid ─────────────────────────────────────────────────────────── */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-sm);
}

.gallery-grid__item {
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
}

.gallery-grid__item img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

@media (hover: hover) {
    .gallery-grid__item:hover img {
        transform: scale(1.05);
    }
}

/* ── Filter Tabs (Portfolio) ──────────────────────────────────────────────── */

.filter-tabs {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.filter-tab {
    font-size: var(--fs-small);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

@media (hover: hover) {
    .filter-tab:hover {
        border-color: var(--accent-gold);
        color: var(--accent-gold);
        background: var(--accent-glow);
    }
}

.filter-tab--active {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: var(--accent-glow);
}

/* ── Animations ───────────────────────────────────────────────────────────── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* ── Lightbox Tweaks ──────────────────────────────────────────────────────── */

.lightbox__caption {
    display: none !important;
}