/* ====== PALETTE & RESET ====== */
:root {
  --font-primary: 'Inter', Arial, sans-serif;
  --font-secondary: 'Montserrat', Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====== TYPOGRAPHY ====== */
body {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-main);
  min-height: 100vh;
  padding-top: 0 !important;
  overflow-x: hidden; 
  transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 900 !important;
  color: var(--accent-orange);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p, li, a, button, input, textarea, nav {
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--text-main);
}

/* ====== HEADER ====== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3000;
  background: transparent;
  box-shadow: none ;
}
.site-header + section {
  /* Offset per evitare che i titoli sotto l'header fisso vengano coperti */
  padding-top: 5.5rem;
}
/* Offset anche quando il primo elemento è <main> (es. about, portfolio) */
.site-header + main {
  padding-top: 6.5rem;
}
@media (max-width: 900px) {
  .site-header + section { padding-top: 5rem; }
  .site-header + main { padding-top: 5.8rem; }
}
.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.logo a {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-bright);
  text-decoration: none;
  letter-spacing: -1px;
  transition: all 0.3s;
}
.logo a:hover {
  transform: scale(1.05);
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 4001;
  width: 44px;
  height: 44px;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.2s;
}
.nav-toggle span {
  width: 32px;
  height: 3.5px;
  background: var(--accent-warm);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(.4,1,.7,1);
  display: block;
  position: relative;
}
.nav-toggle span:nth-child(2) {
  width: 24px;
}
.nav-toggle span:nth-child(3) {
  width: 18px;
}
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
  background: var(--bg-alt);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
  width: 32px;
  background: var(--bg-alt);
}

/* Menu fullscreen */
.main-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 1;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(.4,1,.7,1);
  z-index: 4000;  
  backdrop-filter: none;
}
.main-nav.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.main-nav ul {
  flex-direction: column;
  gap: 2.8rem;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
}
.main-nav li {
  width: 100vw;
  text-align: center;
}
.main-nav a {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--accent-bright);
  letter-spacing: -1px;
  padding: 0.7em 0;
  width: 100vw;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  line-height: 1.1;
}
.main-nav a em, .main-nav a i {
  font-family: var(--font-primary), sans-serif;
  font-style: italic;
  font-weight: 400;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-orange);
}

/* Transizione menu fullscreen: fade-in + slide-up voci */
.main-nav {
  transition: opacity 0.45s cubic-bezier(.4,1,.7,1), visibility 0.45s cubic-bezier(.4,1,.7,1);
}
.main-nav ul {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s cubic-bezier(.4,1,.7,1), transform 0.5s cubic-bezier(.4,1,.7,1);
}
.main-nav.open ul {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}
.main-nav li {
  transition: opacity 0.4s cubic-bezier(.4,1,.7,1), transform 0.4s cubic-bezier(.4,1,.7,1);
  opacity: 0;
  transform: translateY(30px);
}
.main-nav.open li {
  opacity: 1;
  transform: translateY(0);
}
.main-nav.open li:nth-child(1) { transition-delay: 0.18s; }
.main-nav.open li:nth-child(2) { transition-delay: 0.28s; }
.main-nav.open li:nth-child(3) { transition-delay: 0.38s; }
.main-nav.open li:nth-child(4) { transition-delay: 0.48s; }




/* ====== FOOTER ====== */

.site-footer {
  background: var(--bg-alt);
  color: var(--text-main);
  border-top: 2.5px solid #e5dcc3;
  box-shadow: 0 -2px 24px rgba(182,168,140,0.08);
  padding: 3.5rem 0 1.5rem 0;
  font-family: var(--font-primary);
  margin-top: 4rem;
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 2rem;
}
.footer-brand h3 {
  font-family: var(--font-secondary);
  font-size: 1.3rem;
  color: var(--accent-orange);
  font-weight: 900;
  margin-bottom: 0.7rem;
  letter-spacing: -1px;
}
.footer-brand p {
  font-size: 1.05rem;
  color: var(--text-main);
  opacity: 0.85;
  line-height: 1.6;
  max-width: 320px;
}
.footer-links h4, .footer-contact h4 {
  font-family: var(--font-secondary);
  font-size: 1.08rem;
  color: var(--accent-warm);
  font-weight: 800;
  margin-bottom: 0.7rem;
  letter-spacing: -0.5px;
}
.footer-links ul, .footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li, .footer-contact li {
  margin-bottom: 0.4rem;
}
.footer-links a, .footer-contact a {
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-primary);
  position: relative;
  transition: color 0.2s;
}
.footer-links a:after, .footer-contact a:after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-bright);
  transition: width 0.3s;
  position: absolute;
  left: 0; bottom: -2px;
}
.footer-links a:hover:after, .footer-contact a:hover:after {
  width: 100%;
}
.footer-links a:hover, .footer-contact a:hover {
  color: var(--accent-bright);
}
.footer-bottom {
  text-align: center;
  color: var(--text-main);
  font-size: 1rem;
  margin-top: 2.5rem;
  opacity: 0.7;
  font-family: var(--font-secondary);
}
@media (max-width: 900px) {
  .footer-main {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0 1rem;
  }
  .footer-brand p { max-width: 100%; }
}




