* {
    box-sizing: border-box;
}

:root {
	--d: 2500ms;
	--angle: 90deg;
	--c1: #2457ce;
	--c2: #5d84de;
	--c3: #416dd4;
	--c4: #1d48aa;
	--c2: rgba(76, 76, 76, 0.1);
    --c5: #2d4784;
    --c6: #304f97;
    --myFont: 'Montserrat', sans-serif;
    --lightBlue: #849edb;
    --darkBlue: #3a66ce;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Styles for the rolling welcome text animation */
#rolling-welcome-text {
  opacity: 0; /* Initially hidden, will be set to 1 by JavaScript */
  font-family: var(--myFont);
  line-height: 1.5;
  max-width: 80%;
  margin: 0 auto;
  font-size: 1.1rem;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-top: -30px;
  margin-left: 30px;
  margin-right: 30px;
}

#rolling-welcome-text > div {
  display: inline;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#rolling-welcome-text span {
  display: inline-block;
  white-space: normal;
  transition: opacity 0.8s ease-in-out; /* Smoother, longer fade-in effect */
}

#rolling-welcome-text span.space-character {
  display: inline;
  white-space: pre;
}

#rolling-welcome-text span.highlight-word {
  color: var(--darkBlue);
  font-weight: 600;
  text-shadow: 0 0 2px rgba(36, 87, 206, 0.3);
}

#rolling-welcome-text span.highlight-word-light {
  color: var(--lightBlue);
  font-weight: 600;
  text-shadow: 0 0 2px rgba(132, 158, 219, 0.3);
}

/* Top buttons container and language button styles */
.top-buttons-container {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 100;
}

.language-container {
  display: flex;
  gap: 10px;
}

