:root {
    --primary: #2dadf7;
    --primary-dark: #2563eb;
    --accent: #fbd92a;
    --bg: #0a1722;
    --bg-soft: #0e1e2d;
    --card: #101b2a;
    --card-hover: #14263a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f1f5f9;
    --text-dim: rgba(241, 245, 249, 0.65);
    --text-faint: rgba(241, 245, 249, 0.4);
    --radius: 0.75rem;
    --glow: rgba(46, 178, 255, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: "Raleway", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

::-webkit-scrollbar { width: 5px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #2563eb, #0ea5e9); }

/* ---------- Nav ---------- */
.nav-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 23, 34, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 1rem;
}

.nav-brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav-brand .dot { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
}

.nav-links a.nav-link {
    position: relative;
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dim);
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    transition: color 0.25s, background 0.25s;
}

.nav-links a.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav-links a.nav-link.active { color: var(--primary); }

.nav-links a.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.15rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary) 70%, rgba(45, 173, 247, 0.4));
}

.btn-store-nav {
    margin-left: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    padding: 0.6rem 1.3rem;
    border-radius: 0.6rem;
    box-shadow: 0 4px 14px rgba(45, 173, 247, 0.3);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-store-nav:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(45, 173, 247, 0.4); filter: brightness(1.08); }

.btn-store-nav svg { width: 16px; height: 16px; fill: currentColor; }

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 9px;
}

.burger span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Bottoni "chunky" stile CoralMC ---------- */
.btn-chunky {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-bottom-width: 7px;
    border-radius: 0.75rem;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.95rem 2.2rem;
    color: var(--bg);
    background: var(--primary);
    box-shadow: 0 10px 28px -6px var(--glow);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn-chunky:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 16px 36px -6px var(--glow); }
.btn-chunky:active { transform: scale(0.98); }

.btn-chunky svg { width: 22px; height: 22px; fill: currentColor; }

.btn-chunky .shine {
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.btn-chunky:hover .shine { transform: translateX(100%); }

.btn-chunky-yellow {
    background: var(--accent);
    color: #0a1722;
    border-color: rgba(10, 23, 34, 0.18);
    box-shadow: 0 10px 28px -6px rgba(251, 217, 42, 0.35);
}

.btn-chunky-yellow:hover { border-color: rgba(10, 23, 34, 0.3); box-shadow: 0 16px 36px -6px rgba(251, 217, 42, 0.45); }

.btn-chunky-dark {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: var(--border);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.btn-chunky-dark:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(45, 173, 247, 0.45); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 150px 1.25rem 130px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: blur(5px) brightness(0.75);
    transform: scale(1.06);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 23, 34, 0.85) 0%, rgba(10, 23, 34, 0.4) 50%, var(--bg) 100%);
}

#particles {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    margin-bottom: 1.6rem;
    backdrop-filter: blur(8px);
}

.hero-badge .pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

.hero-badge.server-offline .pulse-dot {
    background: #ef4444;
    animation: pulse-red 2s infinite;
}

.hero-badge.server-offline {
    border-color: rgba(239, 68, 68, 0.45);
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-logo {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0 auto 1.4rem;
    animation: levitate 5s ease-in-out infinite;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.6));
}

