/* GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --primary-color: #786cff;
  --primary-deep: #5b4ddb;
  --accent: #eacb3d;
  --dark-bg: #0e0f1a;
  --card-bg: rgba(255, 255, 255, 0.07);
  --card-border: rgba(120, 108, 255, 0.2);
  --text-primary: #fff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 85px;
  --mobile-topbar-offset: 88px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--dark-bg);
}

/* LAYOUT */
.main-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: url('../img/dashboard-background.jpg') center center/cover
    no-repeat;
  background-attachment: fixed;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  transition: all 0.4s ease;
  position: relative;
}

.main-content::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 50% at 20% 20%,
      rgba(120, 108, 255, 0.18) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 60% at 80% 80%,
      rgba(91, 77, 219, 0.14) 0%,
      transparent 70%
    );
  pointer-events: none;
  z-index: 0;
}

.main-content > * {
  position: relative;
  z-index: 1;
}

body.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

/* HEADER */
.dashboard-header {
  padding: 2.5rem 2rem 1.5rem;
}

/* SECTION ICON */
.section-icon {
  font-size: 2.6rem;
  color: var(--primary-color);
  filter: drop-shadow(0 0 12px rgba(120, 108, 255, 0.6));
}

/* SECTION DIVIDERS */
.section-divider {
  position: relative;
  width: 100%;
  line-height: 0;
  margin: 1rem 0;
  overflow: hidden;
}

.section-divider svg {
  width: 100%;
  height: 80px;
  display: block;
}

.divider-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: -30px;
  position: relative;
  z-index: 2;
}

.divider-line::before,
.divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(120, 108, 255, 0.15),
    rgba(120, 108, 255, 0.4),
    rgba(120, 108, 255, 0.15),
    transparent
  );
  max-width: 400px;
}

.divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 10px rgba(120, 108, 255, 0.8);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.divider-dot:nth-child(2) {
  width: 10px;
  height: 10px;
  animation-delay: 0.3s;
  background: linear-gradient(135deg, #786cff, #b4aeff);
}

.divider-dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
    box-shadow: 0 0 16px rgba(120, 108, 255, 1);
  }
}

.divider-top {
  margin-top: 0;
}
.divider-bottom {
  margin-bottom: 0;
}

/* LIQUID GLASS CARD */
.glass-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  background: var(--card-bg);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
  color: var(--text-primary);
  transition:
    transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(120, 108, 255, 0.45);
  box-shadow:
    0 24px 60px rgba(120, 108, 255, 0.25),
    0 0 0 0.5px rgba(120, 108, 255, 0.3) inset;
}

/* CARD GLOW */
.card-glow {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    ellipse,
    rgba(120, 108, 255, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none;
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

/* CHI SONO */
.who-am-i-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 5rem 3rem;
  flex-wrap: wrap;
  position: relative;
}

.who-am-i-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.who-am-i-title {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.who-am-i-title h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.who-am-i-card {
  max-width: 520px;
  width: 100%;
  padding: 32px 36px;
  background: var(--card-bg);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}

.who-am-i-card:hover {
  transform: translateY(-8px);
  border-color: rgba(120, 108, 255, 0.45);
  box-shadow: 0 24px 60px rgba(120, 108, 255, 0.25);
}

.who-am-i-card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
}

.who-am-i-card strong {
  color: #fff;
  font-weight: 600;
}

/* I MIEI SERVIZI */
.services-section {
  padding: 4rem 3rem;
  position: relative;
}

.services-title,
.tech-title,
.contact-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 2.5rem;
}

.services-title h1,
.tech-title h1,
.contact-title h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.service-card {
  padding: 32px;
  background: var(--card-bg);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(120, 108, 255, 0.5);
  box-shadow: 0 28px 64px rgba(120, 108, 255, 0.28);
}

.service-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  color: #fff;
  letter-spacing: -0.3px;
}

.service-card p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin: 0;
  font-size: 0.95rem;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    rgba(120, 108, 255, 0.3) 0%,
    rgba(91, 77, 219, 0.2) 100%
  );
  border: 1px solid rgba(120, 108, 255, 0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
  transition:
    background 0.3s,
    box-shadow 0.3s;
}

.service-card:hover .service-icon {
  background: linear-gradient(
    135deg,
    rgba(120, 108, 255, 0.5),
    rgba(91, 77, 219, 0.4)
  );
  box-shadow: 0 0 20px rgba(120, 108, 255, 0.5);
}

.service-icon .material-symbols-rounded {
  font-size: 1.8rem;
  color: #b4aeff;
}

/* TECNOLOGIE UTILIZZATE */
.tech-section {
  padding: 4rem 3rem;
  position: relative;
}

.tech-card {
  max-width: 720px;
  width: 100%;
  padding: 28px 36px;
  background: var(--card-bg);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  text-align: center;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}

.tech-card:hover {
  transform: translateY(-8px);
  border-color: rgba(120, 108, 255, 0.45);
  box-shadow: 0 24px 60px rgba(120, 108, 255, 0.25);
}

.tech-symbols {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 6px 0;
}

.tech-symbols img {
  display: block;
  opacity: 0.85;
  transition:
    opacity 0.2s,
    transform 0.2s;
  filter: brightness(1.1);
}

.tech-symbols img:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* CONTATTAMI */
.contact-section {
  padding: 4rem 3rem;
  display: flex;
  justify-content: center;
  position: relative;
}

.contact-card {
  max-width: 560px;
  width: 100%;
  padding: 36px 40px;
  background: var(--card-bg);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.35s,
    border-color 0.35s;
}

.contact-card:hover {
  transform: translateY(-8px);
  border-color: rgba(120, 108, 255, 0.45);
  box-shadow: 0 24px 60px rgba(120, 108, 255, 0.25);
}

