/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
   Root Variables
 */
:root {
  /* Fonts */
  --font-family-base: "Segoe UI", sans-serif;

  /* Colors */
  --color-primary-dark: hsl(13, 100%, 49%);
  --color-primary-light: hsl(50, 95%, 56%);
  --color-highlight: hsl(51, 90%, 50%);
  --color-white: #ffffff;
  --color-black: #000000;
  --color-black-soft: #0b0b0b;
  --color-footer-bg: hsl(0, 0%, 2%);
  --color-nav-text: #fff;

  /* Backgrounds */
  --bg-main-dark: #000e1a;
  --about-card-Color: rgba(6, 6, 6, 0.893);
  --bg-texture-url: url("https://www.transparenttextures.com/patterns/axiom-pattern.png");
  --bg-gradient-top: lch(12.29% 22.77 280.69);
  --bg-gradient-bottom: lch(10.27% 0 296.81);
  --text-gradient-color: lch(87.76% 0.01 296.81);

  /* Radius outline &  Border */
  --card-radius: 12px;
  --card-border: 1px solid rgba(12, 12, 12, 0.925);
  --about-card-outline: 0.85px solid hsl(0, 0%, 100%);
  --button-outline-color: white;

  /* Animations */
  --animation-speed: 0.3s;
  --animation-ease: ease;
}

/*
   Base Styles
*/
body {
  font-family: var(--font-family-base);
  line-height: 1.6;
  height: 100vh;
  color: var(--text-gradient-color);
  background-repeat: no-repeat;
  background-image: linear-gradient(
    to top,
    var(--bg-gradient-top) 0%,
    var(--bg-gradient-bottom) 100%
  );
}

/*
   Navigation
 */
.nav {
  background-color: var(--color-black-soft);
  padding: 1rem;
}
.nav__list {
  display: flex;
  justify-content: space-evenly;
  gap: 2rem;
  list-style: none;
}
.nav__link {
  color: var(--color-nav-text);
  text-decoration: none;
  font-weight: bold;
  transition: color var(--animation-speed) var(--animation-ease);
}
.nav__link:hover {
  color: var(--color-highlight);
}

/*
   Hero Section
 */
.hero {
  text-align: center;
  padding: 2rem;
  color: var(--color-white);
  background-image: linear-gradient(
    to right,
    var(--color-primary-dark) 0%,
    var(--color-primary-light) 100%
  );
}
.hero__title {
  font-size: 2.5rem;
  animation: fadeInDown 1s ease-in-out;
}

@media (max-width: 377px) {
  .neo-toggle-container {
    --toggle-width: 80px;
    --toggle-height: 38px;
    --toggle-bg: #181c20;
    --toggle-off-color: #475057;
    --toggle-on-color: #36f9c7;
    --toggle-transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    position: relative;
    display: inline-flex;
    flex-direction: column;
    font-family: "Segoe UI", Tahoma, sans-serif;
    transform: translateX(-14rem);
  }
}

