@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-v20-latin_latin-ext-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/inter-v20-latin_latin-ext-800.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-v20-latin_latin-ext-regular.woff2') format('woff2');
}

:root{
  --bg:#120f1c;
  --bg2:#171323;
  --panel:#1c162c;
  --line:rgba(220,205,255,.12);
  --line-strong:rgba(255,255,255,.22);
  --text:#f5f0ff;
  --muted:#b8add7;
  --soft:#8e82b3;
  --accent:#d36fff;
  --accent2:#8b7cff;
  --accent3:#ff8dd2;
  --ok:#8ff0c7;
  --mono:'IBM Plex Mono', monospace;
  --sans:'Inter', system-ui, sans-serif;
  --max-home:860px;
  --max-page:980px;
  --shadow:0 16px 38px rgba(0,0,0,.24);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:var(--sans);
  background:
    radial-gradient(circle at 85% 10%, rgba(211,111,255,.12), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(255,141,210,.08), transparent 30%),
    linear-gradient(180deg, #110d18 0%, #140f20 100%);
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.14;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 2px,
      rgba(255,255,255,.03) 2px,
      rgba(255,255,255,.03) 3px
    );
  z-index:0;
}
a{color:inherit}
img{display:block;max-width:100%}

.page{
  width:min(calc(100% - 32px), var(--max-page));
  margin:0 auto;
  padding:28px 0 56px;
  position:relative;
  z-index:2;
}
.page.home{
  width:min(calc(100% - 32px), var(--max-home));
}

.topline{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding-bottom:20px;
  border-bottom:1px solid var(--line);
  font-family:var(--mono);
  font-size:12px;
  color:var(--soft);
}
.topline-right{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.topline a{
  text-decoration:none;
  color:var(--muted);
}
.topline a:hover{color:var(--accent3)}
.topline a.active{color:var(--text)}

.main{
  padding:42px 0 34px;
  position:relative;
}
.main.home-main{
  min-height:70vh;
  padding-top:54px;
  overflow-x:hidden; /* ← aggiungi */
}

.prompt{
  font-family:var(--mono);
  font-size:12px;
  color:var(--soft);
  margin-bottom:16px;
}
.prompt .u{color:var(--accent3)}
.prompt .p{color:var(--text)}
.prompt .d{color:var(--accent2)}

.eyebrow{
  font-family:var(--mono);
  font-size:11px;
  color:var(--soft);
  margin-bottom:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
h1{
  margin:0;
  font-size:clamp(34px, 6vw, 56px);
  line-height:1;
  letter-spacing:-0.06em;
  font-weight:800;
  max-width:10ch;
}
.home h1{
  font-size:clamp(38px, 8vw, 72px);
  line-height:.96;
  letter-spacing:-0.07em;
  max-width:8ch;
}
.intro,
.sub{
  margin-top:18px;
  max-width:48rem;
  color:var(--muted);
  font-size:18px;
  line-height:1.75;
}
.home .sub{
  max-width:43rem;
  font-size:clamp(17px, 2.2vw, 21px);
}

.quote{
  margin-top:18px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--soft);
  position:relative;
  z-index:2;
}

.switch{
  margin-top:28px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.switch a{
  text-decoration:none;
  border:1px solid var(--line);
  color:var(--muted);
  font-family:var(--mono);
  font-size:12px;
  padding:9px 12px;
  background:rgba(255,255,255,.02);
}
.switch a.active{
  color:var(--text);
  border-color:var(--line-strong);
  background:rgba(255,255,255,.04);
}

.menu{
  margin-top:42px;
  border-top:1px solid var(--line);
  position:relative;
  z-index:2;
}
.entry{
  display:grid;
  grid-template-columns:120px 1fr auto;
  gap:20px;
  align-items:start;
  padding:18px 0;
  border-bottom:1px solid var(--line);
  text-decoration:none;
  position:relative;
}
.entry:hover .verb{color:var(--accent)}
.entry:hover .title{color:#fff}
.verb{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.08em;
  color:var(--soft);
  transition:.15s ease;
}
.title{
  font-size:24px;
  letter-spacing:-0.04em;
  font-weight:700;
  transition:.15s ease;
}
.desc{
  margin-top:6px;
  color:var(--muted);
  line-height:1.65;
  max-width:42rem;
}
.arrow{
  font-family:var(--mono);
  color:var(--soft);
  font-size:12px;
  padding-top:8px;
}

.notes{
  margin-top:34px;
  display:grid;
  gap:10px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--soft);
  position:relative;
  z-index:2;
}
.notes span{display:block}

.section{
  margin-top:42px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.section-title{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
  margin-bottom:10px;
}
.section-title h2{
  margin:0;
  font-size:28px;
  letter-spacing:-0.04em;
}
.section-title span{
  font-family:var(--mono);
  font-size:11px;
  color:var(--soft);
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}
.section-copy{
  margin:0 0 24px;
  color:var(--muted);
  max-width:44rem;
  line-height:1.7;
}

.featured-list{display:grid;gap:24px}
.project{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:22px;
  padding:20px 0;
  border-top:1px solid var(--line);
  align-items:start;
}
.project:first-child{
  border-top:none;
  padding-top:0;
}

.grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:24px;
}
.card{display:grid;gap:14px}

.shot{
  aspect-ratio:16 / 10;
  border:1px solid var(--line);
  overflow:hidden;
  cursor:zoom-in;
  background:#0f0c18;
  position:relative;
  transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.shot::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 85% 15%, rgba(211,111,255,.14), transparent 28%),
    linear-gradient(to top, rgba(10,8,16,.24), rgba(10,8,16,0) 46%);
  opacity:.88;
  transition:opacity .22s ease;
  z-index:1;
  pointer-events:none;
}
.page-work .shot::before{
  background:linear-gradient(to top, rgba(10,8,16,.24), rgba(10,8,16,0) 45%);
}
.shot img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .42s ease, filter .42s ease;
}
.shot-label{
  position:absolute;
  left:12px;
  bottom:12px;
  z-index:2;
  font-family:var(--mono);
  font-size:11px;
  color:var(--text);
  background:rgba(20,15,32,.84);
  border:1px solid rgba(255,255,255,.14);
  padding:7px 9px;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
  letter-spacing:.06em;
}
.shot:hover{
  transform:translateY(-3px);
  border-color:var(--line-strong);
  box-shadow:var(--shadow);
}
.page-personal .shot:hover{
  transform:translateY(-4px);
}
.shot:hover img{
  transform:scale(1.035);
  filter:saturate(1.02) contrast(1.03);
}
.page-personal .shot:hover img{
  transform:scale(1.05);
  filter:saturate(1.04) contrast(1.04);
}
.shot:hover::before{opacity:1}
.shot:hover .shot-label{
  opacity:1;
  transform:none;
}

