/* === Cover Grid (matches Fydar CoverGrid) === */
.cover-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 12px;
    margin: 12px 0;
    padding: 0;
}

@media screen and (min-width: 768px) {
    .cover-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* === CoverDate — each wraps ONE card (matches Fydar CoverDate) === */
.cover-date-label {
    font-size: 1.125em;
    font-weight: 500;
    width: 100%;
    height: 2.25em;
    margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 8px;
    box-sizing: border-box;
    position: relative;
    color: #8d8d8d;
}

.cover-date-label::before {
    content: '';
    position: absolute;
    background-color: #ffffff25;
    bottom: 0;
    left: 0;
    right: -12px;
    height: 3px;
}

.cover-date-label:not(:empty)::after {
    content: '';
    position: absolute;
    background-color: #ffffff25;
    bottom: 3px;
    left: 28px;
    width: 3px;
    height: 5px;
}

/* === Cover Card — 3D perspective hover (matches Fydar Cover) === */
.cover-card {
    display: block;
    position: relative;
    z-index: 1;
    cursor: pointer;
    perspective: 1000px;
    perspective-origin: 50% 50%;
    user-select: none;
    color: white;
}

/* Shadow behind card */
.cover-card::before {
    display: block;
    content: "";
    position: absolute;
    top: 2.5%;
    left: 2.5%;
    width: 95%;
    height: 95%;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 6px 12px 12px rgba(0, 0, 0, 0.4);
    will-change: opacity;
    transform-origin: top center;
    transform: skewX(.001deg);
    transition: transform 0.65s cubic-bezier(0.18, 0.9, 0.58, 1),
                opacity 0.65s cubic-bezier(0.18, 0.9, 0.58, 1);
    pointer-events: none;
}

.cover-card:hover::before {
    opacity: 0.6;
    transform: rotateX(7deg) translateY(-6px) scale(1.0325);
}

/* === Cover Image (the 3D tilting background) === */
.cover-image {
    position: relative;
    width: 100%;
    aspect-ratio: 6 / 9;
    overflow: hidden;
    background-color: #262a31;
    background-size: cover;

    transform-style: preserve-3d;
    transform-origin: top center;
    transform: skewX(0.001deg);
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.18, 0.9, 0.58, 1);
}

.cover-card:hover .cover-image {
    transform: rotateX(7deg) translateY(-6px);
}

/* === Shared image layer setup === */
.cover-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* prevents hover flicker */
}

/* === Default static image === */
.cover-img-static {
    opacity: 1;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* === Hover GIF image === */
.cover-img-hover {
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* === Hover crossfade === */
.cover-card:hover .cover-img-static {
    opacity: 0;
}

.cover-card:hover .cover-img-hover {
    opacity: 1;
}

@keyframes cover-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* === Tags Overlay (top-right) === */
.cover-tags {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    z-index: 2;
}

.cover-tag {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    font-size: 0.65rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

/* === Shine Overlay (matches Fydar cover-background::after) === */
.cover-shine {
    display: block;
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: linear-gradient(
        210deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.4) 35%,
        rgba(255, 255, 255, 0.2) 42%,
        rgba(255, 255, 255, 0) 60%
    );
    transform: translateY(-25%);
    will-change: transform;
    transition: transform 0.65s cubic-bezier(0.18, 0.9, 0.58, 1),
                opacity 0.65s cubic-bezier(0.18, 0.9, 0.58, 1);
    opacity: 0.325;
    pointer-events: none;
}

.cover-card:hover .cover-shine {
    transform: translateY(0%);
    opacity: 0.4;
}

/* === Cover Body (overlaid on image bottom) === */
.cover-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 3;
    background: rgba(22, 22, 24, 0.75);
}

.cover-title {
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cover-card:hover .cover-title {
    color: var(--accent);
}

.cover-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Cover Category (visible) === */
.cover-category {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.cover-category span {
    color: var(--accent);
}

.cover-category-icon {
    opacity: 0.5;
    flex-shrink: 0;
}

.cover-external-icon {
    margin-left: auto;
    opacity: 0.4;
}

/* === Pills / Tags (used in project detail) === */
.pill {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* === Section Heading with Hover Animation === */
.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.6rem;
    margin-bottom: 24px;
    position: relative;
}

.section-heading::after {
    display: none;
}

.heading-anchor {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.section-heading:hover .heading-anchor {
    opacity: 1;
    transform: translateX(0);
}

.heading-anchor:hover {
    color: var(--accent);
}

.heading-hash {
    font-weight: 400;
    font-size: 0.9em;
}

.heading-text {
    transition: color 0.25s ease;
}

.section-heading:hover .heading-text {
    color: var(--text-primary);
}

.heading-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 16px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.18, 0.9, 0.58, 1);
}

.section-heading:hover .heading-line {
    transform: scaleX(1);
}

/* === Project Detail === */
.project-detail {
    max-width: 800px;
}

.project-hero {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    background: var(--bg-tertiary);
}

.project-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.project-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.project-meta span {
    position: relative;
}

.project-meta span + span::before {
    content: '\00b7';
    position: absolute;
    left: -10px;
    color: var(--text-muted);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.project-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* === Award/Nominee Tag === */
.cover-tag--award {
    background: #eab308;
    border-color: #eab308;
    color: #000000;
}

/* === Filter Buttons === */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(196, 160, 255, 0.12);
    border-color: rgba(196, 160, 255, 0.4);
    color: #c4a0ff;
}

.filter-btn--gold.active {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.4);
    color: #eab308;
}

/* === Card visibility for filtering === */
.cover-date[data-filters].filter-hidden {
    display: none;
}

/* === Responsive === */
@media (max-width: 768px) {
    .project-title {
        font-size: 1.8rem;
    }

    .project-meta {
        gap: 8px;
    }

    .heading-anchor {
        opacity: 1;
        transform: translateX(0);
    }

    .heading-line {
        display: none;
    }

    .filter-bar {
        gap: 6px;
    }

    .filter-btn {
        padding: 5px 12px;
        font-size: 0.65rem;
    }
}

/* === Career Log === */
.career-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
}