/* For screens smaller than 30em (~480px) */
@media (max-width: 30em) {
  .hero__title {
    font-size: 1.4rem;
  }
  .about__content {
    transform: translateY(-50px);
  }

 @media (prefers-reduced-motion: no-preference) {
    @keyframes appear {
      from {
        opacity: 0;
        clip-path: inset(100% 100% 50% 100%);
        transform: translateX(-100px);
      }
      to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
      }
    }

    .profile-card {
      animation: appear 0.5s ease-in-out both;
      animation-timeline: view(-50%);
      animation-range: entry 0% cover 40%;
    }
  }

  
  .nav {
    display: flex;
    background-color: var(--color-black-soft);
    position: relative;
    justify-content: end;
    padding: 1.5rem;
  }
  .nav__list {
    transform: translateY(-1rem);
    visibility: hidden;
    display: flex;
    flex-direction: column;
    background-color: #0b0b0b;
    padding: 1.3rem;
    margin-left: -5.5rem;
    transform: translateX(100%);
    border-radius: 15px;
    position: absolute;
    transition: transform 0.4s ease, visibility 0s linear 0.4s;
    outline: white 1px solid;
    animation: slideIn 0.6s ease-in-out forwards;
  }

  .nav__list.nav-visible {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.4s ease;
  }

  .nav__list.nav-hidden {
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.4s ease, visibility 0s linear 0.4s;
  }

  @keyframes slideIn {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }

  .nav__link {
    color: var(--color-nav-text);
    text-decoration: none;
    font-weight: bold;
    transition: color var(--animation-speed) var(--animation-ease);
  }
  .nav__link:hover {
    transform: translateX(-40px);
    transition: 0.5s ease-in-out;
    background-image: -o-linear-gradient(white, rgb(65, 65, 65));
  }
  .neo-toggle-container {
    --toggle-width: 80px;
    --toggle-height: 38px;
    --toggle-bg: #181c20;
    --toggle-off-color: #475057;
    --toggle-on-color: #36f9c7;
    --toggle-transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    position: relative;
    display: inline-flex;
    flex-direction: column;
    font-family: "Segoe UI", Tahoma, sans-serif;
    transform: translateX(-17rem);
  }
}
/* From Uiverse.io by chicogale */
.neo-toggle-container {
  --toggle-width: 80px;
  --toggle-bg: #181c20;
  --toggle-off-color: #475057;
  --toggle-on-color: #36f9c7;
  --toggle-transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);

  position: relative;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, sans-serif;
  transform: translateX(-17rem);
}

.neo-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.neo-toggle {
  position: relative;
  width: var(--toggle-width);
  height: var(--toggle-height);
  display: block;
  cursor: pointer;
  transform: translateZ(0);
  perspective: 500px;
}

/* Track styles */
.neo-track {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--toggle-height) / 2);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: translateZ(-1px);
  transition: transform var(--toggle-transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.neo-background-layer {
  position: absolute;
  inset: 0;
  background: var(--toggle-bg);
  background-image: linear-gradient(
    -45deg,
    rgba(20, 20, 20, 0.8) 0%,
    rgba(30, 30, 30, 0.3) 50%,
    rgba(20, 20, 20, 0.8) 100%
  );
  opacity: 1;
  transition: all var(--toggle-transition);
}

.neo-grid-layer {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to right,
      rgba(71, 80, 87, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(71, 80, 87, 0.05) 1px, transparent 1px);
  background-size: 5px 5px;
  opacity: 0;
  transition: opacity var(--toggle-transition);
}

.neo-track-highlight {
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--toggle-height) / 2);
  background: linear-gradient(90deg, transparent, rgba(54, 249, 199, 0));
  opacity: 0;
  transition: all var(--toggle-transition);
}

/* Spectrum analyzer */
.neo-spectrum-analyzer {
  position: absolute;
  bottom: 6px;
  right: 10px;
  height: 10px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--toggle-transition);
}

.neo-spectrum-bar {
  width: 2px;
  height: 3px;
  background-color: var(--toggle-on-color);
  opacity: 0.8;
}

/* Thumb styles */
.neo-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform var(--toggle-transition);
  z-index: 1;
}

.neo-thumb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /*! Fallback  */
  background: var(--toggle-off-color);
  background-image: linear-gradient(
    to right,
    var(--color-primary-dark) 0%,
    var(--color-primary-light) 100%
  );
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all var(--toggle-transition);
}

.neo-thumb-core {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  transition: all var(--toggle-transition);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neo-thumb-icon {
  position: relative;
  width: 10px;
  height: 10px;
  transition: all var(--toggle-transition);
}

.neo-thumb-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--toggle-off-color);
  transform: translate(-50%, -50%);
  transition: all var(--toggle-transition);
}

.neo-thumb-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--toggle-off-color);
  transform: scale(0);
  opacity: 0;
  transition: all var(--toggle-transition);
}