.language-button-sv,
.language-button-en {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.language-button-sv img,
.language-button-en img {
  width: 30px;
  height: auto;
  border-radius: 4px;
  transition: filter 0.2s ease;
}

.language-button-clicked {
  transform: scale(1.1);
  opacity: 1;
}

.language-button-not-clicked {
  transform: scale(0.9);
  opacity: 0.6;
}

.language-button-not-clicked:hover {
  opacity: 0.8;
  transform: scale(1);
}

@keyframes grow-line {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }
  
    /* Keyframes remain the same */
    @keyframes grow-line {
        from { transform: rotate(var(--angle)) scaleX(0); }
        to { transform: rotate(var(--angle)) scaleX(1); }
    }

    .spotlight-wrapper-right {
        width: 100%;
        height: 100%;
        top: 0;
        left: 50%;
        position: absolute;
    }
    .spotlight-wrapper-left {
        width: 100%;
        height: 100%;
        top: 0;
        left: 50%;
        position: absolute;
    }
  
  .spotlight-beam-right {
      height: 1px;
      width: 100%;
      position: absolute;
      bottom: -2.5px;
      opacity: 0.75;
      transform-origin: bottom left;
      background: linear-gradient(to right, var(--c3), var(--c2));
      animation: grow-line ease 1.6s forwards;
      animation-fill-mode: forwards; /* Ensures the final state is preserved */
      will-change: transform; /* Optimization hint for browsers */
      transform: scaleX(0);
  }

  .spotlight-beam-left {
      height: 1px;
      width: 100%;
      position: absolute;
      bottom: -2.5px;
      opacity: 0.75;
      transform-origin: bottom left;
      background: linear-gradient(to right, var(--c3), var(--c2));
      animation: grow-line ease 1.6s forwards;
      animation-fill-mode: forwards; /* Ensures the final state is preserved */
      will-change: transform; /* Optimization hint for browsers */
      transform: scaleX(0);
  }
  

/* Create 10 spotlights with rotated angles */
.spotlight-1 { --angle: -45.6deg; animation-delay: 2.12s; } /* Original 0.32s + 1.8s */
.spotlight-2 { --angle: -40.6deg; animation-delay: 2.20s; } /* Original 0.40s + 1.8s */
.spotlight-3 { --angle: -32.6deg; animation-delay: 2.28s; } /* Original 0.48s + 1.8s */
.spotlight-4 { --angle: -25.6deg; animation-delay: 2.36s; } /* Original 0.56s + 1.8s */
.spotlight-5 { --angle: -18.6deg; animation-delay: 2.44s; } /* Original 0.64s + 1.8s */
.spotlight-6 { --angle: -12.4deg; animation-delay: 2.52s; } /* Original 0.72s + 1.8s */
.spotlight-7 { --angle: -6.4deg; animation-delay: 2.60s; } /* Original 0.80s + 1.8s */

.spotlight-8  { --angle: calc(180deg + 45.6deg);  animation-delay: 2.12s; }  /* Original 0.32s + 1.8s */
.spotlight-9  { --angle: calc(180deg + 40.6deg);  animation-delay: 2.20s; } /* Original 0.40s + 1.8s */
.spotlight-10 { --angle: calc(180deg + 32.6deg);  animation-delay: 2.28s; } /* Original 0.48s + 1.8s */
.spotlight-11 { --angle: calc(180deg + 25.6deg);  animation-delay: 2.36s; } /* Original 0.56s + 1.8s */
.spotlight-12 { --angle: calc(180deg + 18.6deg);  animation-delay: 2.44s; } /* Original 0.64s + 1.8s */
.spotlight-13 { --angle: calc(180deg + 12.4deg);  animation-delay: 2.52s; } /* Original 0.72s + 1.8s */
.spotlight-14 { --angle: calc(180deg + 6.4deg);   animation-delay: 2.60s; } /* Original 0.80s + 1.8s */
  


  [class^="light-"] {

    /* Enhanced blur with proper units */
    filter: blur(100px); /* Use pixels instead of calculated values */
    
    /* Organic shape adjustments */
    border-radius: 60% 40% 30% 70% / 60% 50% 50% 40%;
    transform: 
        rotate(-135deg)
        skew(3deg, 5deg); /* Add subtle distortion */
}

[class^="light-"]::before,
[class^="light-"]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

[class^="light-"]::before {
    background: radial-gradient(
        circle at 30% 30%,
        rgba(43, 1, 255, 0.473),
        transparent 50%
    );
    filter: blur(30px);
}

[class^="light-"]::after {
    background: conic-gradient(
        #416dd480 0deg,
        #416dd4b5 180deg,
        transparent 360deg
    );
    mix-blend-mode: overlay;
}

.light-1 {
    position: absolute;
    aspect-ratio: 1;
    top: 25vh;
    left: -200px; /* Adjust to be halfway offscreen */
    height: 400px;
    opacity: 0.55;
}

.light-2 {
    position: absolute;
    aspect-ratio: 1;
    top: -150px;
    right: -120px; /* Adjust to be halfway offscreen */
    height: 400px;
    opacity: 0.95;
}

.light-3 {
    position: absolute;
    aspect-ratio: 1;
    top: 60vh;
    right: 25vw; /* Adjust to be halfway offscreen */
    height: 400px;
    opacity: 0.35;
}

.light-4 {
    position: absolute;
    aspect-ratio: 1;
    top: 70vh;
    left: -10vw;
    height: 900px;
    opacity: 0.08;
}

.light-5 {
    position: absolute;
    aspect-ratio: 1;
    top: 60vh;
    right: 15vw;
    height: 400px;
    opacity: 0.35;
}

.light-6 {
    position: absolute;
    aspect-ratio: 1;
    top: 5%;
    left: -200px;
    height: 400px;
    opacity: 0.35;
}

.light-7 {
    position: absolute;
    aspect-ratio: 1;
    top: 30%;
    left: 200px;
    height: 800px;
    opacity: 0.15;
}

.light-8 {
    position: absolute;
    aspect-ratio: 1;
    top: 65%;
    right: -200px;
    height: 700px;
    opacity: 0.25;
}

.light-9 {
    position: absolute;
    aspect-ratio: 1;
    top: 85%;
    left: -200px;
    height: 700px;
    opacity: 0.35;
}

#bm svg {
    display: block;
    margin: 0 auto;
}





html, body {
    width: 100%;
    margin: 0;
}
body {
    background: rgb(0,0,0);

}

