/* Caricamento */

.ps-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bs-white);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.ps-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.ps-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bs-gray-200);
    border-top-color: var(--bs-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/*Regole globali*/

:root{
    --font-primary: "Inter", sans-serif;
    --font-code: "JetBrains Mono", monospace;
}

body{
    cursor: url("img/goose-cursor.png") 16 16, auto;
    font-family: var(--font-primary);
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}

.ps-code-tag,
.nav-link,
.navbar-brand{
    font-family: var(--font-code);
}

/* Componenti riutilizzabili */

.ps-code-tag{
    font-family: var(--font-code);
    font-size: .95rem;
    margin-bottom: 1rem;
}

.ps-code-bracket{
    color: var(--bs-gray-600);
}

.ps-code-element{
    color: var(--bs-blue);
}

.ps-code-attribute{
    color: var(--bs-cyan);
    margin-left: .35rem;
}

.ps-code-value{
    color: var(--bs-orange);
}

.ps-section-title{ 
    display: inline-block; 
    font-family: var(--font-code); 
    font-size: clamp(1.4rem, 2.5vw, 2.4rem); 
    font-weight: 500; 
    background: var(--bs-gray-900); 
    color: var(--bs-white); 
    border-radius: 8px; 
    padding: .5rem 1rem; 
}

/* Navbar */ 

.nav-tabs .nav-link{
    border:0;
}

.nav-tabs .nav-link.active{
    background:transparent;
    border-bottom:2px solid var(--bs-primary);
    font-weight:600;
}

/*Hero Section */

.ps-hero{
    min-height:100vh;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    text-align:center;
    padding-top:8rem;
}

.ps-hero-content{
    max-width:1100px;
    margin:auto;
}

.ps-hero-animation{
    width:clamp(140px,18vw,180px);
    height:clamp(140px,18vw,180px);
    margin:0 auto 2rem;
    display:block;
}

.ps-code-title{
    font-family:var(--font-code);
    font-size:clamp(1.5rem,3vw,3.1rem);
    font-weight:500;
    background:var(--bs-gray-900);
    border-radius:8px;
    line-height:1.6;
}

.ps-code-name{
    color: var(--bs-white);
}

.ps-terminal-btn{
    font-family: var(--font-code);
    margin-top: 3rem;
}

@keyframes scrollFloat{
    0%{
        transform:translateY(0);
    }
    50%{
        transform:translateY(6px);
    }
    100%{
        transform:translateY(0);
    }
}

.ps-float{
    animation:scrollFloat 2s ease-in-out infinite;
}

/* Carousel card */ 

.ps-about-card{
    max-width: 400px;
    min-height: 500px;
}

.ps-about-card img{
    width:100%;
    height:350px;
    object-fit:cover;
}

/* Backpack section */

.ps-backpack-animation{
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: block;
}

/* Offcanvas */

.ps-offcanvas{
    background-color: var(--bs-gray-900);
    color: var(--bs-white);
}

.ps-offcanvas .offcanvas-title{
    font-family: var(--font-code);
}

.ps-offcanvas pre,
.ps-offcanvas code{
    font-family: var(--font-code);
    font-size: .95rem;
    line-height: 1.8;
}

.ps-code-boolean{
    color: var(--bs-success);
}

.ps-code-null{
    color: var(--bs-gray-500);
}

/* Footer */

.ps-footer {
    background-color: var(--bs-blue);
    color: var(--bs-white);
    padding: 20px 0;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 0;
}

.ps-footer a {
    color: inherit;
    text-decoration: none;
}