@font-face {
  font-family: "Agustina";
  src: url(../fonts/Agustina.woff);
}



/*CSS variable declaration for light/dark mode*/

html[data-theme="light"] {
  --bg-mybtn: red;
  --bg-nav: black;
  --bg-nav-img: black;
  --bg-footer: #DDE1EC;
  --bg: #ffffff;
  --text: #191919;
  --text-color: #6c757d;
  --col-icon: black;
  --col-bd-radius: rgb(2, 2, 2);
  --col-box-shadow: #000000 2px 2px 4px, #4D4D4D -2px -2px 4px;
  --col-box-shadow-hover: inset #8a7373 2px 2px 4px, inset #4D4D4D -2px -2px 4px;
  --col-bd-icon: transparent;
  --bg-icon: #fff;
  --col-icon-twitter: #1da1f2;
  --col-icon-dribbble: #ea4c89;
  --col-icon-linkedin: #0e76a8;
  --col-icon-kaggle: #41aff3;
  --col-icon-github: #24292e;
  --col-icon-instagram: rgb(201, 94, 174);
  --col-icon-mail: rgb(209, 82, 82);
  --col-icon-google-scholar: #3cba54;
  --col-icon-codeforces: rgb(19, 145, 184);
  --col-icon-leetcode: rgb(255, 181, 62);
  --shadow-col: rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] {
  --bg-mybtn: rgb(230, 109, 129);
  --bg-nav: #6617cb;
  --bg-nav-img: linear-gradient(315deg, #6617cb 0%, #882463 74%);
  --bg-footer: linear-gradient(315deg, #6617cb 0%, #882463 74%);
  --bg: #191919;
  --text: #ffffff;
  --text-color: #fff;
  --bg-txt-img: linear-gradient(315deg, #d5adc8 0%, #ff8489 74%);
  --txt-fill: transparent;
  --col-icon: white;
  --col-bd-radius: black;
  --col-bd-icon: transparent;
  --col-box-shadow: 5px 5px 10px rgba(22, 21, 21, 0.7), -5px -5px 10px rgba(255, 255, 255, 0.1);
  --col-box-shadow-hover: inset rgba(255, 255, 255, 1) 2px 2px 4px, inset rgba(255, 255, 255, 0.5) -2px -2px 4px;
  --col-icon-twitter: #1da1f2;
  --col-icon-dribbble: #ea4c89;
  --col-icon-linkedin: #0e76a8;
  --col-icon-kaggle: #41aff3;
  --col-icon-github: #24292e;
  --col-icon-instagram: rgb(201, 94, 174);
  --col-icon-mail: rgb(209, 82, 82);
  --col-icon-google-scholar: #3cba54;
  --col-icon-codeforces: rgb(19, 145, 184);
  --col-icon-leetcode: rgb(255, 181, 62);
  --col-white: #fff;
}

/* Commenting out static font-size rules for nav items on specific pages */

.about-page .nav-item {
  transform: scale(0.85);
}

.resume-page .nav-item {
  transform: scale(0.85);
}

.portfolio-page .nav-item {
  transform: scale(0.85);
}

.extra-page .nav-item {
  transform: scale(0.85);
}

.statement-page .nav-item {
  transform: scale(0.85);
}


/* Basic body styling */
html {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Background image styling */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, filter 2s ease-in-out;
  filter: brightness(1) contrast(1);
}

.bg-image.loaded {
  opacity: 1;
}

.bg-image.content-mode {
  filter: brightness(0.8) contrast(1.1);
}

/* Main content container */
.content-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.content-container.loaded {
  opacity: 1;
}

/* Scroll to Top button */
#btnScrollToTop {
  width: 50px;
  height: 50px;
  background-color: #bb86fc;
  color: #fff;
  margin: 8px;
  border: none;
  border-radius: 50%;
  box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  position: fixed;
  outline: none;
  bottom: 10px;
  right: 10px;
  z-index: 99;
  display: none;
}

.navbar-brand {
  font-family: "Ysabeau Infant", sans-serif;
  font-optical-sizing: auto;
  font-size: 90px;
  font-weight: 100;
  font-style: normal;
  margin-right: 0;
  display: inline-block;
  z-index: 1;
  color: white;
  opacity: 0.8;
  transform-origin: center center;
  transition: transform 2s ease-in-out;
}

.navbar-brand.content-mode {
  transform: scale(0.778);
}

.about-page .navbar-brand {
  transform: scale(0.778) !important;
}

.resume-page .navbar-brand {
  transform: scale(0.778) !important;
}

.portfolio-page .navbar-brand {
  transform: scale(0.778) !important;
}

.extra-page .navbar-brand {
  transform: scale(0.778) !important;
}

.statement-page .navbar-brand {
  transform: scale(0.778) !important;
}

.shrink-header {
  transform: scale(0.778) !important;
}

.navbar {
  width: 100%;
  color: white;
  background: linear-gradient(to bottom, 
                rgba(0, 0, 0, 0.85) 0%, 
                rgba(0, 0, 0, 0.7) 60%, 
                rgba(0, 0, 0, 0.4) 85%, 
                rgba(0, 0, 0, 0) 100%) !important;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ensure the navbar text is visible against transparent backgrounds */
.navbar-brand, .nav-link {
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
}

.navbar-brand-container {
  width: 100%;
  text-align: center;
  margin-bottom: 0;
}

.navbar-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding: 0 15%;
  position: relative;
}

.nav-item {
  position: relative;
  text-align: center;
  flex: 0 1 auto;
  margin: 0;
  padding: 0 3rem;
}

/* Remove the conflicting styles */
.nav-item:nth-child(1),
.nav-item:nth-child(2),
.nav-item:nth-child(3),
.nav-item:nth-child(4),
.nav-item:nth-child(5) {
  position: relative;
  transform: none;
}

/* Position nav items */
.about-link {
  position: absolute !important;
  left: 10% !important;
  transform: translateX(-50%) !important;
  transition: left 2s ease-in-out;
}

.resume-link {
  position: absolute !important;
  left: 30% !important;
  transform: translateX(-50%) !important;
  transition: left 2s ease-in-out;
}

.portfolio-link, .portfolio-secondary-link {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  transition: left 2s ease-in-out;
}

.extra-link {
  position: absolute !important;
  left: 70% !important;
  transform: translateX(-50%) !important;
  transition: left 2s ease-in-out;
}

.statement-link {
  position: absolute !important;
  left: 90% !important;
  transform: translateX(-50%) !important;
  transition: left 2s ease-in-out;
}

/* Content mode - compressed nav positions */
.navbar-nav.content-mode .about-link {
  left: 20% !important;
}

.navbar-nav.content-mode .resume-link {
  left: 35% !important;
}

.navbar-nav.content-mode .portfolio-link {
  left: 50% !important; /* stays the same */
}

.navbar-nav.content-mode .extra-link {
  left: 65% !important;
}

.navbar-nav.content-mode .statement-link {
  left: 80% !important;
}

.nav-link {
  color: white !important;
  padding: 0.5rem 1rem;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0.8;
  transform-origin: center center;
  transform: font-size 2s ease-in-out;
}

.navbar-nav.content-mode .nav-link {
  transform: scale(0.85);
}

/* Remove hover effects */
.nav-link:hover,
.navbar-brand:hover {
  color: white !important;
}

/* Footer styling */
.footer {
  width: 100%;
  padding: 2rem 0 0 0;
  background: linear-gradient(to top, 
                rgba(0, 0, 0, 0.85) 0%, 
                rgba(0, 0, 0, 0.7) 60%, 
                rgba(0, 0, 0, 0.4) 85%, 
                rgba(0, 0, 0, 0) 100%) !important;
  color: white;
  text-align: center;
  margin-top: auto;
  position: relative;
}

.footer-heading {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.footer p, 
.footer a {
  color: white;
}

.footer .container {
  margin: 0 auto;
  display: block;
  max-width: 1140px;
}

.footer-social-icons {
  margin-top: 1rem;
}

.footer-social-icons a {
  color: white;
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: opacity 0.3s ease;
}

.footer-social-icons a:hover {
  opacity: 0.7;
}

.contact-form {
  text-align: left;
}

.contact-form .form-group {
  margin-bottom: 1rem;
}

.contact-form .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  color: white;
}

.contact-form .btn {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.contact-form .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.copyright-text {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.5rem;
}

/* Common page-specific overrides */
.bg-image.bg-filtered {
  filter: brightness(0.8) contrast(1.1);
}

/* Override global navigation animations for all pages except home */
.about-page .nav-item,
.resume-page .nav-item,
.portfolio-page .nav-item,
.extra-page .nav-item,
.statement-page .nav-item {
  opacity: 1 !important;
  pointer-events: auto;
}

/* Content sections styling */
.about-section,
.portfolio-section,
.extra-section,
.statement-section {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 2rem;
  opacity: 1;
}
.about-content h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

/* Common text styling */
.text-line {
  margin: 0;
  color: white;
  font-family: 'Ysabeau Infant', sans-serif;
  font-size: 1.2em;
  text-align: center;
  opacity: 1;
  text-shadow: 
    0px 0px 10px rgba(0, 0, 0, 1),
    0px 0px 10px rgba(0, 0, 0, 1),
    0px 0px 10px rgba(0, 0, 0, 1);
}

.text-lines {
  margin: 0;
  color: white;
  font-family: 'Ysabeau Infant', sans-serif;
  font-size: 0.9em;
  text-align: center;
  opacity: 1;
  text-shadow: 
    0px 0px 10px rgba(0, 0, 0, 1),
    0px 0px 10px rgba(0, 0, 0, 1),
    0px 0px 10px rgba(0, 0, 0, 1);
}

/* Masonry gallery common styles 
#masonry-gallery {
  width: calc(100% - 0px) !important;
  max-width: 1200px !important;
  margin: 100px auto 0 !important;
  position: relative !important;
  display: block !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* Fix padding for extra section to center masonry properly */
#extra-section .main-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* .masonry-brick {
  width: calc(25% - 16px);
  margin: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}

.masonry-sizer,
.masonry-brick {
  width: 220px !important;
  display: block !important;
}
*/
.masonry-brick img,
.masonry-brick video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block !important;
  border-radius: 10px;
}

/* Responsive masonry 
@media (max-width: 1200px) {
  .masonry-brick {
    width: calc(33.333% - 16px);
  }
}

@media (max-width: 900px) {
  .masonry-brick {
    width: calc(50% - 16px);
  }
}

@media (max-width: 600px) {
  .masonry-brick {
    width: calc(100% - 16px);
  }
}

/* Main content styling */
.main-content {
  padding: 250px 20px 20px;
  margin-top: 0px;
  min-height: calc(100vh - 200px);
  background-color: transparent;
  color: white;
}

#resume-section .main-content {
  padding-top: 0px !important;
  
}

