/* =========================
   Luca Portfolio - Styles
   Palette: blu/azzurro/bianco sfumati
   Effetti: liquid glass + soft 3D
   ========================= */

:root{
  --bg0: #071226;
  --bg1: #0b2a5a;
  --bg2: #0ea5e9;

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);

  --glass: rgba(255,255,255,.10);
  --glass-strong: rgba(255,255,255,.14);
  --stroke: rgba(255,255,255,.16);

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow-soft: 0 12px 40px rgba(0,0,0,.28);

  --radius: 20px;
  --radius-lg: 28px;

  --max: 1120px;

  --nav-h: 76px;
}

/* Reset */
*{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; }
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% 10%, rgba(14,165,233,.40), transparent 60%),
              radial-gradient(1100px 700px at 80% 20%, rgba(59,130,246,.35), transparent 55%),
              radial-gradient(900px 700px at 50% 90%, rgba(255,255,255,.10), transparent 60%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

body {
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

::selection{ background: rgba(14,165,233,.35); }

.container{
  width: min(100% - 32px, var(--max));
  margin-inline:auto;
}

.spacer{ height: 56px; }
.hidden{ display:none !important; }

/* Decorative blobs */
.bg-blob{
  position: fixed;
  inset: auto;
  width: 540px;
  height: 540px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: .22;
  z-index: -2;
  pointer-events:none;
}
.bg-blob.blob-a{ top:-160px; left:-180px; background: linear-gradient(120deg, #38bdf8, #1d4ed8); }
.bg-blob.blob-b{ bottom:-220px; right:-220px; background: linear-gradient(120deg, #60a5fa, #22d3ee); }

/* Liquid glass surface */
.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* Soft 3D card */
.card{
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px;
  transform: translateZ(0);
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(600px 220px at 20% 10%, rgba(255,255,255,.22), transparent 55%),
              radial-gradient(600px 220px at 80% 0%, rgba(56,189,248,.20), transparent 55%),
              radial-gradient(600px 260px at 60% 120%, rgba(99,102,241,.16), transparent 55%);
  opacity:.75;
  pointer-events:none;
}
.card > *{ position: relative; z-index:1; }

.pill{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgba(0,0,0,.22);
}

/* Badge + bottone Contattami nella card Chi sono */
.skills-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Mobile: bottone sotto, centrato */
@media (max-width: 768px) {
  .skills-actions {
    justify-content: center;
  }

  .skills-actions .btn {
    width: 100%;
    text-align: center;
  }
}


.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(56,189,248,.30), rgba(255,255,255,.08));
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  user-select:none;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 22px 55px rgba(0,0,0,.33); }
.btn:active{ transform: translateY(0px); }

.btn.secondary{
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.badge{
  font-size: 12px;
  letter-spacing: .2px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: rgba(255, 255, 255, 0.85);
}

/* Navbar */
.nav{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  transition: transform 0.35s ease;

  position: sticky;
}

.nav.nav-hidden {
  transform: translateY(-110%);
}


.nav-inner{
  width: min(100% - 24px, 1620px);
  margin-inline:auto;
  padding: 10px 12px;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top: -10px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-mark{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 12px 34px rgba(0,0,0,.30);
  background: rgba(255,255,255,.08);
}

.brand:hover .brand-mark {
  box-shadow: 0 0 0 3px rgba(56,189,248,.35),
              0 14px 36px rgba(0,0,0,.35);
}



.brand-mark img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title{
  font-weight: 700;
  letter-spacing:.2px;
  line-height: 1.05;
}
.brand-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links{
  display:flex;
  gap: 10px;
  align-items:center;
}
.nav-links a{
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.85);
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-links a:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  transform: translateY(-1px);
}
.nav-links a.active{
  background: rgba(56,189,248,.14);
  border-color: rgba(56,189,248,.26);
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.icon-btn{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor:pointer;
  display:grid;
  place-items:center;
  transition: transform .18s ease, background .18s ease;
}
.icon-btn:hover{ transform: translateY(-2px); background: rgba(255,255,255,.10); }
.icon{
  width: 20px; height: 20px;
  opacity: .92;
}

/* Mobile menu drawer */
.drawer-backdrop{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
  z-index: 60;
}
.drawer{
  position: fixed;
  top: 12px;
  right: 12px;
  left: 12px;
  max-width: 520px;
  margin-left:auto;
  border-radius: 22px;
  padding: 14px;
  transform: translateY(-10px) scale(.98);
  opacity:0;
  pointer-events:none;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 61;
}
.drawer.open{
  transform: translateY(0px) scale(1);
  opacity:1;
  pointer-events:auto;
}
.drawer-backdrop.open{
  opacity:1;
  pointer-events:auto;
}
.drawer a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  margin-top: 10px;
}
.drawer a:first-of-type{ margin-top: 0; }
.drawer a:hover{ background: rgba(255,255,255,.10); }
.drawer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
}
.drawer-title{
  font-weight: 700;
}
.drawer-close{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  cursor:pointer;
}

/* Hero */
.hero{
  padding: 36px 0 18px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  align-items:stretch;
}
.hero h1{
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.05;
  letter-spacing: -.6px;
}
.hero p{
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 62ch;
}
.hero-cta{
  margin-top: 16px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.hero-stats{
  display:grid;
  gap: 12px;
  height: 100%;
}
.stat{
  padding: 18px;
  border-radius: 22px;
}
.stat .big{
  font-size: 22px;
  font-weight: 800;
}
.stat .small{
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
  line-height:1.35;
}

/* Sections */
.section{
  padding: 26px 0;
}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 12px;
}

/* Responsive fix: sezione "Come lavoro" */
@media (max-width: 900px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .section-head .pill {
    align-self: center;
  }
}

@media (max-width: 900px) {
  .section-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }

  .section-head .pill {
    align-self: center;
  }

  .section-title,
  .section-sub {
    text-align: center;
  }
}


.section-title{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.section-sub{
  color: var(--muted);
  line-height:1.5;
  max-width: 60ch;
  font-size: 14px;
}

/* Cards grid */
.grid{
  display:grid;
  gap: 14px;
}
.grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.grid.cols-2{ grid-template-columns: repeat(2, 1fr); }

.feature{
  padding: 22px;
  border-radius: 26px;
}
.feature h3{
  font-size: 16px;
  font-weight: 800;
}
.feature p{
  margin-top: 8px;
  color: var(--muted);
  line-height:1.55;
  font-size: 16px;
}

/* Portfolio cards */
.project{
  border-radius: 26px;
  overflow:hidden;
}
.project-cover{
  aspect-ratio: 16/9;
  background:
    radial-gradient(600px 220px at 20% 10%, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(135deg, rgba(14,165,233,.55), rgba(29,78,216,.55));
  border-bottom: 1px solid rgba(255,255,255,.14);
  display:flex;
  align-items:flex-end;
  padding: 14px;
}
.project-cover .badge{ background: rgba(255,255,255,.10); }
.project-body{
  padding: 18px;
}
.project-title{
  font-weight: 900;
  letter-spacing:-.2px;
}
.project-desc{
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.project-actions{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* About page */
.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 16px;
  align-items: stretch;
}
.avatar{
  border-radius: 28px;
  overflow:hidden;
  aspect-ratio: 1/1;
  background:
    radial-gradient(600px 220px at 20% 10%, rgba(255,255,255,.20), transparent 55%),
    linear-gradient(135deg, rgba(56,189,248,.55), rgba(29,78,216,.55));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--shadow);
}
.avatar-inner{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  text-align:center;
  padding: 18px;
  color: rgba(255,255,255,.88);
}
.k-list{
  display:grid;
  gap: 10px;
  margin-top: 10px;
}
.k-item{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 14px;
  border-radius: 18px;
}
.k-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  background: rgba(56,189,248,.95);
  box-shadow: 0 0 0 6px rgba(56,189,248,.14);
}

.k-dot1{
  width: 14px;
  height: 10px;
  border-radius: 999px;
  margin-top: 13px;
  background: rgba(56,189,248,.95);
  box-shadow: 0 0 0 6px rgba(56,189,248,.14);
}

/* =========================
   ABOUT - FOTO PROFILO
   ========================= */

.avatar-photo {
  position: relative;
  height: 100%;
  min-height: 100%;
  width: 100%;
  padding: 0;
  overflow: hidden;
  display: flex;
}

/* immagine full */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* overlay luminosità */
.avatar-light {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(600px 260px at 20% 10%, rgba(255,255,255,.35), transparent 55%),
    radial-gradient(600px 260px at 80% 100%, rgba(56,189,248,.18), transparent 60%);
  pointer-events: none;
}

/* pill in basso a destra */
.avatar-pill {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
}


/* Contact page */
.form{
  display:grid;
  gap: 12px;
}
.field{
  display:grid;
  gap: 8px;
}
label{
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
input, textarea{
  width:100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  outline:none;
  transition: border-color .18s ease, background .18s ease;
}
input:focus, textarea:focus{
  border-color: rgba(56,189,248,.45);
  background: rgba(255,255,255,.10);
}
textarea{ min-height: 130px; resize: vertical; }

.form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Placeholder più chiaro (form contatti) */
.form input::placeholder,
.form textarea::placeholder {
  color: rgba(255, 255, 255, 0.65); /* bianco morbido */
}

/* Compatibilità browser */
.form input::-webkit-input-placeholder,
.form textarea::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.416);
}

.form input:-ms-input-placeholder,
.form textarea:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.65);
}


.note{
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Footer */
.footer{
  padding: 22px 0 32px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr .9fr;
  gap: 14px;
}
.footer h4{
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
}
.footer a{
  color: rgba(255,255,255,.78);
}
.footer a:hover{
  color: rgba(255,255,255,.95);
}
.footer ul{
  list-style:none;
  display:grid;
  gap: 8px;
}
.copyright{
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* On-scroll animations */
.reveal{
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .65s ease, transform .65s ease;
  will-change: opacity, transform;
}
.reveal.show{
  opacity: 1;
  transform: translateY(0px);
}

/* Accessibility */
:focus-visible{
  outline: 2px solid rgba(56,189,248,.7);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .grid.cols-3{ grid-template-columns: 1fr; }
  .grid.cols-2{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .nav-links{ display:none; }
  .form-row{ grid-template-columns: 1fr; }
}


/* =========================
   FOOTER FULL WIDTH
   ========================= */

.footer-full {
  width: 100%;
  margin: 0;
  border-radius: 0;
  padding: 40px 6vw 20px;
  box-shadow: 0 -20px 60px rgba(0,0,0,.35);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Brand */
.footer-logo {
  font-size: 34px;
  font-weight: 700;
  font-family: cursive; /* se vuoi lo stesso stile dell'immagine */
}

/* Menu */
.footer-menu h4,
.footer-social h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,.8);
}

.footer-links a:hover {
  color: #ffffff;
}

/* Social */
.social-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Bottom bar */
.footer-bottom {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.75);
}

/* Responsive */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}


.footer-logo-img {
  max-width: 360px;
  width: 120%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
  opacity: 0.95;
}

/* mobile */
@media (max-width: 1145px) {
  .footer-logo-img {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .footer-logo-img {
    max-width: 250px;
    margin: 0 auto;
  }
}


.footer-menu-columns {
  display: grid;
  grid-template-columns: auto auto;
  gap: 14px;
}


/* mobile: centra i contenuti al centro */
@media (max-width: 600px) {
  .footer-menu-columns {
    align-items: center;
    margin-left: 60px;
  }

  .footer-menu h4,
  .footer-social h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
    margin-left: 60px;
}

.social-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: 60px;
}

}