/* ====== HERO ====== */

.hero-bgimg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.hero-bgimg {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  padding: 0;
  top: 0;
}
.hero-bgimg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 26, 27, 0.62);
  z-index: 1;
}
.hero-bgimg-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}
.hero-bgimg-title {
  font-family: var(--font-secondary);
  font-size: 4.2rem;
  font-weight: 900;
  color: var(--accent-bright);
  letter-spacing: -2px;
  margin-bottom: 1.2rem;
  line-height: 1.05;
  text-shadow: 0 4px 32px rgba(0,0,0,0.18);
}
.hero-bgimg-subtitle {
  font-size: 1.5rem;
  color: var(--white);
  font-family: var(--font-primary);
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
@media (max-width: 900px) {
  .hero-bgimg-title { font-size: 2.2rem; }
  .hero-bgimg-subtitle { font-size: 1.1rem; }
  .hero-bgimg-content { padding: 2.5rem 1rem; }
}
@media (max-width: 600px) {
  .hero-bgimg-title { font-size: 1.3rem; }
  .hero-bgimg-subtitle { font-size: 0.98rem; }
  .hero-bgimg-content { padding: 1.2rem 0.3rem; }
}


/* ====== INTRO SECTION ====== */

.intro-flex {
  display: flex;
  align-items: center;
  gap: 4vw;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem 2rem;
}
.intro-text-col {
  flex: 1 1 0;
  min-width: 260px;
  max-width: 600px;
}

.intro-text-col .btn-primary {
  margin-top: 2rem;
}
.intro-title {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  color: var(--accent-orange);
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}
.intro-desc {
  font-size: 1.18rem;
  color: var(--text-main);
  line-height: 1.7;
  font-family: var(--font-primary);
  font-weight: 400;
}
.intro-img-col {
  flex: 0 0 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intro-img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  border: 6px solid var(--bg-alt);
  background: var(--bg-alt);
  transition: transform 0.3s cubic-bezier(.4,1,.7,1);
}
.intro-img:hover {
  transform: scale(1.04) rotate(-2deg);
}
@media (max-width: 900px) {
  .intro-flex {
    flex-direction: column-reverse;
    gap: 2.5rem;
    padding: 3rem 1rem 2rem 1rem;
  }
  .intro-img-col {
    flex: 0 0 180px;
  }
  .intro-img {
    width: 180px;
    height: 180px;
  }
  .intro-title { font-size: 1.5rem; }
  .intro-desc { font-size: 1rem; }
}


/* ====== SKILLS ====== */


.skills {
  background: none;
  padding: 5rem 0 4rem 0;
  max-width: 1200px;
  margin: 0 auto;
}
.skills-title {
  font-family: var(--font-secondary);
  font-size: 2.7rem;
  color: var(--accent-orange);
  font-weight: 900;
  text-align: left;
  margin-bottom: 3.5rem;
  letter-spacing: -1.5px;
  text-shadow: 0 2px 12px rgba(244,185,66,0.07);
  margin-left: 2vw;
}
.skills-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  align-items: start;
  margin: 0 auto;
  max-width: 1100px;
  position: relative;
}
.skills-area {
  background: var(--bg-alt);
  border-radius: 38px ;
  box-shadow: 0 8px 40px rgba(182,168,140,0.18);
  padding: 3.2rem 2.2rem 2.2rem 2.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  transition: box-shadow 0.22s, transform 0.18s;
  font-family: var(--font-primary);
  min-width: 320px;
  max-width: 480px;
  width: 100%;
}
.skills-area:nth-child(odd) {
  margin-top: 3.5rem;
}
.skills-area:hover {
  box-shadow: 0 18px 64px rgba(244,185,66,0.15);
  transform: scale(1.035) rotate(-1deg);
}
.skills-area h3 {
  font-family: var(--font-secondary);
  font-size: 1.45rem;
  color: var(--accent-warm);
  font-weight: 800;
  margin-bottom: 1.3rem;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 8px rgba(244,185,66,0.06);
}
.skills-list {
  list-style: disc inside;
  color: var(--text-main);
  font-size: 1.18rem;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
  line-height: 1.8;
}
.skills-list li {
  margin-bottom: 0.4rem;
  font-family: var(--font-primary);
}
.skills-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  margin-top: 1.1rem;
}
.tool-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--bg-main);
  border: 1.5px solid #e5dcc3;
  border-radius: 22px ;
  font-family: var(--font-secondary);
  font-size: 1.08rem;
  font-weight: 700;
  padding: 0.48em 1.4em 0.48em 1.2em;
  box-shadow: 0 2px 12px rgba(182,168,140,0.13);
  letter-spacing: 0.01em;
  transition: box-shadow 0.18s, transform 0.18s;
  margin-bottom: 0.1em;
}
.tool-badge:hover {
  box-shadow: 0 12px 32px rgba(244,185,66,0.15);
  transform: scale(1.09) rotate(-2deg);
}
@media (max-width: 900px) {
  .skills-areas {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    align-items: center;
    max-width: 98vw;
  }
  .skills-area {
    max-width: 98vw;
    min-width: 0;
    padding: 2rem 1rem 1.2rem 1rem;
  }
  .skills-title { font-size: 1.5rem; margin-bottom: 1.2rem; margin-left: 1vw; }
}




