@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Poppins:wght@400;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #a4cce7;
  color: #1f71a1;
  overflow-x: hidden;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 1000;
  transition: all 0.3s ease;
}

header .logo {
  color: #1f71a1;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.8em;
}

header ul {
  display: flex;
}

header ul li {
  list-style: none;
  margin: 0 10px;
}

header ul li a {
  text-decoration: none;
  color: #1f71a1;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

header ul li a:hover,
header ul li a.active {
  background-color: aliceblue;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5em;
  color: #1f71a1;
}

/* Section Styles */
.main-content {
  margin-top: 80px;
}

.section {
  min-height: 100vh;
  padding: 80px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 30px;
}

.home-section .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  color: #1f71a1;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #1f71a1;
}

/* Home Section */
.content {
  max-width: 600px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  padding: 30px;
}

.content h2 {
  padding-bottom: 10px;
  font-size: 2em;
  color: #1f71a1;
}

.content p {
  font-size: 1em;
  color: #1f71a1;
  margin-bottom: 20px;
}

.content a {
  display: inline-block;
  padding: 10px 25px;
  background-color: #fff;
  color: #1f71a1;
  margin-top: 15px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.content a:hover {
  background-color: #1f71a1;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.imgBox img {
  width: 100%;
  max-width: 300px;
  animation: animate 5s linear infinite;
  border-radius: 15px;
}

/*Writing text animation*/
.dynamic-text {
  font-size: 1.2em;
  color: #1f71a1;
  margin-bottom: 15px;
  height: 30px;
  line-height: 30px;
  overflow: hidden;
}

.typing {
  position: relative;
  color: #1f71a1;
  font-weight: 600;
}

.typing::after {
  content: "";
  position: absolute;
  right: -5px;
  width: 1px;
  height: 100%;
  border-right: 2px solid #1f71a1;
  animation: blink 0.8s infinite;
}

/* For very small screens */
@media screen and (max-width: 480px) {
  .dynamic-text {
    min-height: 100px;
    /* Even more space for potential 2-3 lines */
  }

  .content h2 {
    font-size: 1.7em;
  }
}

@keyframes blink {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes animate {

  0%,
  100% {
    transform: translateY(10px);
  }

  50% {
    transform: translateY(30px);
  }
}

/* About Section */
.about-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.about-image {
  flex: 1;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  border-radius: 15px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Home Section Layout */
.home-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
}

/* Profile Image Styling */
.imgBox {
  order: -1;
  /* This line ensures image stays above text */
  margin-bottom: 20px;
}

.imgBox img {
  width: 100%;
  max-width: 250px;
  border-radius: 50%;
  /* Makes it circular */

  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  animation: animate 5s linear infinite;
}

/* Content Styling */
.content {
  max-width: 600px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 30px;
}

/* Responsive Adjustments */
@media screen and (min-width: 768px) {
  .home-section .container {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }

  .imgBox {
    order: 0;
    margin-bottom: 0;
  }

  .imgBox img {
    max-width: 300px;
  }
}

/* Keep existing animations */
@keyframes animate {

  0%,
  100% {
    transform: translateY(10px);
  }

  50% {
    transform: translateY(30px);
  }
}

.personal-info {
  margin-top: 30px;
}

.info-item {
  display: flex;
  margin-bottom: 10px;
}

.info-item span {
  font-weight: 600;
  min-width: 100px;
}

/* Skills Section Styles */
.skills-category {
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.7);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.skills-category h3 {
  color: #1f71a1;
  font-size: 1.3em;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.skills-category h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: #1f71a1;
}

/* Programming Languages Grid */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  justify-items: center;
}

.language-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.language-item i {
  font-size: 2.5em;
  color: #1f71a1;
  margin-bottom: 40px;
  transition: transform 0.3s ease;
}

.language-item span {
  color: #1f71a1;
  font-weight: 500;
  text-align: center;
}

.language-item:hover {
  transform: translateY(-5px);
}

.language-item:hover i {
  transform: scale(1.1);
}

/* Core Skills List */
.core-skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.core-skill-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.core-skill-item i {
  color: #1f71a1;
  margin-right: 10px;
  font-size: 1.1em;
}

.core-skill-item span {
  color: #1f71a1;
  font-weight: 500;
}

.core-skill-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: #1f71a1;
}

.core-skill-item:hover i,
.core-skill-item:hover span {
  color: white;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .languages-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
  }

  .core-skills {
    grid-template-columns: 1fr;
  }
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}