.hero-logo::before {
    content: "";
    position: absolute;
    inset: -32px;
    background: radial-gradient(circle, rgba(45, 173, 247, 0.22) 0%, transparent 65%);
    filter: blur(28px);
    z-index: -1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes levitate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.05;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.tagline {
    margin-top: 1rem;
    color: var(--text-dim);
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    max-width: 620px;
}

.hero-actions {
    margin-top: 2.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-stats {
    margin-top: 3rem;
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    backdrop-filter: blur(8px);
    transition: border-color 0.25s, transform 0.25s;
}

.stat-chip:hover { border-color: rgba(45, 173, 247, 0.4); transform: translateY(-2px); }

.stat-chip > div:last-child {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    line-height: 1.35;
}

.stat-chip b {
    color: var(--text);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1;
}

.chip-icon {
    line-height: 0;
}

.chip-icon svg { width: 24px; height: 24px; fill: var(--primary); }

.chip-icon.discord svg { fill: #fff; transition: fill 0.25s; }
.stat-chip:hover .chip-icon.discord svg { fill: var(--primary); }

.chip-icon.grass svg { width: 30px; height: 30px; fill: none; }

/* ---------- Wave animata ---------- */
.wave {
    position: relative;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
}

.wave svg { display: block; width: 100%; height: 90px; }

.wave path { fill: var(--bg); }

/* ---------- Sezioni ---------- */
section { scroll-margin-top: 90px; }

.section-head {
    text-align: center;
    margin-bottom: 3rem;
}

.section-head .kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(45, 173, 247, 0.1);
    border: 1px solid rgba(45, 173, 247, 0.3);
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.section-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-head h2 .gradient-text { display: inline-block; }

.section-head p {
    color: var(--text-dim);
    margin-top: 0.8rem;
    max-width: 560px;
    margin-inline: auto;
}

/* ---------- Features ---------- */
.features-section {
    padding: 4.5rem 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.3rem;
}

.feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.9rem 1.5rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: rgba(45, 173, 247, 0.4);
    box-shadow: 0 18px 40px -16px var(--glow);
}

.feature .card-icon { margin-bottom: 1.1rem; }

.feature h3 {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- Come giocare ---------- */
.steps-section { padding: 5rem 0; }

.how-to-wrap {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    transition: transform 0.3s, border-color 0.3s;
}

.step:hover { transform: translateX(5px); border-color: rgba(45, 173, 247, 0.4); }

.step-num {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 900;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px -8px var(--glow);
}

.step h3 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.step p { color: var(--text-dim); font-size: 0.9rem; }

/* IP Card */
.ip-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.4rem 2rem;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.5);
}

.ip-card .badge {
    position: absolute;
    top: -1.3rem;
    left: 50%;
    transform: translateX(-50%) rotate(-6deg);
    background: var(--accent);
    color: #0a1722;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.35rem 0.9rem;
    border-radius: 0.5rem;
    box-shadow: 0 6px 16px rgba(251, 217, 42, 0.35);
    z-index: 3;
    white-space: nowrap;
}

.ip-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 300px;
}

.ip-info {
    flex: 0 0 auto;
    min-width: 280px;
}

.ip-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.3rem;
}

.ip-name {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.8rem 1rem;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.ip-value {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.8rem 1rem;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    margin-bottom: 1.6rem;
}

.ip-card .ip-copy-btn {
    width: 100%;
}

.ip-mascot {
    position: relative;
    flex: 1;
    align-self: stretch;
    min-height: 260px;
}

.ip-mascot::before {
    content: "";
    position: absolute;
    right: 8%;
    bottom: 0;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(45, 173, 247, 0.25), transparent 65%);
    filter: blur(22px);
    pointer-events: none;
}

.ip-mascot img {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.45));
    animation: levitate 5s ease-in-out infinite;
    z-index: 1;
}

/* ---------- Store ---------- */
.store-section { padding: 5rem 0; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.store-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.8rem;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s;
}

.store-card:hover { border-color: rgba(45, 173, 247, 0.35); }

.store-card .left h3 {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.store-card .left p {
    margin-top: 0.6rem;
    color: var(--text-dim);
    max-width: 460px;
}

.store-card .right .btn-chunky { white-space: nowrap; }

/* ---------- Candidature ---------- */
.apply-section { padding: 5rem 0 6rem; }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.3rem;
}

.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem 1.6rem;
    text-align: left;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
    cursor: pointer;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(45, 173, 247, 0.45);
    box-shadow: 0 20px 45px -18px var(--glow);
}

.card:hover::before { opacity: 1; }

.card-icon {
    line-height: 0;
    margin-bottom: 1.3rem;
}

.card-icon svg { width: 40px; height: 40px; fill: var(--primary); }

.card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.card .card-cta {
    margin-top: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary);
}

.card .card-cta svg { width: 15px; height: 15px; fill: var(--primary); transition: transform 0.3s; }

.card:hover .card-cta svg { transform: translateX(4px); }

/* ---------- CTA Discord ---------- */
.cta-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, var(--primary), #2563eb);
    padding: 7rem 0;
}

.cta-wave {
    position: absolute;
    left: 0;
    width: 100%;
    height: 150px;
    line-height: 0;
    pointer-events: none;
    z-index: 1;
}

.cta-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.cta-wave-top { top: -1px; transform: scaleY(-1); }
.cta-wave-bottom { bottom: -1px; }