/* ====== FEATURED WORK ====== */

.featured-work {
  padding: 5rem 0 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
}
.featured-title {
  font-family: var(--font-secondary);
  font-size: 2.3rem;
  color: var(--accent-orange);
  font-weight: 900;
  text-align: left;
  margin-bottom: 2.5rem;
  letter-spacing: -1px;
  margin-left: 2vw;
}
.featured-list {
  display: flex;
  gap: 2.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  max-width: 100%;
  margin-left: 2vw;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

a.featured-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.featured-block {
  flex: 0 0 auto;
  width: 350px;  
  max-width: 90vw;
  min-height: 480px;
  background: var(--bg-alt);
  border-radius: 32px 32px 24px 24px/40px 40px 18px 18px;
  box-shadow: 0 4px 32px rgba(182,168,140,0.13);
  padding: 0 0 1.2rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  scroll-snap-align: start;
  transition: box-shadow 0.22s, transform 0.18s;
  margin-bottom: 0.5rem;
  border: 2.5px solid #e5dcc3;
  position: relative;
}

.featured-img-wrap {
  width: 100%;
  height: 210px;
  border-radius: 24px 24px 0 0/32px 32px 0 0;
  overflow: hidden;
  background: #ede3d3;
  border-bottom: 2px solid #e5dcc3;
  box-shadow: 0 2px 12px rgba(182,168,140,0.10);
}
.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 24px 24px 0 0/32px 32px 0 0;
  transition: transform 0.3s;
  max-width: 100%;
}
.featured-block:hover .featured-img-wrap img {
  transform: scale(1.04) rotate(-1deg);
}
.featured-info {
  padding: 1.2rem 1.5rem 0.2rem 1.5rem;
  width: 100%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* distribuisce badge, titolo e desc */
}
.featured-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--bg-main);
  border-radius: 14px;
  font-family: var(--font-secondary);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.3em 1em;
  margin-bottom: 0.7rem;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(182,168,140,0.10);
}
.featured-name {
  font-family: var(--font-secondary);
  font-size: 1.18rem;
  color: var(--accent-warm);
  font-weight: 800;
  margin: 0.5rem 0 0.7rem 0;
  letter-spacing: -0.5px;
}
.featured-desc {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.featured-name,
.featured-desc {
  word-wrap: break-word;
}
.featured-cta {
  text-align: left;
  margin-left: 2vw;
  margin-top: 2.2rem;
}
.featured-cta .btn-primary {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1em 2.2em;
  border-radius: 22px;
  background: var(--accent-orange);
  color: #fff;
  border: none;
  transition: background 0.3s, transform 0.18s;
  cursor: pointer;
  display: inline-block;
  margin-top: 0.2em;
  box-shadow: 0 2px 8px rgba(242,140,53,0.10);
}
.featured-cta .btn-primary:hover {
  background: var(--accent-bright);
  color: var(--accent-warm);
  transform: scale(1.05);
}
@media (max-width: 900px) {
  .featured-title { font-size: 1.5rem; margin-bottom: 1.2rem; }
  .featured-list { gap: 1rem; margin-left: 0; padding: 0 1rem; }
  .featured-block { flex: 0 0 auto; width: calc(100vw - 2rem); max-width: none; }
  .featured-img-wrap { height: 160px; }
  .featured-info { padding: 0.8rem 1rem 0.2rem 1rem; }
  .featured-cta { margin-top: 1.2rem; }
}


/* ====== TESTIMONIALS ====== */

.testimonials {
  background: none;
  padding: 5rem 0 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
}
.testimonials-title {
  font-family: var(--font-secondary);
  font-size: 2.3rem;
  color: var(--accent-orange);
  font-weight: 900;
  text-align: left;
  margin-bottom: 2.5rem;
  letter-spacing: -1px;
  margin-left: 2vw;
}
.testimonials-list {
  display: flex;
  gap: 2.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  max-width: 100vw;
  margin-left: 2vw;
}
.testimonial-block {
  min-width: 340px;
  max-width: 400px;
  background: var(--bg-alt);
  border-radius: 32px;
  box-shadow: 0 4px 32px rgba(182,168,140,0.13);
  padding: 2.2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  scroll-snap-align: start;
  transition: box-shadow 0.22s, transform 0.18s;
  margin-bottom: 0.5rem;
  border: 2.5px solid #e5dcc3;
  position: relative;
}
.testimonial-block:hover {
  box-shadow: 0 16px 48px rgba(244,185,66,0.13);
  transform: scale(1.04) rotate(-1deg);
}
.testimonial-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.2rem;
  border: 3px solid var(--accent-bright);
  box-shadow: 0 2px 8px rgba(244,185,66,0.10);
}

