body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", sans-serif;
    background: #0f172a;
    color: #f8fafc;
    margin: 0;
    padding: 0 1rem 4rem;
}

header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.user-main {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.user-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.user-handle {
    font-size: .9rem;
    color: #94a3b8;
}

.stats-line {
    font-size: .8rem;
    color: #64748b;
}

.pill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .7rem;
}

.pill {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
    padding: .3rem .6rem;
    border-radius: 999px;
}

/* --- Video pubblico compatto e centrato come nel feed --- */
.intro-video {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: .75rem;
    padding: 1rem;
    margin: 1.5rem auto 0;
    width: 100%;
    max-width: 480px;             /* compatto come nel feed */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-video h2 {
    margin: 0 0 .75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    width: 100%;
}

/* Frame 16:9 */
.intro-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: .75rem;
    overflow: hidden;
    background: #0b1220;
    border: 1px solid rgba(255,255,255,0.08);
}

.intro-video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
}

.intro-video-meta {
    color:#94a3b8;
    font-size:.75rem;
    margin-top:.5rem;
    text-align: center;
}

/* --- Layout generale --- */
main {
    max-width: 1100px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 900px) {
    main {
        grid-template-columns: 2fr 1fr;
    }
}

section {
    background: rgba(15,23,42,0.4);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: .75rem;
    padding: 1rem 1.25rem 1.25rem;
}

section + section {
    margin-top: 1rem;
}

.section-title {
    display:flex;
    justify-content: space-between;
    align-items:flex-start;
    gap:.5rem;
    margin-bottom: 1rem;
}

.section-title h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section-title small {
    color:#64748b;
    font-size:.7rem;
    line-height:1.2;
}

.item-block {
    border-left: 2px solid rgba(255,255,255,0.08);
    padding-left: .75rem;
    margin-bottom: 1rem;
}

.item-headline {
    display:flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap:.5rem;
}

.item-title {
    color:#fff;
    font-weight:600;
    font-size:.9rem;
}

.item-meta {
    color:#94a3b8;
    font-size:.75rem;
    line-height:1.2;
}

.item-desc {
    color:#cbd5e1;
    font-size:.8rem;
    line-height:1.4;
    margin-top:.5rem;
    white-space:pre-line;
}

.skill-chiplist {
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
    margin-top:.5rem;
}

.skill-chip {
    background:rgba(34,197,94,.12);
    border:1px solid rgba(34,197,94,.4);
    color:#bbf7d0;
    border-radius:.5rem;
    font-size:.7rem;
    padding:.3rem .5rem;
    line-height:1.2;
}

.gallery-grid {
    display:grid;
    grid-template-columns: repeat(auto-fill,minmax(140px,1fr));
    gap:.75rem;
}

.gallery-card {
    background:#000;
    border-radius:.5rem;
    border:1px solid rgba(255,255,255,0.07);
    overflow:hidden;
}

.gallery-card img {
    display:block;
    width:100%;
    height:140px;
    object-fit:cover;
}

.gallery-caption {
    font-size:.7rem;
    color:#cbd5e1;
    padding:.5rem .6rem .7rem;
    line-height:1.3;
}

.empty-state {
    color:#475569;
    font-size:.8rem;
    font-style:italic;
}

footer {
    max-width:1100px;
    margin:3rem auto 4rem;
    text-align:center;
    color:#475569;
    font-size:.7rem;
}

a.public-link {
    color:#38bdf8;
    text-decoration:none;
}
a.public-link:hover {
    text-decoration:underline;
}

/* Mobile */
@media (max-width: 640px){
    .intro-video { padding: .75rem; border-radius: .6rem; }
    .intro-video-frame { border-radius: .6rem; }
}