.h2-fade-in {
    opacity: 0;
}

.name-title {
    font-weight: 700;
    color: var(--c3);
    font-size: 1.42rem !important;
    margin-bottom: 0rem;
}
.title-title {
    font-size: 2.13rem;
    font-weight: 700;
    margin: 0.5rem 0rem 1rem 0rem;
    color: white;
    font-family: var(--myFont);
}

.little-bold-text {
    font-weight: 500;
    color: var(--lightBlue);
}

#top-container {
    width: 100%;
    height: 100vh;
    position: fixed;
    overflow: hidden;
}
.top-buttons-container {
    position: absolute;
    right: 20px;
    top: 20px;
    padding-bottom: 50px;
    height: 80px;
    display: flex;
    z-index: 9;
}

.github-link {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    padding-left: 5px;
}

.github-link:hover .github-icon-top {
    animation: grow 1.5s ease;
}

.github-icon-top {
    width: 40px;
    height: 40px;
    display: block;
    
}

@keyframes grow {
    0%, 100% {
        transform: scale(1);
    }
    20% {
        transform: scale(0.85);
    }
    50% {
        transform: scale(1);
    }
    70% {
        transform: scale(0.95);
    }
}




.mail-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
    cursor: pointer;
    width: 40px; /* Initial width of the container */
    transition: width 0.5s ease; /* Smooth transition for the container width */
    height: 40px; /* Set the height to match the icon */
}
.mail-link {
    display: flex;
    align-items: center;
}

.mail-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    transition: transform 0.5s ease; /* Smooth transition for the transform property */
}

.mail-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.5s ease; /* Smooth transition for the icon */
    
}
.mail-link:hover .mail-icon {
    animation: grow 1.5s ease;
}

.email-text {
    white-space: nowrap;
    opacity: 0;
    position: absolute;
    left: 40px; /* Position the text next to the icon */
    transition: opacity 0.5s ease; /* Smooth transition for the text opacity */
    margin-left: 10px;
    color: #fff;
    font-family: var(--myFont);
}

.mail-container:hover {
    width: 305px; /* Adjust width to reveal the text */
}

.mail-container:hover .mail-wrapper {
    transform: translateX(-50px); /* Adjust the value to move the wrapper */
}

.mail-container:hover .email-text {
    opacity: 1; /* Fade in the text */
}

.tooltip-top {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    z-index: 999;
    font-family: var(--myFont);
    display: none;
}

.tooltip-top.visible {
    display: block;
    opacity: 1;
}













#bm {
    width: 100%;
    
    padding: 0vw 33vw;
    position: relative;
    z-index: 3;
}

#bm .particles-js-canvas-el {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    height: 100vh;
    width: 100vw;
    z-index: 2;
}

#bm-wrapper {
    position: relative;
    z-index: 3;
    padding: 0 0 10vh 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}
#bm-wrapper p {
    color: white;
    font-family: var(--myFont);
    font-size: 1vw;
    font-weight: 500;
    max-width: 500px;
}



#portfolio {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    margin-bottom: 120px;
    margin-top: 40px;
}
.h1Wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#particles-wrapper > .h1Wrapper > h1 {
    margin-top: 70px;
}
/*
#portfolio::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 1px;
    background-color: white;
}
*/

.project-description {
    font-weight: bold;
    margin-left: 20px;
    font-size: 1.0rem;
}

h1, h2 {
    color: white;
    font-family: var(--myFont);
}
p {
    color: rgb(235, 235, 235);
    font-family: var(--myFont);
}
h1 {
    font-size: 3.8rem;
    position: relative;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 100px;
    z-index: 3;
}
.line {
    height: 2px;
    width: 100px;
    display: inline-block;
    background: #2457ce;
    margin-bottom: 30px;
    z-index: 3;
}
/*
h1::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 47%;
    width: 100px;
    height: 2px;
    background-color: white;
}
*/
h2 {
    font-size: 1.42rem;
    line-height: 20px;
    margin-bottom: 20px;
}

.portfolioInnerWrapper {
    display: flex;
    padding: 0rem 0 7rem 0;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 auto;
}