.testimonial-quote {
  font-size: 1.18rem;
  font-family: var(--font-secondary);
  color: var(--accent-warm);
  font-style: italic;
  margin-bottom: 1.2rem;
  line-height: 1.6;
  position: relative;
  padding-left: 1.2rem;
}
.testimonial-quote:before {
  content: '“';
  font-size: 2.2rem;
  color: var(--accent-bright);
  position: absolute;
  left: 0;
  top: -0.7rem;
  font-family: var(--font-secondary);
  opacity: 0.7;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.5rem;
}
.testimonial-name {
  font-family: var(--font-secondary);
  font-size: 1.08rem;
  color: var(--accent-orange);
  font-weight: 800;
}
.testimonial-role {
  font-size: 0.98rem;
  color: var(--text-main);
  opacity: 0.8;
}
@media (max-width: 900px) {
  .testimonials-title { font-size: 1.5rem; margin-bottom: 1.2rem; }
  .testimonials-list { gap: 1.2rem; }
  .testimonial-block { min-width: 220px; max-width: 320px; padding: 1.2rem 1rem 1rem 1rem; }
}

/* ====== CTA ====== */
.cta {
  background: none;
  padding: 5rem 0 4rem 0;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.cta-inner {
  background: var(--bg-alt);
  border-radius: 32px;
  box-shadow: 0 4px 32px rgba(182,168,140,0.13);
  padding: 3.2rem 2.2rem 2.2rem 2.2rem;
  border: 2.5px solid #e5dcc3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.cta-title {
  font-family: var(--font-secondary);
  font-size: 2.1rem;
  color: var(--accent-warm);
  font-weight: 900;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}
.cta-desc {
  font-size: 1.18rem;
  color: var(--text-main);
  line-height: 1.7;
  font-family: var(--font-primary);
  font-weight: 400;
  margin-bottom: 1.2rem;
}
.cta-btn {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1em 2.2em;
  border-radius: 22px;
  background: var(--accent-orange);
  color: #fff;
  border: none;
  transition: background 0.3s, transform 0.18s;
  cursor: pointer;
  display: inline-block;
  margin-top: 0.2em;
  box-shadow: 0 2px 8px rgba(242,140,53,0.10);
}
.cta-btn:hover {
  background: var(--accent-bright);
  color: var(--accent-warm);
  transform: scale(1.05);
}
@media (max-width: 900px) {
  .cta-inner { padding: 1.5rem 1rem 1.2rem 1rem; }
  .cta-title { font-size: 1.2rem; }
  .cta-desc { font-size: 1rem; }
}



/* ====== CONTATTI ====== */

.contact-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 0 4rem 0;
}
.contact-flex {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  justify-content: center;
}
.contact-info {
  flex: 1 1 320px;
  background: var(--bg-alt);
  border-radius: 32px;
  box-shadow: 0 4px 32px rgba(182,168,140,0.10);
  border: 2.5px solid #e5dcc3;
  padding: 2.5rem 2rem 2rem 2rem;
  font-family: var(--font-primary);
  min-width: 260px;
  max-width: 400px;
}
.contact-title {
  font-family: var(--font-secondary);
  font-size: 1.3rem;
  color: var(--accent-orange);
  font-weight: 900;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.2rem;
}
.contact-list li {
  margin-bottom: 0.5rem;
}
.contact-list a {
  color: var(--accent-warm);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-primary);
  transition: color 0.2s;
  position: relative;
}
.contact-list a:hover {
  color: var(--accent-bright);
}
.contact-note {
  font-size: 1.05rem;
  color: var(--text-main);
  opacity: 0.8;
  margin-top: 1.2rem;
  line-height: 1.6;
}
.contact-form {
  flex: 2 1 400px;
  background: var(--bg-alt);
  border-radius: 32px;
  box-shadow: 0 4px 32px rgba(182,168,140,0.10);
  border: 2.5px solid #e5dcc3;
  padding: 2.5rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 260px;
  max-width: 600px;
}
.contact-form label {
  font-family: var(--font-secondary);
  font-size: 1.08rem;
  color: var(--accent-warm);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1.5px solid #e5dcc3;
  border-radius: 18px;
  font-size: 1rem;
  font-family: var(--font-primary);
  background: #f8f4ec;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(182,168,140,0.06);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px var(--accent-bright, #f4b94233);
}
.contact-form button {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1em 2.2em;
  border-radius: 22px;
  background: var(--accent-orange);
  color: #fff;
  border: none;
  transition: background 0.3s, transform 0.18s;
  cursor: pointer;
  display: inline-block;
  margin-top: 0.2em;
  box-shadow: 0 2px 8px rgba(242,140,53,0.10);
}
.contact-form button:hover {
  background: var(--accent-bright);
  color: var(--accent-warm);
  transform: scale(1.05);
}
@media (max-width: 900px) {
  .contact-main { padding: 2.5rem 0 2rem 0; }
  .contact-flex { flex-direction: column; gap: 2rem; align-items: stretch; }
  .contact-info, .contact-form { max-width: 98vw; min-width: 0; padding: 1.5rem 1rem 1.2rem 1rem; }
}




