@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono");

:root {
  --bg-color: #101010;
  --text-color: gainsboro;
  --accent-blue: #294ad8;
  --accent-green: #227131;
  --highlight-color: #c1c1c1;
  --highlight-bg: #1d1d1d;
  --label-bg: rgba(140, 140, 140, 0.47);
  --animation-duration: 5s;
}

/* Base styles */
html {
  height: 100vh;
}

::selection {
  background-color: var(--highlight-color);
  color: var(--highlight-bg);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Ubuntu Mono", monospace;
  background-attachment: fixed;
  overflow-x: hidden;
  background-position: 0 0;
  /* Simplified background pattern */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%23272727' fill-opacity='0.35' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1z'%3E%3C/path%3E%3C/svg%3E");
}

/* Typography scales */
.size-limit-heading {
  font-size: 5vw;
}

@media (max-width: 31.25em) {
  .size-limit-heading {
    font-size: 25px;
  }
}

@media (min-width: 43.75em) {
  .size-limit-heading {
    font-size: 35px;
  }
}

.size-limit-text {
  font-size: 2vw;
}

@media (max-width: 43.75em) {
  .size-limit-text {
    font-size: 14px;
  }
}

@media (min-width: 48.4375em) {
  .size-limit-text {
    font-size: 15.5px;
  }
}

.size-limit-nav {
  font-size: 2vw;
}

@media (max-width: 46.875em) {
  .size-limit-nav {
    font-size: 15px;
  }
}

@media (min-width: 65.625em) {
  .size-limit-nav {
    font-size: 21px;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(219, 219, 219, 0.47);
}

/* Main content styles */
.headline {
  margin-left: 3vw;
  transition: 0.3s;
}

#intro>p {
  margin-left: 5vw;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 2;
}

@media (max-width: 420px) {
  #intro>p {
    line-height: 1.5;
  }
}

#intro-text {
  transition: 0.3s;
  margin-top: -1%;
}

#about-me {
  margin-left: 3vw;
  margin-bottom: 10vw;
}

.client-info {
  background: var(--label-bg);
  padding: 3px 6px;
  border-radius: 7px;
}

@media (max-width: 420px) {
  .client-info {
    padding: 2px 5px;
  }

  .line-break-intro {
    display: none;
  }
}

/* Margin utilities */
.margin-mid {
  margin: 2vw 0 1vw 4vw;
}

.margin-max {
  margin: 2vw 0 1vw 5vw;
}

/* Footer and navigation */
#bottom-background {
  position: fixed;
  z-index: 0;
  background-image: linear-gradient(to top, var(--bg-color) 0%, rgba(16, 16, 16, 0.3) 100%);
  bottom: 0;
  left: 0;
  width: 99vw;
  height: 10vw;
}

@media (max-width: 420px) {
  #bottom-background {
    height: 33vw;
  }
}

#footer {
  position: fixed;
  right: 2%;
  bottom: 2%;
  z-index: 4;
}

#footer-content {
  width: 100%;
}

#links {
  transition: 0.3s;
  display: inline-flex;
  bottom: 2%;
  z-index: 3;
  margin-left: 3vw;
  vertical-align: middle;
  line-height: 35px;
  font-weight: 700;
  position: fixed;
  text-transform: uppercase;
  letter-spacing: 3px;
  padding-right: 4vw;
}

@media (max-width: 530px) {
  #links {
    display: block;
    line-height: 10px;
    bottom: 1%;
  }

  #links .dash {
    display: none;
  }
}

#links>p>a {
  transition: 0.3s;
  color: #969cad;
  text-decoration: none;
}

#links>p>a:hover {
  color: var(--text-color);
}

.dash {
  pointer-events: none;
  padding: 0 10px;
}

#footer-logo {
  width: 80px;
  background-color: rgba(16, 16, 16, 0.6);
  transition: 0.3s;
}

@media (max-width: 420px) {
  #footer-logo {
    width: 50px;
  }
}

@media (max-width: 300px) {
  #footer-logo {
    width: 30px;
  }
}

#footer-logo:hover {
  transform: scale(1.1);
}

/* Text glitch effect */
@keyframes noise-anim {
  0% {
    clip: rect(87px, 9999px, 19px, 0);
  }

  5.8823529412% {
    clip: rect(68px, 9999px, 9px, 0);
  }

  11.7647058824% {
    clip: rect(13px, 9999px, 71px, 0);
  }

  17.6470588235% {
    clip: rect(67px, 9999px, 68px, 0);
  }

  23.5294117647% {
    clip: rect(17px, 9999px, 73px, 0);
  }

  29.4117647059% {
    clip: rect(21px, 9999px, 96px, 0);
  }

  35.2941176471% {
    clip: rect(80px, 9999px, 79px, 0);
  }

  41.1764705882% {
    clip: rect(69px, 9999px, 35px, 0);
  }

  47.0588235294% {
    clip: rect(41px, 9999px, 66px, 0);
  }

  52.9411764706% {
    clip: rect(31px, 9999px, 22px, 0);
  }

  58.8235294118% {
    clip: rect(95px, 9999px, 1px, 0);
  }

  64.7058823529% {
    clip: rect(73px, 9999px, 18px, 0);
  }

  70.5882352941% {
    clip: rect(47px, 9999px, 46px, 0);
  }

  76.4705882353% {
    clip: rect(20px, 9999px, 49px, 0);
  }

  82.3529411765% {
    clip: rect(67px, 9999px, 16px, 0);
  }

  88.2352941176% {
    clip: rect(100px, 9999px, 73px, 0);
  }

  94.1176470588% {
    clip: rect(35px, 9999px, 80px, 0);
  }

  100% {
    clip: rect(41px, 9999px, 100px, 0);
  }
}

