html, body {
  height: 100%;
  overflow: hidden; /* Hide main scrollbars */
}

body {
  background: #1e1e1e;
  color: #f1f1f1;
  font-family: "Helvetica Neue", sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}




/* --- Each Section --- */

.container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  /* Hide scrollbar cross-browser */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.section {
  height: 100vh;
  scroll-snap-align: start;
}




/* --- Intro section --- */
.intro {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #1e1e1e;
  z-index: 20;
  scroll-snap-align: start;
  transition: opacity 0.1s ease
}

#intro-text {
  font-size: 4rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  color: white;
  z-index: 20;
}
.blinking-cursor {
  display: none;
  margin-left: 2px;
  width: 1px;
  background-color: white;
  animation: blink 1.5s step-start infinite;
  animation-play-state: paused;
  height: 1.2em;
  vertical-align: bottom;
}
@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  50.1%, 100% {
    opacity: 0;
  }
}

.mouse-scroll {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.3, 0.7, 0.4, 1);
}
.mouse {
  height: 40px;
  width: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.line {
  margin-top: 7px;
  width: 1px;
  height: 27px;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.line::after {
  content: '';
  position: absolute;
  left: 0;
  width: 2px;
  background: #fff;
  border-radius: 1px;
  opacity: 0.85;
}
.mouse-scroll.visible .line::after {
  animation: scroll-line-grow-drop 2.5s cubic-bezier(0.43,0.05,0.7,1) infinite;
}
@keyframes scroll-line-grow-drop {
  0% {
    top: 0;
    height: 0;
    opacity: 0.85;
  }
  50% {
    top: 0;
    height: 38px;
    opacity: 1;
  }
  100% {
    top: 38px;   /* 22px + 16px, so bottom edge stays pinned */
    height: 0;
    opacity: 0.85;
  }
}




/* MAIN PAGE */
#main-page {
  position: relative;
  top: 0%;
  left: 0%;
  height: 100vh;
  min-width: 100vw;
  display: flex;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 10;
  pointer-events: auto;
  margin: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.outer-center-wrapper {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  position: fixed;
  bottom: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 80vh;
  overflow-y: auto;
}

ul[role="list"] {
    position: fixed !important;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
}

.main-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping */
  text-align: left;
}

.bar-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 2.5rem;
  width: 12px;
  margin-right: 24px;  /* controls horizontal gap to text */
  margin-bottom: 0;
}

.bar-stack .bar {
  background: #f1f1f1;
  opacity: 1;
  width: 100%;
  height: 18%;
  border-radius: 2px;
  margin: 1px 0;
  transition: opacity 0.2s;
}
.bar-stack .bar.inactive {
  opacity: 0.1;
}

.text-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  white-space: normal;
}

.static-text {
  font-size: 2.5rem;
  letter-spacing: 0.07em;
  margin-right: 0.25em;
  display: inline-block;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.sentence {
  font-size: 2.5rem;
  letter-spacing: 0.07em;
  white-space: nowrap;
  display: inline-block;
}

/* Responsive for narrow screens */
@media (max-width: 600px) {  
  #intro-text {
    font-size: 10.6vw;
  }
  .main-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .outer-center-wrapper {
    top: 30%;
    min-height: 205px;
  }
  .bar-stack {
    flex-direction: column;
    margin-right: 0;
    margin-bottom: 10px; /* space between bar and text */
    align-self: flex-start;
  }
  .text-container {
    flex-direction: column;
    align-items: flex-start;
    white-space: normal;
  }
  .static-text {
    margin-right: 0;
    margin-bottom: 0.15em;
  }
  .sentence {
    white-space: normal;
  }
  .text-container .static-text,
  .text-container .sentence {
    font-size: 7vw;
  }
  .bar-stack {
    height: 7vw;
  }
  .social-icons ul {
    margin-top: 30px;
    padding-bottom: 15px;
    display: inline-block;
    margin-left: 0px;
    margin-right: 5px;
    padding-left: 0;
    z-index: 1000;
  }
  .quick-flip {
    font-size: 5vw;;
  }
  .footer-area .copyright-text p {
    font-size: 2vw !important;
  }
}