/* ====== ABOUT PAGE ====== */

.about-intro-alt {
  padding: 6rem 0;
  background-color: var(--bg-main);
}
.about-intro-alt-container {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.about-intro-alt-text {
  flex: 1;
  max-width: 650px;
}
.about-title-alt {
  font-size: 3rem;
  font-family: var(--font-secondary);
  color: var(--accent-orange);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
}
.about-subtitle-alt {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 2rem;
}
.about-intro-alt-text .btn-primary {
  font-size: 1.1rem;
  padding: 0.8em 1.8em;
}
.about-intro-alt-photo {
  flex: 0 0 320px;
  height: 400px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(182, 168, 140, 0.2);
  border: 6px solid var(--white);
}
.about-intro-alt-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}
.about-intro-alt-photo:hover img {
  transform: scale(1.05);
}

.experience-showcase {
  padding: 6rem 0;
  background-color: var(--bg-alt);
  border-top: 2px solid #e5dcc3;
  border-bottom: 2px solid #e5dcc3;
}
.experience-category {
  margin-bottom: 4rem;
}
.category-title {
  font-size: 2.5rem;
  font-family: var(--font-secondary);
  color: var(--accent-orange);
  text-align: center;
  margin-bottom: 3rem;
}
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.experience-card {
  background: var(--bg-main);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 6px 30px rgba(182, 168, 140, 0.1);
  border: 1.5px solid #e5dcc3;
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}
.experience-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(182, 168, 140, 0.18);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.experience-card .exp-logo {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background-color: #fff;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.experience-card .exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-title {
  flex: 1;
}
.experience-card .exp-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-orange);
  line-height: 1.3;
}
.experience-card .exp-meta {
  font-size: 0.95rem;
  color: var(--text-main);
  opacity: 0.9;
}
.experience-card .exp-period {
  font-size: 0.9rem;
  color: var(--accent-warm);
  font-weight: 600;
  margin-bottom: 1rem;
}
.experience-card .exp-desc {
  font-size: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}