.cta-wave path.fill { fill: var(--bg); }
.cta-wave path.line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 3.5;
    stroke-linecap: round;
}

.cta-banner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1rem 2rem;
}

.cta-banner .cta-icon {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.4rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-banner .cta-icon svg { width: 36px; height: 36px; fill: var(--primary); }

.cta-banner h3 {
    position: relative;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.cta-banner p {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.8rem auto 1.8rem;
    max-width: 480px;
    font-size: 1.02rem;
}

/* ---------- Footer ---------- */
footer {
    background: var(--bg);
    padding: 3rem 0 2.2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
    font-size: 1.05rem;
}

.footer-brand img { width: 34px; height: 34px; border-radius: 9px; }
.footer-brand .dot { color: var(--primary); }

.footer-desc {
    color: var(--text-dim);
    font-size: 0.88rem;
    max-width: 300px;
}

footer h4 {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1.1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-dim);
    transition: color 0.25s;
    width: fit-content;
}

.footer-links a:hover { color: var(--primary); }

.footer-social {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s, transform 0.25s;
}

.footer-social a:hover { border-color: var(--primary); transform: translateY(-2px); }

.footer-social a svg { width: 18px; height: 18px; fill: var(--text-dim); transition: fill 0.25s; }
.footer-social a:hover svg { fill: var(--primary); }

footer .copyright {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-faint);
    text-align: center;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 12, 20, 0.82);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.modal-overlay.open { display: flex; }

.modal {
    width: 100%;
    max-width: 580px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid rgba(45, 173, 247, 0.25);
    border-radius: 1rem;
    padding: 2.2rem;
    position: relative;
    animation: modalIn 0.3s ease;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
    scrollbar-width: thin;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 36px;
    height: 36px;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s, border-color 0.25s;
}

.modal-close:hover { color: #fff; border-color: var(--primary); }

.modal-close svg { width: 16px; height: 16px; }

.modal-head { margin-bottom: 1.6rem; }

.modal-head .kicker {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(45, 173, 247, 0.1);
    border: 1px solid rgba(45, 173, 247, 0.3);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
}

.modal-head h3 {
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.6rem;
}

.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.45rem;
}

.field input,
.field textarea {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.85rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.field textarea { resize: vertical; min-height: 90px; }

.field input:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 173, 247, 0.12);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions { margin-top: 1.6rem; }

.form-actions .btn-chunky { width: 100%; }

.form-msg {
    display: none;
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    text-align: center;
}

.form-msg.ok { display: block; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); color: #86efac; }
.form-msg.err { display: block; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .how-to-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .burger { display: flex; }

    .nav-links {
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        background: rgba(10, 23, 34, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.25rem 1.3rem;
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s, transform 0.3s;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a.nav-link { padding: 0.85rem 0.6rem; }
    .nav-links a.nav-link.active::after { display: none; }
    .btn-store-nav { margin: 0.7rem 0 0; justify-content: center; }

    .store-card { padding: 2rem 1.6rem; }
    .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .hero { padding: 130px 1rem 110px; }
    .hero-logo { width: 150px; height: 150px; }
    .modal { padding: 1.6rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
    .btn-chunky { width: 100%; }
    .hero-actions .btn-chunky { width: auto; min-width: 60%; }
}

@media (max-width: 720px) {
    .cta-section { padding: 5.5rem 0; }
    .cta-wave { height: 90px; }
    .ip-row { flex-direction: column; align-items: stretch; }
    .ip-info { min-width: 0; }
    .ip-mascot { min-height: 240px; }
}

/* ---------- Blog ---------- */
.blog-section { padding: 5rem 0 6rem; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    margin-top: 2.6rem;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.8rem;
}

.blog-search {
    margin-top: 1.8rem;
}

.blog-search-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 480px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.5rem 0.35rem 1.1rem;
    transition: border-color 0.3s;
}

.blog-search-form:focus-within {
    border-color: var(--accent);
}

.blog-search-form svg {
    width: 17px;
    height: 17px;
    fill: var(--text-faint);
    flex-shrink: 0;
}

.blog-search-form input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 0;
}

.blog-search-form .btn {
    padding: 0.45rem 1.2rem;
    font-size: 0.82rem;
    border-radius: 999px;
}

.blog-search-info {
    margin-top: 1.4rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.blog-empty {
    margin-top: 2.4rem;
    text-align: center;
    color: var(--text-faint);
}

.blog-filter-chip {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.blog-filter-chip:hover {
    border-color: var(--accent);
    color: var(--text);
}

.blog-filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a1722;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.8rem;
}

.blog-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
}

.blog-share-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-right: 0.3rem;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.blog-share-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(45, 173, 247, 0.06);
}