/* Gesture area */
.neo-gesture-area {
  position: absolute;
  inset: -10px;
  z-index: 0;
}

/* Interaction feedback */
.neo-interaction-feedback {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.neo-ripple {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--toggle-on-color) 0%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all 0.4s ease-out;
}

.neo-progress-arc {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--toggle-on-color);
  transform: translate(-50%, -50%) scale(0) rotate(0deg);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

/* Status indicator */
.neo-status {
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.neo-status-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.neo-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--toggle-off-color);
  transition: all var(--toggle-transition);
}

.neo-status-text {
  font-size: 9px;
  font-weight: 600;
  color: var(--toggle-off-color);
  letter-spacing: 1px;
  transition: all var(--toggle-transition);
}

/* Value display */
.neo-value-display {
  position: absolute;
  top: -22px;
  right: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--toggle-off-color);
  opacity: 0;
  transform: translateY(5px);
  transition: all var(--toggle-transition);
}

.neo-value-text {
  transition: all var(--toggle-transition);
}

/* Active states */

/* ON state */
.neo-toggle-input:checked + .neo-toggle .neo-thumb {
  transform: translateX(calc(var(--toggle-width) - 38px));
}

.neo-toggle-input:checked + .neo-toggle .neo-thumb-ring {
  background-color: var(--toggle-on-color);
  border-color: rgba(54, 249, 199, 0.3);
  box-shadow: 0 0 15px rgb(20 20 20 / 50%);
}

.neo-toggle-input:checked + .neo-toggle .neo-thumb-wave {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #fff;
}

.neo-toggle-input:checked + .neo-toggle .neo-thumb-pulse {
  transform: scale(1.2);
  opacity: 0.3;
  animation: neo-pulse 1.5s infinite;
}

.neo-toggle-input:checked + .neo-toggle .neo-track-highlight {
  background-image: linear-gradient(to right, black 0%, rgb(88, 88, 88) 100%);
  opacity: 1;
}

.neo-toggle-input:checked + .neo-toggle .neo-grid-layer {
  opacity: 1;
}

.neo-toggle-input:checked + .neo-toggle .neo-spectrum-analyzer {
  opacity: 1;
}

.neo-toggle-input:checked + .neo-toggle .neo-spectrum-bar:nth-child(1) {
  animation: neo-spectrum 0.9s infinite;
}

.neo-toggle-input:checked + .neo-toggle .neo-spectrum-bar:nth-child(2) {
  animation: neo-spectrum 0.8s 0.1s infinite;
}

.neo-toggle-input:checked + .neo-toggle .neo-spectrum-bar:nth-child(3) {
  animation: neo-spectrum 1.1s 0.2s infinite;
}

.neo-toggle-input:checked + .neo-toggle .neo-spectrum-bar:nth-child(4) {
  animation: neo-spectrum 0.7s 0.1s infinite;
}

.neo-toggle-input:checked + .neo-toggle .neo-spectrum-bar:nth-child(5) {
  animation: neo-spectrum 0.9s 0.15s infinite;
}

.neo-toggle-input:checked + .neo-toggle .neo-status-dot {
  background-image: linear-gradient(
    to right,
    var(--color-primary-dark) 0%,
    var(--color-primary-light) 100%
  );
  box-shadow: 0 0 8px var(--color-white);
}

.neo-toggle-input:checked + .neo-toggle .neo-status-text {
  color: var(--color-white);
  content: "ACTIVE";
}

.neo-toggle-input:checked + .neo-toggle + .neo-value-display {
  opacity: 1;
  transform: translateY(0);
}

.neo-toggle-input:checked + .neo-toggle + .neo-value-display .neo-value-text {
  color: var(--toggle-on-color);
}

/* Hover effects */
.neo-toggle:hover .neo-thumb-ring {
  transform: scale(1.05);
}

