:root {
  --header-safe-offset: clamp(88px, 9vw, 116px);
}

section[id] {
  scroll-margin-top: var(--header-safe-offset);
}

.site-bg {
  z-index: 0;
  pointer-events: none;
}

.main,
.footer {
  position: relative;
  z-index: 1;
}

.site-bg::after {
  background:
    radial-gradient(ellipse 85% 72% at 50% 40%, rgba(5, 5, 5, 0.22) 0%, rgba(5, 5, 5, 0.62) 68%, #050505 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.12) 0%, rgba(5, 5, 5, 0.42) 100%);
}

.site-bg > canvas.site-bg__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  mix-blend-mode: normal;
  opacity: 0.82;
  transform: scale(1.12) translateZ(0);
  filter: saturate(1.08) contrast(1.06) brightness(0.82);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform: scale(1.12) translateZ(0);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.site-bg > #hero-particles {
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.92;
  filter: saturate(1.06) brightness(1.05);
}

.hero {
  position: relative;
  min-height: 100svh;
  padding-block: clamp(6rem, 10vh, 8rem) clamp(7rem, 12vh, 8.5rem);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: 1;
  background:
    radial-gradient(circle at 24% 28%, rgba(204, 255, 0, 0.14), transparent 24%),
    radial-gradient(circle at 74% 30%, rgba(79, 195, 255, 0.14), transparent 24%),
    radial-gradient(circle at 52% 56%, rgba(255, 255, 255, 0.05), transparent 38%);
  filter: blur(26px);
  mix-blend-mode: screen;
  opacity: 0.92;
  animation: heroGlowDrift 16s ease-in-out infinite alternate;
}

.hero::after {
  inset: 12% 8% 14%;
  z-index: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 58%),
    conic-gradient(from 180deg at 50% 50%, rgba(204, 255, 0, 0.18), rgba(79, 195, 255, 0.14), rgba(204, 255, 0, 0.08), transparent 76%, rgba(204, 255, 0, 0.16));
  filter: blur(44px);
  mix-blend-mode: screen;
  opacity: 0.48;
  animation: heroGlowOrbit 24s ease-in-out infinite alternate;
}

@keyframes heroGlowDrift {
  0% {
    transform: translate3d(-2%, -1.5%, 0) scale(0.96);
    opacity: 0.72;
  }

  50% {
    transform: translate3d(1.25%, 1%, 0) scale(1.04);
    opacity: 0.94;
  }

  100% {
    transform: translate3d(3.5%, -1%, 0) scale(0.99);
    opacity: 0.78;
  }
}

@keyframes heroGlowOrbit {
  0% {
    transform: translate3d(-1.5%, 1%, 0) scale(0.98) rotate(-8deg);
    opacity: 0.34;
  }

  50% {
    transform: translate3d(2.5%, -1%, 0) scale(1.06) rotate(6deg);
    opacity: 0.54;
  }

  100% {
    transform: translate3d(0.5%, 2%, 0) scale(1.01) rotate(14deg);
    opacity: 0.4;
  }
}

.hero__container {
  width: 100%;
}

.hero__content {
  position: relative;
  z-index: 3;
  min-height: min(32rem, calc(100svh - clamp(14rem, 24vh, 18rem)));
  justify-content: center;
}

.scroll-indicator {
  bottom: clamp(1.75rem, 4vh, 3rem);
  z-index: 2;
}

.about__grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}

.about__image-wrapper,
.about__content {
  min-width: 0;
}

.about__content {
  width: 100%;
}

.skills {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(204, 255, 0, 0.08), transparent 24%),
    radial-gradient(circle at 84% 32%, rgba(79, 195, 255, 0.11), transparent 22%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.38) 0%, rgba(3, 3, 3, 0.1) 100%);
}

.skills::before,
.skills::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.skills::before {
  top: 10%;
  left: -8%;
  width: min(24rem, 40vw);
  height: min(24rem, 40vw);
  background: rgba(204, 255, 0, 0.1);
}

.skills::after {
  right: -10%;
  bottom: 6%;
  width: min(28rem, 45vw);
  height: min(28rem, 45vw);
  background: rgba(79, 195, 255, 0.08);
}

.skills .container {
  position: relative;
  z-index: 1;
}

.skills__header {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.skills__intro {
  margin-top: 1rem;
  color: #9a9a9a;
  font-size: 1.06rem;
  line-height: 1.85;
}

.skills__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.skills__stat {
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(240, 240, 240, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.88) 0%, rgba(5, 5, 5, 0.78) 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.skills__stat-value {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #f0f0f0;
}

.skills__stat-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  line-height: 1.75;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 0;
}

.skill-category {
  position: relative;
  padding: 1.4rem;
  border: 1px solid rgba(240, 240, 240, 0.08);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.96) 0%, rgba(7, 7, 7, 0.88) 100%);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.skill-category::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(204, 255, 0, 0) 0%, rgba(204, 255, 0, 0.5) 50%, rgba(204, 255, 0, 0) 100%);
}

.skill-category::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.skill-category:hover {
  transform: translateY(-8px);
  border-color: rgba(204, 255, 0, 0.24);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.35);
}

.skill-category__head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.skill-category__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(204, 255, 0, 0.2), rgba(79, 195, 255, 0.15));
  border: 1px solid rgba(240, 240, 240, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: #f0f0f0;
}

.skill-category__title {
  margin-bottom: 0.45rem;
  border-bottom: none;
  padding-bottom: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  color: #f0f0f0;
}

.skill-category__desc {
  color: #8a8a8a;
  font-size: 0.96rem;
  line-height: 1.7;
}