.blog-share-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.blog-related {
    margin-top: 3rem;
}

.blog-related h2 {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
}

.blog-grid-related {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0;
    gap: 1.2rem;
}

.blog-grid-related .blog-cover {
    aspect-ratio: 16 / 9;
}

@media (max-width: 900px) {
    .blog-grid-related { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .blog-grid-related { grid-template-columns: 1fr; }
}

.blog-page {
    min-width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-weight: 700;
    font-size: 0.9rem;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.blog-page:hover {
    border-color: var(--accent);
    color: var(--text);
}

.blog-page.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a1722;
}

.blog-card {
    position: relative;
    display: block;
    transition: transform 0.3s;
}

.blog-pin {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 2;
    background: var(--accent);
    color: #0a1722;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.32rem 0.65rem;
    border-radius: 0.4rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.reading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1000;
}

.reading-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #7c6cf6);
    transition: width 0.1s linear;
}

.blog-card .blog-cover {
    transition: transform 0.3s;
}

.blog-card:hover .blog-cover {
    transform: scale(1.02);
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: var(--bg-soft);
    border-radius: var(--radius);
}

.blog-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.4rem 1.4rem 1.6rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.blog-tag {
    background: var(--accent);
    color: #0a1722;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.28rem 0.6rem;
    border-radius: 0.4rem;
}

.blog-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-faint);
}

.blog-body h3 {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.blog-body p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-dim);
    flex: 1;
}

.blog-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
}

.blog-more-link svg { width: 14px; height: 14px; fill: var(--primary); }

.blog-more { text-align: center; margin-top: 2.8rem; }

.blog-hero { padding: 8rem 0 2rem; }

@media (max-width: 900px) {
    .blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .blog-grid { grid-template-columns: 1fr; }
}

/* ---------- Mobile: contenuti centrati ---------- */
@media (max-width: 720px) {
    .feature,
    .card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature .card-icon,
    .card .card-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .store-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .store-card .left p { margin-inline: auto; }

    .ip-card { padding: 2rem 1.4rem; }
    .ip-info { text-align: center; }

    .ip-mascot {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        min-height: 300px;
    }

    .ip-mascot::before {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .ip-mascot img {
        position: relative;
        right: auto;
        height: 100%;
        max-height: 300px;
    }

    .blog-body {
        align-items: center;
        text-align: center;
    }

    .blog-more-link { justify-content: center; }
}

@media (max-width: 560px) {
    .footer-grid { text-align: center; }
    .footer-brand,
    .footer-social { justify-content: center; }
    .footer-desc { margin-inline: auto; }
}

/* ---------- Articolo: layout con indice (TOC) ---------- */
html { scroll-behavior: smooth; }

.article-layout {
    position: relative;
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.article-main {
    flex: 1;
    min-width: 0;
    max-width: 780px;
    margin: 0 auto;
}

.article-main h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.25;
    margin: 1.2rem 0;
}

.article-main .blog-cover { margin-bottom: 2.2rem; }

.article-main .blog-body { padding: 0; }

.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.blog-back:hover { color: var(--primary); }

.blog-back svg { width: 16px; height: 16px; fill: currentColor; transform: rotate(180deg); }

.toc {
    position: sticky;
    top: 110px;
    flex: 0 0 230px;
    padding: 0.3rem 0;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}

.toc.visible {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0.9rem;
}

.toc-title svg { width: 15px; height: 15px; fill: var(--primary); flex-shrink: 0; }

.toc ul {
    display: grid;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc li a {
    display: block;
    padding: 0.4rem 0.2rem;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-faint);
    transition: color 0.25s;
}

.toc li a:hover { color: var(--text-dim); }

.toc li a.active { color: #ffffff; }

.toc li.level-3 a {
    padding-left: 1.3rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.content {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text-dim);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-main h1, .article-main .blog-meta, .article-main .blog-cover { overflow-wrap: anywhere; }

.content h1 {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text);
    margin: 2.4rem 0 0.8rem;
}

.content h2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text);
    margin: 2.2rem 0 0.8rem;
}