/* Content section styling for SPA */
.content-section {
  position: static;
  padding: 20px;
  margin: 0;
  color: white;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.content-section.active {
  opacity: 1;
}

.content-section.fade-in-content {
  opacity: 1;
}
/* Container layout */
.content-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Force minimum page height */
#root, .app, main, [data-reactroot] {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Force correct display on all elements */
header, main, section, div, footer {
  display: block;
  box-sizing: border-box;
}

/* Top navbar row with brand and toggle */
.top-navbar-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

/* Ensure proper spacing */
.vertical-spacer {
  min-height: 45vh;
}

.footer .contact-form .btn {
  display: block;
  padding: 10px 20px;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  font-family: 'Ysabeau Infant', sans-serif;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  width: fit-content;
  margin: 0 auto;
  text-shadow: 
      0px 0px 10px rgba(0, 0, 0, 1),
      0px 0px 10px rgba(0, 0, 0, 1),
      0px 0px 10px rgba(0, 0, 0, 1);
}

.footer .contact-form .btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Portfolio Hover Animation - Phase 3 Step 1 */
.navbar-nav .nav-item.hidden-nav {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

.navbar-nav .nav-item.revealed-nav {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible;
}

.navbar-nav .nav-item.revealed-nav .nav-link {
  opacity: 0.8 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 10;
}

.nav-letter {
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  display: inline;
  filter: blur(4px);
  pointer-events: none;
}

.nav-letter.fade-in {
  opacity: 1;
  filter: blur(0px);
  pointer-events: none;
}

.portfolio-link:hover {
  text-shadow: 0px 2px 8px rgba(255, 255, 255, 0.5);
}

/* =================================== */
/* NAV HOVER/ACTIVE - NO INTERFERENCE  */
/* =================================== */

/* Base styling for revealed nav links */
.nav-item.revealed-nav .nav-link {
  transition: font-size 2s ease-in-out, transform 0.4s ease-in-out, text-shadow 0.4s ease-in-out;
  position: relative;
}

/* Underline element for revealed nav links */
.nav-item.revealed-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; /* Position below text */
  left: 50%;
  width: 0%;
  height: 1px;
  background-color: rgba(255, 248, 240, 0.9);
  transform: translateX(-50%);
  transform-origin: center;
  transition: width 0.4s ease-in-out;
}

/* Hover effects for revealed nav links */
.nav-item.revealed-nav .nav-link:hover {
  transform: scale(1.1);
  text-shadow: 
    0 0 8px rgba(255, 248, 240, 0.8),
    0 0 16px rgba(255, 248, 240, 0.6),
    0 0 24px rgba(255, 248, 240, 0.4);
}

/* Expand underline on hover */
.nav-item.revealed-nav .nav-link:hover::after {
  width: 100%;
}

/* Portfolio base styling after animation completes */
.portfolio-link.animation-complete .nav-link {
  transition: font-size 2s ease-in-out, transform 0.4s ease-in-out, text-shadow 0.4s ease-in-out;
  position: relative;
}

/* Portfolio underline element */
.portfolio-link.animation-complete .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0%;
  height: 1px;
  background-color: rgba(255, 248, 240, 0.9);
  transform: translateX(-50%);
  transform-origin: center;
  transition: width 0.4s ease-in-out;
}