.experience-row {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.experience-row .experience-category {
  flex: 1;
}
.experience-grid-small {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Responsive About Alt */
@media (max-width: 900px) {
  .about-intro-alt-container {
    flex-direction: column-reverse;
    text-align: center;
  }
  .about-intro-alt-photo {
    width: 280px;
    height: 320px;
    margin-bottom: 2rem;
  }
  .experience-row {
    flex-direction: column;
  }
}


/* ====== PORTFOLIO ====== */
.portfolio-hero {
  padding: 5rem 0 2rem 0;
  background: var(--bg-alt);
}
.portfolio-title {
  font-size: 2.8rem;
  font-family: var(--font-secondary);
  color: var(--accent-orange);
  text-align: center;
  margin-bottom: 1.2rem;
}
.portfolio-subtitle {
  font-size: 1.18rem;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 0.5rem;
}
.portfolio-filter-section {
  background: var(--bg-alt);
  padding-bottom: 1.5rem;
}
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-btn {
  font-family: var(--font-secondary);
  font-size: 1.08rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--accent-orange);
  border: 2px solid var(--accent-orange);
  border-radius: 18px;
  padding: 0.5em 1.5em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}
.portfolio-grid-section {
  background: var(--bg-main);
  padding: 2rem 0 5rem 0;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2.2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.portfolio-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  border-radius: 22px;
  box-shadow: 0 6px 30px rgba(182,168,140,0.10);
  border: 1.5px solid #e5dcc3;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s, transform 0.3s;
  overflow: hidden;
  cursor: pointer;
}
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 40px rgba(182,168,140,0.18);
}
.portfolio-card-img {
  width: 100%;
  height: 180px;
  background: #ede3d3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.portfolio-card:hover .portfolio-card-img img {
  transform: scale(1.06) rotate(-1deg);
}
.portfolio-card-content {
  padding: 1.3rem 1.5rem 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.portfolio-card-title {
  font-family: var(--font-secondary);
  font-size: 1.18rem;
  color: var(--accent-warm);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}
.portfolio-card-desc {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 0.7rem;
  line-height: 1.5;
}
.portfolio-card-cat {
  display: inline-block;
  background: var(--secondary);
  color: var(--bg-main);
  border-radius: 14px;
  font-family: var(--font-secondary);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.3em 1em;
  margin-top: auto;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(182,168,140,0.10);
}
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .portfolio-card-img {
    height: 140px;
  }
  .portfolio-card-content {
    padding: 1rem 1rem 0.9rem 1rem;
  }
}

/* ====== PROJECT PAGE ====== */

/* ====== HERO FULL BG ====== */
.project-hero-bg {
  position: relative;
  height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-bg-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 2rem;
}