.flip {
  display: inline-block;
  perspective: 600px;
  vertical-align: baseline;
  min-width: 1em;
  white-space: pre;
  position: relative;
}
.char {
  display: inline-block;
  transition: transform 0.5s ease, color 0.3s;
  transform-style: preserve-3d;
}
.char.flipping {
  transform: rotateY(180deg);
  color: #ffdb85;
}

.main-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  margin: 2.5rem 0 2.5rem 0;
}

.flip-link {
  text-decoration: none;
  font-size: 2rem;
  font-weight: bold;
  color: #f1f1f1;
  position: relative;
  perspective: 600px;
}

.flip-vertical {
  display: inline-block;
  transform-origin: 50% 100%;
  transition: transform 0.45s cubic-bezier(.7,1.7,.5,1), color 0.3s;
  font-variant: all-small-caps;
}
.flip-link:hover .flip-vertical,
.flip-link:focus .flip-vertical {
  transform: rotateX(90deg) translateY(-1em);
  color: #ffdb85;
}


.social-icons ul {
    text-align: left;
    margin-top: 15px;
}

.social-icons li {
    list-style: none;
    display: inline-block;
}

.social-icons a {
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    width: 40px;
    height: 40px;
    position: relative;
    display: inline-block;
    text-align: center;
    line-height: 35px;
    background-color: transparent;
    border: 4px solid transparent;
}
.social-icons a::after,
.social-icons a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #f1f1f1, #ffdb85);
  bottom: -5px;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease-out;
}
.social-icons a::before {
  top: -5px;
  transform-origin: right;
}
.social-icons a:hover::after {
  transform: scaleX(1);
}


.quick-flip {
  --transition-duration: 0.325s;
  --timing-function: cubic-bezier(0.66, 0, 0.34, 1); /* https://easingwizard.com/ */

  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  height: 1lh; /* restrict height to one line */

  > * {
    display: block; /* inline elements can't use transforms */
    transition: transform var(--transition-duration) var(--timing-function),
      translate 0ms calc(var(--transition-duration) / 2);
  }

  &:hover > * {
    transform: translateY(-1lh); /* move up by one line */
  }
}
.quick-flip a span {
  display: block;
}

.quick-flip a span span {
  display: inline;
}

.space-control-small {
  font-size: 1rem;
  white-space:pre;
}

@layer general-styling {
  :root {
    --black: hsl(228, 14%, 7%);
    --white: hsl(220, 33%, 96%);
    --gray: hsl(220, 2%, 51%);
    --teal: hsl(173, 47%, 52%);
  }

  body {
    margin: 0;
    font-family: system-ui;
    font-size: 2rem;
    display: grid;
    min-block-size: 100svh;
    place-content: center;
    background: var(--teal);
    color: var(--white);
  }

  h1 {
    text-transform: uppercase;
    text-align: center;
    font-weight: 900;
    margin: 0;
    color: hsl(from var(--teal) h 20% 15%);
  }

  @layer demo-specific-prettying-up {
    /* Want to keep it an unordered list, and don't really feel
   like the numbers should be anything more than decoration, which
   is why I went with spans with aria-hidden */
    ul:has(.quick-flip) {
      margin: 0;
      margin-top: 2vh;

      list-style: none;
      text-transform: uppercase;
      font-weight: 600;

      li {
        margin-block: 2vh;
      }

      a {
        text-decoration: none;
        color: var(--white);
      }
    }
  }
}

.flip-icon {
  color: var(--gray);
}




/* FOOTER */
.footer-area {
  position: fixed;       /* Fix footer position relative to viewport */
  bottom: 20px;          /* Distance from bottom, adjust as needed */
  left: 50%;             /* Position horizontally at 50% */
  transform: translateX(-50%); /* Center horizontally by shifting left half width */
  width: auto;           /* Keep width automatic or set as needed */
  text-align: center;
  justify-content: center; /* Center content inside footer */
  z-index: 1000;         /* Ensure it stays above other content */
}

.footer-area .copyright-text p {
  font-size: 0.8rem;
}