/* Portfolio hover effects */
.portfolio-link.animation-complete .nav-link:hover {
  transform: scale(1.1);
  text-shadow: 
    0 0 8px rgba(255, 248, 240, 0.8),
    0 0 16px rgba(255, 248, 240, 0.6),
    0 0 24px rgba(255, 248, 240, 0.4);
}

/* Portfolio underline expansion */
.portfolio-link.animation-complete .nav-link:hover::after {
  width: 100%;
}

/* Active state - includes underline */
.nav-link.nav-active {
  transform: scale(1.1) !important;
  text-shadow: 
    0 0 8px rgba(255, 248, 240, 0.8),
    0 0 16px rgba(255, 248, 240, 0.6),
    0 0 24px rgba(255, 248, 240, 0.4) !important;
  position: relative;
}

/* Active state underline - always visible */
.nav-link.nav-active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 100% !important;
  height: 1px;
  background-color: rgba(255, 248, 240, 0.9);
  transform: translateX(-50%);
}

#about-section {
  position: relative;
}

/* About Section Responsive Styling */
#about-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#about-section .row {
  align-items: flex-start;
  min-height: auto;
}

/* Left column - cut out image */
#about-section .col-md-6:first-child {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.cut_out-container.left-image {
  width: 100%;
  max-width: 500px !important;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.content-image.image-left {
  width: 100%;
  height: auto;
  max-width: 500px !important;
  object-fit: contain;
  object-position: center;
}

