html {
    scroll-behavior: smooth;
}

body {
    background-image: url('assets/background.png');
    background-repeat: no-repeat;
    margin: 0;
    color: white;
    font-family: "SNPro";
    background-attachment: fixed;
}

nav {
    background-color: #152848;
    width: 85%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

section {
    scroll-margin-top: 100px;
}

.namenav {
    color: white;
    font-size: 30px;
    font-weight: bold;
    padding-left: 20px;
    margin: 0;
    text-align: center;
    display: flex;
    align-items: center;
}

.buttonnav {
    text-decoration: none;
    color: white;
    font-family: "SNPro";
    font-weight: bold;
    font-size: 18px;
    height: 100%;
    padding: 0 40px;

    position: relative;
    display: flex;            /* make button a flex container */
    align-items: center;      /* vertically center text inside */
    justify-content: center;  /* optional: center text horizontally */
    
    background-color: #152848; 
    overflow: hidden;           
    z-index: 0;
    transition: color 0.3s ease;
}


.buttonnav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8affef;   /* background color on hover */
    z-index: -1;               /* behind the text */
    transform: scaleY(0);      /* start from top */
    transform-origin: top;     /* animation starts from top */
    transition: transform 0.3s ease;
}

.buttonnav:hover::before {
    transform: scaleY(1);      /* fill from top to bottom */
}

.buttonnav:hover {
    color: black;               /* text color changes on hover */
}

.buttonnavs {
    display: flex;
    align-items: center;

    padding-right: 20px;
}

.contactnav {
    height: 100%;
    margin: 0;
    padding: 0 20px;
    border: none;
    display: flex;
    align-items: center;

    background-color: #8affef;
    color: black;
    font-family: "SNPro";
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
}

.indexbody {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 10%;
    min-height: 100vh;
}

.indexbodytitle {
    font-size: 30px;
    line-height: 0.5;
}

.indexbodycontent {
    line-height: 2.0;
    font-size: 20px;
}

.indexbodybutton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding: 20px 40px;
    font-size: 18px;
    font-family: "SNPro";
    background-color: #8affef;
    border: none;
    text-decoration: none;
    color: black;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indexbodybutton:hover {
    background-color: #6de0c7;
}

.contactnav:hover {
    background-color: #6de0c7;
}

.navimage {
    height: 24px;
    width: 24px;
    padding: 2px;
}

.indexbodybutton img {
    height: 1em;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

.projectcard {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px 35px;
    width: 80%;
    break-inside: avoid;
    margin-bottom: 20px;
}

.contactcard {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    margin-bottom: -10px;
}

.contactcard a {
    color: white;
    text-decoration: underline;
}

.projectcard p {
    padding-left: 25px;
    padding-right: 25px;
    text-align: justify;
}

#home {
    margin-top: 50px;
    margin-bottom: 100px;
}

#projects {
    margin-left: 10%;
    margin-right: 75px;
    margin-bottom: 500px;
}

#about {
    margin-left: 10%;
    margin-right: 10%;
    margin-bottom: 100px;
    text-align: justify;
}

.aboutcontent {
    margin-left: 5%;
}

.projectcont {
    column-count: 2;
    column-gap: 20px;
}

.lastcard {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.projectbutton {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
    font-family: "SNPro";
    background-color: transparent;
    border: 1px solid white;
    border-radius: 10px;
    color: white;
    text-decoration: none;
}

.projectbutton.right {
    margin-left: auto;
}

.projectcard-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

#sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background-color: #1e2d47;
    transition: right 0.3s ease;
    z-index: 2000;
    padding: 20px;
    padding: 0 30px;
    backdrop-filter: blur(6px);
}

#sidebar.active {
    right: 0;
}

#blurOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    background: rgba(0, 0, 0, 0.2);

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.3s ease;

    z-index: 1500;
}

#blurOverlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebartitle {
    font-size: 30px;
}

.sidebarcontent {
    font-size: 20px;
    line-height: 1;
    margin-right: 30px;
}

.contactcard p {
    overflow-wrap: break-word; /* Modern standard */
    word-break: break-word;  /* Ensures very long words/URLs break */
}

@font-face {
    font-family: "SNPro";
    src: url(assets/SNPro-VariableFont_wght.ttf);
}