:root {
  --dark: #0a0a0a;
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 .5H40M.5 0V40' fill='none' stroke='%23475569' stroke-opacity='.15'/%3E%3C/svg%3E");
  --tilt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90L1440 0v90z'/%3E%3C/svg%3E");
}

:is(#projects_section, #experience_section)::before,
:is(#projects_section, #experience_section)::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 3;
  pointer-events: none;
  background: var(--dark);
  -webkit-mask: var(--tilt) center / 100% 100% no-repeat;
  mask: var(--tilt) center / 100% 100% no-repeat;
}

:is(#projects_section, #experience_section)::before { bottom: 100%; }
:is(#projects_section, #experience_section)::after { top: 100%; transform: scale(-1, -1); }

#skills_section,
#education_section { padding-top: 130px; }
#skills_section { padding-bottom: 150px; }

@keyframes rv-up { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes rv-pop { 0% { opacity: 0; scale: .6; } 70% { opacity: 1; scale: 1.06; } 100% { opacity: 1; scale: 1; } }
@keyframes rv-left { from { opacity: 0; translate: -60px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes rv-right { from { opacity: 0; translate: 60px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes rv-line { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes rv-float { from { opacity: 0; translate: 0 30px; scale: .92; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes rv-title { from { opacity: 0; translate: 0 24px; letter-spacing: .08em; filter: blur(6px); } to { opacity: 1; translate: 0 0; letter-spacing: -0.015em; filter: blur(0); } }

.rv { opacity: 0; }
.rv.is-in {
  opacity: 1;
  animation: var(--rv, rv-up) .6s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.section-title.rv { --rv: rv-title; }
.project_card.rv { --rv: rv-float; }
.skill.rv { --rv: rv-pop; }
.left-container .text-box.rv { --rv: rv-left; }
.right-container .text-box.rv { --rv: rv-right; }
.timeline-item img.rv { --rv: rv-pop; animation-delay: .15s; }

.hero-firstname,
.hero-lastname,
.hero-description,
.about-image-wrapper { animation: rv-up .7s cubic-bezier(.2, .8, .2, 1) backwards; }
.hero-lastname { animation-delay: .12s; }
.hero-description { animation-delay: .25s; }
.about-image-wrapper { animation-name: rv-float; animation-delay: .15s; animation-duration: .8s; }
.hero-title::after { transform-origin: left; animation: rv-line .6s .35s cubic-bezier(.2, .8, .2, 1) backwards; }

.about-image { transition: none; }

@media screen and (max-width: 600px) {
  .left-container .text-box.rv { --rv: rv-right; }
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; }
  *, *::before, *::after { animation: none !important; }
}

#experience_section { overflow-x: clip; }

#footer .copyright { padding-inline: 25px; line-height: 1.6; }
#footer .heart { display: inline-block; transition: scale .3s cubic-bezier(.2, .8, .2, 1); }
#footer .copyright:hover .heart { scale: 1.25; }

@media (max-width: 900px) {
  #about_section { min-height: auto; padding-top: 130px; padding-bottom: 110px; }
  .about-image-wrapper { flex: none; width: min(100%, 440px); margin-inline: auto; aspect-ratio: 1024 / 1080; min-height: 0; }
  #about_section .about-image { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: 50% 45.6%; }
}

#education_section::after { display: none; }

#contact_section {
  padding-top: 110px;
  padding-bottom: 120px;
  background-color: #fff;
  background-image:
    radial-gradient(ellipse 60% 70% at 50% 50%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .6) 45%, transparent 75%),
    var(--grid);
  background-size: 100% 100%, 40px 40px;
  border-top: 1px solid rgba(71, 85, 105, .15);
}

#particles-contact {
  position: absolute;
  inset: 0;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 420px 220px at 50% 55%, rgba(0, 0, 0, .1) 40%, #000 100%);
  mask-image: radial-gradient(ellipse 420px 220px at 50% 55%, rgba(0, 0, 0, .1) 40%, #000 100%);
}

#contact_section > :not(#particles-contact) { position: relative; z-index: 1; }

#contact_section {
  box-sizing: border-box;
  min-height: calc(100vh - 78px - 140px);
  min-height: calc(100svh - 78px - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#footer { padding-block: 28px; }

@media (max-width: 600px) {
  #contact_section { min-height: calc(100svh - 100px - 130px); }
}

#about_section {
  background-color: #fff;
  background-image:
    var(--grid),
    radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .15) 0%, rgba(0, 0, 0, .05) 40%, transparent 70%);
  background-size: 40px 40px, 100% 100%;
}

#about_section .grid-bg { display: none; }

#contact_section .social_link { transition: padding .5s ease-in-out; }
#projects_section .project_card { transition: transform .4s cubic-bezier(.165, .84, .44, 1), box-shadow .4s cubic-bezier(.165, .84, .44, 1), border-color .4s cubic-bezier(.165, .84, .44, 1); }

@media (min-width: 901px) {
  .about-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }
  .hero-description { max-width: none; font-size: 1.25rem; }
  .about-image-wrapper picture { display: block; }
  #about_section .about-image { display: block; margin-left: auto; }
}