.project-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin-bottom: 10px;
  color: #1f71a1;
}

.project-info p {
  margin-bottom: 15px;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.project-tech span {
  background: rgba(31, 113, 161, 0.1);
  color: #1f71a1;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8em;
}

.project-link {
  display: inline-block;
  padding: 8px 20px;
  background-color: #1f71a1;
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: #165a82;
  transform: translateY(-2px);
}

/* icons */
.custom-icon {
  width: 65px;
  /* Adjust as needed */
  height: 65px;
  /* Adjust as needed */
  object-fit: contain;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

/* Experience Section */
.modern-style-experience {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 800px;
  margin: 0 auto;
}

.experience-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 12px #1f71a1;
  transition: all 0.3s ease;
  border-left: 4px solid #1f71a1;
}

.experience-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px #1f71a1;
}

.experience-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.company-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1f71a1, #3a9bd8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  flex-shrink: 0;
}

.company-logo i {
  font-size: 24px;
  color: white;
}

.experience-title h3 {
  color: #1f71a1;
  font-size: 1.4em;
  margin-bottom: 5px;
  font-weight: 600;
}

.company-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
  font-size: 1.1em;
}

.experience-period {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 5px;
}

.experience-location {
  color: #666;
  font-size: 0.9em;
  display: flex;
  align-items: center;
}

.experience-location i {
  margin-right: 5px;
  font-size: 0.9em;
}

.experience-details {
  border-top: 1px solid #eaeaea;
  padding-top: 20px;
}

.experience-description {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #444;
}

.skills-acquired h4 {
  color: #1f71a1;
  margin-bottom: 12px;
  font-size: 1.1em;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: rgba(31, 113, 161, 0.1);
  color: #1f71a1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: rgba(31, 113, 161, 0.2);
  transform: translateY(-2px);
}
/*  Experience style Section */
.linkedin-experience {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 800px;
  margin: 0 auto;
}

.linkedin-card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.linkedin-card:hover {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.linkedin-header {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.linkedin-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #0077b5, #00a0dc);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.linkedin-logo i {
  font-size: 24px;
  color: white;
}

.linkedin-title h3 {
  color: #191919;
  font-size: 1.25em;
  margin: 0 0 4px 0;
  font-weight: 600;
  line-height: 1.4;
}

.company-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #666666;
  font-size: 0.95em;
}

.company-name {
  font-weight: 500;
  color: #191919;
}

.separator {
  color: #666666;
}

.job-type {
  color: #666666;
}

.duration-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666666;
  font-size: 0.9em;
}

.duration {
  color: #666666;
}

.location {
  display: flex;
  align-items: center;
  gap: 4px;
}

.location i {
  font-size: 0.85em;
}

.linkedin-description {
  margin: 16px 0;
  padding-left: 20px;
}

.linkedin-description p {
  color: #191919;
  line-height: 1.6;
  margin-bottom: 8px;
  font-size: 0.95em;
  position: relative;
}

.linkedin-description p:before {
  content: "•";
  position: absolute;
  left: -15px;
  color: #666666;
}

.linkedin-skills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.skills-label {
  color: #666666;
  font-size: 0.9em;
  font-weight: 500;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: rgba(31, 113, 161, 0.1);
  color: #1f71a1;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: rgba(31, 113, 161, 0.2);
  transform: translateY(-1px);
}

.add-experience {
  text-align: center;
  margin-top: 30px;
}

