/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #000000;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.projects {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 8vh;
    overflow: hidden;
    opacity: 0;
    animation: pageFadeIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ==========================================================================
   PROJECT DETAILS PANEL
   ========================================================================== */
.project-info {
    position: relative;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px 40px;
    width: 320px;
    text-align: center;
    background: linear-gradient(135deg, #444444 0%, #111111 40%, #000000 100%);
    border-radius: 16px;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #888888;
    border-right: 3px solid #333333;
    border-bottom: 3px solid #111111;
    box-shadow:
        0 15px 35px rgba(0,0,0,0.8),
        0 0 25px rgba(255,255,255,0.1),
        inset 1px 1px 0px rgba(255,255,255,0.3);
    opacity: 0;
    transform: translateY(-20px);
    animation: panelSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.2s;
}

#projectTitle {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

#projectLink {
    display: inline-block;
    width: 100%;
    padding: 14px 0;
    color: #ffffff;
    background: linear-gradient(180deg, #1f1f1f 0%, #050505 100%);
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    border-radius: 12px;
    border: 3px solid #ffffff;
    box-shadow:
        0 8px 20px rgba(0,0,0,0.6),
        0 0 0 1px #000000,
        inset 0 0 0 1px rgba(255,255,255,0.2);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

#projectLink:hover {
    color: #000000;
    background: #ffffff;
    border-color: #ffffff;
    transform: scale(1.04) translateY(-2px);
    box-shadow:
        0 12px 25px rgba(0,0,0,0.5),
        0 0 25px rgba(255,255,255,0.9),
        inset 0 0 0 2px #000000;
}

/* ==========================================================================
   DESKTOP ARC CAROUSEL
   ========================================================================== */
#carousel {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    animation: carouselFadeIn 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.4s;
}

.card {
    position: absolute;
    pointer-events: auto;
    cursor: grab;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #555555 0%, #111111 30%, #050505 100%);
    border-radius: 16px;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #999999;
    border-right: 3px solid #222222;
    border-bottom: 3px solid #111111;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 15px rgba(255,255,255,0.15);
    transition: transform 0.1s ease-out, opacity 0.2s ease, filter 0.1s ease;
}

.card:active { cursor: grabbing; }

.card::before {
    content: '';
    position: absolute;
    inset: 42px;
    border-radius: 80%;
    background: #111111;
    border: 2px solid #333333;
    z-index: 1;
}

.card img {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: cover;
    pointer-events: none;
    border-radius: 50%;
    z-index: 2;
}

.card .shine {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    pointer-events: none;
    z-index: 3;
    border-radius: 50%;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255,255,255,0.4) 45%,
        rgba(255,255,255,0.6) 50%,
        rgba(255,255,255,0.4) 55%,
        transparent 70%
    );
    background-size: 300% 100%;
    background-position: 0% 0%;
    mix-blend-mode: overlay;
    opacity: 0.4;
    transition: background-position 0.1s ease-out, opacity 0.2s ease;
}

.card.active {
    border-color: #ffffff;
    box-shadow:
        0 25px 50px rgba(0,0,0,0.9),
        0 0 30px rgba(255,255,255,0.4),
        inset 1px 1px 2px rgba(255,255,255,0.5);
}

.card.active .shine { opacity: 0.8; }

/* ==========================================================================
   MOBILE FLAT STRIP CAROUSEL
   ========================================================================== */
#mobile-strip {
    display: none; /* shown by JS on mobile */
    position: relative;
    z-index: 100;
    width: 100%;
    gap: 20px;
    padding: 20px 28px;
    margin-top: 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
}
#mobile-strip::-webkit-scrollbar { display: none; }

/* each mobile card */
.m-card {
    flex: 0 0 150px;
    height: 150px;
    scroll-snap-align: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;

    background: linear-gradient(135deg, #555 0%, #111 30%, #050505 100%);
    border-top: 2px solid #888;
    border-left: 2px solid #666;
    border-right: 2px solid #222;
    border-bottom: 2px solid #111;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 10px rgba(255,255,255,0.08);

    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    transform: scale(0.85);
    opacity: 0.5;
}

.m-card.active {
    transform: scale(1.08);
    opacity: 1;
    border-top-color: #fff;
    border-left-color: #aaa;
    box-shadow:
        0 16px 40px rgba(0,0,0,0.9),
        0 0 28px rgba(255,255,255,0.45),
        inset 1px 1px 2px rgba(255,255,255,0.4);
}

/* circular image inside m-card */
.m-card-inner {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    overflow: hidden;
    background: #111;
    border: 2px solid #333;
}

.m-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.m-card-inner .shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255,255,255,0.35) 48%,
        rgba(255,255,255,0.55) 52%,
        transparent 70%
    );
    background-size: 300% 100%;
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.m-card.active .m-card-inner .shine { opacity: 0.9; }

/* hint arrows */
#mobile-strip::before,
#mobile-strip::after {
    content: '';
    position: sticky;
    top: 0;
    height: 100%;
    width: 32px;
    flex-shrink: 0;
    pointer-events: none;
}
#mobile-strip::before {
    left: 0;
    background: linear-gradient(to right, #000, transparent);
}
#mobile-strip::after {
    right: 0;
    background: linear-gradient(to left, #000, transparent);
}

/* swipe hint label - mobile only */
#swipe-hint {
    display: none;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 8px;
    z-index: 200;
    position: relative;
    animation: hintFade 2.5s ease forwards;
    animation-delay: 1.5s;
    opacity: 1;
}
@media (max-width: 768px) { #swipe-hint { display: block; } }

@keyframes hintFade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes pageFadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes panelSlideIn {
    0%   { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes carouselFadeIn {
    0%   { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   MOBILE OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
    .projects {
        padding-top: 6vh;
        justify-content: flex-start;
    }

    .project-info {
        width: min(290px, 88vw);
        padding: 18px 24px;
        gap: 14px;
    }

    #projectTitle {
        font-size: 18px;
        letter-spacing: 3px;
    }

    #projectLink {
        font-size: 12px;
        letter-spacing: 3px;
        padding: 11px 0;
    }

    /* hide desktop arc on mobile */
    #carousel { display: none !important; }
}