/* Right column - text image */
#about-section .col-md-6:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.cut_out-container.right-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.content-image.image-right {
  width: 100%;
  height: auto;
  max-width: 450px;
  object-fit: contain;
  object-position: center;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  #about-section .row {
      flex-direction: column;
      min-height: auto;
  }
  
  #about-section .col-md-6 {
      width: 100%;
      margin-bottom: 30px;
  }
  
  .content-image.image-left {
      max-width: 280px;
  }
  
  .content-image.image-right {
      max-width: 320px;
  }
}

@media (max-width: 576px) {
  #about-section .container {
      padding: 0 10px;
  }
  
  .content-image.image-left {
      max-width: 250px;
  }
  
  .content-image.image-right {
      max-width: 280px;
  }
}

@media (max-width: 480px) {
  .content-image.image-left {
      max-width: 200px;
  }
  
  .content-image.image-right {
      max-width: 240px;
  }
}

/* About Text Content Styling */
.about-text-content {
  padding: 0 20px;
  max-width: 600px;
  margin: 0 auto;
}

.about-title {
  font-family: 'Ysabeau Infant', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: white;
  text-align: right;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  text-shadow: 
      0px 0px 10px rgba(0, 0, 0, 1),
      0px 0px 15px rgba(0, 0, 0, 0.8),
      2px 2px 4px rgba(0, 0, 0, 0.9);
  position: relative;
  padding-bottom: 30px;
}

/* First underline - directly under the title text */
.about-title::after {
  content: '';
  position: absolute;
  bottom: 18px;
  right: -20px;
  width: 800px;
  height: 1px;
  background: linear-gradient(to right, 
    rgba(255, 248, 240, 0) 0%, 
    rgba(255, 248, 240, 0.5) 15%, 
    rgba(255, 248, 240, 0.5) 85%, 
    rgba(255, 248, 240, 0) 100%);
}