.footer-title {
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 65%;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255,255,255,.35),
    rgba(255,255,255,.08)
  );
}


/* =========================
   BIGLIETTO DA VISITA RUOTANTE
   ========================= */

.visit-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* contenitore */
.visit-card {
  width: 450px;
  height: 300px;
  perspective: 1000px;
}

/* anima la rotazione */
.visit-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
}

.visit-card:hover .visit-card-inner {
  transform: rotateY(180deg);
}

/* front & back */
.visit-card-front,
.visit-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
}

/* immagini */
.visit-card-front img,
.visit-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* lato front */
.visit-card-front {
  box-shadow:
    0 0 0 rgba(255,255,255,0),
    -0.2rem 0 0.75rem hsla(0, 0%, 0%, 0.45);
}

/* lato back */
.visit-card-back {
  transform: rotateY(180deg);
  box-shadow:
    0 0 0 rgba(255,255,255,0),
    -0.2rem 0 0.75rem hsla(0, 0%, 0%, 0.45);
}

/* mobile */
@media (max-width: 460px) {
  .visit-card {
    width: 290px;
    height: 190px;
  }
}


/* =========================
   FORM SUCCESS MESSAGE
   ========================= */

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;

  color: rgba(255,255,255,.95);
  background: linear-gradient(
    180deg,
    rgba(14,165,233,.25),
    rgba(59,130,246,.18)
  );
  border: 1px solid rgba(56,189,248,.45);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
}



/* =========================
   PROJECT COVER IMAGE STYLES
   ========================= */
/* Project cover image */
.project-cover {
  position: relative;
  overflow: hidden;
}

/* Immagine che riempie tutto */
.project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 riempie senza deformare */
  z-index: 0;
}

/* Badge sempre sopra */
.project-cover .badge {
  position: relative;
  z-index: 2;
}

/* Mantiene eventuali effetti luce / overlay */
.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.05)
  );
  z-index: 1;
  pointer-events: none;
}
