/* stile.css — portfolio di Kygo, stile "server Discord". Colori e caratteri in :root */
:root {
  --bg: #0b0a10;
  --side: #110f18;
  --s1: #17141f;
  --s2: #1e1a29;
  --line: #262236;
  --fg: #f3efff;
  --fg-2: #bab3d1;
  --fg-3: #918aab;
  --ac: #a78bfa;
  --ac-2: #c4b5fd;
  --deep: #6d4fd8;
  --ok: #3ddc97;
  --display: "Chakra Petch", "Rajdhani", "DejaVu Sans", Arial, sans-serif;
  --sans: "Geist", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
  --sideW: 336px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--ac); color: #0b0913; }
:focus-visible { outline: 2px solid var(--ac-2); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 90; background: var(--ac); color: #0b0913; padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ── struttura: barra server + canali + contenuto ── */
.app { display: grid; grid-template-columns: var(--sideW) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: 76px minmax(0, 1fr); z-index: 10; }

/* colonna dei server */
.rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; background: #07060b; border-right: 1px solid #15121f; }
.ri { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--s1); color: var(--fg-2); transition: border-radius .25s, background .25s, color .25s; }
.ri img { width: 50px; height: 50px; border-radius: inherit; }
.ri b { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; font: 700 16px/1 var(--display); letter-spacing: .04em; color: var(--fg); background: color-mix(in srgb, var(--c) 30%, var(--s1)); transition: background .25s; }
.ri svg { width: 24px; height: 24px; }
.ri:hover, .ri.on { border-radius: 16px; }
.ri:hover b { background: var(--c); }
.ri.dc:hover { background: #5865f2; color: #fff; }
.ri::before { content: ""; position: absolute; left: -13px; top: 50%; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--fg); transform: translateY(-50%) scaleY(0); transition: transform .2s, height .2s; }
.ri:hover::before { transform: translateY(-50%) scaleY(1); height: 20px; }
.ri.on::before { transform: translateY(-50%) scaleY(1); height: 40px; }
.ri::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); padding: 8px 12px; border-radius: 6px; background: #000; color: var(--fg); font: 600 14px/1 var(--sans); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 30; }
.ri:hover::after, .ri:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.rsep { width: 32px; height: 2px; border-radius: 2px; background: var(--line); }

