/*v2*/
/* Generic parameters */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  overflow-y: auto;
  min-height: 100vh;
  background-color: #34495E;
}

main {
  animation: fadeIn 1.7s ease-in;
}

:root {
  --canvas-size: 90;
}

/* Section Logo */
.section-logo {
  width: 200px;
  height: auto;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  pointer-events: none;
  user-select: none;
  z-index: 9999;
}

.section {
  position: relative;
  overflow: hidden;
}

.section1-logo {
  filter: invert(99%) sepia(1%) saturate(2163%) hue-rotate(185deg) brightness(100%) contrast(96%);
  opacity: 0.2;
}

.section2-logo {
  filter: invert(23%) sepia(14%) saturate(1550%) hue-rotate(171deg) brightness(93%) contrast(88%);
  opacity: 0.05;
}

.section3-logo {
  filter: invert(99%) sepia(1%) saturate(2163%) hue-rotate(185deg) brightness(100%) contrast(96%);
  opacity: 0.2;
}

/* Buttons */
.btn-primary {
  background-color: #27AE60 !important;
  border: none !important;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #5dade2 !important;
}

/* Containers */
canvas {
  background: #34495E;
  display: block;
  width: calc(var(--canvas-size) * 1vw);
  height: calc(var(--canvas-size) * 0.6vw);
}

.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2rem;
  margin: 0 auto;
  max-width: none;
}

.header {
  flex: 1;
  text-align: left;
  padding-left: 3vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header .mt-4 {
  display: flex;
  justify-content: center;
}

.canvas-container {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* titles */
hr {
  margin: 15px 0;
  color: #F8F9F9;
}

h1, h6 {
  color: #34495E;
}

/* Sections */
section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 4rem 0;
  position: relative;
}

.section:nth-child(1) { 
  background-color: #34495E; 
}

.section:nth-child(1) h1,
.section:nth-child(1) h6 {
  color: #F8F9F9;
}

.section:nth-child(2) h2 {
  color: #34495E;
}

.section:nth-child(2) { 
  background-color: #F8F9F9; 
}

.section:nth-child(3) { 
  background-color: #34495E; 
  align-items: flex-start;
}

.section:nth-child(3) h2 {
  color: #F8F9F9;
}

/* Contact Form Styles */
.section:nth-child(3) .container {
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0rem;
}

.contact-wrapper {
  display: flex;
  width: 100%;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

#contact-form {
  background-color: rgba(248, 249, 249, 0.1);
  padding: 2rem;
  border-radius: 8px;
  width: 75%;
  position: relative;
}

.linkedin-badge {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px; /* Added to ensure vertical centering */
}

#contact-form .form-label {
  color: #F8F9F9;
  margin-bottom: 0.5rem;
}

#contact-form .form-control {
  background-color: rgba(248, 249, 249, 0.9);
  border: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

#contact-form .form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.25);
}

#contact-form .btn-primary {
  padding: 0.5rem 2rem;
}

#contact-form .invalid-feedback {
  color: #F8F9F9;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 0.5rem;
  justify-content: left;
}

.social-icon {
  color: #F8F9F9;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
  color: #27AE60;
}

/* Footer */
footer {
  background-color: #34495E;
  color: #B3B3B3;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* Mobile */
@media screen and (max-width: 768px), (orientation: portrait) {
  .container {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    align-items: center;
    width: 100%;
  }

  .header {
    padding: 0;
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  h1, h2 {
    width: 100%;
    text-align: center;
  }

  .canvas-container {
    display: none;
  }

  hr {
    width: 100%;
    margin: 15px auto;
    color: #F8F9F9;
  }

  section {
    padding: 2rem 0;
  }

  .social-icons {
    justify-content: center;
  }

  /* Mobile Contact Form */
  .section:nth-child(3) .container {
    padding: 20px;
    align-items: center;
  }

  .contact-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  #contact-form {
    width: 100%;
    padding: 1.5rem;
    margin: 0 auto;
  }

  .linkedin-badge {
    width: 100%;
    min-height: auto; /* Reset min-height for mobile */
  }

  .section-logo {
    width: 120px;
    right: 1rem !important;
  }
}
