/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #333;
}

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* TYPOGRAPHY */
h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

h3 {
  color: #667eea;
  margin-bottom: 1rem;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  z-index: 100;
}

.logo {
  font-weight: bold;
  color: #667eea;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #667eea;
}

/* HERO */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  object-fit: cover;
  border: 5px solid white;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* LAYOUT SECTIONS */
section {
  padding: 4rem 0;
}

section:nth-child(even) {
  background: #f8f9fa;
}

/* GRIDS COMUNI */
.about-content,
.contact-content,
.education-grid,
.skills-grid,
.project-grid,
.social-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

/* CARDS BASE */
.about-summary,
.education-item,
.skill-category,
.project-card,
.social-link {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.project-card:hover,
.social-link:hover {
  transform: translateY(-5px);
}

/* RESUME */
.resume-section {
  margin-bottom: 3rem;
}

.education-item h4 {
  color: #667eea;
  margin-bottom: 0.5rem;
}

.institution,
.date {
  color: #666;
}

.date {
  font-style: italic;
  margin-bottom: 1rem;
}

.skill-category h4 {
  color: #667eea;
  margin-bottom: 1rem;
  text-align: center;
}

.skills-list {
  list-style: none;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.skill-bar {
  background: #f0f0f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transition: width 2s ease-in-out;
}

/* PROJECTS */
.project-card h4 {
  color: #667eea;
  margin-bottom: 1rem;
}

.project-card p {
  color: #666;
  margin-bottom: 1rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: #f0f0f0;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #667eea;
  font-weight: 600;
}

/* CONTACT FORM */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #eee;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button[type="submit"] {
  width: 100%;
  background: #667eea;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

button[type="submit"]:hover {
  background: #5a6fd8;
}

/* SOCIAL LINKS */
.social-link {
  text-align: center;
}

.social-link i {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.social-link h4 {
  margin-bottom: 0.5rem;
}

.social-link a {
  color: #666;
  text-decoration: none;
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr 1fr;
  }

  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .social-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ERROR STATES */
.error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: block;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #dc3545;
}

.form-group.success input,
.form-group.success textarea {
  border-color: #28a745;
}

.success-message {
  color: #28a745;
  text-align: center;
  font-weight: 600;
  padding: 1rem;
  background: #d4edda;
  border-radius: 8px;
  margin-top: 1rem;
}