.meta{min-width:0;display:grid;gap:10px}
.kicker{
  font-family:var(--mono);
  font-size:11px;
  color:var(--soft);
  text-transform:uppercase;
  letter-spacing:.08em;
}
.meta h3{
  margin:0;
  font-size:28px;
  line-height:1.05;
  letter-spacing:-0.04em;
}
.page-personal .meta h3{
  font-size:26px;
  line-height:1.06;
}
.meta p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}
.meta-actions{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin-top:2px;
}
.meta-actions a{
  text-decoration:none;
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
}
.meta-actions a:hover{color:var(--accent3)}

.archive{margin-top:10px;display:grid;gap:0}
.row{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1.7fr) auto;
  gap:18px;
  align-items:start;
  padding:16px 0;
  border-top:1px solid var(--line);
}
.row-title{
  font-weight:700;
  letter-spacing:-0.02em;
}
.row-copy{
  color:var(--muted);
  line-height:1.65;
}
.row a{
  text-decoration:none;
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.row a:hover{color:var(--accent3)}

.bridge,
.footer-block{
  margin-top:42px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.bridge p,
.footer-block p{
  margin:0;
  color:var(--muted);
  line-height:1.75;
}
.bridge a,
.footer-block a{
  color:var(--text);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.18);
}
.bridge a:hover,
.footer-block a:hover{
  color:var(--accent3);
  border-color:var(--accent3);
}
.footer-links{display:grid;gap:12px}
.reply{
  min-height:18px;
  color:var(--accent3);
  font-family:var(--mono);
  font-size:12px;
  margin-top:10px;
}

#footerQuote:hover{
  color:var(--text);
}