/* Second underline - below first, extended longer */
.about-title::before {
  content: '';
  position: absolute;
  bottom: 10px;
  right: 100px;
  width: 1100px;
  height: 1px;
  background: linear-gradient(to right, 
  rgba(255, 248, 240, 0) 0%, 
  rgba(255, 248, 240, 0.5) 10%, 
  rgba(255, 248, 240, 0.5) 90%, 
  rgba(255, 248, 240, 0) 100%);
}
.about-text-flow {
  line-height: 1.6;
}

.about-text-flow p {
  font-family: 'Ysabeau Infant', sans-serif;
  font-size: 1rem;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 
      0px 0px 8px rgba(0, 0, 0, 1),
      0px 0px 12px rgba(0, 0, 0, 0.8),
      1px 1px 3px rgba(0, 0, 0, 0.9);
}

/* Creative Flow Layouts */
.intro-paragraph {
  text-align: left;
  font-size: 1.1rem;
  margin-left: -150px;
  margin-bottom: 2rem;
  position: relative;
  left: 30px;
}

.flow-paragraph.flow-right {
  text-align: right;
  padding-left: 60px;
  font-style: italic;
  position: relative;
  right: -80px;
  width: calc(100% + 80px);
  padding-right: 80px;
}

.flow-paragraph.flow-center {
  text-align: left;
  padding: 0 40px;
  font-weight: 500;
}

.main-paragraph {
  text-align: justify;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-left: -150px;
  position: relative;
  left: 30px;
}

.personality-paragraph {
  text-align: left;
  font-size: 1.05rem;
  padding-right: 40px;
  position: relative;
  left: 80px;
  width: calc(100% - 40px);
}

.closing-paragraph {
  text-align: center;
  font-size: 1.1rem;
  margin-top: 2rem;
  padding: 0 20px;
  margin-left: -400px;
  margin-right: 200px;
}


/* First line (longer) below closing paragraph */
#about-section .about-text-content::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: -500px;
  width: 1100px;
  height: 1px;
  background: linear-gradient(to right, 
    rgba(255, 248, 240, 0) 0%, 
    rgba(255, 248, 240, 0.5) 10%, 
    rgba(255, 248, 240, 0.5) 90%, 
    rgba(255, 248, 240, 0) 100%);
  z-index: 10;
}

/* Second line (shorter) below first line */
#about-section .about-text-content::before {
  content: '';
  position: absolute;
  bottom: -15px;
  left: -600px;
  width: 800px;
  height: 1px;
  background: linear-gradient(to right, 
    rgba(255, 248, 240, 0) 0%, 
    rgba(255, 248, 240, 0.5) 15%, 
    rgba(255, 248, 240, 0.5) 85%, 
    rgba(255, 248, 240, 0) 100%);
  z-index: 10;
}

.highlight-text {
  font-style: italic;
  font-weight: 600;
  text-shadow: 
      0px 0px 12px rgba(255, 255, 255, 0.3),
      0px 0px 8px rgba(0, 0, 0, 1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-title {
      font-size: 1.8rem;
      letter-spacing: 1px;
  }
  
  .about-text-flow p {
      font-size: 0.95rem;
  }
  
  .flow-paragraph.flow-right {
      padding-left: 20px;
      text-align: left;
  }
  
  .flow-paragraph.flow-center {
      padding: 0 10px;
  }
  
  .personality-paragraph {
      padding-right: 10px;
  }
}

@media (max-width: 576px) {
  .about-text-content {
      padding: 15px;
  }
  
  .about-title {
      font-size: 1.5rem;
      margin-bottom: 1.5rem;
  }
  
  .about-text-flow p {
      font-size: 0.9rem;
      margin-bottom: 1.2rem;
  }
  
  .flow-paragraph.flow-right,
  .flow-paragraph.flow-center,
  .personality-paragraph {
      text-align: left;
      padding: 0;
  }
}

.main-content #about-section {
  padding-top: 0px !important;
  margin-top: -10px !important;
}

.about-left-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.about-left-content .about-title {
  margin-bottom: 1.5rem;
  width: 100%;
}

/* Hide mobile version on desktop, show desktop version */
#about-section .mobile-about-content {
  display: none;
}

#about-section .container {
  display: block;
}

/* About Section - Title Above Two Columns */
#about-section .about-title {
  text-align: right;
  width: 100%;
  padding-right: 150px;
}

