html,
body {
  margin: 0;
  padding: 0;
}

.about-container-hero {
  margin-top: 3rem;
  max-height: 600px;
}

/* Background Section */
.background-mission {
  padding: 30px 50px;
  background-color: #fafafa;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Heading animation */
.bm-heading {
  text-align: center;
  font-size: 28px !important;
  color: #333;
  transform: translateY(30px);
  margin-top: -2rem;
}

.background-mission h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 6rem;
  color: #333;
}

.background-mission-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Text and image row */
.text-image-row {
  display: grid;
  gap: 30px;
  align-items: center;
}

.text-image-row.no-image {
  grid-template-columns: 1fr;
}

.text-image-row.row-1 {
  grid-template-columns: 2fr 1fr;
  grid-template-areas: "text image";
}

.text-image-row.row-1 p {
  grid-area: text;
}

.text-image-row.row-1 .image-wrapper {
  grid-area: image;
}

.text-image-row.row-2 {
  grid-template-columns: 1fr 2fr; 
  grid-template-areas: "image text";
}
.text-image-row.row-2 p {
  grid-area: text;
}
.text-image-row.row-2 .image-wrapper {
  grid-area: image;
}

/* Paragraph styling */
.text-image-row p {
  margin: -3rem 0 1em 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

.sub-paragraph {
  display: block;
  margin-top: 0.8em;
  text-indent: 1.5em;
}

/* Image wrapper */
.image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Styling image */
.mission-image {
  width: 400px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  opacity: 0;
  margin-top: -3rem;
  transform: translateX(50px);
  transition: transform 0.8s ease-out, opacity 0.8s ease-out, box-shadow 0.3s ease, scale 0.3s ease;
}

.mission-image.slide-left {
  transform: translateX(-50px);
}

.mission-image.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Figure Caption Styling */
.figure-caption {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #888;
  text-align: center;
}

/* Hover effect */
.mission-image:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

@media (max-width: 1030px) {
  .hero-text {
    margin-top: -1rem;
  }
  .scroll-indicator {
    margin-top: -3rem;
  }
    .background-mission {
    margin-top: -2rem;
  }
}

/* Responsive */
@media (max-width: 980px) {
  .background-mission {
    padding: 40px 50px;
  }

  .text-image-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .text-image-row .image-wrapper {
    width: 80%; /* image size */
  }

  .mission-image {
    width: 100%;
    height: auto;
  }
  
  .text-image-row p {
    margin: 0 0 1.2em 0 !important;
  }

  .mission-image {
    margin-top: 0 !important;
  }

  .image-wrapper {
    margin-top: 0 !important;
  }
}

/* Mobile smaller screens */
@media (max-width: 650px) {
  .background-mission {
    padding: 30px 20px;
  }

  .text-image-row {
    gap: 15px;
  }

  .image-wrapper {
    width: 90%;
  }
}

/* Section Header */
#skill-cards {
  padding-top: 20px;    /* reduce top spacing */
  padding-bottom: 40px; /* optional bottom spacing */
  margin: -3rem auto;
}

.cards-top-header {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  padding-top: 0;
  padding-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cards-top-header h2.section-header {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  display: inline-flex;      /* allows pseudo lines */
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
}


.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 1200px;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

.section-header span {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

.section-header::before,
.section-header::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #333;
  margin: 0 15px;
}

.section-header span::before {
  left: -120px;
}
.section-header span::after {
  right: -120px;
}

.cards-top-header p {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  max-width: 700px;        /* limits width for readability */
  margin: 0 auto;           /* center paragraph */
}

.cards-header-mobile {
  display: none;
}

/* CARDS */
.cards-section-mobile {
  display: none;
}

/* card wrapper grid */
.card-wrapper {
  display: grid;
  grid-auto-flow: row;
  gap: 30px 20px;
  justify-content: center;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  pointer-events: auto;
}

.card.zoomed ~ .card {
  pointer-events: none;
}

.cards-section {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}



@media (min-width: 950px) {
  .card-wrapper {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
  .card {
    width: 220px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet: 2x2 */
  .card-wrapper {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 30px 20px;
  }

  .card {
    width: 220px;
  }
}

/* Card Styling */
.card {
  position: relative;
  perspective: 1000px;
  aspect-ratio: 8 / 10;
  cursor: none;
}

.card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
}

.card-back {
  transform: rotateY(180deg);
}

.card-front img,
.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  
}


/* Zoom Button */
.zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease;
}

