:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

body.loaded #loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-top-color: #22d3ee;
  border-right-color: #34d399;
  box-shadow: 0 0 36px rgba(34, 211, 238, .24);
  animation: spin 1s linear infinite;
}

.mesh-line {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.float-shape {
  position: absolute;
  border: 1px solid;
  border-radius: 34% 66% 61% 39% / 34% 32% 68% 66%;
  background: rgba(255, 255, 255, .03);
  filter: blur(.2px);
  animation: morphFloat 10s ease-in-out infinite;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(125, 211, 252, .8);
  box-shadow: 0 0 18px rgba(34, 211, 238, .8);
  animation: particleDrift var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.nav-link {
  border-radius: 999px;
  padding: .72rem 1rem;
  font-size: .875rem;
  font-weight: 700;
  color: rgb(203 213 225);
  transition: all .25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: rgb(8 15 30);
  background: linear-gradient(135deg, #67e8f9, #86efac);
}

.mobile-link {
  display: block;
  border-radius: 1rem;
  padding: .9rem 1rem;
  color: rgb(226 232 240);
  font-weight: 700;
  transition: all .25s ease;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, .08);
  color: #67e8f9;
}

.nav-scrolled {
  background: rgba(5, 8, 22, .66);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
  backdrop-filter: blur(22px);
}

.typing-cursor {
  width: 2px;
  height: 1.35em;
  background: #67e8f9;
  display: inline-block;
  animation: blink .8s step-end infinite;
  box-shadow: 0 0 18px rgba(103, 232, 249, .8);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3.5rem;
  border-radius: 999px;
  padding: .95rem 1.35rem;
  font-weight: 800;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease, color .25s ease;
}

.btn-primary {
  color: rgb(8 15 30);
  background: linear-gradient(135deg, #67e8f9, #6ee7b7 52%, #fcd34d);
  box-shadow: 0 0 42px rgba(34, 211, 238, .28);
}

.btn-secondary {
  color: rgb(226 232 240);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(16px);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-3px);
}

.btn-secondary:hover {
  border-color: rgba(103, 232, 249, .55);
  color: #a5f3fc;
  box-shadow: 0 0 28px rgba(34, 211, 238, .18);
}

.profile-frame {
  animation: profileFloat 6s ease-in-out infinite;
}

.stat-card {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(16px);
}

.stat-card dt {
  font-size: .72rem;
  color: rgb(148 163 184);
}

.stat-card dd {
  margin-top: .35rem;
  color: white;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
}

.section-shell {
  position: relative;
  padding: 6rem 1.25rem;
}

@media (min-width: 640px) {
  .section-shell {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  .section-shell {
    padding: 7rem 2.5rem;
  }
}

.section-kicker {
  margin-bottom: 1rem;
  color: #a5f3fc;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.section-title {
  color: white;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.04;
  font-weight: 950;
}

.glass-panel,
.skill-card,
.timeline-card,
.project-card,
.info-tile {
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
  backdrop-filter: blur(20px);
}

.glass-panel {
  border-radius: 2rem;
}

.info-tile {
  border-radius: 1.4rem;
  padding: 1.25rem;
}

.info-tile span,
.timeline-card span {
  color: #67e8f9;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.info-tile h3,
.timeline-card h3,
.project-card h3,
.skill-card h3 {
  margin-top: .8rem;
  color: white;
  font-size: 1.18rem;
  font-weight: 900;
}

.info-tile p,
.timeline-card p,
.project-card p,
.skill-card p {
  margin-top: .75rem;
  color: rgb(203 213 225);
  line-height: 1.75;
  font-size: .95rem;
}

.skill-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent), transparent 60%), transparent 40%);
  opacity: .72;
  pointer-events: none;
}

.skill-card svg {
  position: relative;
  width: 3rem;
  height: 3rem;
  color: var(--accent);
  fill: currentColor;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent), transparent 50%));
}

.skill-card h3,
.skill-card p {
  position: relative;
}

.skill-card:hover,
.timeline-card:hover,
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(103, 232, 249, .45);
  box-shadow: 0 30px 90px rgba(34, 211, 238, .14);
}