.skill-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 86px;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(240, 240, 240, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.skill-item i,
.skill-item .icon-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 16px;
  background: rgba(8, 8, 8, 0.9);
  border: 1px solid rgba(240, 240, 240, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.skill-item i {
  font-size: 1.7rem;
}

.skill-item .icon-placeholder {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: #cf0;
}

.skill-item__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.skill-item__copy span {
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #f0f0f0;
}

.skill-item__copy small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8f8f8f;
}

.skill-item:hover {
  transform: translateY(-3px);
  border-color: rgba(204, 255, 0, 0.26);
  background: linear-gradient(180deg, rgba(204, 255, 0, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.projects {
  padding-top: clamp(72px, 9vw, 112px);
}

.projects__header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.projects-showcase {
  padding-top: 0.25rem;
}

.projects-showcase__panel {
  border-color: rgba(240, 240, 240, 0.08);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.82) 0%, rgba(10, 10, 10, 0.92) 100%);
  box-shadow:
    0 40px 110px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.projects-showcase__panel::after {
  content: "";
  position: absolute;
  inset: auto 10% -36% auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.08) 0%, transparent 68%);
  pointer-events: none;
}

.projects-showcase__hud {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(240, 240, 240, 0.08);
}

.projects-showcase__status {
  align-items: flex-end;
}

.projects-showcase__counter {
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
}

.projects-showcase__viewport {
  min-height: clamp(580px, 76vh, 820px);
}

.project-slide__img-wrap {
  border-radius: 32px;
}

.project-slide__info {
  padding-block: 0.75rem;
  max-width: min(420px, 100%);
  min-width: 0;
}

.project-slide .project-title {
  max-width: 9.5ch;
  font-size: clamp(1.95rem, 3.55vw, 3.65rem);
  line-height: 0.92;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

.project-slide .project-desc {
  color: #959595;
}

.testimonials {
  background-color: transparent;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.12) 0%, rgba(5, 5, 5, 0.32) 100%);
}

.testimonials::before {
  color: rgba(255, 255, 255, 0.08);
}

.testimonials-marquee::before {
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.58) 0%, transparent 100%);
}

.testimonials-marquee::after {
  background: linear-gradient(-90deg, rgba(5, 5, 5, 0.58) 0%, transparent 100%);
}

.contact {
  background-color: transparent;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.14) 0%, rgba(5, 5, 5, 0.34) 100%);
}

.contact::after {
  background-image:
    linear-gradient(rgba(34, 34, 34, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 34, 34, 0.08) 1px, transparent 1px);
  opacity: 0.45;
}

.scene3d {
  min-height: 100vh;
  background-color: transparent;
  background:
    radial-gradient(ellipse at 50% 104%, rgba(236, 244, 214, 0.16) 0%, rgba(204, 255, 0, 0.08) 18%, transparent 52%),
    radial-gradient(circle at 44% 50%, rgba(255, 255, 255, 0.04), transparent 26%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.03) 0%, rgba(5, 5, 5, 0.02) 44%, rgba(5, 5, 5, 0.14) 62%, rgba(5, 5, 5, 0.36) 100%);
}

.scene3d::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 42% 52%, rgba(255, 255, 255, 0.035) 0%, transparent 30%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.02) 0%, rgba(5, 5, 5, 0.04) 38%, rgba(5, 5, 5, 0.14) 58%, rgba(5, 5, 5, 0.54) 100%);
  pointer-events: none;
}

.scene3d__overlay {
  padding: clamp(1rem, 4vw, 3rem);
  background: none;
  align-items: stretch;
}

.scene3d__grid {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 430px);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: min(78vh, 860px);
}

.scene3d__stage {
  min-height: clamp(360px, 62vh, 760px);
}

.scene3d__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 430px;
  margin-left: auto;
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
  border: 1px solid rgba(240, 240, 240, 0.08);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.54) 0%, rgba(5, 5, 5, 0.72) 100%);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.scene3d__legacy {
  display: none;
}

.scene3d__eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.42rem 0.78rem;
  border: 1px solid rgba(240, 240, 240, 0.08);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  letter-spacing: 0.16em;
}

.scene3d__title {
  margin-bottom: 1rem;
  max-width: 8.5ch;
  margin-inline: auto;
  font-size: clamp(2rem, 3.7vw, 3.55rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.scene3d__subtitle {
  max-width: 22rem;
  margin-inline: auto;
  margin-bottom: 1.4rem;
  color: #989898;
  text-wrap: pretty;
}

.scene3d__actions {
  display: flex;
  justify-content: center;
  width: 100%;
  align-items: center;
  margin-bottom: 1rem;
}

.scene3d__cta {
  min-width: min(100%, 240px);
  justify-content: center;
}

.scene3d__meta {
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid rgba(240, 240, 240, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f8f8f;
  line-height: 1.8;
}

@media (max-width: 1100px) {
  .skills__grid {
    grid-template-columns: 1fr;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .projects-showcase__status {
    align-items: flex-start;
  }

  .project-slide .project-title {
    max-width: none;
  }

  .scene3d__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .scene3d__stage {
    min-height: clamp(260px, 38vh, 420px);
  }

  .scene3d__copy {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-block: clamp(6rem, 14vw, 7rem) clamp(5.5rem, 14vw, 7rem);
  }

  .hero__content {
    min-height: auto;
  }

  .skills__stats {
    grid-template-columns: 1fr;
  }

  .skill-items {
    grid-template-columns: 1fr;
  }

  .projects {
    padding-top: clamp(64px, 9vw, 88px);
  }

  .projects-showcase__panel {
    border-radius: 28px;
  }

  .projects-showcase__hud {
    padding-bottom: 0;
    border-bottom: none;
  }

  .scene3d__overlay {
    padding: 1rem;
  }

  .scene3d__stage {
    min-height: 220px;
  }

  .scene3d__copy {
    max-width: none;
    border-radius: 24px;
  }
}
