/* =========================================
   PARALLAX STACK LAYOUT
   Tone: High-Tech / Immersive / Portfolio
   Agent: ui-ux-pro-max + frontend-design
   ========================================= */

/* CONTAINER */
.parallax-stack-container {
    padding: 2rem 5% 10rem 5%;
    /* Bottom padding for scroll space */
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    /* Ensure container is tall enough to scroll */
    min-height: 100%;
}

/* STICKY HEADER */
/* HEADER (Scrolls away) */
.projects-header {
    position: relative;
    /* top: 2rem; Removed */
    /* z-index: 1000; Removed */
    margin-bottom: 4rem;
    pointer-events: none;
    color: white;
}

.projects-header h2 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin: 0;
    text-align: left;
    /* Gradient Text for "Design Anchor" */
    background: linear-gradient(to right, #ffffff, #888888);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.9;
}

/* PARALLAX CARD (Restored: Sticky + Clearance) */
.parallax-card {
    position: sticky;
    top: 22vh;
    /* Increased clearance */
    height: 50vh;
    min-height: 400px;
    z-index: 10;
    /* Lower than header */
    margin-bottom: 10vh;

    background: rgba(18, 18, 18, 0.95);
    /* High opacity for separation */
    /* Deeper Dark Glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);

    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease;

    /* Stacking Context */
    transform-origin: center top;
}

/* Light Mode Override via data-theme (if applicable context exists) */
[data-theme="light"] .parallax-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

/* INTENTIONAL VISUAL HIERARCHY */
.card-content {
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* 1. Header Area */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-number {
    font-family: var(--font-main, monospace);
    font-size: 1rem;
    opacity: 0.5;
    letter-spacing: 0.1em;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.icon-link {
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.icon-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* 2. Main Title & Desc */
.card-main {
    margin-top: auto;
    margin-bottom: auto;
}

.project-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.project-desc {
    font-size: 1.25rem;
    line-height: 1.5;
    max-width: 60ch;
    opacity: 0.8;
    font-weight: 300;
}

/* 3. Footer / Tech Stack */
.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

[data-theme="light"] .card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

[data-theme="light"] .tech-tag {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* BACKGROUND ACCENTS (Differentiation Anchor) */
.card-bg-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, var(--accent-color, rgba(100, 100, 255, 0.15)), transparent 70%);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s;
}

.parallax-card:hover .card-bg-accent {
    opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .parallax-card {
        top: 15vh;
        height: 75vh;
        margin-bottom: 5vh;
        border-radius: 20px;
    }

    .card-content {
        padding: 1.5rem;
    }

    .projects-header h2 {
        font-size: 3rem;
    }

    .project-title {
        font-size: 2rem;
    }
}