.timeline-card {
  border-radius: 1.65rem;
  padding: 1.5rem;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.project-card {
  overflow: hidden;
  border-radius: 1.65rem;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.project-visual {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  color: white;
}

.project-visual span {
  position: absolute;
  inset: 1.25rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
}

.project-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
}

.visual-one {
  background: radial-gradient(circle at 25% 20%, rgba(34, 211, 238, .45), transparent 35%), linear-gradient(135deg, #111827, #062f3f);
}

.visual-two {
  background: radial-gradient(circle at 75% 25%, rgba(52, 211, 153, .45), transparent 32%), linear-gradient(135deg, #101827, #12362c);
}

.visual-three {
  background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, .36), transparent 35%), linear-gradient(135deg, #151321, #3a2b12);
}

.tech-row {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tech-row span {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
  padding: .42rem .7rem;
  color: rgb(203 213 225);
  font-size: .75rem;
  font-weight: 800;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 999px;
  padding: .65rem 1rem;
  background: #67e8f9;
  color: #07101f;
  font-size: .85rem;
  font-weight: 900;
  transition: all .25s ease;
}

.project-btn.ghost {
  color: rgb(226 232 240);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
}

.project-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(34, 211, 238, .22);
}

.social-btn {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .07);
  color: white;
  font-weight: 900;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.social-btn svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.social-btn:hover {
  transform: translateY(-4px);
}

.whatsapp:hover {
  border-color: rgba(52, 211, 153, .55);
  box-shadow: 0 0 28px rgba(52, 211, 153, .2);
}

.telegram:hover {
  border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 0 28px rgba(56, 189, 248, .2);
}

.instagram:hover {
  border-color: rgba(244, 114, 182, .55);
  box-shadow: 0 0 28px rgba(244, 114, 182, .2);
}

.premium-footer {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, .13), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(245, 158, 11, .1), transparent 28%);
}

.premium-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  opacity: .18;
}

.footer-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .26);
  backdrop-filter: blur(22px);
  padding: clamp(1.35rem, 4vw, 2.5rem);
}

.footer-panel::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -7rem;
  top: -9rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(103, 232, 249, .18), transparent 65%);
  pointer-events: none;
}

.footer-title {
  color: white;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.footer-chip,
.footer-link {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .055);
  color: rgb(203 213 225);
  transition: all .25s ease;
}

.footer-chip {
  border-radius: 999px;
  padding: .48rem .75rem;
  font-size: .75rem;
  font-weight: 800;
}

.footer-link {
  border-radius: .9rem;
  padding: .75rem .85rem;
  font-weight: 800;
}

.footer-link:hover {
  border-color: rgba(103, 232, 249, .48);
  color: #a5f3fc;
  transform: translateX(4px);
}

.footer-social {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .065);
  color: white;
  transition: all .25s ease;
}

.footer-social svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.footer-social:hover {
  transform: translateY(-4px);
}

.footer-cta,
.footer-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 999px;
  font-weight: 900;
  transition: all .25s ease;
}

.footer-cta {
  margin-top: 1.5rem;
  min-height: 3rem;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, #67e8f9, #86efac);
  color: #07101f;
  box-shadow: 0 0 30px rgba(34, 211, 238, .2);
}

.footer-cta:hover,
.footer-top-link:hover {
  transform: translateY(-2px);
}

.footer-bottom {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-top: 1.25rem;
  color: rgb(148 163 184);
  font-size: .875rem;
  text-align: center;
}

.footer-top-link {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
  color: rgb(226 232 240);
  padding: .65rem .95rem;
}

.footer-top-link:hover {
  border-color: rgba(103, 232, 249, .52);
  color: #a5f3fc;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes morphFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    border-radius: 34% 66% 61% 39% / 34% 32% 68% 66%;
  }
  50% {
    transform: translate3d(18px, -24px, 0) rotate(12deg);
    border-radius: 64% 36% 42% 58% / 47% 62% 38% 53%;
  }
}

@keyframes particleDrift {
  from {
    transform: translate3d(0, 100vh, 0);
    opacity: 0;
  }
  15%, 80% {
    opacity: .8;
  }
  to {
    transform: translate3d(16px, -12vh, 0);
    opacity: 0;
  }
}

@keyframes profileFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