.add-experience-btn {
  background: transparent;
  color: #1f71a1;
  border: 1px solid #1f71a1;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-experience-btn:hover {
  background: rgba(31, 113, 161, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.add-experience-btn i {
  font-size: 0.9em;
}

/* Responsive adjustments for Experience style */
@media screen and (max-width: 768px) {
  .linkedin-header {
    gap: 12px;
  }
  
  .linkedin-logo {
    width: 48px;
    height: 48px;
  }
  
  .linkedin-logo i {
    font-size: 20px;
  }
  
  .linkedin-title h3 {
    font-size: 1.1em;
  }
  
  .company-info,
  .duration-location {
    flex-wrap: wrap;
  }
  
  .skill-tags {
    gap: 6px;
  }
  
  .skill-tag {
    padding: 4px 10px;
    font-size: 0.8em;
  }
}

@media screen and (max-width: 480px) {
  .linkedin-card {
    padding: 20px;
  }
  
  .linkedin-description {
    padding-left: 15px;
  }
  
  .linkedin-skills {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .company-logo {
    margin-bottom: 15px;
  }

  .skill-tags {
    gap: 8px;
  }

  .skill-tag {
    padding: 5px 12px;
    font-size: 0.85em;
  }
}

@media screen and (max-width: 480px) {
  .experience-card {
    padding: 20px;
  }

  .company-logo {
    width: 50px;
    height: 50px;
  }

  .company-logo i {
    font-size: 20px;
  }

  .experience-title h3 {
    font-size: 1.2em;
  }
}

/* Contact Section */
.contact-container {
  display: flex;
  gap: 40px;
}

.contact-info {
  flex: 1;
  background: rgba(255, 255, 255, 0.7);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.contact-item i {
  font-size: 1.5em;
  color: #1f71a1;
  margin-right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.contact-text h3 {
  margin-bottom: 5px;
  color: #1f71a1;
}

.contact-form {
  flex: 1;
  background: rgba(255, 255, 255, 0.7);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
  font-size: 1em;
  color: #1f71a1;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  padding: 12px 30px;
  background: #1f71a1;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form button:hover {
  background: #165a82;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
/* Error message styling */
.error-message {
  color: #e74c3c;
  font-size: 0.85em;
  margin-top: 5px;
  display: block;
  min-height: 20px;
}

/* Success message styling */
.success-message {
  background: #2ecc71;
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: center;
  display: none;
  animation: fadeIn 0.5s ease;
}

/* Form input error state */
.form-group input:invalid,
.form-group textarea:invalid {
  border: 1px solid #e74c3c !important;
}

.form-group input:valid,
.form-group textarea:valid {
  border: 1px solid #27ae60 !important;
}

/* Loading state for button */
button.loading {
  position: relative;
  color: transparent;
}

button.loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Footer */
footer {
  background: rgba(255, 255, 255, 0.2);
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Social icons */
.social-links {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.custom-social-icon {
  width: 55px;
  /* Adjust size as needed */
  height: 55px;
  /* Adjust size as needed */
  margin: 0 10px;
  transition: all 0.3s ease;
  border-radius: 50%;
  /* Makes icons circular if desired */
  object-fit: contain;
  /* Ensures icons maintain aspect ratio */
  padding: 8px;
  /* Adds some spacing around the icon */
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  /* Maintains your existing shadow */
}

.custom-social-icon:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  background: #1f71a1;
  /* Changes background on hover to match your theme */
}

/*social links*/

.social-links a:hover {

  color: #fff;
  transform: translateY(-3px);
}

footer p {
  color: #1f71a1;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }

  .contact-container {
    flex-direction: column;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item:nth-child(odd) .timeline-date,
  .timeline-item:nth-child(even) .timeline-date {
    left: 0;
    right: auto;
    top: -20px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 80px;
    margin-right: 0;
  }
}

@media screen and (max-width: 768px) {
  header {
    padding: 15px 20px;
  }

  .menu-toggle {
    display: block;
  }

  header ul {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.9);
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    transition: all 0.3s ease;
  }

  header ul.active {
    left: 0;
  }

  header ul li {
    margin: 15px 0;
  }

  .home-section .container {
    flex-direction: column;
    text-align: center;
  }

  .content {
    margin-bottom: 30px;
  }

  .imgBox img {
    max-width: 250px;
  }

  .section-title {
    font-size: 2em;
  }
}


@media screen and (max-width: 576px) {
  .container {
    padding: 20px;
  }

  .section-title {
    font-size: 1.8em;
  }

  .project-card {
    min-width: 100%;
  }
}
/* ============ BACK TO TOP BUTTON ============ */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: #1f71a1;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 24px rgba(31, 113, 161, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px) scale(0.9);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.35s ease,
    background 0.3s ease,
    color 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: floatUp 3s ease-in-out infinite;
}

.back-to-top:hover {
  background: #1f71a1;
  color: #fff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 32px rgba(31, 113, 161, 0.4);
}

.back-to-top:active {
  transform: translateY(-2px) scale(1);
}

@media screen and (max-width: 576px) {
  .back-to-top {
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    font-size: 0.95rem;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Gentle floating motion */
@keyframes floatUp {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 10px 24px rgba(31, 113, 161, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
  50% {
    transform: translateY(-6px) scale(1);
    box-shadow:
      0 16px 30px rgba(31, 113, 161, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
}

/* Stop floating when hovered — keeps it feeling responsive */
.back-to-top:hover {
  animation: none;
}



