
/* =========================
   SECTION BASE
========================= */
section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 10rem 5% 3rem;
  opacity: 0;
  visibility: hidden;
}

section.active {
  animation: show-content 1.4s linear forwards;
  animation-delay: 1.3s;
}

@keyframes show-content {
  to {
    opacity: 1;
    visibility: visible;
  }
}




/* =========================
   HOME SECTION
========================= */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  flex-wrap: wrap;
}

.home-detail {
  flex: 1 1 380px;
}

.home-detail h1 {
  font-size: clamp(3.2rem, 6vw, 5.5rem);
}
/* 
.home-detail h2 {
  font-size: 3rem;
  margin-top: -0.5rem;
}

.home-detail h2 span {
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 0.07rem var(--main-color);
  animation: display-text 16s linear infinite;
  animation-delay: calc(-4s * var(--i));
}

@keyframes display-text {
  25%,
  100% {
    display: none;
  }
}

.home-detail h2 span::before {
  content: attr(data-text);
  position: absolute;
  width: 0;
  border-right: 0.2rem solid var(--main-color);
  color: var(--main-color);
  white-space: nowrap;
  overflow: hidden;
  animation: fill-text 4s linear infinite;
}

@keyframes fill-text {
  10%,
  100% {
    width: 0;
  }
  70%,
  90% {
    width: 100%;
  }
} */
.home-detail h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-top: 1rem;
  display: flex;
  align-items:baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.animated-text {
 font-size: inherit; /* inherit h2 size */
  color: var(--main-color);
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--main-color);
  width: fit-content;
  line-height: 1.2;
}

.home-detail p {
  font-size: 1.6rem;
  margin: 1.5rem 0 2.5rem;
}

.btn-sci {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.btn {
  padding: 1rem 3rem;
  background: var(--main-color);
  border-radius: 4rem;
  font-size: 1.6rem;
  color: var(--bg-color);
  font-weight: 500;
  transition: 0.4s;
}

.btn:hover {
  background: transparent;
  color: var(--main-color);
  box-shadow: 0 0 1rem var(--main-color);
}
.sci {
  overflow: visible;
}

.sci a {
  display: inline-flex;
  position:relative;
  padding: 0.8rem;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  margin-right: 0.8rem;
  transition: 0.4s;
}

.sci a:hover {
  background: var(--main-color);
  box-shadow: 0 0 1rem var(--main-color);
}

.sci a::after {
  content: attr(data-label);
  position: absolute;
  bottom: -3.6rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--disabled-color);
  color: var(--text-color);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-size: 1.2rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Show on hover */
.sci a:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow */
.sci a::before {
  content: "";
  position: absolute;
  top: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0.6rem 0.6rem 0;
  border-style: solid;
  border-color: var(--disabled-color) transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Show arrow on hover */
.sci a:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

/* =========================
   HOME IMAGE (FIXED)
========================= */
.home-img {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
  position: relative;
}

.home-img .img-box {
  width: clamp(220px, 35vw, 420px);
  height: clamp(220px, 35vw, 420px);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: background-color 0.3s ease, mix-blend-mode 0.3s ease;
  z-index: 0;
}
/* Dark mode overlay */
body:not(.light) .img-overlay {
  background: rgba(30, 60, 150, 0.3); /* subtle white tint */
  mix-blend-mode: multiply; /* works well on dark backgrounds */
}

/* Light mode overlay */
body.light .img-overlay {
  background: rgba(11, 24, 54, 0.15); /* subtle dark tint */
  mix-blend-mode: screen; /* keeps image visible on light backgrounds */
}

/* First rotating star effect (existing) */
.home-img .img-box::after {
  content: "";
  position: absolute;
  inset: -200%;
  background: conic-gradient(
    transparent 0deg,
    transparent 260deg,
    rgba(185, 15, 143, 0.9) 300deg,
    rgba(185, 15, 143, 1) 360deg
  );
  animation: rotate-border 10s linear infinite;
  z-index: 0;
}

/* Second rotating star effect */
.home-img .img-box::before {
  content: "";
  position: absolute;
  inset: -200%; /* slightly larger than ::after */
  background: conic-gradient(
    transparent 0deg,
    transparent 250deg,
    rgba(100, 20, 180, 0.8) 280deg,
    rgba(100, 20, 180, 1) 360deg
  );
  animation: rotate-border-reverse 15s linear infinite;
  z-index: 0;
  opacity: 0.9; /* make it visible but not overpowering */
}

/* Rotation animations */
@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes rotate-border-reverse {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

/* IMAGE HOLDER */
.img-item {
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.img-item img {
  width: 85%;
  max-width: 100%;
  height: auto;
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  mix-blend-mode: color-dodge;
}

body.light .img-item img {
  mix-blend-mode: normal; /* or multiply, screen, overlay — test and pick best */
}

/* =========================
   MOBILE NAVIGATION
========================= */
@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(280px, 80%);
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: 0.4s;
    z-index: 100;
  }

  nav.show {
    right: 0;
  }

  body.menu-open #menu-icon {
    display: none;
  }

  body.menu-open #close-icon {
    display: block;
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 101;
  }

  .home {
    flex-direction: column;
    text-align: center;
  }

  .btn-sci {
    justify-content: center;
  }
}
