/* Basic Reset & Body Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --black: #000;
    --nearblack: #333;
    --nearblack2: #555;
    --shadowblack: rgba(0,0,0,0.1);
    --transpblack: rgba(0, 0, 0, 0.7);
    --nearwhite: #f4f4f4;
    --nearwhite2: #e9ecef;
    --white: #fff;
    --grey: #ddd;
    --grey2: #6c757d;
    --grey3: #5a6268;
    --grey4: #e0e0e0;
    --darkgrey: #495057;
    --blue: #007bff;
    --darkblue: #0056b3;
}

@view-transition {
    navigation: auto;
}

body, a{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--black);
    font-size: 19px;
}

.content-before-footer{
    /* Allows this container to grow and fill space, pushing footer down */
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
}

/* .white-space{
    flex-grow: 1; 
} */

p{
    margin-bottom: 10px;
    font-size: 19px;
}
p.legal, p.legal a{
    font-size: 14px;
    font-style: italic;
}

h1{
    font-size: 28px;
}
h2{
    font-size: 25px;
}
h3{
    font-size: 19px;
}

body{
    background-color: var(--nearwhite);
    display: flex;
    flex-direction: column;
    /* min-height: 100vh; */
}

a.link{
    text-decoration: none;
    color: var(--blue);
    font-weight: bold;
}

a.link:hover{
    text-decoration: underline;
}

/* Navigation */
header{
    background: var(--nearwhite);
    color: var(--white);
    padding: 0rem 0 0rem 0;
    border-top:20px solid var(--black);
}

header ul.nav a.active{
    position: relative
}

header ul.nav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: -20px;
  width: 20px;
  height: 20px;
  /* The trick: transparent background with a box-shadow or border */
  background: transparent;
border-top-right-radius: 50%; /* Create the curve shape */
box-shadow: 10px -1px 0 0 var(--black); /* The shadow acts as the fill matching the button color */
}

header ul.nav a.active::after {
    content: "";
    position: absolute;
    top: 0;
    right: -20px; /* Move to the right of the button */
    height: 20px;
    width: 20px;
    background: transparent;
    border-top-left-radius: 50%; /* Create the curve shape */
    box-shadow: -10px -1px 0 0 var(--black); /* The shadow acts as the fill matching the button color */
}

footer{
    background: var(--black);
    color: var(--white);
    padding: 0.7rem 0;
    margin: 0;
    display:block;
    width: 100%;
}



ul.nav, ul.links {
    list-style: none;
    display: flex;
    justify-content: center; /* Center navigation items */
    padding: 0 2rem; /* Add some padding on the sides */
}
/* ul.nav{
    overflow: hidden;
} */
ul.nav a{
    font-weight:bold;
}


ul.links{
    margin-top: 35px;
    margin-bottom: 20px;
    gap: 15px;
}

ul.nav li {
    margin: 0 5%;
}

ul.nav li a {
    text-decoration: none;
    padding: 5px 15px;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    display: inline-block;
}

header ul.nav li a{
    border-radius: 0 0 4px 4px;
}

footer a{
    color: var(--white);
}

ul.nav a.active { /* Style for the current page link */
    background-color: var(--black);
    color: var(--white);
    pointer-events: none;
}



footer ul.nav a.active{
    background-color: var(--white);
    color: var(--black);
}

/* ul.links li:not(:last-child)::after {
    content: "|"; 
    margin: 0 10px;
    color: var(--white);
} */



/* Main Content Area */
main {
    /* max-width: 1100px;*/
    margin: 1.5rem auto 0rem auto; /* Center content and add top/bottom margin */
    background-color: var(--nearwhite);
    padding: 2rem 2rem;
    border-radius: 0px 0px 0px 0px;
    /* margin: 0px; */
    padding: 0px;
}

html.animate-transition main.home {
    animation: fadeInLeft 0.5s ease-out;
}

html.animate-transition main.projects {
    animation: fadeInRight 0.5s ease-out;
}

html.animate-transition header{
    animation: slideDown 0.5s ease-in forwards;
}

.btn.middled{
    display:block;
    width: fit-content;
    margin: 20px auto 0 auto;
}

@keyframes slideDown{
    from{
        transform: translateY(-20px);
    }
    to{
        transform: translate(0);
    }
}


@keyframes fadeInLeft {
    from {
        opacity: 1;
        transform: translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInRight{
    from {
        opacity: 1;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }    
}


main h1{
    text-align: center;
    margin-bottom: 1rem;
    color: var(--black);
}

main .btn{
    display: inline-block;
    color: var(--white);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-right: 10px; /* Space between buttons */
    background-color: var(--black);
}

.btn:hover:not(.active) {
    background-color: var(--nearblack2);
}


.card-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    flex-direction:column;
    align-items:center;
    margin-bottom: 30px;
    /* margin-right: 30px;
    margin-left: 30px; */
    margin-right: 0px;
    margin-left: 0px;
}


/* Project card */
.card{
    background-color: var(--white);
    width: 100%;
    color: var(--black);
    display: block;
    /* height: 300px; */
    overflow:hidden;
    padding: 2rem;
    box-shadow: 0 2px 5px var(--shadowblack);
    margin-bottom: 0rem;
}

.projects .card{
    min-height: 300px;
}

.card-contents{
    margin-top: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}

/* Card title */
.card h2{
    color: var(--black);
    text-align:left;
    padding-top:0px;
    margin-top:0px;
    margin-bottom: 5px;
}

/* Card description */
li p{
    text-overflow: ellipsis;
}

.home-image{
    height: 400px;
    float:right;
    border-radius: 10px;
    object-fit: contain;
    margin-left: 20px;
    margin-bottom: 10px;
}

/* splide */
.splide{
    width: 50%;
    height: 300px;
    float:right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.splide.bigger{
    height: 500px;
}

.splide__track, .splide__list, .splide__slide {
    height: 100%;
}

.splide__slide img {
    margin:0px;
    padding:0px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 5px 5px 0; /* Optional: rounds the right corners to match card */
}

.splide__slide {
    position: relative; /* Establishes a positioning context */
}

.splide__slide p {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--transpblack); /* Dark see-through background */
    color: var(--white);
    padding: 5px 10px;
    margin: 0;
    font-size: 0.85rem;
}


/*Responsive Adjustments */
@media (min-width: 769px) {
    .mobile{
        display: none;
    }
}
@media (max-width: 1100px) {
    .splide{
        width: 100%;
    }
}
@media (max-width: 768px) {
    .splide.bigger{
        height: 300px;
    }
    .desktop{
        display:none;
    }
    .home-image {
        display: none;
    }

    /* .card-list {
        margin-left: 0;
        margin-right: 0;
    } */

    .card{
        /* border-radius: 0px 0px 0px 0px; */
        padding: 0.9rem;
    }
}