:root{
  --bg:#ffffff;
  --text:#0d0f12;
  --muted:#5a616b;
  --border:rgba(13,15,18,.14);
  --hover:rgba(13,15,18,.04);
  --max: 1080px;
  --padY: 42px;

  --radius: 15px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size:16px;
  line-height:1.65;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; text-decoration-color: rgba(13,15,18,.25); }

.container{
  width:min(var(--max), calc(100% - 56px));
  margin-inline:auto;
}

@media (max-width: 900px){
  .container{ width:min(var(--max), calc(100% - 32px)); }
}

.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:10;
  background: var(--bg);
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 18px 0;
}

.brand{
  letter-spacing:.12em;
  font-family: Arial, Helvetica, sans-serif;;
  font-weight:700;
  font-size:20px;
  text-transform:uppercase;
}

.nav-menu{
  display:flex;
  gap:18px;
  align-items:center;
  font-size:20px;
  color: var(--muted);
}

.nav-toggle{
  display:none;
  border:1px solid var(--border);
  background:transparent;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
}

@media (max-width: 900px){
  .nav-toggle{ display:inline-flex; }
  .nav-menu{
    display:none;
    position:absolute;
    right:16px;
    top:56px;
    flex-direction:column;
    gap:10px;
    padding:12px;
    border:1px solid var(--border);
    background: var(--bg);
    border-radius:12px;
  }
  .nav-menu.open{ display:flex; }
}

/* Page */
.page{
  padding: var(--padY) 0 calc(var(--padY) + 6px);
}

/* IMPORTANT: no horizontal dividers */
.rule{ display:none !important; }

/* Type */
.kicker{
  color:var(--muted);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin: 0 0 10px;
}

.h1{
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing:-.04em;
  line-height:1.02;
  margin: 0 0 10px;
}

.sub{
  margin:0;
  color:var(--muted);
  max-width: 78ch;
  font-size: 18px;
  line-height: 120%;
}

.note{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

/* Portfolio list */
.list{
  margin: 26px 0 0;
  padding:0;
  list-style:none;
  display:grid;
}

.item{
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display:grid;
  grid-template-columns: 48px 1fr auto;
  gap:16px;
  align-items:baseline;
}

.item:hover{ background: var(--hover); }

.index{
  color:var(--muted);
  font-size:12px;
  letter-spacing:.06em;
}

.item a{
  display:grid;
  gap:2px;
  width:100%;
}

.item-title{
  font-size:16px;
  font-weight:700;
  letter-spacing:-.01em;
}

.item-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}

.arrow{
  color:var(--muted);
  white-space:nowrap;
  font-size:12px;
}

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

/* Project page */
.back{
  display:inline-block;
  margin-bottom: 18px;
  color:var(--muted);
  font-size:12px;
}

.project-head{
  display:grid;
  gap:8px;
  margin-bottom: 22px;
}

/* === THIS is the key part (like screenshot) === */
.project-grid{
  display:grid;
  grid-template-columns: 350px 1fr;
  gap: 28px;
  align-items:start;
}

/* left column — NOT sticky (like screenshot) */
.side{
  position: static;
  padding-top: 0;
}

/* meta list — label/value aligned */
.meta-list{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:0px;
  font-size: 18px;
  line-height: 120%;
  color:var(--muted);
}

.meta-list li{
  display:grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items:baseline;
}

.meta-list strong{
  color: var(--text);
  font-weight:700;
}

.credits{ 
    margin:0; 
    padding-left: 18px; 
    color:var(--muted); } 

/* Credits-only divider */ 
.credits-block .rule{ 
    margin: 6px 0; } 

/* Credits toggle with triangle arrow */ 
.credits-toggle{ 
    cursor: pointer; 
    user-select: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
    color: var(--muted); 
    font-size: 18px;
  line-height: 120%; 
    margin: 1px 0; } 
    
/* triangle */ 
.credits-toggle::after{ 
    content: ""; 
    display: inline-block; 
    width: 0; height: 0; 
    border-top: 5px solid transparent; 
    border-bottom: 5px solid transparent; 
    border-right: 6px solid currentColor; 
    transform: rotate(180deg); /* pointing left */ 
    transition: transform 0.2s ease; } 
    
/* open state → triangle points down */ 
.credits-toggle.open::after{ 
    transform: rotate(270deg); } 
    
/* content */ 
.credits-content{ 
    display: none; 
    margin-top: 6px;
    font-size: 18px;
  line-height: 120%;; } 
    
.credits-content.open{ 
    display: block; }

/* right column text in 1 column */
.project-body{
  column-count: 1;
  column-gap: 28px;
}

.project-body .sub{
  max-width: none;       /* allow column flow */
  break-inside: avoid;
  margin: 0 0 0px;
}

@media (max-width: 980px){
  .project-grid{ grid-template-columns: 1fr; }
  .project-body{ column-count: 1; }
}

