.page {
  display: none;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.page--active {
  display: block;
  opacity: 1;
  pointer-events: auto;
  will-change: auto;
}

/* GSAP fallback — if animations fail or are slow, ensure elements are visible */
.no-gsap #hero-name,
.no-gsap #designation,
.no-gsap #bio-card,
.no-gsap #get-in-touch,
.no-gsap #stats,
.no-gsap #projects,
.no-gsap #marquee,
.no-gsap #view-all,
.no-gsap #social-media,
.no-gsap #services,
.no-gsap #robo-card,
.no-gsap #ai-agent,
.no-gsap #profile,
.no-gsap #download-cv,
.no-gsap #hero-greeting,
.no-gsap #logo-corner,
.no-gsap #sidebar,
.no-gsap #hire-me,
.no-gsap #availability-status,
.no-gsap #topbar-search,
.no-gsap #topbar-actions,
.no-gsap #topbar-location {
  opacity: 1 !important;
}

#download-cv {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#cv-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  background: linear-gradient(90deg, #042222, #5EAF74);
  border-radius: 0 9999px 9999px 0;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 300ms ease, filter 300ms ease;
}
#cv-link:hover {
  box-shadow: 0 0 20px rgba(94, 175, 116, 0.5);
  filter: brightness(1.1);
}
#cv-link span {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #FFFFFF;
}

#cv-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5EAF74;
  border-radius: 9999px;
  flex-shrink: 0;
}
#cv-icon i {
  color: #021A1A;
  font-size: 0.875rem;
}
#cv-icon i {
  font-size: 1.125rem;
}

#profile {
  position: fixed;
  z-index: 10;
  background: #042222;
  border-radius: 0.75rem 0.75rem 0 0;
  overflow: hidden;
}
#profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

#hero-greeting {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#hero-greeting::before, #hero-greeting::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
}
#hero-greeting::before {
  top: 0;
  background: linear-gradient(to right, #5EAF74, transparent 65%);
}
#hero-greeting::after {
  bottom: 0;
  background: linear-gradient(to right, #5EAF74, transparent);
}
#hero-greeting span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

#hero-name {
  position: fixed;
  z-index: 10;
  overflow: hidden;
}
#hero-name svg {
  display: block;
  overflow: visible;
}
#hero-name text {
  fill: #FFFFFF;
}

#designation {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#designation p {
  font-size: 1.125rem;
  color: #F1F7F7;
  white-space: nowrap;
}
#designation p #typedText {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, #5EAF74, #2CC295);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#designation p .cursor {
  color: #00DF82;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}
#bio-card {
  position: fixed;
  z-index: 10;
  background: linear-gradient(180deg, #042222 0%, #021A1A 100%);
  border-radius: 0 0 1rem 1rem;
  padding: 1rem;
}

#get-in-touch {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
}
#get-in-touch h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #F1F7F7;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  gap: 0.25rem;
}
#get-in-touch h2 i {
  color: #00DF82;
  font-size: 0.75rem;
}

#stats {
  position: fixed;
  z-index: 10;
}
#stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  height: 100%;
}
#stats .stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
#stats .stat-card .stat-number {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  height: 100%;
  background: #042222;
  border-radius: 0.5rem;
  flex-shrink: 0;
}
#stats .stat-card .stat-number span {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00DF82;
}
#stats .stat-card .stat-label {
  flex: 1;
  height: 100%;
  background: #03624C;
  padding: 0.5rem;
  border-radius: 0.75rem;
  text-transform: uppercase;
}
#stats .stat-card .stat-label p {
  font-size: 0.875rem;
  font-weight: 500;
  color: #F1F7F7;
  overflow: hidden;
}