.content h3 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text);
    margin: 1.9rem 0 0.65rem;
}

.content h4, .content h5, .content h6 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin: 1.6rem 0 0.55rem;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { scroll-margin-top: 130px; }

.content p { margin: 0 0 1rem; }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }

.content strong { color: var(--text); font-weight: 800; }

.content a { color: var(--primary); font-weight: 700; }
.content a:hover { text-decoration: underline; }

.content ul, .content ol { margin: 0 0 1.15rem; padding-left: 1.5rem; display: grid; gap: 0.4rem; }
.content ol { padding-left: 1.7rem; list-style: decimal; }
.content li { padding-left: 0.15rem; }
.content li::marker { color: var(--primary); font-weight: 700; }
.content li > ul, .content li > ol { margin: 0.4rem 0 0; }

.content li[data-list] { list-style: none; }
.content li[data-list="ordered"] { list-style: decimal; }
.content li[data-list="bullet"] { position: relative; padding-left: 1.5rem; }
.content li[data-list="bullet"]::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.62em;
    width: 0.45em;
    height: 0.45em;
    border-radius: 0.12em;
    background: var(--primary);
}

.content ul[data-list="checked"], .content ul[data-list="unchecked"] { list-style: none; padding-left: 0.3rem; }
.content li[data-list="checked"]::before, .content li[data-list="unchecked"]::before {
    content: "\2611";
    color: var(--primary);
    font-weight: 900;
    display: inline-block;
    width: 1.4rem;
    margin-left: -1.55rem;
}
.content li[data-list="unchecked"]::before { content: "\2610"; color: var(--text-faint); }

.content blockquote {
    margin: 1.4rem 0;
    padding: 0.9rem 1.2rem;
    border-left: 3px solid var(--primary);
    background: var(--bg-soft);
    border-radius: 0 0.65rem 0.65rem 0;
    color: var(--text);
    font-style: italic;
}
.content blockquote p { margin: 0 0 0.5rem; }
.content blockquote p:last-child { margin-bottom: 0; }
.content blockquote + blockquote {
    margin-top: 0;
    border-top-right-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.content blockquote:last-child { border-bottom-right-radius: 0.65rem; }

.content code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.86em;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 0.15em 0.45em;
    color: #8fd3ff;
    white-space: nowrap;
}

.content pre {
    margin: 1.2rem 0;
    padding: 1rem 1.2rem;
    background: #070d14;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    overflow-x: auto;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #d7e6f2;
}
.content pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    white-space: pre;
}

.content .ql-code-block-container {
    margin: 1.2rem 0;
    background: #070d14;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    overflow-x: auto;
}
.content .ql-code-block {
    padding: 0.12rem 1.2rem;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #d7e6f2;
    white-space: pre;
}
.content .ql-code-block:first-child { padding-top: 0.9rem; }
.content .ql-code-block:last-child { padding-bottom: 0.9rem; }

.content iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0.65rem;
    margin: 1.4rem 0;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.93rem;
}
.content th {
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 800;
    text-align: left;
}
.content th, .content td {
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    vertical-align: top;
}
.content tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }

.content img {
    margin: 1.4rem auto;
    border-radius: 0.75rem;
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.content .ql-align-center { text-align: center; }
.content .ql-align-right { text-align: right; }
.content .ql-align-justify { text-align: justify; }
.content .ql-indent-1 { padding-left: 1.6rem; }
.content .ql-indent-2 { padding-left: 3.2rem; }
.content .ql-indent-3 { padding-left: 4.8rem; }
.content .ql-indent-4 { padding-left: 6.4rem; }

@media (max-width: 640px) {
    .content table { display: block; overflow-x: auto; white-space: nowrap; }
}

.blog-article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.blog-article-nav a { font-size: 0.9rem; font-weight: 800; color: var(--primary); max-width: 46%; }
.blog-article-nav a.next { text-align: right; }

@media (max-width: 1100px) {
    .toc { display: none; }
}

/* ================= STAFF LIST ================= */
.staff-list-hero {
    padding: 110px 0 5rem;
    min-height: 60vh;
}

.breadcrumb {
    margin-bottom: 1.2rem;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    font-weight: 600;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-faint);
}

