/* ============================================
   PORTFOLIO PAGE
   ============================================ */

/* Active nav link */
.nav-links .nav-active {
    color: var(--accent) !important;
}

/* ── Page layout ── */
.portfolio-section {
    min-height: 100vh;
    padding: 120px 2rem 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Header ── */
.portfolio-header {
    text-align: center;
    margin-bottom: 80px;
}

.portfolio-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.75rem);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0.6rem 0 1rem;
}

.portfolio-hint {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--accent-light);
    margin-top: 0.25rem;
    opacity: 0.85;
}

/* ── Bubbles arena ── */
.bubbles-arena {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem 4rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Bubble container — carries the float animation ── */
.bubble-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bubble-1 { animation: float1 6.2s ease-in-out infinite; }
.bubble-2 { animation: float2 7.4s ease-in-out infinite 1.1s; }
.bubble-3 { animation: float3 5.6s ease-in-out infinite 0.6s; }

/* Pause floating on hover so the card feels stable */
.bubble-container:hover {
    animation-play-state: paused;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    35%       { transform: translateY(-20px); }
    65%       { transform: translateY(9px); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    40%       { transform: translateY(-26px); }
    70%       { transform: translateY(11px); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    30%       { transform: translateY(13px); }
    62%       { transform: translateY(-19px); }
}

/* ── The circular bubble ── */
.bubble {
    width: clamp(160px, 22vw, 230px);
    height: clamp(160px, 22vw, 230px);
    border-radius: 50%;
    background: #FAFAF8;
    border: 2px solid rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        0 12px 40px rgba(0, 0, 0, 0.45);
}

.bubble img {
    width: 68%;
    height: 68%;
    object-fit: contain;
    display: block;
}

/* Hover: scale up and glow */
.bubble-container:hover .bubble {
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow:
        0 0 0 6px rgba(226, 132, 19, 0.12),
        0 0 48px rgba(226, 132, 19, 0.25),
        0 20px 56px rgba(0, 0, 0, 0.5);
}

/* ── Per-bubble background colors ── */
.bubble-1 .bubble { background: rgba(244, 166, 30, 0.65); }
.bubble-2 .bubble { background: rgba(213, 171, 132, 0.65); }
.bubble-3 .bubble { background: rgba(0, 141, 223, 0.65); }

/* ── Info card ── */
.bubble-card {
    margin-top: 1.75rem;
    width: clamp(210px, 24vw, 270px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.35rem 1.25rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.bubble-container:hover .bubble-card {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.bubble-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.55rem;
}

.bubble-card p {
    font-size: 0.81rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* ── Tech tags ── */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.tech-stack span {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-glow);
    color: var(--accent-light);
    border: 1px solid rgba(226, 132, 19, 0.2);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Visit link ── */
.bubble-cta {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s, letter-spacing 0.2s;
}

.bubble-cta:hover {
    color: var(--accent-light);
    letter-spacing: 0.06em;
}

/* ── Staggered vertical offsets on desktop ── */
@media (min-width: 768px) {
    .bubble-1 { margin-top: 48px; }
    .bubble-2 { margin-top: 0px; }
    .bubble-3 { margin-top: 72px; }
}

/* ── Embedded portfolio section (index.html) ── */
.portfolio-index {
    padding: 6rem 1rem;
    background: var(--bg-primary);
}

/* ── Mobile: cards always visible (no hover on touch) ── */
@media (max-width: 767px) {
    .portfolio-section {
        padding: 100px 1.25rem 80px;
    }

    .bubbles-arena {
        gap: 3rem 2rem;
    }

    .bubble-card {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        width: clamp(210px, 80vw, 300px);
    }

    .bubble-container:hover .bubble {
        transform: scale(1.05);
    }
}