.zoom-btn:hover {
  transform: scale(1.1);
}

.zoom-btn img {
  pointer-events: none;
}

/* Overlay */
.overlay .card {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 100;
}

.card.zoomed {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1001;
  width: 300px;
  transform: translate(-50%, -50%);
}


/* Custom Flip Cursor  */
.cards-section.has-custom-cursor .card {
  cursor: none;
}

.flip-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(17,17,17,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(17,17,17,0.95);
  background: rgba(255,255,255,0.92);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(0,0,0);
  transition: opacity 0.16s ease, transform 0.06s linear;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.flip-cursor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 50%;
  border: 2px solid rgba(17,17,17,0.12);
  opacity: 1;
  animation: ripplePulse 1.6s infinite;
  pointer-events: none;
}

@keyframes ripplePulse {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  70%  { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.flip-cursor.visible { display: flex; opacity: 1; }
.flip-cursor.hidden { opacity: 0; }
#close-btn img {
  cursor: pointer;
}

/* MOBILE VIEW */
@media (max-width: 767px) {
  .cards-top-header {
    padding-top: 15px;
    padding-bottom: 20px;
  }

  .cards-top-header p {
    display: block;         /* ensure paragraph shows */
    font-size: 0.95rem;
    max-width: 90%;
  }

  .cards-header-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0rem;
    text-align: center;
  }

  .section-header-mobile span {
    white-space: normal;    /* allow wrapping on smaller screens */
  }

  .cards-section {
    display: none;
  }

  .cards-section-mobile {
    position: relative;
    display: block;
    height: 100vh; /* viewport height for stacking */
    overflow-y: auto;
    margin-top: -7rem;
    margin-bottom: -10rem;
  }
  .section-mobile-description {
    margin-top: -0.5rem;
  }

  .scroll-indicator {
    margin-top: -2rem;
  }
  
  .mobile-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-list {
    position: sticky;
    top: 0; /* stick to top while scrolling */
    height: 100vh; /* each card fills viewport */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
  }

  .mobile-card {
    width: 90%;
    max-width: 400px;
    aspect-ratio: 8 / 10;
    transform: scale(0.9);
    transition: transform 0.3s ease;
  }

  /* Active card scales up */
  .mobile-list:nth-child(n):target .mobile-card,
  .mobile-list:nth-child(n):focus-within .mobile-card {
    transform: scale(1);
  }

  .mobile-card-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }

  /* Section Header */
  .cards-header-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: -8rem;
  }

  .section-header-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1200px;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #333;
  }

  .section-header-mobile span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
  }

  .section-header-mobile::before,
  .section-header-mobile::after {
    content: "";
    flex: 1;
    height: 2px;
    background: #333;
    margin: 0 15px;
  }

  .section-header-mobile span::before {
    left: -120px;
  }
  .section-header-mobile span::after {
    right: -120px;
  }

}

/* Ensure only affects resume section */
#resume-section .features-and-blog-wrapper {
  text-align: center;
  padding: 60px 20px;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  align-items: center;
  gap: 20px;
  background-repeat: repeat;
  margin-top: 0; /* spacing from previous section */
}

/* Heading and paragraph */
#resume-section .features-and-blog-wrapper h2 {
  font-size: 2rem;
  margin-bottom: 0;
}

#resume-section .features-and-blog-wrapper p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
}

#resume-section .features-and-blog-wrapper button {
  background-color: #6b2aa5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#resume-section .features-and-blog-wrapper button:hover {
  background-color: #541d82;
  transform: scale(1.05);
}

/* Mobile: stack buttons */
@media (max-width: 650px) {
  #resume-section .features-and-blog-wrapper {
    padding: 40px 15px;
    margin-top: 2rem;
  }

  #resume-section .features-and-blog-wrapper .button-group {
    flex-direction: column;
    gap: 15px;
  }

  #resume-section .features-and-blog-wrapper button {
    width: 80%;
    max-width: 200px;
  }
}


.resume-btn {
  display: inline-block;    
  padding: 0.25rem 0.5rem;  
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: bold;
  background: #6b2aa5;
  color: #fff;
  cursor: pointer;
  line-height: 1;    
  width: auto;        
  max-width: 100%;        
  text-align: center;      
  white-space: nowrap;  
  box-sizing: border-box;     
  transition: background 0.3s;
}


.resume-btn:hover {
  background: #541d82;
}

.newsletter-about {
  margin-top: 6rem;

}