#about-section .about-left-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Performance Optimization for About Animations */
#about-section .about-title,
#about-section .intro-paragraph,
#about-section .flow-paragraph,
#about-section .main-paragraph,
#about-section .personality-paragraph,
#about-section .closing-paragraph,
#about-section .about-left-content {
    will-change: transform, opacity; /* Optimize for animations */
}

/* Remove will-change after animation completes */
#about-section .about-title.rise-animated,
#about-section .intro-paragraph.rise-animated,
#about-section .flow-paragraph.rise-animated,
#about-section .main-paragraph.rise-animated,
#about-section .personality-paragraph.rise-animated,
#about-section .closing-paragraph.rise-animated,
#about-section .about-left-content.rise-animated {
    will-change: auto;
}


/* About Section Rise-Up Animation - Initial Hidden State */
#about-section .about-title,
#about-section .intro-paragraph,
#about-section .flow-paragraph,
#about-section .main-paragraph,
#about-section .personality-paragraph,
#about-section .closing-paragraph,
#about-section .about-left-content {
    opacity: 1;
    transform: translateY(20px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* About section fades out when section loses fade-in-content class */
#about-section:not(.fade-in-content) .about-title,
#about-section:not(.fade-in-content) .intro-paragraph,
#about-section:not(.fade-in-content) .flow-paragraph,
#about-section:not(.fade-in-content) .main-paragraph,
#about-section:not(.fade-in-content) .personality-paragraph,
#about-section:not(.fade-in-content) .closing-paragraph,
#about-section:not(.fade-in-content) .about-left-content {
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Animated State - Visible */
#about-section .about-title.rise-animated,
#about-section .intro-paragraph.rise-animated,
#about-section .flow-paragraph.rise-animated,
#about-section .main-paragraph.rise-animated,
#about-section .personality-paragraph.rise-animated,
#about-section .closing-paragraph.rise-animated,
#about-section .about-left-content.rise-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Reset System for About */
.animation-reset #about-section .about-title,
.animation-reset #about-section .intro-paragraph,
.animation-reset #about-section .flow-paragraph,
.animation-reset #about-section .main-paragraph,
.animation-reset #about-section .personality-paragraph,
.animation-reset #about-section .closing-paragraph,
.animation-reset #about-section .about-left-content {
    transform: translateY(20px);
    opacity: 0;
    transition: none;
}

.animation-ready #about-section .about-title,
.animation-ready #about-section .intro-paragraph,
.animation-ready #about-section .flow-paragraph,
.animation-ready #about-section .main-paragraph,
.animation-ready #about-section .personality-paragraph,
.animation-ready #about-section .closing-paragraph,
.animation-ready #about-section .about-left-content {
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Connect Section Rise-Up Animation - Initial Hidden State */
#connect-section .connect-message,
#connect-section .message-text,
#connect-section .form-group,
#connect-section .btn-send,
#connect-section .globe-container,
#connect-section .location,
#connect-section .email,
#connect-section .social-icons {
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Animated State - Visible */
#connect-section .connect-message.rise-animated,
#connect-section .message-text.rise-animated,
#connect-section .form-group.rise-animated,
#connect-section .btn-send.rise-animated,
#connect-section .globe-container.rise-animated,
#connect-section .location.rise-animated,
#connect-section .email.rise-animated,
#connect-section .social-icons.rise-animated {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Reset System for Connect */
.animation-reset #connect-section .connect-message,
.animation-reset #connect-section .message-text,
.animation-reset #connect-section .form-group,
.animation-reset #connect-section .btn-send,
.animation-reset #connect-section .globe-container,
.animation-reset #connect-section .location,
.animation-reset #connect-section .email,
.animation-reset #connect-section .social-icons {
    transform: translateY(20px);
    opacity: 0;
    transition: none;
}

.animation-ready #connect-section .connect-message,
.animation-ready #connect-section .message-text,
.animation-ready #connect-section .form-group,
.animation-ready #connect-section .btn-send,
.animation-ready #connect-section .globe-container,
.animation-ready #connect-section .location,
.animation-ready #connect-section .email,
.animation-ready #connect-section .social-icons {
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Performance Optimization for Connect Animations */
#connect-section .connect-message,
#connect-section .message-text,
#connect-section .form-group,
#connect-section .btn-send,
#connect-section .globe-container,
#connect-section .location,
#connect-section .email,
#connect-section .social-icons {
    will-change: transform, opacity;
}