.hero-content .project-title {
  font-family: var(--font-secondary);
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.hero-content .project-tags {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content .project-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

/* ====== PROJECT DETAILS ====== */
.project-details {
  background: var(--bg-main);
  padding: 2rem 0;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.details-item h4 {
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.details-item p {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}
/* ====== SEZIONI ALTERNATE ====== */
.project-section {
  background: var(--bg-main);
  padding: 4rem 0;
}

.project-section.alt {
  background: var(--bg-alt);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
}

.section-text h2 {
  font-family: var(--font-secondary);
  font-size: 1.6rem;
  color: var(--accent-orange);
  margin-bottom: 1rem;
}

.section-text p {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.7;
}

.section-img img {
  height: 100%;
  max-height: 400px;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(182,168,140,0.10);
}
@media screen and (max-width: 900px) {
  .section-img img {
    max-width: 90vw;
  }
}

/* ====== GALLERY ====== */
.project-gallery {
  background: var(--bg-main);
  padding: 3rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid img {
  height: 100%;
  max-height: 400px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(182,168,140,0.10);
  display: block;
}

/* ====== DOWNLOAD BANNER ====== */
.project-download-banner {
  background: var(--bg-alt);
  padding: 4rem 0;
  text-align: center;
}

.project-download-banner h2 {
  font-family: var(--font-secondary);
  font-size: 1.8rem;
  color: var(--accent-orange);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.project-download-banner p {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.download-banner-img {
  max-width: 600px;
  margin: 0 auto;
}

.download-link {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-link:hover {
  transform: scale(1.02);
}

.download-banner-img img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(182,168,140,0.15);
  transition: box-shadow 0.3s ease;
}

.download-link:hover img {
  box-shadow: 0 12px 48px rgba(182,168,140,0.25);
}

/* ====== CTA ====== */
.project-cta {
  text-align: center;
  padding: 3rem 0;
}

.project-cta a {
  display: inline-block;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 22px;
  padding: 1em 2.2em;
  margin: 0.4rem;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary {
  background: var(--accent-orange);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-orange);
  color: var(--accent-orange);
}

.btn-secondary:hover {
  background: var(--accent-orange);
  color: #fff;
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .hero-content .project-title { font-size: 2rem; }
  .hero-content .project-subtitle { font-size: 1rem; }
  
  .project-download-banner {
    padding: 3rem 0;
  }
  
  .project-download-banner h2 {
    font-size: 1.5rem;
  }
  
  .project-download-banner p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .download-banner-img {
    max-width: 100%;
    padding: 0 1rem;
  }
}





.btn-primary {
  background: var(--accent-orange);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: #fff;
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-orange);
  color: var(--accent-orange);
}

.btn-secondary:hover {
  background: var(--accent-orange);
  color: #fff;
  transform: scale(1.05);
}

/* Optional container max-width utility */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 900px) {
  .project-title {
    font-size: 2rem;
  }
  .project-subtitle {
    font-size: 1rem;
  }
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 30px;
  margin: 0 0.5rem;
}

.btn-primary {
  background: var(--accent-bright);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-orange);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-bright);
  border: 2px solid var(--accent-bright);
}

.btn-secondary:hover {
  background: var(--accent-bright);
  color: var(--white);
}



/* ====== CLEAN NATURE THEME OVERRIDES (teal/emerald/mint) ====== */
:root {
  /* Sfondo più pulito */
  --bg-main: #FAFCFB;          /* bianco con leggerissima tinta mint */
  --bg-alt: #F7FAF9;           /* card molto soft */
  --text-main: #1F2322;        /* testo profondo e sobrio */
  /* Nuovo primario e accenti nature/giovani */
  --color-primary: #0F766E;    /* teal profondo */
  --color-primary-600: #0B5F59;/* hover teal */
  --color-mint: #99F6E4;       /* mint fresco per highlight leggeri */
  --color-emerald: #22C55E;    /* emerald vivo per micro-accenti */
  --accent-warm: #6E4E3B;      /* marrone brand conservato */
  /* Riallineo variabili esistenti all’impianto nuovo */
  --accent-orange: var(--color-primary);
  --accent-bright: var(--color-emerald);
  --secondary: #14B8A6;        /* teal chiaro per badge/link secondari */
}

/* Header ancora più pulito su sfondo chiaro */
.site-header { background: rgba(250,252,251,0.85); backdrop-filter: saturate(1.05) blur(8px); border-bottom: 1px solid rgba(0,0,0,0.05); }
.logo a { color: var(--color-primary); }
.main-nav a { color: var(--color-primary); }
.main-nav a:hover, .main-nav a.active { color: #fff; background: color-mix(in srgb, var(--color-primary) 28%, transparent); }

/* Hero pulita: sfondo chiaro, senza blob/texture invadenti */
.hero-modern { background: linear-gradient(180deg, #FFFFFF 0%, #FAFCFB 100%); }
.hero-blob { display: none !important; }
.hero-modern .hero-title { color: var(--text-main); }
.hero-modern .hero-subtitle { color: color-mix(in srgb, var(--text-main) 78%, transparent); }

/* CTA: primario teal elegante, secondario outline teal */
.btn-primary, .cta-btn, .project-cta a.btn-primary {
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-600));
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--color-primary) 22%, transparent);
}
.btn-primary:hover, .cta-btn:hover, .project-cta a.btn-primary:hover {
  background: linear-gradient(180deg, var(--color-primary-600), var(--color-primary));
  transform: translateY(-2px) scale(1.03);
}
.btn-secondary { color: var(--color-primary); border: 2px solid var(--color-primary); background: transparent; }
.btn-secondary:hover { background: var(--color-primary); color: #fff; }

/* Badge/tag con mint molto soft e testo teal */
.tool-badge, .featured-badge, .portfolio-card-cat {
  background: color-mix(in srgb, var(--color-mint) 35%, transparent);
  color: var(--color-primary-600);
  border: 1px solid color-mix(in srgb, var(--color-mint) 42%, transparent);
}

/* Link footer e underline più freschi */
.footer-links a, .footer-contact a { color: var(--color-primary); }
.footer-links a:after, .footer-contact a:after { background: var(--color-emerald); }

/* Focus ring coerente e sobrio */
a:focus, button:focus, .btn-primary:focus, .btn-secondary:focus {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
  outline-offset: 2px;
}



/* ====== MOBILE-FIRST ENHANCEMENTS ====== */
/* Tipografia e spaziature più leggibili su mobile */
:root {
  --space-1: 0.5rem;
  --space-2: 0.8rem;
  --space-3: 1.2rem;
  --space-4: 1.6rem;
  --space-5: 2.2rem;
}

h1, h2, h3, p { -webkit-hyphens: auto; hyphens: auto; }

/* CTA e tap targets min 44px */
.btn-primary, .btn-secondary, .cta-btn, .project-cta a {
  min-height: 44px;
  padding: 0.9em 1.6em;
}

.nav-toggle { width: 48px; height: 48px; }
.nav-toggle span { height: 4px; }

/* Layout a colonna singola e padding contenuti più stretti su schermi piccoli */
@media (max-width: 900px) {
  .site-header .container { padding: 0.8rem 1rem; }
  .container { padding: 0 1rem; max-width: 100%; }
  .intro-flex { gap: var(--space-3); padding: var(--space-5) 1rem var(--space-4) 1rem; }
  .skills { padding: var(--space-5) 0 var(--space-4) 0; }
  .featured-work { padding: var(--space-5) 0 var(--space-3) 0; }
  .cta { padding: var(--space-5) 0 var(--space-4) 0; }
  .contact-main { padding: var(--space-5) 0 var(--space-4) 0; }

  .skills-areas { grid-template-columns: 1fr; gap: var(--space-3); }
  .featured-list { gap: var(--space-2); }
  .featured-block { min-height: 380px; min-width: 90vw; }
  .portfolio-grid { grid-template-columns: 1fr; gap: var(--space-3); }

  .hero-modern { min-height: 84vh; padding-top: 5.2rem; }
  .hero-modern .hero-cta { gap: var(--space-2); }
}

@media (max-width: 600px) {
  h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  h2 { font-size: clamp(1.3rem, 6vw, 1.6rem); }
  h3 { font-size: clamp(1.05rem, 4.8vw, 1.3rem); }
  p  { font-size: 1rem; line-height: 1.7; }

  .intro-img { width: 160px; height: 160px; }
  .featured-block { min-height: 340px; }
}

/* Nav accessibile: stati focus visibili e scroll lock già gestito da JS */
.main-nav a { outline-offset: 3px; }
.main-nav a:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-primary) 55%, transparent); }

/* Reduced motion: disattiva animazioni non essenziali */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}


/* ====== MOBILE MENU TUNING ====== */
@media (max-width: 900px) {
  .main-nav ul { gap: 1.4rem; }
  .main-nav a {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
    line-height: 1.2;
    padding: 0.6em 0;
  }
}

/* ====== HERO MOBILE POLISH ====== */
@media (max-width: 900px) {
  .hero-modern .hero-inner { max-width: 92vw; }
  .hero-modern .hero-title { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .hero-modern .hero-subtitle { font-size: clamp(0.95rem, 4.2vw, 1.15rem); }
}
@media (max-width: 600px) {
  .hero-modern .hero-title {
    position: relative;
    padding-bottom: 0.5rem;
  }
  .hero-modern .hero-title::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 88px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-mint), var(--color-emerald));
    opacity: 0.9;
  }
  .hero-modern .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-modern .hero-cta .btn-primary,
  .hero-modern .hero-cta .btn-secondary { width: 100%; min-height: 48px; }
}