.neo-toggle-input:not(:checked) + .neo-toggle:hover .neo-thumb-wave::before,
.neo-toggle-input:not(:checked) + .neo-toggle:hover .neo-thumb-wave::after {
  opacity: 1;
}

/* Drag gesture handling */
.neo-toggle.neo-dragging .neo-track {
  transform: translateZ(-1px) scale(1.02);
}

.neo-toggle.neo-dragging .neo-thumb {
  transition: none;
}

/* Animations */

/* This is a CSS feature that allows for smooth transitions between different states of a page. */
@view-transition {
  navigation: auto;
  easing: cubic-bezier(0.25, 1, 0.5, 1);
}

/* The above code is using the `@supports` rule to check if the browser supports the `view-transition:
auto` property. If the browser does support it, then it applies the CSS styles*/
@supports (view-transition: auto) {
  ::view-transition-group(*) {
    animation-duration: 0.5s;
  }
}

@keyframes neo-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.2;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

@keyframes neo-spectrum {
  0% {
    height: 3px;
  }
  50% {
    height: 8px;
  }
  100% {
    height: 3px;
  }
}

/* Custom script to enable advance features */
.neo-toggle.neo-activated .neo-ripple {
  width: 100px;
  height: 100px;
  opacity: 0.5;
  transition: all 0.6s ease-out;
}

.neo-toggle.neo-progress .neo-progress-arc {
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(1) rotate(270deg);
  transition: opacity 0.3s ease, transform 1s ease;
}

/* Status text change */
.neo-toggle-input:checked + .neo-toggle .neo-status-text::before {
  content: "ACTIVE";
}

.neo-toggle-input:not(:checked) + .neo-toggle .neo-status-text::before {
  content: "STANDBY";
}

/* Main Content */
.main-content {
  background-color: var(--bg-main-dark);
  background-image: var(--bg-texture-url);
}

/* Profile Cards */
.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.profile-card {
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(17, 25, 40, 0.75);
  border-radius: var(--card-radius);
  border: var(--card-border);
  padding: 1.5rem;
  color: var(--color-white);
  transition: transform var(--animation-speed) var(--animation-ease);
}
.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px var(--color-black);
}
.profile-card__title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.profile-card__gallery {
  text-align: center;
  margin-bottom: 1rem;
}
.profile-card__img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  animation: customAni 2s ease infinite;
  filter: brightness(110%) contrast(110%) saturate(130%);
}

.profile-card__bio,
.profile-card__stats {
  margin-top: 1rem;
}
.profile-card__heading {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--color-highlight);
}

.about {
  padding: 1.2rem;
  color: #fff;
  height: 100vh;
}
.about__title {
  font-size: 1.8rem;
  margin-top: 2rem;
  color: hsl(48, 100%, 50%);
}
.about__text {
  font-size: 1rem;
  margin: 1rem 0;
  line-height: 1.6;
}
.about__grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.about__card {
  background-color: var(--about-card-Color);
  border: var(--about-card-outline);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}
.about__card:hover {
  transform: scale(1.05);
}

/* Contact Page */
.contact {
  height: 100vh;
  padding: 2rem;
}
.contact__form {
  max-width: 600px;
  border: solid white 0.85px;
  margin: 0 auto;
  background-color: var(--color-black);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px black;
}
.contact__group {
  margin-bottom: 1.5rem;
}
.contact__label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.contact__input,
.contact__textarea {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 4px;
}
.contact__textarea {
  min-height: 120px;
}
.contact__button {
  display: inline-block;
  outline: solid 1px var(--button-outline-color);
  padding: 0.8rem 1.5rem;
  background-image: linear-gradient(
    to right,
    var(--color-primary-dark) 0%,
    var(--color-primary-light) 100%
  );
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.contact__button:hover {
  background-color: hsl(48, 95%, 40%);
}

/*Footer */
.footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--color-footer-bg);
  color: var(--color-white);
}

/*
   Animations
*/
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes customAni {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}
