* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
}

#main {
  position: relative;
  overflow: hidden;
}

#page,
#page1,
#page2,
#page3 {
  position: relative;
  height: 100vh;
  width: 100vw;
  background-color: #f8f9fa;
}

canvas {
  position: relative;
  z-index: 9;
  max-width: 100vw;
  max-height: 100vh;
}

#loop {
  display: flex;
  position: absolute;
  top: 30%;
  height: 25%;
  width: 100%;
  font-size: 92px;
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: -1px;
}

#loop > h1 {
  font-weight: 800;
  animation-name: anim;
  animation-duration: 18s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

#loop > h1 > span {
  -webkit-text-stroke: 1.3px #000;
  color: transparent;
  font-weight: 900;
}

@keyframes anim {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

#nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 7%;
  width: 100%;
  position: fixed;
  z-index: 9;
  padding: 0 30px;
  
}

#nav > h3 {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

#nav button {
  padding: 10px 20px;
  border-radius: 50px;
  background-color: #000;
  color: #fff;
  border: none;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

#page > h3 {
  position: absolute;
  top: 55%;
  left: 5%;
  font-family: system-ui, sans-serif;
  font-weight: 400;
  color: #555;
  font-size: 20px;
  line-height: 1.6;
}

#page > h4 {
  position: absolute;
  top: 62%;
  left: 25%;
  font-family: system-ui, sans-serif;
  font-weight: 500;
  color: #333;
  font-size: 18px;
}

#page1 > #right-text {
  position: absolute;
  top: 30%;
  left: 10%;
}

#page1 > #right-text > h3 {
  font-weight: 500;
  color: #666;
  font-size: 18px;
  margin-bottom: 12px;
}

#page1 > #right-text > h1 {
  line-height: 1.4;
  font-size: 54px;
  font-weight: 800;
}

#page1 > #left-text {
  position: absolute;
  top: 50%;
  right: 10%;
  text-align: end;
}

#page1 > #left-text > h1 {
  font-size: 54px;
  line-height: 1.4;
  font-weight: 800;
}

#page1 > #left-text > h3 {
  color: #666;
  font-weight: 400;
  font-size: 18px;
  margin-top: 12px;
}

#page2 > #text1 {
  position: absolute;
  top: 30%;
  left: 10%;
}

#page2 > #text1 > h3 {
  color: #666;
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 12px;
}

#page2 > #text1 > h1 {
  font-size: 64px;
  line-height: 1.35;
  font-weight: 800;
}

#page2 > #text2 {
  position: absolute;
  top: 55%;
  right: 10%;
  text-align: end;
  max-width: 520px;
}

#page2 > #text2 > p {
  color: #555;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.65;
}

/* ── PAGE 3 ── both sides ─────────────────────────────────────── */
#page3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
}

#left-text-page3 {
  text-align: left;
}

#left-text-page3 h3 {
  color: #666;
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 16px;
}

#left-text-page3 h1 {
  font-size: 78px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -2px;
}

#right-text-page3 {
  text-align: right;
}

#right-text-page3 h1 {
  font-size: 64px;
  line-height: 1.3;
  font-weight: 800;
  margin-bottom: 12px;
}

#right-text-page3 h3 {
  color: #666;
  font-weight: 400;
  font-size: 18px;
}

/* ── SOCIAL BAR (now inside nav) ──────────────────────────────── */
#social-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(161, 161, 161, 0.4);
  padding: 10px 20px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#social-bar a {
  color: #000000;
  font-size: 24px;
  text-decoration: none;           
  position: relative;             
  display: inline-flex;
  align-items: center;
  transition: color 0.25s ease;
}

#social-bar a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;                    
  left: 50%;
  background-color: #00d4ff;       
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

#social-bar a:hover {
  color: #00d4ff;
  transform: translateY(-2px);    
}

#social-bar a:hover::after {
  width: 100%;                     
}