.portfolioSectionOuterWrapper  {
    width: 42%;
    margin: 1rem auto;
}
.portfolioInnerWrapper .portfolioSectionOuterWrapper:last-child {
    width: 42%;
    margin: 1rem auto;
    text-align: center;
}

.portfolioSectionTitleWrapper {

    display: flex;
    align-items: flex-end;
}

.portfolioSection {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 20px;
    border: 0.15rem solid transparent;
    border-radius: 10px;
    z-index: 3;
}
.portfolioSection p {
    line-height: 0px;
}
.portfolioSection p:first-of-type {
    margin-top: 40px;
}
.portfolioSection img {
    width: 100%;
    height: 168px;
    margin: 0 auto;
    position: relative;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 168px;
    background-color: transparent;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.1);
}
.imgWrapper {
    position: relative;
}

a {
    text-decoration: none;
}
ul {
    padding: 0 0 0 20px;
}
li {
    font-size: 1rem;
    color: white;
    font-family: var(--myFont);
    font-weight: bold;
    position: relative;
    list-style: none;
}
li:before{
    content: '• ';
    margin-right: .5em;
    position: absolute;
    left: -18px;
    top: -4px;
    font-size: 1.6em;
    line-height: 0.9em;
  }
li:before{ 
    color: #2457ce;
}

#content-wrapper {
    position: relative;
    top: 100vh;
    background: black;
    border-top: solid 1px grey;
    padding-top: 10vh;
    overflow: hidden;
}

#presentation {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    z-index: 3;
    
}
#skills {
    display: flex;
    width: 100%;
    justify-content: center;
}
#skillsInnerWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.skillsBulletsWrapper {
    display: flex;
    flex-direction: column;
}





.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-card {
    display: flex;
    align-items: center;
    padding: 20px 60px;
    border: 4px solid #3b3b3b;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #121212;
    color: #fff;
    flex-grow: 1;
    justify-content: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    width: 30px;
    margin-right: 10px;
    display: block;
}

.skill-card span {
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
}









#photoAndPersonalText {
    display: flex;
    width: 100%;
    align-items: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    z-index: 999;
    position: relative;
    margin-bottom: 150px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-me-wrapper {
    display: flex;
    align-items: center;
    background: linear-gradient(168deg, rgba(23,23,23,1) 21%, rgba(35,35,35,1) 46%, rgba(23,23,23,1) 72%);
    border: 4px solid #3b3b3b;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 3rem 4rem;
}


.personalText {
    text-align: justify;
    padding-right: 4rem;
    
}
.personalText p {
    font-size: 1.0rem;
}
.personalText a {
    color: var(--lightBlue);
    font-weight: 500;
    text-decoration: underline;
}
.personalText a:hover {
    color: rgb(143, 185, 233);
    text-decoration: underline;
}
.photo {
    margin-top: 10px;
    margin-bottom: 10px;
}

/*
.photo img {
    width: 440px;
}
*/

.photo img {
    width: 310px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 20px 30px 20px rgba(0, 0, 0, 1);
}

#presentationInnerWrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 70px 0;
    flex-direction: column;
}
#design, #languages, #frameworks {
    margin: 0 30px 20px;
}

.divider {
    display: block;
    z-index: 5;
    position: relative;
    margin: 4rem auto;
}

#contacts {
    margin: 0 auto;
    padding-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.emailWrapper {
    display: flex;
    font-weight: bold;
    margin-left: 0px;
    align-items: center;
    z-index: 3;
    display: flex;
    justify-content: center;
}
.email {
    font-size: 1.1rem;
}
.copyMailButton {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}
.copyMailButton:hover {
    color: rgb(207, 207, 207);
    
}
.copyMailButton img {
    width: 20px;
    height: 20px;
    position: absolute;
    right: -25px;
    top: -10px;
}
.copyMailButton:hover > img {
    width: 28px;
    height: 28px;
    transition: width 0.2s ease, height 0.2s ease;
}
.copyMailButton:not(:hover) > img {
    width: 25px;
    height: 25px;
    transition: width 0.1s ease, height 0.1s ease;
}