#connect-section .connect-message.rise-animated,
#connect-section .message-text.rise-animated,
#connect-section .form-group.rise-animated,
#connect-section .btn-send.rise-animated,
#connect-section .globe-container.rise-animated,
#connect-section .location.rise-animated,
#connect-section .email.rise-animated,
#connect-section .social-icons.rise-animated {
    will-change: auto;
}

/* About Section Text Background Shading - Highly Specific Organic Brush Style */
/* Only targets about section paragraphs within the about-text-flow container */

#about-section .about-text-flow p {
  position: relative;
  z-index: 2;
}

/* Base brush stroke styling - only for about section text flow paragraphs */
#about-section .about-text-flow p::before {
  content: '';
  position: absolute;
  background: radial-gradient(ellipse 150% 180% at center, 
    rgba(0, 0, 0, 0.5) 0%, 
    rgba(0, 0, 0, 0.35) 20%, 
    rgba(0, 0, 0, 0.2) 40%, 
    rgba(0, 0, 0, 0.1) 60%, 
    rgba(0, 0, 0, 0.05) 75%, 
    rgba(0, 0, 0, 0.02) 85%, 
    rgba(0, 0, 0, 0) 100%);
  border-radius: 50% 40% 60% 30%;
  z-index: -1;
  transform: rotate(-3deg);
  transition: all 0.3s ease;
  pointer-events: none; /* Prevents interference with text selection */
}

/* Specific paragraph background shapes - highly targeted */
#about-section .about-text-flow .intro-paragraph::before {
  top: -8px;
  left: -12px;
  right: -8px;
  bottom: -8px;
  transform: rotate(-2deg);
  border-radius: 45% 55% 40% 60%;
}

#about-section .about-text-flow .flow-paragraph.flow-right::before {
  top: -6px;
  left: -10px;
  right: -15px;
  bottom: -6px;
  transform: rotate(1deg);
  border-radius: 60% 40% 50% 50%;
}

#about-section .about-text-flow .flow-paragraph.flow-center::before {
  top: -7px;
  left: -8px;
  right: -8px;
  bottom: -7px;
  transform: rotate(-1deg);
  border-radius: 40% 60% 45% 55%;
}

#about-section .about-text-flow .main-paragraph::before {
  top: -10px;
  left: -15px;
  right: -10px;
  bottom: -10px;
  transform: rotate(2deg);
  border-radius: 55% 45% 35% 65%;
}

#about-section .about-text-flow .personality-paragraph::before {
  top: -8px;
  left: -10px;
  right: -12px;
  bottom: -8px;
  transform: rotate(-2deg);
  border-radius: 50% 50% 60% 40%;
}

#about-section .about-text-flow .closing-paragraph::before {
  top: -8px;
  left: -12px;
  right: -8px;
  bottom: -8px;
  transform: rotate(1deg);
  border-radius: 65% 35% 45% 55%;
}

/* ================================================================ */
/*         ABOUT SECTION: COMPLETE LINE ANIMATION SYSTEM            */
/* ================================================================ */

/* Hide ALL content except line containers */
#about-section .about-title,
#about-section .about-left-content,
#about-section .intro-paragraph,
#about-section .flow-paragraph,
#about-section .main-paragraph,
#about-section .personality-paragraph,
#about-section .closing-paragraph {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Line parent containers visible but text hidden */
#about-section .about-title,
#about-section .about-text-content {
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    color: transparent !important;
    text-shadow: none !important;
}

/* Hide paragraph backgrounds */
#about-section .about-text-flow p::before {
    display: none !important;
}

/* Hide text-content children */
#about-section .about-text-content > * {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ===== STAGE 0: INITIAL STATE (at center, width 0) ===== */

.about-title::after {
    content: '' !important;
    position: fixed !important;
    top: 24.7vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 1px !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: linear-gradient(to right, 
        rgba(255, 248, 240, 0) 0%, 
        rgba(255, 248, 240, 0.5) 15%, 
        rgba(255, 248, 240, 0.5) 85%, 
        rgba(255, 248, 240, 0) 100%) !important;
    transition: width 1.2s ease-out, top 0.8s ease-out !important;
    z-index: 1000 !important;
}

