/* ==========================================================================
   Alessandro Gallo - AWS DevOps Engineer Portfolio
   ========================================================================== */

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Base HTML and body styles */
html {
  scroll-padding-top: 5.5rem;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #000;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* Navigation / Top Bar */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 1rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  width: 100%;
}

.topbar nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.topbar a {
  color: #000;
  background: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 2.25rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  border: none;
}

.topbar a.resume-btn {
  color: #fff;
  background: #000;
}

.topbar a:hover {
  background: #222;
  color: #fff;
  opacity: 0.92;
}

/* Main Layout */

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5.5rem;
  min-height: 100vh;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

/* Hero Section */

.hero {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem 0 1rem;
}

.hero-img {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
  aspect-ratio: 1/1;
}

.hero-title {
  color: #000;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero-subtitle {
  color: #666;
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.hero-desc {
  color: #666;
  font-size: 1.125rem;
  max-width: 40rem;
  margin: 1rem auto 2.5rem auto;
}

.explore-btn {
  min-width: 120px;
  max-width: 16rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0 1.5rem;
  font-size: 1.125rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  text-decoration: none;
  border: 1px solid #ddd;
  margin-bottom: 2.5rem;
}

.explore-btn:hover {
  background: #000;
  color: #fff;
  opacity: 0.92;
}

/* Section Styles */

.section,
.resume-cta {
  text-align: center;
}

.section p,
.resume-cta p {
  margin: 1.5em 0;
  line-height: 1.7;
  font-size: 1.1em;
  color: #666;
}

.section-title,
.hero-title,
.resume-cta-title {
  color: #000;
}

.section {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.about-space {
  margin-bottom: 2.5em;
}

/* Skills Section */

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.skill-badge {
  display: flex;
  align-items: center;
  height: 2.5rem;
  background: #eee;
  color: #222;
  border-radius: 0.5rem;
  padding: 0 1rem;
  font-size: 1rem;
  font-weight: 500;
}

/* Projects Section */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #fafbfc 60%, #f5f5f5 100%);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.07), 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s, transform 0.18s;
  border: 1.5px solid #ececec;
  min-height: 180px;
  padding: 0;
}

.project-card:hover {
  box-shadow: 0 10px 24px -3px rgba(0, 0, 0, 0.10), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  transform: translateY(-4px) scale(1.025);
  border-color: #d1d5db;
}

.project-content {
  width: 100%;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.project-title {
  color: #000;
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
  text-align: center;
}

.project-desc {
  color: #555;
  font-size: 1.04rem;
  line-height: 1.7;
  text-align: center;
  margin: 0;
}

/* Certifications Section */

.certifications-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .certifications-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .certifications-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.cert-card {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid #eee;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  text-align: center;
}

.cert-title {
  color: #222;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
}

/* Resume CTA Section */

.resume-cta {
  background: #f5f5f5;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  padding: 2rem 1.5rem;
  margin: 3rem auto;
  text-align: center;
  max-width: 700px;
  width: 90vw;
}

.resume-cta-title {
  color: #000;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.resume-cta-text {
  color: #666;
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.resume-btn-lg {
  min-width: 150px;
  max-width: 16rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0 1.5rem;
  font-size: 1.125rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  margin: 0 auto;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.resume-btn-lg:hover {
  background: #222;
  color: #fff;
  opacity: 0.92;
}

/* Contact Section */

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .contact-list {
    flex-direction: row;
    justify-content: center;
  }
}

.contact-link {
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  color: #000;
  font-weight: 600;
  border-radius: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  font-size: 1rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #ddd;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  text-decoration: none;
}

.contact-link:hover {
  background: #000;
  color: #fff;
  opacity: 0.92;
}

.contact-text {
  color: #666;
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 0 auto 2rem auto;
  max-width: 36rem;
  text-align: center;
  display: block;
  width: 100%;
}

/* Footer */

.footer {
  width: 100%;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #666;
  font-size: 0.95rem;
}

.footer-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-text {
  color: #666;
  font-size: 0.875rem;
}

.tech-accent {
  color: #000;
}

/* Contact Section Specific Styles */

#contact {
  text-align: center;
}

#contact p.contact-text {
  color: #666;
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 0 auto 2rem auto;
  max-width: 36rem;
  text-align: center;
  display: block;
  width: 100%;
}