html {
    scroll-behavior: smooth;
    color: #C5C6C7;
}

#home {
    position: relative;
    height: 100vh;
    width: 100%;
    background: 
        linear-gradient(to bottom, rgba(0,0,0,0) 50%, #111 100%),
        url('../images/mercedes-w15.jpg') center/cover no-repeat;
    background-size: cover;
    background-position: center;
}

html, body {
   
    height: 100%;
    margin: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.navbar {
    font-family: 'Montserrat', sans-serif;
    background-color:#101519;
    background: rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    font-size: 25px;
    display: flex;
    justify-content: left;      
    position: absolute;
    flex-direction: column;
    width: 220px;
    height: 100vh;
    padding: 20px;                
    z-index: 10;                      
    position: fixed; 
}

.navbar a {
    display: inline-block;
    margin: 45px 15px;
    color: #C5C6C7;
    text-decoration: none;
    font-weight: 550;
}

.navbar a:hover {
    color: crimson;
    text-shadow: 0 0 10px crimson, 0 0 20px crimson;
    background-color: none;
}

.navbar a.active {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.home-content {
    font-family: 'Syne', sans-serif;
    position: absolute;
    top: 28%;                 
    right: 50px;              
    transform: translateY(-50%); 
    text-align: right;       
    color: #C5C6C7;
}

.home-content h1 {
   
    font-size: 75px;
    margin-right: 50px;
}

.home-content h3 {
   
    margin-right: 55px;
    font-size: 18px;
}

#about {
    position: relative;
    background-size: cover;
    background-position: center;
    width: 100%;
    min-height: 100vh;
    overflow: hidden; 
    background-color: #101519; 
}

#about::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/mercedeshamilton.jpg') center/cover no-repeat;
    filter: blur(12px);     
    opacity: 0.6;               
    z-index: 0;                 
}

.about-flex {
    display: flex;
    justify-content: space-between;  
    align-items: flex-start;
    gap: 50px;
    flex-wrap: wrap; 
}

.about-content {
    margin-top: 8%;
    padding-left: 20%;
    max-width: 950px;
    line-height: 1.6;
    letter-spacing: 2px;
}

.about-content h2 {
    font-family: 'Syne', sans-serif;
    font-size: 36px;
    margin-bottom: 20px;
}

.about-content p{
    font-family: 'Montserrat', sans-serif;
    position: relative;
    font-size: 20px;
}

.about-photo img {
    width: 500px; 
    max-width: 100%;
    align-self: flex-end;
    margin-top: 35%;
    height: auto;
    display: block;
    margin-right: 90px;
}

.about-content, .about-photo {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.about-content.active, .about-photo.active {
    opacity: 1;
    transform: translateY(0);
}

#portfolio {
    padding-top: 10%;
    background-color: #101519;
    background: -moz-linear-gradient(50px);
    background-position: center;
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

#portfolio::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/Bahrain_Wallpaper_6.webp') center/cover no-repeat;
    filter: blur(15px);             
    opacity: 0.6;          
    z-index: 0;                    
}

.portfolio-flex {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    gap: 20px;
    flex-wrap: wrap;
}

.portfolio-content {
    padding-left: 20%;
    max-width: 950px;
    line-height: 1.6;
    letter-spacing: 2px;
}

#portfolio h2 {
    font-family: 'Syne', sans-serif;
    font-size: 36px;
    margin-bottom: 20px;
}

#portfolio p{
    font-family: 'Montserrat', sans-serif;
    position: relative;
    font-size: 20px;
}

.portfolio-image img {
    width: 700px; 
    max-width: 100%;
    align-self: flex-end;
    height: auto;
    display: block;
    margin-right: 90px;   
}

.portfolio-image a img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-image a img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

.portfolio-content, .portfolio-image {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.portfolio-content.active, .portfolio-image.active {
    opacity: 1;
    transform: translateY(0);
}

#contact {
    padding-top: 14%;
    background-color: #101519;
    background: -moz-linear-gradient(50px);
    background-position: center;
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.contact-content h2{
    font-family: 'Syne', sans-serif;
    font-size: 50px;
    margin-bottom: 20px;
}

.contact-content p{
    font-family: 'Montserrat', sans-serif;
    position: relative;
    font-size: 30px;
}

.contact-content a{
    font-size: 30px;
}

.contact-links a {
    color: #00ffff;
    text-decoration: none;
    font-size: 24px;
    margin-right: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-links a:hover {
    color: crimson;
    text-shadow: 0 0 10px crimson, 0 0 20px crimson;
    background-color: none;
}

.contact-content {
    padding-left: 20%;
    max-width: 950px;
    line-height: 1.6;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.contact-content.active {
    opacity: 1;
    transform: translateY(0);
}

#contact::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/blacknwhite.jpg') center/cover no-repeat;
    filter: blur(15px);             
    opacity: 0.6;          
    z-index: 0;                    
}

#home::before,
#about::before,
#portfolio::before,
#contact::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    opacity: 0.6;
    z-index: 0;  /* FIX: keep behind content */
}

.home-content,
.about-content,
.about-photo,
.portfolio-content,
.portfolio-image,
.contact-content {
    position: relative;
    z-index: 1;
    
    
}   
   
.home-content.active,
.about-content.active,
.about-photo.active,
.portfolio-content.active,
.portfolio-image.active,
.contact-content.active {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .about-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .portfolio-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.about-flex,
.portfolio-flex {
    display: flex;
    justify-content: space-between; /* text on left, image on right */
    align-items: flex-start;
    gap: 50px; 
    flex-wrap: nowrap; /* prevent wrapping to new line */
}