#projects {
  position: fixed;
  z-index: 10;
  background: linear-gradient(180deg, #042222 0%, #021A1A 100%);
  border-radius: 1rem 1rem 0 0;
  padding: 1rem;
  display: flex;
}
#projects .projects-thumbnail {
  flex: 0 0 35%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#projects .projects-thumbnail .projects-thumbnail-body {
  flex: 1;
  overflow: hidden;
}
#projects .projects-thumbnail .projects-thumbnail-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  object-position: center bottom;
}
#projects .projects-info {
  flex: 0 0 65%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#projects .projects-info .projects-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#projects .projects-info .projects-footer .project-url {
  font-size: 0.875rem;
  color: #00DF82;
  text-decoration: none;
  display: block;
  text-align: right;
}
#projects .projects-info .section-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#projects .projects-info .section-content h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
}
#projects .projects-info .section-content p {
  font-size: 0.875rem;
  color: #FFFFFF;
  line-height: 1.625;
  flex: 1;
}

#marquee {
  position: fixed;
  z-index: 10;
  overflow: hidden;
  display: flex;
  align-items: center;
}
#marquee::before, #marquee::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #2CC295 100%);
}
#marquee::before {
  top: 0;
}
#marquee::after {
  bottom: 0;
}

#view-all {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
}

#view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}
#view-all-btn:focus-visible {
  outline: 2px solid #021A1A;
  outline-offset: -3px;
}
#view-all-btn {
  flex: 1;
  height: 100%;
  background: #2CC295;
  border: none;
  border-radius: 9999px 0 0 9999px;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
#view-all-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #021A1A;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  font-weight: 700;
}
#view-all-btn:hover {
  transform: scaleX(1.06);
  box-shadow: 0 0 18px rgba(44, 194, 149, 0.35);
}

#social-media {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(4, 34, 34, 0.85));
  border-radius: 0 1rem 1rem 0;
  border: 1.5px solid rgba(44, 194, 149, 0.5);
  border-left: none;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
#social-media #social-preview {
  flex: 0 0 40%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
#social-media #social-preview #social-code-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
}
#social-media #social-preview #social-code-rain .code-line {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  opacity: 0;
  transform: translateX(-8px);
  animation: code-fade-in 500ms ease forwards;
}
#social-media #social-preview #social-code-rain .code-line.clr-neon, #social-media #social-preview #social-code-rain .code-line.clr-green {
  color: #00DF82;
}
#social-media #social-preview #social-code-rain .code-line.clr-mint {
  color: #2CC295;
}
#social-media #social-preview #social-code-rain .code-line.clr-dim {
  color: rgba(94, 175, 116, 0.6);
}
#social-media #social-preview #social-code-rain .code-line.clr-white {
  color: rgba(255, 255, 255, 0.6);
}
#social-media #social-preview #social-code-rain .code-line.clr-normal-case {
  text-transform: none;
}
#social-media #social-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 100%;
  padding: 0 0.75rem;
}
#social-media #social-links .social-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(44, 194, 149, 0.5);
  background: rgba(44, 194, 149, 0.12);
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
#social-media #social-links .social-item i {
  font-size: 1rem;
}
#social-media #social-links .social-item:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(0, 223, 130, 0.4);
  background: rgba(0, 223, 130, 0.2);
}

@keyframes code-fade-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
#services {
  position: fixed;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: rgba(3, 98, 76, 0.15);
  border: 2px solid #03624C;
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 1rem;
}
#services .services-header {
  flex-shrink: 0;
}
#services .services-content {
  flex: 1;
  margin-top: 1rem;
  overflow: hidden;
}
#services .services-content .services-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  gap: 0.75rem 1rem;
}

#services .services-content .services-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #F1F7F7;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  font-weight: 500;
  white-space: nowrap;
  transition: color 200ms ease, transform 200ms ease;
  cursor: default;
}
#services .services-content .services-list li i {
  color: #00DF82;
  flex-shrink: 0;
}
#services .services-content .services-list li:hover {
  color: #00DF82;
  transform: translateX(3px);
}

#services .services-content .services-list li.services-more {
  color: rgba(44, 194, 149, 0.7);
}