/* Gallery — 2 columns like screenshot */
.gallery{
  margin-top: 26px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

/* IMPORTANT: remove “lines between images” */
.figure{
  margin:0;
  border:0 !important;
  padding:0 !important;
}

.figure img{
  width:100%;
  height:auto;
  display:block;
  background:#fff;
  border-radius: var(--radius);
}

.caption{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

/* Pager */
.pager{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
  color:var(--muted);
  font-size:12px;
}

/* Footer */
.footer{
  border-top: 0;
  padding: 18px 0;
  margin-top: 30px;
}

.footer-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color: var(--muted);
  font-size: 12px;
}

/* Hover preview */
.preview{
  position:fixed;
  left:0; top:0;
  width: 280px;
  height: 190px;
  pointer-events:none;
  opacity:0;
  transform: translate(-9999px, -9999px);
  border:1px solid var(--border);
  background:#fff;
  border-radius: var(--radius);
  overflow:hidden;
}

.preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius: 0;
}

@media (max-width: 900px){
  .preview{ display:none; }
}

/* About */
.about-grid{
  display:grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items:start;
}

.about-portrait{
  margin:0;
}

.about-portrait img{
  width:100%;
  height:auto;
  display:block;
  background:#fff;
  border-radius: var(--radius);
}

.about-portrait figcaption{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  line-height: 1.6;
}

.about-content .section-title{
  margin-top:0;
}

/* contact links */
.contact-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
  color: var(--muted);
  font-size:17px;
}

/* su mobile: tutto full width (1 colonna) */
@media (max-width: 980px){
  .gallery{
    grid-template-columns: 1fr;
  }
  .gallery .figure{
    grid-column: 1 / -1 !important;
  }
}

/* Read more behavior */
.desc-more{
  display: block;
}

.read-more{
  display: none;
}

/* Desktop: always show full text, hide button */
@media (min-width: 981px){
  .desc-more{ display:inline !important; }
  .read-more{ display:none !important; }
}

/* Mobile: show preview, hide rest until open */
@media (max-width: 980px){
  .desc-more{ display:none !important; }
  .desc-more.open{ display:inline !important; }

  .read-more{
    display:inline-block !important;
    margin-top: 10px;
    background: none;
    border: none;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(13,15,18,.25);
  }
}

.figure.pdf iframe{
  width:auto;
  height: auto;           /* regola quanto “grande” appare il pdf */
  border:0;
  border-radius: var(--radius);
  background:#fff;
}

.pdf-actions{
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.pdf-actions a{
  text-decoration: underline;
  text-decoration-color: rgba(13,15,18,.25);
}

/* Images + videos in gallery */
.media{
  width:100%;
  height:auto;
  display:block;
  border-radius: var(--radius);
  background:#fff;
}
video.media{
  outline: none;
}

/* Projects grid (Portfolio page) */
.projects-grid{
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

/* Card */
.project-card{
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-media{
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 3 / 2;
}

.card-media img{
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 0; /* radius sta sul contenitore */
}

/* Bottom bar like screenshot */
.card-bar{
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.card-title{
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.card-meta{
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-arrow{
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  padding-bottom: 2px;
} 

/* Hover 
.project-card:hover .card-bar{
  background: rgba(13,15,18,.06);
} */

/* Mobile */
@media (max-width: 980px){
  .projects-grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.to-top{
  background: none;
  border: none;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(13,15,18,.25);
}

/* About "slide" with portrait background */
.about-page{
  position: relative;
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  z-index: 3;
  font-size: 12px;
  color: black;
}

/* background image */
.about-page::before{
  content:"";
  position: fixed;       /* feels like a slide background */
  inset: 0;
  background-image: var(--about-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .62;          /* adjust */
  pointer-events: none;
  z-index: -1;
}

/* readable content card */
.about-slide{
  position: relative;
  z-index: 1;
  margin-top: 16px;
  max-width: none;      /* editorial column */
}

/* optional: subtle panel behind text for readability */
.about-content{
 /* background: rgba(255,255,255,.78);
  backdrop-filter: blur(6px);*/
  border-radius: 14px;
  padding: 18px 18px;
}

/* FORCE EVERYTHING BLACK IN ABOUT */
.about-page h1,
.about-page h2,
.about-page h3,
.about-page h4,
.about-page p,
.about-page span,
.about-page a,
.about-page li,
.about-page .kicker,
.about-page .sub,
.about-page .note,
.about-page .contact-links,
.about-page .contact-links a{
  color: #000 !important;
}

/* FORCE EVERYTHING ARIAL IN ABOUT */
.about-page h1,
.about-page h2,
.about-page h3,
.about-page h4,
.about-page p,
.about-page span,
.about-page a,
.about-page li,
.about-page .kicker,
.about-page .sub,
.about-page .note,
.about-page .contact-links,
.about-page .contact-links a{
  font-family: Arial, Helvetica, sans-serif;
}