.breadcrumb li a {
    color: var(--text-dim);
    transition: color 0.25s;
}

.breadcrumb li a:hover { color: var(--primary); }

.breadcrumb li + li::before {
    content: "/";
    color: var(--text-faint);
    margin-right: 0.5rem;
}

.breadcrumb-light li,
.breadcrumb-light li a,
.breadcrumb-light li + li::before {
    color: rgba(241,245,249,0.7);
}

.breadcrumb-light li a:hover { color: #fff; }

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.6rem;
    max-width: 960px;
    margin: 2.8rem auto 0;
}

.staff-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem 1.6rem 1.8rem;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.staff-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s;
}

.staff-card:hover {
    transform: translateY(-6px);
    border-color: rgba(45, 173, 247, 0.45);
    box-shadow: 0 20px 45px -18px var(--glow);
}

.staff-card:hover::before { opacity: 1; }

.staff-card-avatar {
    width: 96px;
    height: 96px;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    box-shadow: 0 10px 22px -8px rgba(0,0,0,0.5);
    margin-bottom: 1.1rem;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.staff-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.staff-card-role {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(45, 173, 247, 0.1);
    border: 1px solid rgba(45, 173, 247, 0.25);
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.staff-card-nick {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.staff-card-alias {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-faint);
    margin-bottom: 0.7rem;
}

.staff-card-alias span { color: var(--text-dim); }

.staff-card-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
    max-width: 28ch;
}

.staff-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
}

.staff-card-cta svg {
    width: 14px;
    height: 14px;
    fill: var(--primary);
    transition: transform 0.3s;
}

.staff-card:hover .staff-card-cta svg { transform: translateX(4px); }

.staff-list-note {
    text-align: center;
    margin-top: 2.8rem;
    color: var(--text-faint);
    font-size: 0.88rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* ================= PROFILE HERO ================= */
.profile-hero {
    position: relative;
    padding: 110px 0 3.5rem;
    overflow: hidden;
}

.profile-hero .hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.profile-hero .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(5px) brightness(0.75);
    transform: scale(1.06);
}

.profile-hero .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 23, 34, 0.82) 0%, rgba(10, 23, 34, 0.5) 45%, var(--bg) 100%);
}

.profile-hero-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 3.2rem;
    align-items: center;
    margin-top: 1.2rem;
}

.profile-avatar-wrap {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 520px;
}

.profile-avatar-glow {
    position: absolute;
    inset: 10% 5% 0 5%;
    background: radial-gradient(circle at 50% 35%, rgba(45, 173, 247, 0.28) 0%, transparent 62%);
    filter: blur(28px);
    z-index: 0;
}

.profile-avatar-img {
    position: relative;
    z-index: 1;
    height: 520px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 26px 40px rgba(0,0,0,0.45));
    image-rendering: auto;
    animation: levitate 5s ease-in-out infinite;
}

.profile-hero-text .kicker {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(45, 173, 247, 0.1);
    border: 1px solid rgba(45, 173, 247, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}

.profile-hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.05;
    margin-bottom: 0.6rem;
}

.profile-alias-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.alias-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

.alias-pill strong { color: var(--text); margin-left: 0.25rem; }

.realname {
    font-weight: 800;
    color: var(--text);
    font-size: 1rem;
}

.profile-role-line {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.2rem;
}

.profile-hero-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 640px;
}

.profile-hero-desc strong { color: var(--text); }

.profile-identity-note {
    margin-top: 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-faint);
    font-style: italic;
    border-left: 2px solid rgba(45,173,247,0.35);
    padding-left: 0.9rem;
}

.profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.8rem;
}

/* ================= PROFILE SECTIONS ================= */
.profile-section {
    padding: 4.5rem 0;
}

.profile-section-alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.profile-text-card {
    max-width: 780px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem;
    box-shadow: 0 24px 50px -20px rgba(0,0,0,0.35);
}