.about-title::before {
    content: '' !important;
    position: fixed !important;
    top: 24.9vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 1px !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: linear-gradient(to right, 
        rgba(255, 248, 240, 0) 0%, 
        rgba(255, 248, 240, 0.5) 10%, 
        rgba(255, 248, 240, 0.5) 90%, 
        rgba(255, 248, 240, 0) 100%) !important;
    transition: width 1.2s ease-out, top 0.8s ease-out !important;
    z-index: 1000 !important;
}

#about-section .about-text-content::after {
    content: '' !important;
    position: absolute !important;
    top: 13.1vh !important;
    left: 15% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 1px !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: linear-gradient(to right, 
        rgba(255, 248, 240, 0) 0%, 
        rgba(255, 248, 240, 0.5) 10%, 
        rgba(255, 248, 240, 0.5) 90%, 
        rgba(255, 248, 240, 0) 100%) !important;
    transition: width 1.2s ease-out, top 0.8s ease-out !important;
    z-index: 1000 !important;
}

#about-section .about-text-content::before {
    content: '' !important;
    position: absolute !important;
    top: 13.3vh !important;
    left: 15% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 1px !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: linear-gradient(to right, 
        rgba(255, 248, 240, 0) 0%, 
        rgba(255, 248, 240, 0.5) 15%, 
        rgba(255, 248, 240, 0.5) 85%, 
        rgba(255, 248, 240, 0) 100%) !important;
    transition: width 1.2s ease-out, top 0.8s ease-out !important;
    z-index: 1000 !important;
}

/* ===== STAGE 1: EXPANSION (add .lines-expand class) ===== */

.about-title.lines-expand::after {
    width: 800px !important;
}

.about-title.lines-expand::before {
    width: 1100px !important;
}

#about-section .about-text-content.lines-expand::after {
    width: 1100px !important;
}

#about-section .about-text-content.lines-expand::before {
    width: 800px !important;
}

/* ===== STAGE 2: SEPARATION (add .lines-separate class) ===== */

.about-title.lines-separate::after {
    top: 6vh !important;
}

.about-title.lines-separate::before {
    top: 6.5vh !important;
}

#about-section .about-text-content.lines-separate::after {
    top: 650px !important;
    position: absolute !important;
    left: 15% !important;
    transform: translateX(-50%) !important;
}

#about-section .about-text-content.lines-separate::before {
    top: 655.5px !important;
    position: absolute !important;
    left: 15% !important;
    transform: translateX(-50%) !important;
}

/* ================================================================ */
/*                    END OF ABOUT LINE ANIMATIONS                  */
/* ================================================================ */

/* ================================================================ */
/*              ABOUT SECTION: CONTENT ANIMATIONS                   */
/*              (Triggered AFTER line animations)                   */
/* ================================================================ */

/* Content starts hidden and below final position */
#about-section .about-title,
#about-section .about-left-content,
#about-section .intro-paragraph,
#about-section .flow-paragraph,
#about-section .main-paragraph,
#about-section .personality-paragraph,
#about-section .closing-paragraph,
#about-section .about-text-content > * {
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0.8s, color 0.8s ease-out, text-shadow 0.8s ease-out;
}

/* Show title text when animated */
#about-section .about-title.content-visible {
    opacity: 1 !important;
    visibility: visible !important;
    color: white !important; /* Text becomes visible */
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8) !important; /* Restore text shadow */
    transform: translateY(0);
}

/* Show image when animated */
#about-section .about-left-content.content-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

/* Show paragraphs when animated */
#about-section .intro-paragraph.content-visible,
#about-section .flow-paragraph.content-visible,
#about-section .main-paragraph.content-visible,
#about-section .personality-paragraph.content-visible,
#about-section .closing-paragraph.content-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

/* Ensure text-flow container is always visible */
#about-section .about-text-flow {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Individual paragraphs show when they get content-visible class */
#about-section .intro-paragraph.content-visible,
#about-section .flow-paragraph.content-visible,
#about-section .main-paragraph.content-visible,
#about-section .personality-paragraph.content-visible,
#about-section .closing-paragraph.content-visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
}




/* Restore paragraph backgrounds when visible */
#about-section .about-text-flow p.content-visible::before {
    display: block !important;
}

/* ================================================================ */
/*                 END OF CONTENT ANIMATIONS                        */
/* ================================================================ */


/* 3D perspective for masonry gallery */
#masonry-gallery {
  perspective: 1000px;
  perspective-origin: center center;
}

.masonry-brick {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}