.tooltip-text {
    visibility: hidden; /* Initially hidden */
    position: absolute; /* Positioned relative to the container */
    z-index: 1; /* Ensure tooltip appears above other content */
    background-color: black; /* Tooltip background color */
    color: white; /* Tooltip text color */
    padding: 5px; /* Padding around tooltip text */
    border-radius: 5px; /* Rounded corners for tooltip */
    top: -45px; /* Position below the container */
    left: 20px; /* Center horizontally */
    transform: translateX(-50%); /* Center horizontally */
    white-space: nowrap; /* Prevent tooltip text from breaking onto new line */
    color: white;
    font-family: var(--myFont);
    font-size: 0.9rem;
}

/* Show tooltip on hover */
.copyMailButton:hover .tooltip-text {
    visibility: visible; /* Show tooltip text when container is hovered over */
}

.githubButton {
    background: black;
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 8px solid rgba(9,9,9,1);
    padding: 5px 20px 5px 20px;
    cursor: pointer;
}
.githubButton:hover {
    border: 8px solid rgb(255, 255, 255);
    background: linear-gradient(60deg, rgba(9,9,9,1) 0%, rgb(36, 87, 206, 0.2) 28%, rgb(8, 8, 8) 54%);
    border-image: conic-gradient(from var(--angle), var(--c2), var(--c1) 0.1turn, var(--c1) 0.10turn, var(--c2) 0.25turn) 30;
    animation: borderRotate var(--d) linear infinite forwards, moveBackground var(--d) linear infinite forwards;
}
.githubButton:hover > img {
    filter: brightness(1.2);
}

.githubButton img {
    width: 40px;
    height: 40px;
}
.githubButton span {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    font-family: var(--myFont);
    margin: 0 15px;
}
.githubWrapper {
    margin-right: 60px;
    z-index: 3;
    display: flex;
    justify-content: center;
}






@property --angle {
  syntax: '<angle>';
  initial-value: 90deg;
  inherits: true;
}



@keyframes borderRotate {
	100% {
		--angle: 450deg;
	}
}

@keyframes moveBackground {
    0% {
        background-size: 100% 100%; /* Start size: full size */
    }
    50% {
        background-size: 220% 100%; /* Increase size horizontally to move right */
    }
    100% {
        background-size: 100% 100%; /* Back to the initial size */
    }
}


@keyframes expandImg {
	0% {
        width: 100%;
        height: 168px;
    }
    100% {
		width: 100%;
        height: 168px;
	}
}
.portfolioSection:not(:hover) > img {
    animation: shrinkImg 200ms ease forwards; /* Animation to expand padding back to original state */
}

@keyframes shrinkImg {
    0% {
        width: 100%;
        height: 168px;
    }
    100% {
        width: 100%;
        height: 168px;
    }
}



.animate-on-scroll {
    opacity: 0;
    transform: translatex(-150px);
    transition: opacity 1s ease, transform 1s ease;
}

.animate-on-scroll.active {
    opacity: 1;
    transform: translatex(0);
}
.animate-on-scroll-from-right {
    opacity: 0;
    transform: translatex(150px);
    transition: opacity 1s ease, transform 1s ease;
}

.animate-on-scroll-from-right.active {
    opacity: 1;
    transform: translatex(0);
}



/* Particles */

