:root {
  --background: url('../assets/bg.jpg');
  --widget: #def9;
  --widget-hover: #defb;
  --backdrop-url: url('https://bakaafk.s-ul.eu/xfbnV9IG.gif');
  font-weight: 500;
  line-height: 1.4;
  font-family: 'Quicksand', Arial, sans-serif;
}

body {
  margin: 0 auto;
  min-width: 320px;
  max-width: min(1280px, 100% - 100px);
  height: auto;
  display: block;
  align-items: normal;
  justify-content: normal;
}

@media (width < 880px) {
  body {
    max-width: calc(100% - 50px);
  }
}

.background {
  --multiplier: clamp(0, calc(-5 * var(--scroll, 0) + 1.5), 1);
  position: fixed;
  transform: translate(calc(var(--tx, 0) * var(--multiplier, 1)), calc(var(--ty, 0) * var(--multiplier, 1)));
  z-index: -1;
  filter: blur(clamp(0px, calc(50px * var(--scroll, 0) + -5px), 10px)) brightness(clamp(.7, calc(-.5 * var(--scroll, 0) + .85), .8));
  inset: -30px;
  background: #9af var(--background) center/cover no-repeat;
}
header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 50px;
  transform: translateY(-50%);
  margin-top: 45vh;
}
@media (width < 1300px) {
  header {
    margin-right: auto;
    margin-left: auto;
    max-width: 950px;
  }
}
@media (width < 880px) {
  header {
    flex-direction: column;
    gap: 20px;
    margin-right: auto;
    margin-left: auto;
    max-width: 480px;
  }
}
header img {
  animation: 1s ease-in-out .2s both avatar;
  border-radius: 50%;
  width: clamp(120px, 26vmin, 200px);
  height: clamp(120px, 26vmin, 200px);
  pointer-events: none;
}
@keyframes avatar {
  0% {
    transform: scale(.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
header .name-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
header h1 {
  margin: 0;
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #fbc2eb, #fcd5ce, #f8edeb, #a1c4fd, #c2e9fb);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: flow 8s ease-in-out infinite, titleEntrance 1.2s ease-out 0.3s both;
  text-shadow: 0 4px 24px #fff8, 0 2px 8px #fbc2eb44;
  filter: drop-shadow(0 2px 8px #fbc2eb44);
  transition: font-size .3s, background .5s, text-shadow .5s, filter .5s, letter-spacing .3s, transform .3s;
}

header h1:hover {
  transform: scale(1.05);
  letter-spacing: 4px;
  text-shadow: 0 6px 32px #fff8, 0 4px 16px #fbc2eb66;
}

@keyframes titleEntrance {
  0% {
    transform: translateX(-100px) scale(0.8);
    opacity: 0;
    filter: blur(10px);
  }
  50% {
    transform: translateX(10px) scale(1.05);
    filter: blur(2px);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}
@media (width < 880px) {
  header h1 {
    font-size: 2.5rem;
  }
}
header .bio {
  color: #333;
  font-size: 1.5rem;
  font-weight: 500;
  background: rgba(255,255,255,0.7);
  padding: 18px 28px;
  border-radius: 18px;
  box-shadow: 0 2px 16px 0 #fbc2eb22, 0 1.5px 6px 0 #a1c4fd22;
  margin-top: 2px;
  max-width: 600px;
  line-height: 1.6;
  transition: font-size .3s, padding .3s, background .5s, color .3s, box-shadow .5s, margin-top .3s, transform .3s, background-color .3s;
  animation: bioEntrance 1.2s ease-out 0.6s both;
}

header .bio:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 32px 0 #fbc2eb44, 0 4px 16px 0 #a1c4fd44;
}

@keyframes bioEntrance {
  0% {
    transform: translateX(-80px) scale(0.9);
    opacity: 0;
    filter: blur(8px);
  }
  60% {
    transform: translateX(8px) scale(1.02);
    filter: blur(1px);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@media (width < 880px) {
  header .bio {
    font-size: 1.1rem;
    padding: 12px 16px;
    max-width: 95vw;
  }
}
.scroll-down-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  justify-content: center;
  transition: opacity 0.5s ease, pointer-events 0.5s ease;
  gap: 10px;
  padding-bottom: 20px;
}

.scroll-down-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
  transition: opacity 0.3s ease;
  animation: scrollDownPulse 2s ease-in-out infinite;
}

@keyframes scrollDownPulse {
  0%, 100% {
    opacity: 0.8;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.arrow {
  display: flex;
  justify-content: center;
}

.arrow svg {
  opacity: .6;
  transition: opacity .2s, transform .2s;
  cursor: pointer;
  padding: 0 15px;
  width: 60px;
  height: 80px;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.arrow svg:hover {
  opacity: .9;
  transform: translateY(-2px);
}

.scroll-down-container:hover .scroll-down-text {
  opacity: 1;
}

body[style*='.'] .scroll-down-container {
  opacity: 0;
  pointer-events: none;
}
.main-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 60px;
  opacity: calc(var(--scroll) / .15);
  margin-top: max(0px, calc(-140vh * var(--scroll) + 35vh));
  margin-bottom: calc(35vh - max(0px, calc(-140vh * var(--scroll) + 35vh)));
}
@media (width < 1300px) {
  .main-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-right: auto;
    margin-left: auto;
    max-width: 950px;
  }
}
@media (width < 880px) {
  .main-container {
    margin-right: auto;
    margin-left: auto;
    max-width: 480px;
  }
}
main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  grid-column: span 8;
  height: fit-content;
}
@media (width < 880px) {
  main {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}
.widget {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  position: relative;
  --square-size: calc((((min(1280px, 100vw - 100px) - (60px * 11)) / 12) * 8 + (60px - var(--gap)) * 7) / 8);
  --c: min(var(--columns, 2), var(--template-columns));
  --r: var(--rows, 2);
  grid-row: span var(--r);
  grid-column: span var(--c);
  transition: transform .2s linear, background-color .2s linear;
  border-radius: 24px;
  background-color: var(--widget);
  height: calc(var(--square-size) * var(--r) + var(--gap) * (var(--r) - 1));
  overflow: hidden;
  color: #000;
  animation: widgetEntrance 0.5s ease-out both;
  animation-play-state: paused;
  animation-delay: calc(var(--scroll) * 0s + var(--widget-delay, 0s));
}

.widget:nth-child(1) { --widget-delay: 0.1s; }
.widget:nth-child(2) { --widget-delay: 0.2s; }
.widget:nth-child(3) { --widget-delay: 0.3s; }
.widget:nth-child(4) { --widget-delay: 0.4s; }
.widget:nth-child(5) { --widget-delay: 0.5s; }
.widget:nth-child(6) { --widget-delay: 0.6s; }

.widget[data-animated="true"] {
  animation-play-state: running;
}

@keyframes widgetEntrance {
  0% {
    transform: translateY(40px) scale(0.9);
    opacity: 0;
    filter: blur(5px);
  }
  60% {
    transform: translateY(-2px) scale(1.02);
    filter: blur(1px);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}
@media (width < 1300px) {
  .widget {
    --square-size: calc((min(950px, 100vw - 100px) - (var(--gap) * 7)) / 8);
  }
}
@media (width < 880px) {
  .widget {
    --square-size: calc((max(320px, min(480px, calc(100vw - 50px))) - (var(--gap) * 3)) / 4);
  }
}
.widget:hover {
  background-color: var(--widget-hover);
}
.widget:active {
  transform: perspective(300px) translateZ(-10px);
}
.widget>a {
  display: flex;
  flex-direction: row;
  align-items: center;
  box-sizing: border-box;
  padding: 24px;
  width: 100%;
  height: 100%;
  color: #000;
}
.widget .icon {
  margin: 0 16px 0 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.widget .icon svg, .icon > svg {
  width: 40px;
  height: 40px;
  display: block;
  margin: 0;
}
.widget .meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
}
.bold {
  font-weight: bold;
}
.opaque {
  color: #000b;
}
.widget .meta .bold, .widget .meta .opaque {
  overflow-wrap: break-word;
  word-break: normal;
  max-width: 100%;
  display: block;
}
aside {
  display: flex;
  grid-column: span 4;
  flex-direction: column;
  gap: 20px;
}
@media (width < 1300px) {
  aside {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (width < 880px) {
  aside {
    display: flex;
  }
}
.project {
  transition: transform .2s linear, background-color .2s linear;
  border-radius: 16px;
  background: var(--widget);
  overflow: hidden;
  animation: projectEntrance 0.5s ease-out both;
  animation-play-state: paused;
  animation-delay: calc(var(--scroll) * 0s + var(--project-delay, 0s));
}

.project:nth-child(1) { --project-delay: 0.7s; }
.project:nth-child(2) { --project-delay: 0.8s; }

.project[data-animated="true"] {
  animation-play-state: running;
}

@keyframes projectEntrance {
  0% {
    transform: translateX(30px) scale(0.9);
    opacity: 0;
    filter: blur(5px);
  }
  60% {
    transform: translateX(-2px) scale(1.02);
    filter: blur(1px);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}
.project:hover {
  background-color: var(--widget-hover);
}
.project:active {
  transform: perspective(300px) translateZ(-10px);
}
.project>a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  box-sizing: border-box;
  padding: 15px 20px;
  width: 100%;
  height: 100%;
  color: #000;
}
.project .bold {
  color: #06b;
  font-size: 1.1em;
}
.project .meta {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  color: #000b;
}
.project .meta svg {
  fill: #000b;
}
.project .meta>div {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}
.project .lang {
  flex: 1;
  justify-content: flex-end;
}
.color-dot {
  border-radius: 50%;
  width: .6em;
  height: .6em;
}
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -35vh;
  height: 15vh;
  font-size: 20px;
}
footer .footer-container {
  opacity: .65;
  transition: opacity .2s;
  color: #fff;
  line-height: 2;
  text-align: center;
}
footer .footer-container:hover {
  opacity: .8;
}
footer a {
  transition: color .2s;
  color: #fff;
}
footer a:hover {
  color: #7df;
}

/* Fixed view count in bottom left corner */
.view-count-fixed {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-count-fixed:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.view-icon {
  width: 18px;
  height: 18px;
  filter: grayscale(100%) brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  object-fit: contain;
}

#viewCount {
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (width < 880px) {
  .view-count-fixed {
    bottom: 15px;
    left: 15px;
    font-size: 14px;
    padding: 6px 10px;
  }
}
a {
  text-decoration: none;
}
h1 {
  margin: 0;
}
html {
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
  user-select: none;
}

/* Discord Display Widget Styles */
.display {
  min-width: 35vw;
  padding: 1.75em;
  background: var(--widget);
  border-radius: 0.45rem;
  animation: displayEntrance 0.5s ease-out both;
  animation-play-state: paused;
  animation-delay: calc(var(--scroll) * 0s + 0.9s);
}

.display[data-animated="true"] {
  animation-play-state: running;
}

@keyframes displayEntrance {
  0% {
    transform: translateY(40px) scale(0.9);
    opacity: 0;
    filter: blur(5px);
  }
  60% {
    transform: translateY(-2px) scale(1.02);
    filter: blur(1px);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

.userinfo {
  background-image: linear-gradient(-0.75turn, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--backdrop-url);
  background-size: cover;
  background-position: 50% 50%;
  border-radius: 0.45rem;
  padding: 1em;
  display: grid;
  grid-template-columns: min-content 1fr max-content;
  gap: 0 12px;
  align-items: center;
  grid-template-areas:
    "avatar display view"
    "avatar username view"
    "avatar status view";
}

#avatar {
  grid-area: avatar;
  border-radius: 50%;
}

#username {
  color: rgba(170, 170, 170, 1);
  grid-area: username;
}

#display {
  grid-area: display;
  color: white;
}

#status {
  display: flex;
  align-items: center;
  gap: 6px;
  grid-area: status;
  color: white;
}

#viewuser {
  grid-area: view;
}

.activity {
  display: grid;
  grid-template-columns: min-content 1fr;
  grid-template-rows: min-content min-content min-content;
  gap: 0px 12px;
  align-items: center;
  grid-template-areas:
    "images name"
    "images details"
    "images state";
}

.act-name {
  font-weight: 700;
  grid-area: name;
}

.act-details {
  grid-area: details;
}

.act-state {
  grid-area: state;
}

.act-images {
  position: relative;
  grid-area: images;
}

.largeimage {
  border-radius: 0.45rem;
}

.smallimage {
  position: absolute;
  bottom: -4px;
  right: -4px;
  border-radius: 50%;
  border: 4px solid var(--widget);
}

.activities {
  display: grid;
  gap: 16px 0;
}

.button {
  cursor: pointer;
  padding: 4px 8px;
  border: transparent;
  border-radius: 0.45rem;
  color: white;
  background: rgb(78, 46, 121);
  text-decoration: none;
}