/* ===== Projects Browser-Mockup Section =====
   No scroll-jacking/pinning — a normal-flow section (like the rest of the
   page), revealed with the site's existing WOW.js fadeInUp convention.
   Tab-switching between projects is a self-contained CSS-transition slide,
   independent of page scroll position. */
.projects-pin {
    --jif-purple: #9729F3;
    --jif-purple-light: #dab2ff;
    --jif-purple-deep: #5200a1;

    position: relative;
    width: 100%;
    padding: 1rem;
}

@property --jif-glow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.browser-mockup {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    /* extra room so the rotating glow halo has space to breathe around the box */
    padding: 10px;
}

.browser-mockup::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: conic-gradient(
        from var(--jif-glow-angle),
        var(--jif-purple-deep),
        var(--jif-purple),
        var(--jif-purple-light),
        #4500ff,
        var(--jif-purple-deep)
    );
    filter: blur(16px);
    opacity: .8;
    z-index: 0;
    animation: jif-glow-spin 6s linear infinite;
}

@keyframes jif-glow-spin {
    to { --jif-glow-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
    .browser-mockup::before {
        animation: none;
    }
}

.browser-mockup-frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: #1b0733;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(87, 0, 199, 0.35);
    overflow: hidden;
    border: 1px solid rgba(218, 178, 255, 0.25);
}

.browser-chrome {
    flex: 0 0 auto;
    background: linear-gradient(180deg, #2a0d4d 0%, #1b0733 100%);
    padding: .6rem .9rem 0;
}

.chrome-topline {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: .6rem;
}

.traffic-lights {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.traffic-lights .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.address-bar {
    flex: 1 1 auto;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    padding: .35rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #e4d4ff;
    font-size: .85rem;
    max-width: 420px;
    overflow: hidden;
}

.address-bar i {
    color: var(--jif-purple-light);
    flex: 0 0 auto;
}

.address-domain {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chrome-spacer {
    flex: 0 0 auto;
    width: 60px;
}

.tab-bar {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
}

.tab-bar::-webkit-scrollbar {
    display: none;
}

.proj-tab {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .55);
    padding: .6rem 1rem;
    font-size: .85rem;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    white-space: nowrap;
    transition: background .25s, color .25s;
}

.proj-tab.active,
.proj-tab:hover {
    color: #fff;
    background: rgba(151, 41, 243, .35);
}

.proj-tab:focus-visible {
    outline: 2px solid var(--jif-purple-light);
    outline-offset: -2px;
}

.browser-viewport {
    position: relative;
    overflow: hidden;
    background: #10041f;
    touch-action: pan-y;
}

.tabs-track {
    display: flex;
    align-items: stretch; /* every panel stretches to match the tallest one */
    transition: transform .5s cubic-bezier(.65, 0, .35, 1);
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .tabs-track {
        transition: none;
    }
}

.tab-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem clamp(1rem, 4vw, 3rem);
}

@media (min-width: 768px) {
    .tab-panel {
        flex-direction: row;
        align-items: center;
    }

    .panel-media, .panel-copy {
        flex: 1 1 50%;
        min-width: 0;
    }
}

.panel-media img,
.panel-media video {
    border-radius: 10px;
    max-height: 380px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.panel-copy h3 {
    color: var(--jif-purple-light);
}

.panel-copy p {
    color: #fff;
}

.panel-cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem 1.4rem;
    border-radius: 30px;
    background: var(--jif-purple-deep);
    color: #fff;
    text-decoration: none;
    transition: background .25s;
    width: fit-content;
}

.panel-cta:hover {
    background: var(--jif-purple);
    color: #fff;
}

.panel-cta-primary {
    background: var(--jif-purple);
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background .2s, opacity .2s;
}

.nav-arrow:hover:not(:disabled) {
    background: rgba(151, 41, 243, .45);
}

.nav-arrow:disabled {
    opacity: .25;
    cursor: default;
}

.nav-arrow-left { left: 12px; }
.nav-arrow-right { right: 12px; }

@media (max-width: 767px) {
    .nav-arrow {
        width: 36px;
        height: 36px;
    }
}

.tab-counter {
    position: absolute;
    bottom: 14px;
    right: 18px;
    color: rgba(255, 255, 255, .7);
    font-size: .85rem;
    letter-spacing: .05em;
    z-index: 2;
}

.projects-links-below {
    background: transparent;
    padding-top: 3rem;
    padding-bottom: 4rem;
}