/* colonna dei canali */
.panel { display: flex; flex-direction: column; min-height: 0; background: linear-gradient(180deg, #12101b, #0f0d16); border-right: 1px solid var(--line); }
.banner { position: relative; display: flex; align-items: flex-end; gap: 12px; height: 128px; padding: 14px 16px; overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; }
.banner .mini { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .8; }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 85% 0%, rgba(109, 79, 216, .55), transparent 60%), linear-gradient(180deg, rgba(18, 16, 27, .1), #12101b 92%); }
.banner img { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 0 0 3px #12101b, 0 0 24px rgba(167, 139, 250, .55); transition: transform .3s; }
.banner:hover img { transform: rotate(-6deg) scale(1.05); }
.banner b { display: block; font: 700 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.banner small { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 500 11px/1 var(--mono); color: var(--ac-2); text-transform: uppercase; letter-spacing: .12em; }
.banner small i { font-style: normal; color: var(--ac); font-size: 9px; }
.panel .cat { display: flex; align-items: center; gap: 4px; width: calc(100% - 16px); margin: 18px 8px 6px; padding: 4px 6px; min-height: 28px; font: 700 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); border-radius: 4px; text-align: left; }
.panel .cat svg { width: 12px; height: 12px; transition: transform .2s; }
.panel .cat em { margin-left: auto; font-style: normal; font: 500 11px/1 var(--mono); color: #5d5775; }
.panel button.cat:hover { color: var(--fg-2); }
.panel .cat[aria-expanded="false"] svg { transform: rotate(-90deg); }
.panel .cat.static { padding-left: 22px; }
.chans { display: grid; gap: 3px; padding: 0 8px; overflow: hidden; transition: max-height .3s ease, opacity .2s; max-height: 400px; }
.chans.chiuso { max-height: 0; opacity: 0; }
.chans a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 4px 10px 4px 8px; border-radius: 8px; color: var(--fg-3); font-size: 15.5px; font-weight: 500; transition: background .2s, color .2s, transform .2s; }
.ci { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--s1); border: 1px solid var(--line); color: var(--fg-3); flex: none; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.ci svg { width: 16px; height: 16px; }
.cn { display: grid; gap: 1px; min-width: 0; }
.cn1 { display: flex; align-items: center; gap: 4px; }
.cn small { font-size: 11.5px; font-weight: 400; color: #6f688a; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.chans a:hover .cn small, .chans a.on .cn small { color: var(--fg-3); }
.ext .cn { display: flex; }
.cn i { font-style: normal; color: #5d5775; font-weight: 400; }
.chans a:hover { background: rgba(167, 139, 250, .07); color: var(--fg-2); transform: translateX(3px); }
.chans a:hover .ci { color: var(--ac-2); border-color: rgba(167, 139, 250, .4); }
.chans a.on { background: linear-gradient(90deg, rgba(167, 139, 250, .2), rgba(167, 139, 250, .03)); color: var(--fg); }
.chans a.on::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ac); box-shadow: 0 0 12px var(--ac); }
.chans a.on .ci { background: var(--ac); border-color: var(--ac); color: #0b0913; box-shadow: 0 0 18px rgba(167, 139, 250, .55); }
.chans a.on .cn i { color: var(--ac-2); }
.badge { margin-left: auto; font: 700 11px/1 var(--sans); font-style: normal; background: #f23f43; color: #fff; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; box-shadow: 0 0 0 0 rgba(242, 63, 67, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(242, 63, 67, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 63, 67, 0); } }
.ext .ci { border-style: dashed; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; margin-inline: 8px; margin-bottom: 8px; border-radius: 12px; background: #0b0a11; border: 1px solid var(--line); }
.ava { position: relative; flex: none; padding: 2px; border-radius: 50%; background: conic-gradient(from var(--a, 0deg), var(--ac), var(--deep), #3ddc97, var(--ac)); animation: gira 4s linear infinite; }
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes gira { to { --a: 360deg; } }
.ava img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #0b0a11; }
.ava i { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 3px solid #0b0a11; }
.me-t { min-width: 0; }
.me-t b { display: block; font-size: 14px; font-weight: 600; }
.me-t small { display: block; font-size: 12px; color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-b { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--fg-3); transition: background .2s, color .2s; flex: none; }
.me-b:hover { background: #5865f2; color: #fff; }
.me-b svg { width: 20px; height: 20px; }

.top { display: none; }

/* ── canali (sezioni) ── */
.ch { position: relative; border-bottom: 1px solid var(--line); isolation: isolate; }
.topic { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 clamp(20px, 4vw, 56px); background: rgba(11, 10, 16, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topic span { font-weight: 600; font-size: 15px; white-space: nowrap; }
.topic small { font-size: 13px; color: var(--fg-3); padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in { padding: clamp(56px, 8vw, 112px) clamp(20px, 4vw, 56px); max-width: 1180px; }
.sh { font: 700 clamp(44px, 6vw, 88px)/.95 var(--display); text-transform: uppercase; letter-spacing: -.01em; margin-bottom: clamp(32px, 4vw, 56px); }

/* ── #benvenuto ── */
.rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .55; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%); mask-image: linear-gradient(90deg, transparent 0%, #000 55%); }
.hero { min-height: 100vh; overflow: clip; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 60% at 25% 45%, rgba(11, 10, 16, .96), rgba(11, 10, 16, .5)); pointer-events: none; }
.cmd { font: 400 15px/1.4 var(--mono); color: var(--fg-2); }
.cmd .pr { color: var(--ok); }
.cmd .pa { color: var(--ac); }
.caret { color: var(--ac); font-weight: 400; font-style: normal; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { margin-top: 18px; font: 700 clamp(96px, 17vw, 260px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.02em; background: linear-gradient(180deg, #fff 30%, var(--ac-2) 75%, var(--deep)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 40px rgba(167, 139, 250, .25)); }
.hero h1 .dot { color: var(--ac); -webkit-text-fill-color: var(--ac); }
.sub { margin-top: 26px; font-size: clamp(19px, 1.9vw, 25px); line-height: 1.45; color: var(--fg-2); max-width: 36ch; }
.sub b { color: var(--fg); font-weight: 600; }

/* messaggio del bot */
.msg { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; margin-top: clamp(40px, 5vw, 64px); max-width: 620px; padding: 16px; border-radius: 10px; background: rgba(23, 20, 31, .78); border: 1px solid var(--line); }
.msg-ava { width: 44px; height: 44px; border-radius: 50%; }
.msg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-h b { font-weight: 600; color: var(--ac-2); }
.msg-h .apptag { font: 600 10px/1 var(--sans); padding: 3px 5px; border-radius: 3px; background: #5865f2; color: #fff; }
.msg-h small { font-size: 12px; color: var(--fg-3); }
.embed { margin-top: 8px; padding: 14px 16px 16px; border-radius: 4px; background: #121019; border-left: 4px solid var(--ac); display: grid; gap: 8px; }
.em-auth { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.em-auth img { width: 20px; height: 20px; border-radius: 50%; }
.em-t { font-size: 17px; color: var(--fg); }
.embed p { font-size: 15px; color: var(--fg-2); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.fields dt { font-size: 13px; font-weight: 600; }
.fields dd { font-size: 14px; color: var(--fg-2); }
.dc-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; transition: background .15s; }
.dbtn:hover { background: #6d6f78; }
.dbtn.pri { background: var(--deep); }
.dbtn.pri:hover { background: #7f63e6; }

/* ── #lavori ── */
.proj { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(32px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.proj.alt .shots { order: 2; }
.shots { position: relative; padding-bottom: 28px; padding-right: 48px; }
.shots .desk { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(109, 79, 216, .45); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.shots .phone { position: absolute; right: 0; bottom: 0; width: 26%; aspect-ratio: 9 / 18; object-fit: cover; object-position: top; border-radius: 14px; border: 3px solid #26213a; box-shadow: 0 20px 50px -10px #000; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.shots.stack .wide { position: absolute; right: 0; bottom: 0; width: 70%; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 20px 50px -10px #000; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.proj:hover .desk { transform: translateY(-4px); }
.proj:hover .phone, .proj:hover .wide { transform: translateY(-10px) rotate(-1.5deg); }
.info { display: grid; gap: 14px; align-content: center; }
.idx { font: 400 13px/1 var(--mono); color: var(--ac); }
.info h3 { font: 700 clamp(32px, 3.4vw, 48px)/1 var(--display); text-transform: uppercase; }
.info p { color: var(--fg-2); max-width: 46ch; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.roles li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 8px; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--fg-2); }
.roles li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--r, var(--ac)); }
.go { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--line); font-weight: 500; transition: border-color .15s, background .15s; }
.go:hover { border-color: var(--ac); background: rgba(167, 139, 250, .08); }

/* ── #chi-sono ── */
.pin { max-width: 820px; padding: clamp(24px, 3vw, 36px); border-radius: 12px; background: var(--s1); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--ac); }
.pin-k { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ac); }
.pin-k svg { width: 16px; height: 16px; }
.bio { margin-top: 18px; font-size: clamp(21px, 2.2vw, 30px); line-height: 1.4; letter-spacing: -.01em; }
.bio b { color: var(--ac-2); font-weight: 600; }
.bio2 { margin-top: 16px; color: var(--fg-2); font-size: 18px; max-width: 58ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.facts dt { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin-bottom: 8px; }
.facts dd { font-weight: 500; }

/* ── #skill ── */
.skill-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.roles-box, .cmds { padding: 20px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); }
.roles-box .cat, .cmds .cat { margin: 0 0 14px; }
.rgroup { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.rgroup > span { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.rgroup .roles li { background: var(--bg); }
.cmds { display: grid; gap: 4px; background: #121019; }
.cmdrow { display: grid; gap: 4px; padding: 12px 14px; border-radius: 8px; transition: background .15s; }
.cmdrow b { font: 500 16px/1.2 var(--mono); color: var(--fg); }
.cmdrow span { font-size: 14px; color: var(--fg-2); }
.cmdrow:hover { background: var(--s2); }
.cmdrow:hover b { color: var(--ac-2); }
.cmd-input { margin-top: 8px; display: flex; align-items: center; gap: 4px; padding: 12px 14px; border-radius: 8px; background: var(--s2); font: 400 14px/1 var(--mono); color: var(--fg-3); }
.cmd-input span { color: var(--fg); }

/* ── #contatti ── */
#contatti { overflow: clip; }
#contatti .rain { -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); opacity: .4; }
.big { font: 700 clamp(56px, 9vw, 140px)/.92 var(--display); text-transform: uppercase; letter-spacing: -.015em; }
.big span { color: var(--ac); }
.invite { margin-top: clamp(36px, 5vw, 56px); max-width: 480px; padding: 18px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); }
.inv-k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-3); }
.inv-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 12px; }
.inv-row img { width: 56px; height: 56px; border-radius: 16px; }
.inv-row b { display: block; font-size: 17px; }
.inv-row span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-3); }
.inv-row span i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.join { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 4px; background: #248046; color: #fff; font-weight: 600; font-size: 15px; transition: background .15s; }
.join:hover { background: #1a6334; }
.inv-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 6px 6px 14px; border-radius: 6px; background: var(--bg); font: 400 13px/1 var(--mono); color: var(--fg-2); }
.inv-link code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-link button { min-height: 40px; padding: 0 14px; border-radius: 4px; background: var(--s2); font: 500 13px/1 var(--sans); flex: none; }
.inv-link button:hover { background: var(--line); }


/* comparsa */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.mostra { opacity: 1; transform: none; }

/* ── tablet ── */
@media (max-width: 1100px) {
  .proj, .proj.alt { grid-template-columns: minmax(0, 1fr); }
  .proj.alt .shots { order: 0; }
  .skill-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { display: grid; position: sticky; top: 0; z-index: 20; background: rgba(13, 12, 19, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
  .top .server { display: flex; align-items: center; height: 56px; margin: 0; padding: 0 16px; border: 0; gap: 10px; }
  .top .server b { font: 700 19px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
  .top .server img { width: 34px; height: 34px; border-radius: 10px; }
  .chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); color: var(--fg-2); font-size: 14px; font-weight: 500; }
  .chips a.on { background: var(--s2); color: var(--fg); border-color: var(--ac); }
  .topic { top: 106px; }
  .hero { min-height: 0; }
  .ch { scroll-margin-top: 106px; }
}
/* ── telefono ── */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .in { padding: 44px 16px 56px; }
  .topic { padding: 0 16px; }
  .hero h1 { font-size: 26vw; }
  .msg { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .msg-ava { display: none; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dbtn { flex: 1 1 100%; justify-content: center; }
  .shots { padding-right: 28px; padding-bottom: 20px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .inv-row { grid-template-columns: 48px minmax(0, 1fr); }
  .inv-row img { width: 48px; height: 48px; }
  .join { grid-column: 1 / -1; }
}

/* ── barra canali: dettagli extra ── */
.panel { position: relative; }
.panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(220px circle at var(--mx, -300px) var(--my, -300px), rgba(167, 139, 250, .10), transparent 70%); transition: opacity .3s; }
.unread { position: absolute; left: -6px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--fg); opacity: 0; transition: opacity .3s; }
.chans a.nuovo .unread { opacity: 1; }
.chans a.nuovo .cn1 { color: var(--fg); }
.chans a.on .unread { opacity: 0; }
.chans a.on { box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .22); }
.chans a.on::after { content: ""; position: absolute; inset: 0; border-radius: 8px; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(196, 181, 253, .14) 50%, transparent 70%) -200% 0 / 200% 100% no-repeat; animation: brilla 3.2s ease-in-out infinite; }
@keyframes brilla { 60%, 100% { background-position: 200% 0; } }
.voice { padding: 0 8px; display: grid; gap: 2px; }
.vc { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border-radius: 8px; color: var(--fg-3); font-size: 15px; font-weight: 500; }
.vc svg { width: 18px; height: 18px; color: var(--ok); }
.vu { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 34px; font-size: 13.5px; color: var(--fg-2); }
.vava { display: grid; place-items: center; border-radius: 50%; padding: 2px; box-shadow: 0 0 0 2px var(--ok); animation: parla 1.6s ease-in-out infinite; }
.vava img { width: 22px; height: 22px; border-radius: 50%; }
@keyframes parla { 50% { box-shadow: 0 0 0 2px rgba(61, 220, 151, .25); } }
.vu b { font-weight: 500; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: auto; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--ok); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .45s; } .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ── progetti illustrati (Twitch, OBS) ── */
.shots.vis { min-height: 320px; }
.tw { width: 86%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0e0e10; box-shadow: 0 30px 80px -30px rgba(145, 70, 255, .5); }
.tw-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #18181b; font-size: 13px; color: #efeff1; }
.tw-top b { font-weight: 600; } .tw-top b span { color: #bf94ff; }
.tw-logo { width: 18px; height: 18px; border-radius: 4px; background: #9146ff; }
.live { margin-left: auto; font: 700 11px/1 var(--sans); font-style: normal; padding: 4px 6px; border-radius: 4px; background: #eb0400; color: #fff; }
.tw-screen { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(60% 80% at 30% 40%, rgba(145, 70, 255, .55), transparent 60%), radial-gradient(50% 70% at 75% 70%, rgba(61, 220, 151, .25), transparent 60%), linear-gradient(135deg, #1a1033, #0b0a10); background-size: 160% 160%; animation: muovi 9s ease-in-out infinite alternate; }
@keyframes muovi { to { background-position: 100% 100%; } }
.tw-rec { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 4px; background: rgba(0, 0, 0, .55); font: 600 12px/1 var(--sans); }
.tw-rec i { width: 8px; height: 8px; border-radius: 50%; background: #eb0400; animation: blink 1.2s steps(1) infinite; }
.dc-alert { position: absolute; right: 0; bottom: 0; width: 64%; padding: 14px; border-radius: 10px; background: #2b2d31; color: #dbdee1; box-shadow: 0 24px 60px -10px #000; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.dc-alert .msg-h img { width: 28px; height: 28px; border-radius: 50%; }
.dc-alert .msg-h b { color: var(--ac-2); font-size: 14px; }
.ping { margin-top: 8px; font-size: 13.5px; }
.ping span { padding: 0 3px; border-radius: 3px; background: rgba(88, 101, 242, .3); color: #c9cdfb; font-weight: 500; }
.tw-embed { margin-top: 8px; padding: 10px 12px; border-radius: 4px; background: #232428; border-left: 4px solid #9146ff; display: grid; gap: 4px; font-size: 13px; }
.tw-embed .em-auth { font-size: 12px; color: #bf94ff; }
.tw-embed b { color: #fff; font-size: 14px; }
.tw-embed p { color: #b5bac1; }
.tw-btn { justify-self: start; margin-top: 4px; padding: 6px 12px; border-radius: 4px; background: #4e5058; color: #fff; font-weight: 500; }
.proj:hover .dc-alert { transform: translateY(-10px) rotate(-1.5deg); }
.obs { width: 92%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #1d1d24; color: #d8d8e0; font-size: 12px; box-shadow: 0 30px 80px -30px rgba(109, 79, 216, .5); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.proj:hover .obs { transform: translateY(-6px); }
.obs-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #15151b; }
.obs-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a46; }
.obs-bar span { margin-left: 8px; color: #9a9aab; }
.obs-prev { padding: 10px; background: #111116; }
.ov { position: relative; aspect-ratio: 16 / 7; border-radius: 4px; overflow: hidden; background: linear-gradient(135deg, #24164a, #0d0b14 60%, #10251d); background-size: 200% 200%; animation: muovi 8s ease-in-out infinite alternate; }
.ov-cam { position: absolute; right: 10px; bottom: 10px; width: 22%; aspect-ratio: 4 / 3; border-radius: 6px; border: 2px solid var(--ac); background: radial-gradient(circle at 50% 40%, #3b3456 30%, #1b1630 31%); }
.ov-tag { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 4px; background: var(--ac); color: #0b0913; font: 700 12px/1 var(--display); letter-spacing: .08em; }
.ov-alert { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(11, 10, 16, .85); border: 1px solid var(--ac); color: var(--ac-2); font-weight: 600; white-space: nowrap; animation: avviso 3s ease-in-out infinite; }
@keyframes avviso { 0%, 15% { opacity: 0; transform: translate(-50%, -8px); } 25%, 70% { opacity: 1; transform: translate(-50%, 0); } 85%, 100% { opacity: 0; transform: translate(-50%, -8px); } }
.obs-docks { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 1px; background: #2a2a34; }
.obs-docks > div { background: #1d1d24; padding: 8px 10px 10px; }
.obs-docks p { font-weight: 600; color: #9a9aab; margin-bottom: 6px; }
.obs-docks li { padding: 3px 6px; border-radius: 3px; }
.obs-docks li.on { background: #3b3456; color: #fff; }
.mix label { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 6px; margin-bottom: 7px; color: #c0c0cc; }
.mix label span { height: 6px; border-radius: 3px; background: #2c2c36; overflow: hidden; }
.mix label b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3ddc97 60%, #ffd36b 80%, #ff6b6b); transform-origin: left; animation: livello 1.1s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes livello { from { transform: scaleX(.25); } to { transform: scaleX(.8); } }
@media (max-width: 560px) {
  .shots.vis { min-height: 260px; }
  .dc-alert { width: 82%; padding: 10px; }
  .tw-embed p { display: none; }
  .obs-docks { grid-template-columns: 1fr 1fr; }
  .obs-docks > div:nth-child(2) { display: none; }
}

/* ── #chi-sono: profilo + storia + about.json ── */
.about { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
.profile { position: sticky; top: 76px; border-radius: 16px; overflow: hidden; background: #111018; border: 1px solid var(--line); box-shadow: 0 40px 90px -40px rgba(109, 79, 216, .55); }
.pf-banner { position: relative; height: 112px; background: radial-gradient(120% 120% at 80% 0%, #6d4fd8, #2a1c5c 50%, #120f1d); overflow: hidden; }
.pf-banner .mini { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; mix-blend-mode: screen; }
.pf-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; margin-top: -52px; position: relative; }
.pf-ava { position: relative; display: block; padding: 6px; border-radius: 50%; background: #111018; }
.pf-ava img { width: 92px; height: 92px; border-radius: 50%; }
.pf-ava i { position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); border: 5px solid #111018; }
.pf-badges { display: flex; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 8px; background: rgba(11, 10, 16, .8); border: 1px solid var(--line); }
.pf-badges li { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--ac-2); }
.pf-badges li:hover { background: var(--s2); }
.pf-badges svg { width: 17px; height: 17px; }
.pf-badges li::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); padding: 6px 10px; border-radius: 6px; background: #000; color: var(--fg); font: 600 12px/1 var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.pf-badges li:hover::after { opacity: 1; transform: translate(-50%, 0); }
.pf-body { padding: 10px 16px 16px; }
.pf-body h3 { font: 700 26px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.pf-user { margin-top: 4px; font-size: 14px; color: var(--fg-3); }
.pf-box { margin-top: 14px; padding: 14px; border-radius: 10px; background: #0b0a11; border: 1px solid var(--line); display: grid; gap: 6px; }
.pf-k { margin-top: 6px; font: 700 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); }
.pf-k:first-child { margin-top: 0; }
.pf-box > p:not(.pf-k) { font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.roles.small li { font-size: 12px; padding: 4px 9px 4px 7px; background: var(--s1); }
.pf-link { display: flex; align-items: center; gap: 8px; min-height: 32px; font: 400 13px/1 var(--mono); color: var(--ac-2); }
.pf-link svg { width: 15px; height: 15px; color: var(--fg-3); }
.pf-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pf-msg { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 44px; border-radius: 8px; background: #5865f2; color: #fff; font-weight: 600; font-size: 14px; transition: background .15s; }
.pf-msg:hover { background: #4752c4; }
.pf-msg svg { width: 18px; height: 18px; }
.about-r { display: grid; gap: clamp(24px, 3vw, 32px); }
.lead-in { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.32; letter-spacing: -.015em; color: var(--fg-2); max-width: 30ch; }
.lead-in b { color: var(--fg); font-weight: 600; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--line); }
.pillars > div { padding: 22px 20px 4px 0; display: grid; gap: 8px; align-content: start; }
.pillars > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.pillars span { font: 500 12px/1 var(--mono); color: var(--ac); }
.pillars h4 { margin: 0; font: 700 19px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.pillars p { font-size: 15px; color: var(--fg-2); }
.code { margin: 0; border-radius: 12px; overflow: hidden; background: #0d0c13; border: 1px solid var(--line); }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #121019; border-bottom: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--fg-3); }
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c2840; }
.code-bar i:first-child { background: #ff5f57; } .code-bar i:nth-child(2) { background: #febc2e; } .code-bar i:nth-child(3) { background: #28c840; }
.code-bar span { margin-left: 10px; color: var(--fg-2); }
.code-bar em { margin-left: auto; font-style: normal; color: #5d5775; }
.code pre { margin: 0; padding: 16px 18px 18px 0; overflow-x: auto; font: 400 14px/1.75 var(--mono); counter-reset: riga; }
.code .ln { display: inline-block; width: 44px; padding-right: 14px; text-align: right; color: #4a4560; user-select: none; counter-increment: riga; }
.code .ln::before { content: counter(riga); }
.code .k { color: #c4b5fd; } .code .s { color: #86e1b0; } .code .b { color: #ffb86b; } .code .p { color: var(--fg-2); }

/* ── piè di pagina ── */
.foot { padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 56px) 24px; background: linear-gradient(180deg, transparent, rgba(109, 79, 216, .07)); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.fbrand { display: flex; align-items: center; gap: 14px; }
.fbrand img { width: 48px; height: 48px; border-radius: 14px; }
.fbrand b { display: block; font: 700 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.fbrand small { display: block; margin-top: 6px; font-size: 13px; color: var(--fg-3); }
.fcta { display: grid; gap: 4px; padding: 14px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--s1); transition: border-color .2s, background .2s; }
.fcta span { font-size: 13px; color: var(--fg-3); }
.fcta b { font: 600 17px/1.2 var(--sans); color: var(--ac-2); }
.fcta:hover { border-color: var(--ac); background: rgba(167, 139, 250, .08); }
.fcols { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 24px; padding: 32px 0; }
.fcols p { margin-bottom: 10px; font: 700 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); }
.fcols a { display: flex; align-items: center; min-height: 36px; color: var(--fg-2); font-size: 15px; transition: color .15s; }
.fcols a:hover { color: var(--fg); }
.fbot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
.fstat { display: inline-flex; align-items: center; gap: 8px; }
.fstat i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 151, .15); }
.fbot a { min-height: 44px; display: inline-flex; align-items: center; }
.fbot a:hover { color: var(--ac); }
@media (max-width: 1100px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .profile { position: relative; top: 0; max-width: 420px; }
}
@media (max-width: 760px) {
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillars > div, .pillars > div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .code pre { font-size: 12px; }
  .code .ln { width: 32px; padding-right: 10px; }
  .fcta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── schermata di caricamento ── */
html.caricamento { overflow: hidden; }
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #050408; animation: auto-esci .6s ease 6s forwards; }
.loader::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 40% at 50% 50%, rgba(109, 79, 216, .18), transparent 70%); opacity: 0; animation: ld-glow 1.2s ease .2s forwards; }
.ld-in { position: relative; display: grid; justify-items: center; gap: 22px; }
.ld-brand { display: flex; align-items: center; gap: 14px; opacity: 0; transform: translateY(8px) scale(.96); animation: ld-su .7s cubic-bezier(.2, .8, .2, 1) .15s forwards; }
.ld-brand img { width: 52px; height: 52px; border-radius: 15px; filter: drop-shadow(0 0 18px rgba(167, 139, 250, .55)); }
.ld-brand span { font: 700 40px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #ece8f8; }
.ld-bar { width: 180px; height: 2px; border-radius: 2px; background: #1c1828; overflow: hidden; opacity: 0; animation: ld-fade .4s ease .5s forwards; }
.ld-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--deep), var(--ac-2)); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; box-shadow: 0 0 10px var(--ac); }
.ld-log { font: 400 12px/1 var(--mono); color: #6f688a; opacity: 0; animation: ld-fade .4s ease .6s forwards; }
.ld-log .pr { color: #3ddc97; } .ld-log .pa { color: var(--ac); }
.ld-log b { color: var(--ac); font-weight: 400; animation: blink 1s steps(1) infinite; }
.loader.esci { animation: ld-via .7s cubic-bezier(.7, 0, .3, 1) forwards; }
.loader.esci .ld-in { animation: ld-zoom .7s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes ld-su { to { opacity: 1; transform: none; } }
@keyframes ld-fade { to { opacity: 1; } }
@keyframes ld-glow { to { opacity: 1; } }
@keyframes ld-zoom { to { transform: scale(1.08); opacity: 0; } }
@keyframes ld-via { 0% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 100% 0); } }
@keyframes auto-esci { to { opacity: 0; visibility: hidden; } }