.contact-card > p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
  margin: 0;
  font-size: 0.98rem;
  text-align: center;
}

.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(
    135deg,
    rgba(120, 108, 255, 0.25),
    rgba(91, 77, 219, 0.2)
  );
  border: 1px solid rgba(120, 108, 255, 0.4);
  border-radius: 50px;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.contact-email-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(120, 108, 255, 0.45),
    rgba(91, 77, 219, 0.35)
  );
  border-color: rgba(120, 108, 255, 0.7);
  box-shadow: 0 0 30px rgba(120, 108, 255, 0.4);
  transform: scale(1.04);
  color: #fff;
}

.contact-email-btn .material-symbols-rounded {
  font-size: 1.3rem;
  color: var(--accent);
}

/* ANIMAZIONI */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 0.7s ease both;
}

.who-am-i-section {
  animation-delay: 0.1s;
}

.services-section {
  animation-delay: 0.2s;
}

.tech-section {
  animation-delay: 0.25s;
}

.contact-section {
  animation-delay: 0.3s;
}

/* TICKER */
.tech-ticker-wrapper {
  background: rgba(120, 108, 255, 0.05);
  border: 1px solid rgba(120, 108, 255, 0.2);
  border-radius: 16px;
  padding: 2rem 0;
  overflow: hidden;
  position: relative;
}

.tech-ticker-wrapper::before,
.tech-ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.tech-ticker-wrapper::before {
  left: 0;
}

.tech-ticker-wrapper::after {
  right: 0;
}

.tech-ticker {
  display: flex;
  overflow: hidden;
  width: 100%;
}

.tech-track {
  display: flex;
  gap: 3rem;
  animation: scroll 30s linear infinite;
  align-items: center;
}

.tech-track:hover {
  animation-play-state: paused;
}

.tech-track img {
  height: 60px;
  width: auto;
  opacity: 0.8;
  transition: all 0.3s ease;
  filter: grayscale(20%);
}

.tech-track img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* RESPONSIVE — TABLET */
@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
    width: 100%;
    padding-top: var(--mobile-topbar-offset);
  }

  body.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
  }

  .dashboard-header {
    padding: 2rem 1.5rem 1rem;
  }

  .dashboard-header img {
    max-height: 120px;
    width: auto;
  }

  .who-am-i-section {
    padding: 3.5rem 2rem;
    gap: 28px;
  }

  .who-am-i-inner {
    gap: 28px;
  }

  .who-am-i-title h1,
  .services-title h1,
  .tech-title h1,
  .contact-title h1 {
    font-size: 2.2rem;
  }

  .services-section,
  .tech-section {
    padding: 3rem 2rem;
  }

  .contact-section {
    padding: 3rem 2rem;
  }

  .who-am-i-card {
    padding: 26px 28px;
  }

  .service-card {
    padding: 26px;
  }

  .contact-card {
    padding: 28px 30px;
  }
}

/* RESPONSIVE — MOBILE */
@media (max-width: 768px) {
  :root {
    --mobile-topbar-offset: 82px;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding-top: var(--mobile-topbar-offset);
    background-attachment: scroll;
  }

  .dashboard-header {
    padding: 1.5rem 1.2rem 0.8rem;
  }

  .dashboard-header img {
    max-height: 250px;
    width: auto;
  }

  .who-am-i-title h1,
  .services-title h1,
  .tech-title h1,
  .contact-title h1 {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
  }

  .section-icon {
    font-size: 2rem;
  }

  .who-am-i-section {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.2rem;
    gap: 20px;
  }

  .who-am-i-inner {
    flex-direction: column;
    gap: 20px;
  }

  .who-am-i-title {
    justify-content: center;
  }

  .who-am-i-card {
    padding: 22px 20px;
    max-width: 100%;
  }

  .who-am-i-card p {
    font-size: 0.97rem;
  }

  .services-section {
    padding: 2.5rem 1.2rem;
  }

  .services-title,
  .tech-title,
  .contact-title {
    margin-bottom: 1.8rem;
    gap: 10px;
  }

  .service-card {
    padding: 22px 20px;
    border-radius: 18px;
  }

  .service-card h3 {
    font-size: 1.05rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }

  .service-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-bottom: 1.1rem;
  }

  .service-icon .material-symbols-rounded {
    font-size: 1.5rem;
  }

  .tech-section {
    padding: 2.5rem 1.2rem;
  }

  .tech-track img {
    height: 44px;
  }

  .tech-track {
    gap: 2rem;
  }

  .contact-section {
    padding: 2.5rem 1.2rem;
  }

  .contact-card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .contact-card > p {
    font-size: 0.93rem;
  }

  .contact-email-btn {
    padding: 12px 20px;
    font-size: 0.92rem;
    gap: 8px;
  }

  .section-divider svg {
    height: 50px;
  }

  .divider-line {
    margin-top: -20px;
  }
}

/* RESPONSIVE — SMALL MOBILE */
@media (max-width: 480px) {
  :root {
    --mobile-topbar-offset: 78px;
  }

  .who-am-i-title h1,
  .services-title h1,
  .tech-title h1,
  .contact-title h1 {
    font-size: 1.5rem;
  }

  .section-icon {
    font-size: 1.75rem;
  }

  .who-am-i-section,
  .services-section,
  .tech-section,
  .contact-section {
    padding: 2rem 1rem;
  }

  .who-am-i-card,
  .service-card,
  .contact-card {
    padding: 18px 16px;
    border-radius: 16px;
  }
  
  .contact-email-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
  }

  .tech-track img {
    height: 36px;
  }

  .tech-track {
    gap: 1.5rem;
  }
}