canvas.particles-js-canvas-el {
    position: absolute;
    z-index: 1;
    min-height: 100%;
    top: 0;
}
#particles-wrapper { 
    position: relative;
    width: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 32%, rgba(0,0,0,1) 100%);
    padding-bottom: 8vh;
    border-top: thin solid #eee;
}
#canvas-overlay {
    position: absolute;
    z-index: 2;
    min-height: 100%;
    width: 100%;
    background: linear-gradient(180deg, rgba(15,15,15,1) 0%, rgba(15,15,15,0.85) 30%, rgba(15,15,15,0.5) 100%);
    pointer-events: none;
    backdrop-filter: blur(3px);
}
#particles-wrapper .h1Wrapper {
    margin-top: 4vh;
}
.glass-reflect {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    background-image: url("glass_reflect.svg");
    background-repeat: no-repeat;
    opacity: 30%;
}










  .fixed {
    position: fixed !important;
  }
  #play-button-container {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 9;
  }
  .equalizer-container {
    display: flex; /* Make the button and equalizer align horizontally */
    align-items: center; /* Ensure they are on the same y-axis */
    width: 40px; /* Initial width for the button and equalizer */
    height: 40px;
    position: relative;
  }
  
  /* Smaller button style */
  #playButton {
    padding: 5px;
    background-color: var(--c1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    left: 0;
    transition: all 0.5s ease;
    z-index: 1000;
  }
  
  #playButton.active {
    width: 0;
    padding: 0;
    opacity: 0;
    left: -100px;
  }
  
  /* Equalizer container (hidden by default) */
  .equalizer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 40px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s ease;
  }
  
  .equalizer.active {
    width: 60px; /* Expands to full width */
    opacity: 1;
  }
  
  .bar {
    width: 6px;
    background: linear-gradient(180deg, #ff004d, #ffac41);
    animation: bounce 1s infinite ease-in-out;
  }
  
  .bar1 {
    background: linear-gradient(180deg, #2457ce, #ff005a); /* Starts with blue (#2457ce) and mixes with synthwave pink */
    animation-delay: 0.1s;
  }
  .bar2 {
    background: linear-gradient(180deg, #0055ff, #ffac41); /* Blue to bright orange */
    animation-delay: 0.2s;
  }
  .bar3 {
    background: linear-gradient(180deg, #008c6d, #ff004d); /* Green to synthwave pink */
    animation-delay: 0.3s;
  }
  .bar4 {
    background: linear-gradient(180deg, #39ff14, #0088ff); /* Neon green to neon blue */
    animation-delay: 0.4s;
  }
  .bar5 {
    background: linear-gradient(180deg, #f000ff, #ff005a); /* Neon purple to synthwave pink */
    animation-delay: 0.5s;
  }
  
  /* Animation for bouncing bars from bottom up */
  @keyframes bounce {
    0%, 100% {
      height: 10px;
    }
    50% {
      height: 40px;
    }
  }
  
  
  




















@media screen and (max-width: 1800px) {
    #bm {
        padding: 0vw 29vw;
    }
}

@media screen and (max-width: 2200px) {
    #bm-wrapper p {
        font-size: 1.2vw;
    }
}
@media screen and (max-width: 1700px) {
    #bm-wrapper p {
        font-size: 1.6vw;
    }
}
@media screen and (max-width: 1500px) {
    #bm-wrapper p {
        font-size: 1.8vw;
    }
}

@media screen and (max-width: 1200px) {
    .portfolioSectionOuterWrapper {
        padding: 0 2rem;
    }
    #bm {
        padding: 0vw 18vw;
    }

    .glass-reflect {
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0;
        background-image: url("glass_reflect_small.svg");
        background-repeat: no-repeat;
        opacity: 30%;
    }

    #bm-wrapper p {
        font-size: 2.2vw;
    }
}

