/* FLOATING SOCIAL - RIDISEGNATO */
.floating-social {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
  animation: fadeInRight 1s ease 1s backwards;
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}
.social-link {
  width: 45px;
  height: 45px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}
.social-link:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  transform: translateX(-5px);
}
.social-link img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
body.light-theme .social-link img {
  filter: brightness(0) saturate(100%);
}
body:not(.light-theme) .social-link img {
  filter: brightness(0) invert(1);
}
.social-link:hover img {
  opacity: 1;
}
/* SCROLL TO TOP */
.scroll-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}
.scroll-top::before {
  content: '↑';
  font-size: 24px;
  font-weight: 700;
  color: white;
}
/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 140px 60px 100px;
}
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
}
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(59, 130, 246, 0.5);
  border-radius: 50%;
  animation: float linear infinite;
}
@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px);
    opacity: 0;
  }
}
.hero-content {
  max-width: 900px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 30px;
  animation: fadeInUp 0.8s ease;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 30px;
  letter-spacing: -2px;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}
.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shine 3s linear infinite;
}
@keyframes shine {
  to { background-position: 200% center; }
}
.hero-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--text-secondary);
  margin-bottom: 50px;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease 0.4s backwards;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}
.btn-primary {
  padding: 18px 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-purple), var(--primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary span {
  position: relative;
  z-index: 1;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(59, 130, 246, 0.4);
}
.btn-secondary {
  padding: 18px 40px;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-subtle);
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateY(-3px);
}
/* STATS */
.stats-section {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.stat-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}
.stat-card:hover::before {
  left: 100%;
}
.stat-card:hover {
  transform: translateY(-10px);
  border-color: rgba(59, 130, 246, 0.4);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.stat-icon {
  font-size: 48px;
  margin-bottom: 20px;
}
.stat-number {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 600;
}
/* ABOUT */
#about {
  padding: 120px 60px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: 80px;
}
.section-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -2px;
}
.section-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}
.about-content p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 25px;
}
.highlight-text {
  color: var(--text-primary);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.skills-container {
  margin-top: 50px;
}
.skills-container h3 {
  font-size: 24px;
  margin-bottom: 25px;
  font-weight: 700;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.skill-tag {
  padding: 15px 20px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-light);
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.skill-tag:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-3px) scale(1.05);
}
.about-visual {
  position: relative;
  height: 600px;
  border-radius: 30px;
  overflow: hidden;
}
.code-window {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  position: relative;
}
.code-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.code-content {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.code-line {
  display: flex;
  gap: 20px;
}
.line-number {
  color: var(--text-secondary);
  opacity: 0.5;
  user-select: none;
}
.code-keyword { color: #569cd6; }
.code-function { color: #dcdcaa; }
.code-string { color: #ce9178; }
.code-comment { color: #6a9955; }
body.light-theme .code-keyword { color: #0000ff; }
body.light-theme .code-function { color: #795e26; }
body.light-theme .code-string { color: #a31515; }
body.light-theme .code-comment { color: #008000; }
/* EXPERIENCE TIMELINE */
#experience {
  padding: 120px 60px;
  background: var(--bg-card);
}
.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-left: 50px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent-purple));
}
.timeline-item {
  position: relative;
  padding-bottom: 60px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -56px;
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.timeline-content {
  background: var(--bg-dark);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}
.timeline-content:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateX(10px);
}
.timeline-date {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}
.timeline-content h3 {
  font-size: 22px;
  margin-bottom: 8px;
  font-weight: 700;
}
.timeline-content h4 {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-weight: 600;
}
.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}
/* PROJECTS */
#projects {
  padding: 120px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 35px;
  margin-top: 60px;
}
.project-card {
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
.project-card:hover::before {
  opacity: 1;
}
.project-card:hover {
  transform: translateY(-12px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.project-image-wrapper {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
}
.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-image-wrapper img {
  transform: scale(1.1);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.overlay-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}
.project-card:hover .overlay-text {
  transform: translateY(0);
}
.project-info {
  padding: 30px;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.project-tag {
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  font-size: 12px;
  color: var(--primary-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.project-info h3 {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.project-info p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 25px;
  flex: 1;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: gap 0.3s ease;
  margin-top: auto;
}
.project-link .arrow {
  transition: transform 0.3s ease;
}
.project-link:hover {
  gap: 15px;
}
.project-link:hover .arrow {
  transform: translateX(5px);
}
/* TESTIMONIALS */
#testimonials {
  padding: 120px 60px;
  background: var(--bg-card);
}
.testimonials-grid {
  max-width: 1400px;
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}
.testimonial-card {
  background: var(--bg-dark);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 100px;
  color: rgba(59, 130, 246, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.3);
}
.testimonial-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}
.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}
.author-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.author-info p {
  font-size: 14px;
  color: var(--text-secondary);
}
/* RESPONSIVE */
@media (max-width: 1200px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .about-visual {
    height: 400px;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 968px) {
  .header-container,
  .stats-section,
  #about,
  #experience,
  #projects,
  #testimonials,
  #contact,
  footer {
    padding-left: 30px;
    padding-right: 30px;
  }
  #hero {
    padding: 120px 30px 80px;
  }
  nav ul {
    gap: 30px;
  }
  .projects-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .floating-social {
    right: 20px;
  }
  .scroll-top {
    right: 20px;
    bottom: 20px;
  }
  .timeline {
    padding-left: 30px;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
@media (max-width: 640px) {
  .header-container {
    padding: 0 20px;
  }
  .logo {
    font-size: 20px;
  }
  nav ul {
    gap: 15px;
  }
  nav a {
    font-size: 13px;
  }
  .theme-toggle {
    width: 45px;
    height: 45px;
  }
  .theme-toggle svg {
    width: 20px;
    height: 20px;
  }
  #hero {
    padding: 100px 20px 60px;
  }
  .hero-title {
    font-size: 36px;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .stats-section,
  #about,
  #experience,
  #projects,
  #testimonials,
  #contact,
  footer {
    padding: 80px 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .floating-social {
    display: none;
  }
  .contact-content {
    padding: 50px 30px;
  }
  .contact-methods {
    grid-template-columns: 1fr;
  }
}