.profile-text-card p {
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.profile-text-card p:last-child { margin-bottom: 0; }

.profile-text-card strong { color: var(--text); }

.identity-box {
    margin-top: 1.8rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    overflow: hidden;
}

.identity-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.identity-row:last-child { border-bottom: 0; }

.identity-row.highlight {
    background: rgba(45,173,247,0.07);
}

.identity-label {
    flex: 0 0 150px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.identity-value {
    flex: 1;
    font-weight: 700;
    color: var(--text);
}

.identity-value em {
    font-weight: 600;
    color: var(--text-dim);
    font-style: italic;
}

/* Role grid */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.3rem;
    margin-top: 1.2rem;
}

.role-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.9rem 1.5rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.role-card:hover {
    transform: translateY(-5px);
    border-color: rgba(45, 173, 247, 0.4);
    box-shadow: 0 18px 40px -16px var(--glow);
}

.role-card h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.role-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.role-note {
    text-align: center;
    margin-top: 1.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-faint);
    font-style: italic;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Project grid */
.project-grid {
    display: grid;
    gap: 1.6rem;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 173, 247, 0.35);
    box-shadow: 0 18px 40px -16px var(--glow);
}

.project-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px -8px var(--glow);
}

.project-icon.muted {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    box-shadow: none;
}

.project-icon svg { width: 24px; height: 24px; fill: #fff; }
.project-icon.muted svg { fill: var(--text-dim); }

.project-card h3 {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.project-status {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(251, 217, 42, 0.15);
    border: 1px solid rgba(251, 217, 42, 0.35);
    color: #fbd92a;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    vertical-align: middle;
}

.project-role {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.project-desc {
    color: var(--text-dim);
    font-size: 0.93rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.project-note {
    background: rgba(251,217,42,0.07);
    border: 1px solid rgba(251,217,42,0.2);
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

/* Skills */
.skills-groups {
    display: grid;
    gap: 1.6rem;
    max-width: 900px;
    margin: 0 auto;
}

.skills-group {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
}

.skills-group h3 {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.skills-group h3::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: border-color 0.25s, color 0.25s, transform 0.25s, background 0.25s;
}

.skill-pill:hover {
    border-color: rgba(45,173,247,0.4);
    color: var(--text);
    transform: translateY(-1px);
    background: rgba(45,173,247,0.06);
}

.skill-pill.accent {
    background: rgba(45,173,247,0.08);
    border-color: rgba(45,173,247,0.2);
    color: #7cc4f9;
}

.skill-pill.accent:hover {
    border-color: rgba(45,173,247,0.45);
    color: #fff;
    background: rgba(45,173,247,0.14);
}

.skill-pill.muted {
    background: rgba(255,255,255,0.04);
}

.skills-legend {
    text-align: center;
    margin-top: 1.6rem;
    font-size: 0.82rem;
    color: var(--text-faint);
    font-style: italic;
}

.profile-cta {
    padding: 3rem 0 4rem;
}

.profile-cta .cta-banner {
    padding: 2.2rem;
}

.notfound-staff {
    padding: 140px 0 5rem;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.notfound-card {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
}

.notfound-card .notfound-code {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #7c6cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.8rem;
}

.notfound-card h1 { font-size: 1.6rem; margin-bottom: 0.7rem; }
.notfound-card p { color: var(--text-dim); margin-bottom: 1.8rem; line-height: 1.6; }

.notfound-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive staff */
@media (max-width: 960px) {
    .profile-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .profile-avatar-wrap {
        min-height: 380px;
        order: -1;
    }
    .profile-avatar-img {
        height: 380px;
    }
    .profile-hero-text {
        text-align: center;
    }
    .profile-alias-line,
    .profile-hero-desc,
    .profile-identity-note {
        margin-left: auto;
        margin-right: auto;
    }
    .profile-hero-desc { text-align: center; }
    .profile-hero-actions { justify-content: center; }
    .identity-row { flex-direction: column; gap: 0.25rem; }
    .identity-label { flex: none; }
}

@media (max-width: 640px) {
    .staff-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
    }
    .profile-hero { padding: 100px 0 2rem; }
    .profile-avatar-wrap { min-height: 300px; }
    .profile-avatar-img { height: 300px; }
    .profile-text-card,
    .project-card,
    .skills-group { padding: 1.5rem; }
    .project-top { flex-direction: column; }
    .profile-hero-actions .btn-chunky { width: 100%; }
    .notfound-card { padding: 2rem 1.4rem; }
}

@media (max-width: 720px) {
    .staff-card,
    .role-card,
    .project-card,
    .skills-group {
        align-items: center;
        text-align: center;
    }
    .project-tags,
    .skills-cloud { justify-content: center; }
    .role-card .card-icon { margin-left: auto; margin-right: auto; }
}