@media screen and (max-width: 900px) {
    #bm-wrapper p {
        font-size: 2.8vw;
        margin-top: -170px;
    }
    #top-container {
        height: 100dvh;
    }
    #content-wrapper {
        top: 100dvh;
    }
    #play-button-container {
        display: none;
    }
    .mail-container {
        display: none;
    }
    .about-me-wrapper {
        flex-direction: column-reverse;
    }
    .personalText {
        margin: 0 1rem;
    }
    #presentation {
        display: flex;
        flex-direction: column;
    }
    #presentationInnerWrapper {
        margin: 0 auto;
        padding: 50px 0 50px 0;
    }
    .about-me-wrapper {
        padding: 2rem;
    }
    #skills {
        width: 100%;
    }
    #bm {
        padding: 0vw 10vw 0vw 7vw;
        padding-bottom: 10vh;
        margin-bottom: 50px;
    }
    h1 {
        font-size: 3.2rem;
    }
    .photo {
        margin: 1rem 0rem 0rem 0rem;
        padding: 0rem 3rem;
    }
    .photo img {
        width: 290px;
    }
    
    #particles-wrapper-two .particles-js-canvas-el {
        position: absolute;
        top: 0;
        z-index: 1;
        min-height: 500px;
    }
    #particles-wrapper-two { 
        position: relative;
        width: 100%; 
    }
    #canvas-overlay-two {
        position: absolute;
        top: 0;
        z-index: 2;
        min-height: 500px;
        width: 100%;
        background: linear-gradient(180deg, rgba(0,0,0,1) 10%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,1) 100%);
        pointer-events: none;
    }

    #languages, #design, #frameworks {
        margin: 20px 35px 0 35px;
    }
    .personalText {
        padding: 0 0rem;
    }
    
    #canvas-overlay {
        position: absolute;
        top: 0;
        z-index: 2;
        min-height: 100%;
        width: 100%;
        background: linear-gradient(180deg, rgba(15, 15, 15, 1) 0%, rgba(15, 15, 15, 0.85) 30%, rgba(15, 15, 15, 0.5) 100%);
        pointer-events: none;
    }
}

    .portfolioSection {
        position: relative;
        overflow: hidden;
        transition: transform 0.3s ease-in-out;
    }
  
  .portfolioSection:hover {
    transform: scale(1.05);
  }
  
  .imgWrapper {
    position: relative;
  }
  
  .imgWrapper img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
  }
  
  .imgWrapper .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }
  
  .portfolioSection:hover .imgWrapper img {
    transform: scale(1.05);
  }
  
  .portfolioSection:hover .imgWrapper .overlay {
    opacity: 1;
  }
  
  .portfolioSectionTitleWrapper h2 {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  }
  
  .portfolioSection:hover .portfolioSectionTitleWrapper h2 {
    transform: translateY(-10px);
    opacity: 0.8;
  }
  .githubButton {
  position: relative;
  display: flex;
  padding: 10px 20px;
  font-size: 16px;
  color: #fff;
  background-color: #000000;
  border-radius: 5px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 10px;
}

.githubButton:hover {
  color: #333;
  background-color: #000000;
  border-radius: 10px;
}

.githubButton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 5px;
  
  box-shadow: 0 0 0 2px transparent;
  transition: background-position 0.5s linear;
}

.githubButton:hover::before {
  background-position: 100% 0;
  
}

.githubButton::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background-color: #333;
  border-radius: 3px;
  z-index: -1;
  transition: background-color 0.3s;
}

.githubButton:hover::after {
  background-color: #0030df;
}



/* ======================
   Portfolio Section
   ====================== */
#portfolio {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 4rem;
}

.portfolio-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.project-row {
    display: flex;
    background: #121212;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.image-glow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(36, 87, 206, 0);
    transition: all 0.3s ease;
}

.project-row:hover .image-glow {
    background: rgba(36, 87, 206, 0.2);
}

.image-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, 
                linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, 
         linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    animation: border-glow 5s ease infinite;
    background-size: 400% 400%;
}

@keyframes border-glow {
    0% {
        background-position: 30% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 30% 50%;
    }
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.project-row:hover .project-image img {
    transform: scale(1.03);
}

.project-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content h2 {
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
    color: #fff;
    font-weight: 600;
    position: relative;
    display: inline-block;
    line-height: 2rem;
}

.project-content h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--c1), var(--c3));
    border-radius: 3px;
}

.project-meta {
    display: flex;
    align-items: center;
    margin: 0.5rem 0 1.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: "Roboto";
}

.made-with {
    color: #a0a0a0;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags span {
    background: rgba(36, 87, 206, 0.2);
    color: #7aa3ff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tags span:hover {
    background: rgba(36, 87, 206, 0.4);
    transform: translateY(-2px);
}

.project-description {
    color: #d0d0d0;
    line-height: 1.7;
    margin: 0 2rem 2rem 2rem;
}

.visit-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--c1), var(--c3));
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    width: fit-content;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
    font-family: "Roboto";
    font-size: 16px;
}

.visit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--c4), var(--c1));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.visit-button:hover::before {
    opacity: 1;
}

