/* ====== Reset & Tokens ====== */
:root {
  --bg: #0e0f14;
  --surface: #141624;
  --text: #e6e6f0;
  --muted: #9aa0b4;
  --accent: #07c274;
  /* viola */
  --accent-2: #00ff00;
  /* azzurro neon */
  --shadow: 0 10px 30px rgba(27, 160, 15, 0.35);
  --radius: 16px;
  --container: 1100px;
  --gap: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 90% -10%,
      rgba(124, 77, 255, 0.2),
      transparent 50%),
    radial-gradient(900px 700px at -10% 10%,
      rgba(0, 225, 255, 0.12),
      transparent 50%),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: calc(var(--radius) - 4px);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(2rem, 6vw, 6rem) 0;
  scroll-margin-top: 80px;
}

.section-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin: 0 0 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr; /* due colonne */
  align-items: center;            /* centra verticalmente */
  gap: var(--gap);                /* mantiene lo spacing coerente */
}

.gap-xl {
  gap: clamp(1rem, 3vw, 3rem);
}

/* ====== Header / Nav ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(14, 15, 20, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent-2);
}

.icon-img {
  width: 20px;
  height: 20px;
  filter: invert(1) brightness(0.8);
  display: inline-block;
} #gmail-icon {
  border-radius: 0;
}


.nav-menu {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg,
      var(--accent),
      var(--accent-2));
  border: 1px solid rgba(124, 77, 255, 0.4);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 0.35rem 0;
  transition: 0.25s;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 64px 1rem auto 1rem;
    border-radius: var(--radius);
    background: rgba(20, 22, 36, 0.95);
    box-shadow: var(--shadow);
    padding: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    transform: translateY(-1rem);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  .nav-menu.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ====== Hero ====== */
.hero {
  padding-top: clamp(4rem, 8vw, 8rem);
}

.hero-inner {
  display: grid;
  align-items: center;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.8fr;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  margin: 0.25rem 0;
}

.subtitle {
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin: 0.25rem 0 1rem;
}

.location {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(0.75rem, 2vw, 0.75rem);
  margin-top: -0.4rem;
}

.cta-group {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.25s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0c12;
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.hero-art {
  position: relative;
  min-height: 260px;
}

.neon-orb {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(120px 120px at 70% 30%,
      rgba(0, 225, 255, 0.6),
      transparent 60%),
    radial-gradient(140px 140px at 30% 70%,
      rgba(124, 77, 255, 0.6),
      transparent 60%),
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 60px rgba(124, 77, 255, 0.2),
    inset 0 0 80px rgba(0, 225, 255, 0.15), var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ====== About ====== */
.about-avatar {
  display: grid;
  place-items: center;
}

.about-avatar img {
  width: 350px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 999px;
  outline: 6px solid var(--accent);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.chips li {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
}

/* ====== Skills ====== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 77, 255, 0.45);
  box-shadow: 0 12px 40px rgba(124, 77, 255, 0.12);
}

.card h3 {
  margin: 0.2rem 0 0.5rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

/* ====== Portfolio ====== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 225, 255, 0.45);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.project-info p {
  margin: 0;
  color: var(--muted);
}

/* ====== Video Reel ====== */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ====== Contact ====== */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 720px;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  outline-color: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: rgba(124, 77, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.15);
}

.error {
  color: #ff8fa3;
  min-height: 1.1em;
}

.form-status {
  color: #a6f4ff;
  min-height: 1.1em;
}

/* ====== Footer ====== */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.2rem 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.to-top {
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.to-top:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ====== Social Icons ====== */
.socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.icon-link {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.icon-link:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 21, 0.45);
  box-shadow: 0 10px 24px rgba(0, 225, 255, 0.16);
}

.icon-link svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  opacity: 0.9;
}

/* ====== Reveal Animations ====== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.up {
  transform: translateY(22px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ====== Modal ====== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 20, 0.6);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  margin: 6vh auto;
  width: min(92%, 900px);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  animation: pop 0.25s ease;
}

@keyframes pop {
  from {
    transform: translateY(10px);
    opacity: 0.8;
  }
}

.modal-media {
  width: 100%;
  height: min(60vh, 520px);
  object-fit: cover;
  display: block;
}

.modal-body {
  padding: 1rem 1.2rem 1.2rem;
}

.modal-body h3 {
  margin: 0 0 0.4rem;
}

.modal-desc {
  color: var(--muted);
  margin: 0.2rem 0 0.8rem;
}

.modal-tags {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.modal-tags li {
  padding: 0.3rem 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* ====== Responsive ====== */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
}

/* ====== Experience Tabs ====== */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0c12;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.timeline {
  list-style: none;
  padding-left: 1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline li {
  list-style: none;
  margin: 1.5rem 0;
  position: relative;
  padding: 0 10px;

  h3,
  p {
    margin: 0.2rem 0;
  }
}


.timeline li::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-2);
  ;
}

.timeline .time {
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline img {
  filter: invert(1) brightness(0.8);
  vertical-align: middle;
  margin-right: 6px;
}

.carousel-container {
  width: 100%;
  max-width: var(--container);
  margin: auto;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  padding: 2rem;
  width: max-content;
  animation: scroll 20s linear infinite;
}

.icon-box {
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  margin: 0 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: var(--text);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;

  img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: invert(1) brightness(0.8);
  }

}


.icon-box:hover {
  transform: scale(1.15);
  border-color: var(--accent-2);
  box-shadow: 0 12px 12px rgba(0, 225, 255, 0.25);
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}







.services-carousel {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  padding: 2rem;
  max-width: 1200px;
  margin-bottom: 3rem;
}

.services-track {
  display: flex;
  gap: 2rem;
  will-change: transform;
  transition: none;
}

.service-card {
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  margin: 0 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: var(--text);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;

  img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: invert(1) brightness(0.8);
  }
}

.service-card:hover {
  transform: scale(1.15);
  border-color: var(--accent-2);
  box-shadow: 0 12px 12px rgba(0, 225, 255, 0.25);
}

.quote {
  margin: 2rem 0 0;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  font-style: italic;
  color: var(--muted);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.quote p {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

.quote cite {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: right;
}
