 html {
  scroll-behavior: smooth !important;
 }

body {
    color: white;
    display: flex;
    flex-direction: column;
    font-family: 'ubuntu';
    background-image: url(./images/background-image.png);
    background-size: 20%;
}

body, .about-me, .projects {
    background-size: 20%;
    margin: 0;
    background-repeat: repeat;
    background-attachment: fixed;
    animation: moveBackground 30s infinite alternate;
}

@keyframes moveBackground {
    0%
    {
        background-position: 0% 0%;
    }
    50%
    {
        background-position: 0% 50%;
    }
    100% 
    {
        background-position: 0% 0%;
    }
}

li {
    list-style: none;
}

a {
    text-decoration: none;
    color: white;
}

html {
    font-size: 45%;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

.about-me-images {
    display: flex;
    flex-wrap: wrap;
    width: 60vw;
    justify-content: space-between;
    margin-top: 70px;
}

.about-me-images img {
    max-width: 25rem;
    height: 25rem
}

@media (max-width: 1500px) {
    html {
        font-size: 42.5%;
    }
}

@media (max-width: 1200px) {
    html {
        font-size: 40%;
    }
}

@media (max-width: 1000px) {
    html {
        font-size: 37.5%;
    }
}

@media (max-width: 770px) {
    html {
        font-size: 35%;
    }
    .about-me-main {
    flex-direction: column;
    gap: 4rem;
  }

  .about-me-portrait {
    margin-top: 4rem;
  }

  .about-me-text h1 {
    font-size: 3.5rem;
    text-align: center;
  }

  .about-me-text p {
    font-size: 1.6rem;
  }

  .about-me-attach {
    flex-direction: column;
    gap: 2rem;
  }

  #portrait-square {
    display: none;
  }
}

@media (max-width: 615px) {
    html {
        font-size: 28%;
    }
}

@media (max-width: 350px) {
    html {
        font-size: 25%;
    }
}

@media (max-width: 300px) {
    html {
        font-size: 20%;
    }
}

@media (max-width: 250px) {
    html {
        font-size: 15%;
    }
}

@media (max-width: 200px) {
    html {
        font-size: 12.5%;
    }
}

@media (max-width: 160px) {
    html {
        font-size: 10%;
    }
}

@media (max-width: 140px) {
    html {
        font-size: 7.5%;
    }
}


/* INTRO */

.intro {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 90vh;
    text-wrap: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.intro h1 {
    font-weight: 10;
    font-size: 6rem;
    margin: 0;
}

.intro h2 {
    font-weight: 10;
    font-size: 6rem;
    margin: 0.4em;
}

#intro-line {
    background-color: white;
    height: 0.1%;
    width: 75rem;
}

#msc {
    color: #fcbdbd;
    font-style: italic;
    margin: 0.4em;
}

#github-logo {
    max-height: 7em;
}

.intro-button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10vh;
}

#arrow {
    max-height: 7em;
}

@keyframes slideInFromTop{
    0% {
        transform: translateY(-10%);
    }
    100% {
        transform: translateY(0);
    }
}

.intro {
    animation: 1.5s ease-out 0s 1 slideInFromTop;
}

/* HEADER */

.header {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    background-color: #00000036;
    box-shadow: rgba(0, 0, 0, 0.712) 0px 8px 24px;
    position: sticky;
    top: 0;
    margin:0;
    height: 8rem;
    z-index: 9999999;
}

.header-individual {
    display: flex;
    flex-direction: row;
    font-size: 3rem;
    gap: 3rem;
    margin-right: 4rem;
}

.header-individual a:hover {
    color: #fcbdbd;
}

/* ABOUT ME */

.about-me {
    background-image: url("./images/background-image-2.png");
    background-size: 20%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fcbdbd;
}

.fade-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 2s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-me-main {
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 8rem;
    flex-wrap: wrap;
    margin-top: 7rem;
}

/* PORTRAIT */

.about-me-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 8rem;
}

.about-me-portrait img {
    object-fit: cover;
    padding: 2rem;
}

#portrait {
    height: auto;
    width: 100%;
    max-width: 50rem;
    border-radius: 5rem;
    background-color: #00000065;
    outline: 0.5rem solid #ff9999;
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 153, 153, 0.6), 0 0 25px rgba(255, 153, 153, 0.3);
}

#portrait-square {
    height: 20em;
    width: 20em;
    border-radius: 3rem;
    background: #ff6868;
    margin-left: 40em;
    margin-top: -17em;
    z-index: 1;
}

/* MAIN TEXT */

.about-me-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 90rem;
}

.about-me-p {
    outline: 0.5rem solid #ff9999;
    background-color: #00000065;
    border-radius: 3rem;
    padding: 4rem;
    margin-top: 0;
    box-shadow: 0 0 10px rgba(255, 153, 153, 0.6), 0 0 25px rgba(255, 153, 153, 0.3);
}

#about-me-line {
    flex: auto;
    height: 0.1rem;
    background-color: #ffffff;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.about-me-text h1 {
    z-index: 1;
    font-size: 6rem;
    margin: 0;
    margin-bottom: 3rem;
    background: linear-gradient(90deg, #ff9999, #ffffff, #ff6868, #ff9999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(255, 153, 153, 0.637);
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% {background-position: 100% 50%;}
  100% { background-position: 0% 50%; }
}

.about-me-text p {
    color: white;
    font-size: 3rem;
    font-weight: 300;
    margin-top: 0;
}

#about-me-text-2 {
    color: rgb(221, 221, 221);
}

/* CONTACT INFO */

.about-me-attach {
    display: flex;
    flex-direction: row;
    gap: 15rem;
    color: white;
}