.visit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(36, 87, 206, 0.4);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .project-content {
        padding: 2rem;
    }
    
    .project-content h2 {
        font-size: 1.6rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
}

/* ======================
   Responsive Portfolio
   ====================== */
@media screen and (max-width: 992px) {
    .project-row {
        flex-direction: column;
    }
    
    .project-image {
        flex: 0 0 auto;
        min-height: 150px;
    }
    
    .project-content {
        padding: 2rem 1.5rem;
    }
    
    .project-description {
        margin-bottom: 1.5rem;
    }
}

@media screen and (max-width: 800px) {
    .emailWrapper {
        margin: 0px;
    }
    .emailWrapper {
        margin-right: 30px;
        margin-top: 0px;
    }
    .githubWrapper {
        margin: 0px 0px 30px 0px;
    }
    #contacts {
        flex-direction: column;
    }
    .portfolioInnerWrapper .portfolioSectionOuterWrapper:last-child {
        width: 95%;
    }
    .divider {
        margin: 0 auto;
    }

    .portfolioSectionOuterWrapper {
        width: 95%;
        margin-bottom: 0rem;
    }
}

@media screen and (max-width: 600px) {
    #bm-wrapper p {
        font-size: 4.2vw;
        margin-top: -130px;
    }
    .portfolioInnerWrapper .portfolioSectionOuterWrapper:last-child, .portfolioSectionOuterWrapper {
        width: 95%;
        padding: 0 1rem;

    }
    .skill-card {
        padding: 15px 15px;
    }
    .about-me-wrapper {
        padding: 2rem;
    }

    .divider {
        display: none;
    }
    canvas.particles-js-canvas-el {
        position: absolute;
        top: 0;
        z-index: 1;
        min-height: 100%;
    }
    #particles-wrapper { 
        position: relative;
        width: 100%; 
    }
    #canvas-overlay {
        position: absolute;
        top: 0;
        z-index: 2;
        min-height: 100%;
        width: 100%;
        background: linear-gradient(180deg, rgba(15, 15, 15, 1) 0%, rgba(15, 15, 15, 0.85) 30%, rgba(15, 15, 15, 0.5) 100%);
        pointer-events: none;
    }
}
@media screen and (max-width: 500px) {
    .visit-button {
        margin: 0 auto;
    }
    .project-description {
        margin: 0 0rem 2rem 0em;
    }
    .project-content {
        min-height: 0px;
    }
    .image-glow {
        padding: 0;
    }
    .about-me-wrapper {
        padding: 1rem;
    }
    #presentationInnerWrapper {
        width: 100%;
    }
    h1 {
        padding-left: 0px;
    }
    .title-title {
        font-size: 1.5rem;
    }

    .email, .githubButton span {
        font-size: 1.1rem;
    }

    .photo img {
        width: 100%;
    }
    .photo {
        padding: 30px;
    }

    .personalText {
        padding: 0;
        margin: 5px;
    }

    .copyMailButton {
        display: none;
    }
    .emailWrapper {
        margin-right: 0px;
    }
    #photoAndPersonalText {
         padding: 0 8px;
    }
}
@media screen and (max-width: 400px) {
    .email, .githubButton span {
        font-size: 0.9rem;
    }
    
    
}

.language-container {
    display: flex;
    align-items: center;
    gap: 10px;  /* Space between buttons */
    margin-right: 10px;
    height: 40px;
}

.language-button-en, .language-button-sv {
    padding: 0;
    background: none;
    cursor: pointer;
    border: 2px solid #000000;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
    height: 26px;
    width: 36px;
}

.language-button-en:focus, .language-button-sv:focus {
    outline: none;
}

.language-button-en:hover, .language-button-sv:hover {
    border: 2px solid #ffffff;
}

.language-button-en img, .language-button-sv img {
    display: block;
    width: 30px;
    height: 20px;
    object-fit: cover;
}

.language-button-clicked {
    border: 2px solid #ffffff;
}
.language-button-not-clicked {
    opacity: 0.5;
}

/* Optional hover effect */
.language-button-en:hover, .language-button-sv:hover {
    border-color: #ffffff;
}

#bm svg {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}