.glitch:after {
  content: attr(data-text);
  position: absolute;
  left: 3.1vw;
  text-shadow: 4px 0 var(--accent-blue);
  color: white;
  background: var(--bg-color);
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-anim var(--animation-duration) infinite linear alternate-reverse;
}

@keyframes noise-anim-2 {
  0% {
    clip: rect(76px, 9999px, 37px, 0);
  }

  5.8823529412% {
    clip: rect(66px, 9999px, 92px, 0);
  }

  11.7647058824% {
    clip: rect(22px, 9999px, 6px, 0);
  }

  17.6470588235% {
    clip: rect(24px, 9999px, 11px, 0);
  }

  23.5294117647% {
    clip: rect(44px, 9999px, 21px, 0);
  }

  29.4117647059% {
    clip: rect(29px, 9999px, 96px, 0);
  }

  35.2941176471% {
    clip: rect(4px, 9999px, 86px, 0);
  }

  41.1764705882% {
    clip: rect(33px, 9999px, 73px, 0);
  }

  47.0588235294% {
    clip: rect(18px, 9999px, 36px, 0);
  }

  52.9411764706% {
    clip: rect(58px, 9999px, 55px, 0);
  }

  58.8235294118% {
    clip: rect(100px, 9999px, 1px, 0);
  }

  64.7058823529% {
    clip: rect(96px, 9999px, 72px, 0);
  }

  70.5882352941% {
    clip: rect(16px, 9999px, 59px, 0);
  }

  76.4705882353% {
    clip: rect(36px, 9999px, 90px, 0);
  }

  82.3529411765% {
    clip: rect(85px, 9999px, 38px, 0);
  }

  88.2352941176% {
    clip: rect(63px, 9999px, 82px, 0);
  }

  94.1176470588% {
    clip: rect(45px, 9999px, 47px, 0);
  }

  100% {
    clip: rect(57px, 9999px, 22px, 0);
  }
}

.glitch:before {
  content: attr(data-text);
  position: absolute;
  left: 2.4vw;
  text-shadow: -4px 0 var(--accent-green);
  color: white;
  background: var(--bg-color);
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: noise-anim-2 var(--animation-duration) infinite linear alternate-reverse;
}

@media (max-width: 300px) {

  .glitch:before,
  .glitch:after {
    animation: none;
  }
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.fadeInDown {
  animation-name: fadeInDown;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fadeIn {
  animation-name: fadeIn;
}

.animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.hide {
  display: none !important;
}

/* UFO Animation */
#ufo-animation {
  position: fixed;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.all {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  width: 240px;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.top {
  position: absolute;
  top: -82px;
  background-color: transparent;
  border: 4px solid white;
  border-bottom-color: transparent;
  border-right-color: transparent;
  border-radius: 100px;
  width: 160px;
  height: 160px;
  transform: rotate(45deg);
  z-index: 1;
}

.inner-oval {
  position: relative;
  border: 4px solid white;
  width: 240px;
  height: 60px;
  border-radius: 50px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: rgba(16, 16, 16, 0.8);
}

.circle1,
.circle2,
.circle3 {
  border: 4px solid white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  animation: zoom 3s linear infinite;
}

.circle2 {
  animation-delay: 1s;
}

.circle3 {
  animation-delay: 2s;
}

@keyframes zoom {

  0%,
  100% {
    background-color: black;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }

  50% {
    background-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  }
}

/* UFO Responsive Design */
@media (max-width: 768px) {
  #ufo-animation {
    right: 3%;
    transform: translateY(-50%) scale(0.8);
  }
}

@media (max-width: 480px) {
  #ufo-animation {
    right: 2%;
    transform: translateY(-50%) scale(0.6);
  }
}

/* Rickroll Animation */
/* Center container */
#rickroll-container {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 20;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* Rickroll image styling */
#rickroll-image {
  width: 200px;
  max-width: 90vw;
  height: auto;
  animation: mirrorEffect 900ms infinite steps(2, end);
  border: 4px solid #fff;
  border-radius: 12px;
  box-sizing: border-box;
}

/* On small screens, move image to bottom above footer */
@media (max-width: 700px) {
  #rickroll-container {
    position: fixed;
    left: 50%;
    bottom: 60px;  
    top: auto;
    transform: translateX(-50%);
    margin: 0;
    width: 100vw;
    justify-content: center;
    align-items: flex-end;
    z-index: 5; 
    pointer-events: none;
  }
  #rickroll-image {
    width: 120px;
    max-width: 95vw;
    border-width: 2px;
    margin-top: 0;
    margin-bottom: 8px;
  }
}

/* Keyframes for instant mirroring */
@keyframes mirrorEffect {
  0% {
    transform: scaleX(1);
  }
  49.999% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(-1);
  }
  100% {
    transform: scaleX(-1);
  }
}