.about-me-attach h4 {
    font-size: 3rem;
    font-weight: 300;
    margin: 0;
    margin-bottom: 1rem;
}

.about-me-attach h5 {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    margin-bottom: 2.5rem;
}

#about-me-highlight {
    color:#ff6868
}

@keyframes glowPulse {
  from { box-shadow: 0 0 2px #ffffff, 0 0 2px #ff9999; }
  to { box-shadow: 0 0 2px #ffffff, 0 0 20px #ff9999; }
}

/* PROJECTS */

.projects {
    background-image: url("./images/background-image-2.png");
    background-size: 20%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.projects-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    max-width: 60vw;
}

.projects-header h1 {
    z-index: 1;
    font-size: 6rem;
    margin: 0;
    margin-bottom: 3rem;
    margin-top: 10rem;
    background: linear-gradient(90deg, #ff9999, #ffffff, #ff6868, #ff9999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(255, 153, 153, 0.637);
    animation: gradientShift 8s ease infinite;
}

.projects-container {
    width: 80vw;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 8rem;
    padding: 8rem;
}

.project {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: flex-start;
    text-align: left;
    padding: 3.5rem;
    min-height: 30rem;
    border-radius: 3rem;
    cursor: pointer;
    outline: 0.5rem solid white;
    filter: grayscale(40%) brightness(0.6) contrast(1.1) saturate(0.6);
    transition: transform 0.3s ease, filter 0.8s ease, outline 0.3s ease;

    flex: 1 1 45rem;
    max-width: 60rem;
}

@media (max-width: 1100px) {
    .project {
        flex: 1 1 100%;
        min-height: 45rem;
    }

    .projects-container {
        gap: 6rem;
        padding: 6rem;
    }

    #MATLAB {
        background-position: center -9rem;
    }
}

@media (max-width: 500px) {
    .project {
        flex: 1 1 100%;
        min-height: 35rem;
    }

    .projects-container {
        gap: 4rem;
        padding: 4rem;
    }
}

/* SPECIFICS FOR EACH PROJECT CARD */

#dissertation {
    background-image: url(./images/neural-network.jpg);
    filter: grayscale(80%) brightness(0.5) contrast(1.2) saturate(0.6);
}

#VBA {
    background-image: url(./images/vba.jpg);
    background-size: cover;
    filter: grayscale(80%) brightness(0.5) contrast(1.2) saturate(0.6);
}

#MATLAB {
    background-image: url(./images/matlab.jpg);
    filter: grayscale(80%) brightness(0.5) contrast(1.2) saturate(0.6);
}

#portfolio {
    background-image: url(./images/background-image.png);
    background-size: 40%;
    filter: grayscale(80%) brightness(0.5) contrast(1.2) saturate(0.6);
}

#FastAPI {
    background-image: url(./images/database.jpg);
    background-size: cover;
    filter: grayscale(80%) brightness(0.6) contrast(1.2) saturate(0.6);
}

.project:hover, #FastAPI:hover, #VBA:hover, #MATLAB:hover, #dissertation:hover, #portfolio:hover {
    transform: translateY(-2.5rem);
    filter: none;
    box-shadow: 0 0 20px #ff6868;
}

.project h2 {
    font-size: 4rem;
    font-weight: 500;
    margin: 0;
}

.project h3 {
    font-size: 3rem;
    font-weight: 200;
    margin: 0;
}

.skills {
    display: flex;
    gap: 2rem;
    font-size: 2rem;
}

.skills p {
    outline: 0.2rem solid white;
    padding: 1rem;
    border-radius: 1.5rem;
    font-weight: 1000;
    background-color: #00000036;
}

/* MODAL PROJECTS */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease forwards;
}

#modal-title {
    font-size: 5rem;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff9999, #ffffff, #ff6868, #ff9999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(255, 153, 153, 0.637);
    animation: gradientShift 8s ease infinite;
} 

#modal-subtitle {
    font-size: 4rem;
    font-weight: 500;
}

#modal-description {
    font-size: 3rem;
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    background: #151627;
    border-radius: 3rem;
    color: white;
    max-width: 800px;
    width: 90%;
    height: 60vh;
    overflow-y: auto;

    border: 0.4rem solid #ffffff;
    box-shadow: 0 0 10px rgba(255, 153, 153, 0.6), 0 0 20px rgba(255, 153, 153, 0.3);
    animation: modalIn 0.4s ease;
}

.modal-content-inner {
    position: relative;
    width: 100%;
    height: 50%;
    overflow: hidden;
    border-bottom: 0.4rem solid #ffffff;
}

.modal-content-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("./images/background-image-2.png");
    background-size: cover;
    background-position: center;
    filter: grayscale(80%) brightness(0.5);

    pointer-events: none;
    z-index: 0;
}

.modal-content-inner > * {
    position: relative;
    z-index: 1;
}

.modal-content-outer {
    background-image: url("./images/background-image.png");
    background-size: 20%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-close {
    margin-top: 2rem;
    align-self: flex-start;
    background: none;
    border: none;
    color: #ff9999;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

.modal-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 80%;
    width: 15%;
    font-size: 3rem;
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(90deg, #ff99cc, #ff9999);
    color: #151729;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, filter 0.2s;
}

.modal-body {
    padding: 3rem;
}

.modal-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* FOOTER */

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5rem;
    background-color: #00000036;
    box-shadow: rgba(0, 0, 0, 0.712) 0px 8px 24px;
    font-size: 1.5rem;
}

/* :HOVERS */

img:hover {
    transform: scale(105%);
}

img {
    transition: 0.5s ease;
}

