/* Sfondo in movimento */
body {
  margin: 0;
  padding: 0;
  font-family: monospace;
  color: #fff;
  background: linear-gradient(120deg, #ff0040, #00fff9, #ffea00);
  background-size: 300% 300%;
  animation: bgShift 6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

/* Layer scanlines */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0px,
    rgba(0,0,0,0.15) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: scanlines 1s steps(20) infinite;
  pointer-events: none;
  z-index: 1;
}

/* Layer blocchi glitch (usa ::after) */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(255,0,0,0.15) 25%, transparent 25% 50%, rgba(0,255,255,0.15) 50% 75%, transparent 75%),
    linear-gradient(0deg, rgba(0,255,0,0.1) 50%, transparent 50%);
  background-size: 4px 100%, 100% 4px;
  animation: glitchBlocks 3s infinite;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}

/* Overlay flash (elemento HTML .flash) */
.flash {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  animation: randomFlash 8s infinite;
}

/* Contenitore del contenuto (spazio per il menu fisso) */
.container {
  width: 90vw;
  max-width: 1000px;
  margin: 4.75rem auto 3rem; /* spazio superiore per il nav fisso */
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  position: relative;
  z-index: 3;
}

/* Menu fisso in alto */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.95rem;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  transition: opacity .18s, transform .12s;
}

.site-nav a:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Tipografia e spazi */
h1 {
  font-weight: normal;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

/* Stile per l'intro (subito sotto il titolo) */
.intro {
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: #ccc;
}

/* Stile per la bio (più grande e prominente) */
.bio {
  font-size: 1.5rem;  /* aumentata */
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #eee;
  border-left: 4px solid #ffea00;
  padding-left: 1rem;
}

/* Contatti */
.opere ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 3rem;
}

.opere li {
  margin-bottom: 1.2rem;
}

.anno {
  font-size: 0.9rem;
  color: #ccc;
}

a {
  color: #fff;
  text-decoration: underline;
}

a:hover {
  opacity: 0.7;
}

/* Animazioni principali */
@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes scanlines {
  to { transform: translateY(2px); }
}

@keyframes glitchBlocks {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-5px, 3px); }
  40%  { transform: translate(3px, -2px); }
  60%  { transform: translate(-2px, -4px); }
  80%  { transform: translate(4px, 2px); }
  100% { transform: translate(0,0); }
}

/* Keyframes per flash casuale */
@keyframes randomFlash {
  0%, 98%, 100% { opacity: 0; }
  1% { opacity: 0.9; }
  3% { opacity: 0; }
  20% { opacity: 0.6; }
  22% { opacity: 0; }
  50% { opacity: 0.7; }
  52% { opacity: 0; }
  75% { opacity: 0.5; }
  77% { opacity: 0; }
}

/* Piccole ottimizzazioni responsive */
@media (max-width: 600px) {
  .bio { font-size: 1.05rem; }
  .container { margin: 5.5rem 1rem 2rem; padding: 1.25rem; }
  .site-nav { font-size: 0.85rem; gap: 0.5rem; padding: 0.5rem; }
}

.news {
  margin: 2rem auto;
  padding: 1rem 2rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  max-width: 800px;
}

.news h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.news ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.4;
}
