/* Fixed Overlay Styling */
#intro-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(143, 180, 181);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001; /* Must be higher than portfolio nav (9999) */
  transition: transform 1.2s cubic-bezier(0.82, 0, 0.18, 1);
}

/* Swipe Up State */
#intro-modal.swipe-up {
  transform: translateY(-100%);
}

/* Scroll Lock Helper */
body.intro-loading {
  overflow: hidden !important;
  height: 100vh !important;
}

.intro-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; 
}

#naSvg {
  width: 320px;
  height: auto;
  transition: opacity 0.5s ease;
}

#revealLine {
  fill: none;
  stroke: white;
  stroke-width: 25px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-fill {
  fill: #231f20;
}

/* --- TEXT ANIMATION LOGIC --- */
.intro-text {
  font-family: sans-serif;
  font-size: 1.1rem;
  margin-top: 25px;
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(25px);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease;
  transition-delay: 1.8s;
}

.start-anim .intro-text {
  opacity: 1;
  transform: translateY(0);
}

.logo {
  font-weight: bold;
  letter-spacing: 4px;
}

/* Renamed to .intro-sub to avoid conflict with .logoSub in nav/footer */
.intro-sub {
  font-weight: 300;
  letter-spacing: 4px;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  display: inline-block;
  transform: translateX(-10px);
  transition: transform 0.8s cubic-bezier(0.65, 0, 0, 1), 
              opacity 0.6s ease, 
              max-width 0.8s cubic-bezier(0.65, 0, 0, 1);
  transition-delay: 2.4s;
}

.start-anim .intro-sub {
  opacity: 1;
  max-width: 400px;
  transform: translateX(0);
}

/* Intro specific separator line */
.intro-line {
  font-weight: 300;
  margin: 0 8px;
  top: -1.5px;
  position: relative;
  color: #231f20; /* Matching the logo fill color */
}

/* Drawing Animation */
.start-anim #revealLine {
  transition: stroke-dashoffset 1.6s cubic-bezier(0.45, 0, 0.05, 1) 0.5s;
  stroke-dashoffset: 0 !important;
}

@media (max-width: 480px) {
  .intro-text {
    width: 320px; /* Matches #naSvg width */
    margin-left: auto;
    margin-right: auto;
    white-space: normal; /* Allows wrapping if the screen is extremely narrow */
    text-align: center;
    font-size: 0.9rem; /* Slightly smaller font for better fit on small screens */
  }

  .intro-sub {
    /* Adjust max-width for mobile to ensure it doesn't push 
       the container wider than the 320px limit */
    max-width: 0; 
  }

  .start-anim .intro-sub {
    max-width: 150px; /* Constrained width for the sliding animation */
  }
}