#boot{
  position:fixed;
  inset:0;
  z-index:50;
  background:
    linear-gradient(rgba(9,7,15,.92), rgba(9,7,15,.96)),
    url('../images/melee.png') center center / cover no-repeat;
  color:#ddd5f1;
  font-family:var(--mono);
  font-size:13px;
  line-height:1.8;
  padding:24px 18px;
  transition:opacity .35s ease, visibility .35s ease;
}
#boot.hide{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
#boot .ok{color:var(--ok)}
#boot .skip{
  position:absolute;
  right:16px;
  bottom:14px;
  color:#7c7297;
  cursor:pointer;
}

.ghost-tentacle{
  position:absolute;
  right:-20px;
  top:-10px;
  width:min(42vw, 360px);
  opacity:.11;
  filter:saturate(.9) contrast(1.05);
  pointer-events:none;
  user-select:none;
  z-index:1;
}
.deadzone{
  position:absolute;
  top:0;
  right:0;
  width:180px;
  height:120px;
  z-index:3;
  background:transparent;
}
.floppy{
  position:absolute;
  right:0;
  bottom:10px;
  width:78px;
  opacity:.9;
  transition:transform .15s ease, opacity .15s ease;
  z-index:2;
}
.floppy:hover{
  transform:translateY(-2px) rotate(-4deg);
  opacity:1;
}
.footer-art{
  position:absolute;
  right:0;
  bottom:0;
  width:180px;
  opacity:.08;
  pointer-events:none;
  user-select:none;
}

.flicker{
  position:fixed;
  left:16px;
  bottom:16px;
  z-index:5;
  font-family:var(--mono);
  font-size:11px;
  color:var(--soft);
  background:rgba(23,19,35,.88);
  border:1px solid var(--line);
  padding:9px 10px;
  opacity:0;
  transform:translateY(8px);
  transition:.2s ease;
  pointer-events:none;
}
.flicker.show{
  opacity:1;
  transform:none;
}
.microtip{
  position:fixed;
  z-index:8;
  font-family:var(--mono);
  font-size:11px;
  color:var(--text);
  background:rgba(26,20,40,.96);
  border:1px solid var(--line);
  padding:8px 10px;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .12s ease, transform .12s ease;
}
.microtip.show{
  opacity:1;
  transform:none;
}

.konami-hint{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:4;
  font-family:var(--mono);
  font-size:11px;
  color:rgba(184,173,215,.55);
  letter-spacing:.08em;
  user-select:none;
}
.sammax-pop{
  position:fixed;
  right:18px;
  bottom:46px;
  z-index:12;
  display:flex;
  align-items:flex-end;
  gap:12px;
  opacity:0;
  transform:translateY(16px);
  pointer-events:none;
  transition:.22s ease;
}
.sammax-pop.show{
  opacity:1;
  transform:none;
}
.sammax-pop img{
  width:400px;
  max-width:36vw;
  height:auto;
  display:block;
  filter:drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
.sammax-line{
  max-width:260px;
  background:rgba(26,20,40,.96);
  border:1px solid var(--line);
  color:var(--text);
  padding:10px 12px;
  font-family:var(--mono);
  font-size:11px;
  line-height:1.5;
}

#image-overlay{
  position:fixed;
  inset:0;
  background:rgba(7,5,12,.88);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
  z-index:20;
  padding:24px;
}
#image-overlay.active{
  opacity:1;
  pointer-events:all;
}
#overlay-img{
  max-width:min(1100px, 92vw);
  max-height:84vh;
  border:1px solid var(--line);
  box-shadow:0 24px 60px rgba(0,0,0,.38);
  background:#0f0c18;
}
.overlay-close{
  position:absolute;
  top:16px;
  right:18px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
}

.personal-fun{
  margin-top:28px;
  display:grid;
  gap:12px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--soft);
}
.personal-fun button{
  width:max-content;
  background:transparent;
  color:var(--muted);
  border:1px solid var(--line);
  padding:8px 10px;
  font-family:var(--mono);
  font-size:12px;
  cursor:pointer;
}
.personal-fun button:hover{
  color:var(--accent3);
  border-color:var(--line-strong);
}