.career-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 11px 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;

    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.88);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;

    transition: all 0.2s ease;
}

.career-cv-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}
.career-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.career-company-card--wide {
    grid-column: 1 / -1;
}

.career-company-card {
    background: #1e1e20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 24px;
}

.career-company-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.career-company-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #2a2a2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.career-company-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.career-company-link {
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

a.career-company-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.career-company-link--no-url {
    cursor: default;
    color: var(--text-muted);
}

.career-company-link--no-url:hover {
    color: var(--text-muted);
    text-decoration: none;
}

/* === Logo accent colors === */
.logo--blue {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.logo--green {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.logo--orange {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.3);
    color: #f97316;
}

.logo--red {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.logo--purple {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    color: #a855f7;
}

.career-role {
    padding-top: 0;
}

.career-role + .career-role {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.career-role-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.career-role-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.career-role-dates {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-family: monospace;
    letter-spacing: 0.02em;
}

.career-role-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.career-role-details li {
    position: relative;
    padding-left: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.career-role-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #eab308;
    border-radius: 2px;
}

.career-role-details li strong {
    color: #ffffff;
    font-weight: 600;
}

/* === Education Grid (Stats section) === */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.edu-card {
    background: #1e1e20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

a.edu-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.edu-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.edu-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;

    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden; /* VERY IMPORTANT */
    flex-shrink: 0;
}

/* logo images */
.edu-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* fills nicely */
    display: block;
}

.edu-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.edu-card-visit {
    font-size: 0.8rem;
    color: #3b82f6;
    letter-spacing: 0.03em;
}

a.edu-card:hover .edu-card-visit {
    text-decoration: underline;
}

.edu-card-location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.edu-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.edu-card-program {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edu-card-degree {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.edu-card-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.02em;
}

/* === More Section (GitHub, Steam) === */
.more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.more-card {
    background: #1e1e20;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.more-card--link:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.more-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.more-card-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.more-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.more-card-external {
    margin-left: auto;
    color: var(--text-muted);
    opacity: 0.6;
}

.more-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* GitHub stats images */
.github-stats-link {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.github-stats-link:hover {
    border-color: rgba(234, 179, 8, 0.3);
}

.github-stats-img {
    width: 100%;
    height: auto;
    display: block;
}


@media (max-width: 768px) {
    .career-header {
        flex-direction: column;
        gap: 16px;
    }

    .career-grid {
        grid-template-columns: 1fr;
    }

    .career-role-header {
        flex-direction: column;
        gap: 4px;
    }

    .edu-grid {
        grid-template-columns: 1fr;
    }

    .more-grid {
        grid-template-columns: 1fr;
    }
}

/* === Overview Cards === */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.overview-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s, background 0.2s;
}

.overview-card:hover {
    border-color: rgba(226, 179, 132, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.overview-card-icon {
    color: #e2b384;
    margin-bottom: 14px;
}

.overview-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overview-card-text {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
}