@media (max-width:900px){
  .grid{grid-template-columns:1fr}
}
@media (max-width:840px){
  .project{grid-template-columns:1fr;gap:16px}
  .row{grid-template-columns:1fr;gap:8px}
  .section-title{flex-direction:column;align-items:flex-start}
  .topline{flex-direction:column}
  .topline-right{justify-content:flex-start}
}
@media (max-width:700px){
  .entry{grid-template-columns:1fr;gap:8px}
  .arrow{padding-top:0}
  .ghost-tentacle{
    width:170px;
    right:0px;  /* ← cambia in 0 o -10px */
    top:22px;
    opacity:.07;
    overflow:hidden; /* non basta qui, serve sul parent */
  }
  .footer-art{
    width:96px;
    right:0;
    bottom:8px;
    opacity:.06;
  }
  .floppy{
    position:static;
    width:56px;
    margin-top:24px;
    opacity:.9;
  }
  .deadzone{
    width:120px;
    height:90px;
  }
  .konami-hint{
    right:12px;
    bottom:12px;
    font-size:10px;
  }
  .sammax-pop{
    right:12px;
    bottom:36px;
    gap:8px;
  }
  .sammax-pop img{
    width:110px;
    max-width:34vw;
  }
  .sammax-line{
    max-width:170px;
    font-size:10px;
    padding:8px 10px;
  }
}

/* 404 */
.error-page{
  width:min(calc(100% - 32px), 760px);
}

.error-main{
  min-height:calc(100vh - 120px);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding-top:34px;
}

.rope{
  position:absolute;
  top:-8px;
  left:50%;
  width:2px;
  height:122px;
  background:linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,.35));
  transform:translateX(-50%);
  opacity:.9;
}

.guybrush-hang{
  --rope-x: 66px;   /* punto orizzontale dove si attacca la corda */
  --rope-h: 110px;  /* lunghezza della corda sopra la mano */

  position:relative;
  margin-top:110px;
  background:transparent;
  border:none;
  padding:0;
  cursor:pointer;
  transform-origin:var(--rope-x) 0;
  animation:guybrushSwing 6.5s ease-in-out infinite;
}

.guybrush-hang::before{
  content:"";
  position:absolute;
  left:var(--rope-x);
  bottom:100%;
  width:2px;
  height:var(--rope-h);
  background:linear-gradient(to bottom, rgba(255,255,255,.82), rgba(255,255,255,.42));
  transform:translateX(-50%);
  opacity:.95;
}

.guybrush-hang img{
  width:148px;
  height:auto;
  display:block;
  image-rendering:pixelated;
  filter:drop-shadow(0 12px 20px rgba(0,0,0,.26));
}

@keyframes guybrushSwing{
  0%   { transform:rotate(-2.2deg); }
  50%  { transform:rotate(2.2deg); }
  100% { transform:rotate(-2.2deg); }
}

.error-copy-wrap{
  width:100%;
  text-align:center;
  margin-top:10px;
}

.error-copy-wrap h1{
  max-width:none;
  font-size:clamp(52px, 12vw, 110px);
  line-height:.88;
  margin:0;
}

.error-line{
  margin:16px auto 0;
  max-width:34rem;
  color:var(--muted);
  font-size:clamp(17px, 2.3vw, 22px);
  line-height:1.7;
}

.error-links{
  margin-top:28px;
  display:flex;
  gap:18px;
  justify-content:center;
  flex-wrap:wrap;
}

.error-links a{
  text-decoration:none;
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
}

.error-links a:hover{
  color:var(--accent3);
}

.page-404 .reply{
  margin-top:14px;
  min-height:18px;
  text-align:center;
}

@media (max-width:700px){

  .rope{
    height:104px;
  }

  .guybrush-stage{
    height:220px;
    margin-top:0;
  }

  .guybrush-hang{
    --rope-x: 50px;
    --rope-h: 92px;
    margin-top:92px;
  }

  .guybrush-hang img{
    width:112px;
  }

  .error-line{
    max-width:20rem;
  }
}

.contact-img{
  width:18px;
  height:18px;
  display:block;
}

.contact-links{
  display:grid;
  gap:14px;
}

.contact-item{
  display:grid;
  grid-template-columns:20px auto 1fr;
  align-items:center;
  gap:10px;
}

.contact-label{
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
  min-width:72px;
}

.contact-icon{
  width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}

.contact-svg{
  width:18px;
  height:18px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.contact-item a{
  text-decoration:none;
  color:var(--text);
}

.contact-item a:hover{
  color:var(--accent3);
}