/* ---------- */
/* EVERYWHERE */
/* ---------- */


 /* a {border: solid rgb(255, 0, 221) 2px; }
div {border: solid rgb(255, 0, 221) 2px; } 
main {border: solid rgb(255, 0, 221) 2px; } */


div {
    overflow: hidden;
  }

.index-main-title h1, .index-main-title h2, .index-main-showcase-textbox p{
    margin: 0;
}





:root {
    /* Default colours*/    
    --background: #f0e5d8; 
    /* background: #6e7266;*/
    --header: #293535;    
    --text: rgb(56, 56, 61);
    --text-hover: rgba(56, 56, 61, 0.8);
    --alternate-text: white;
    --header-button: #e7d8c9;
    --header-light: #879183;
    --showcase-box: #f5efe9;
    --showcase-box-element: rgba(200,200,200, 0.3);
    --showcase-box-element-hover: rgba(150,150,150, 0.3);
}

html.dark-mode {
    /* Dark mode overrides */
    --background: #6e7266;
    --header: #293535;    
    --text: #2e2e2e;
    --text-hover: rgba(46,46,46,0.8);
    --alternate-text: white;
    --header-button: #e7d8c9;
    --header-light: #5e6a5e;
    --showcase-box: #a9a69b;
    --showcase-box-element: rgba(160,160,160,0.3);
    --showcase-box-element-hover: rgba(120,120,120,0.3);
}


::selection {
    background-color: #8f958f;
    color: var(--header);
}

body {
    background-color: var(--background);
    color: var(--text);
    display: flex;
    flex-direction: column; 
    font-family: sans-serif;
    margin: 0;
    min-height: 100vh;
    transition: background-color 0.3s, border-color 0.3s;
    
}



main {
    display: flex; /* Make the main a flex container */
    flex: 1; /* Allow main to grow and fill available space */
    flex-direction: column; /* Ensure content flows vertically */
}



/* ------ */
/* HEADER */
/* ------ */

header {
    background-color: var(--header);
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 1vmin;
    gap: 1vmin;
    transition: background-color 0.3s, border-color 0.3s;
    box-sizing: border-box;
    /* height: 6vmin; */
    min-height: 6vmin;
    height: 6vmin;
    box-shadow: 0 1vmin 2vmin rgba(0, 0, 0, 0.3);
}



/* Link to social Buttons */
.header-logo {
    align-items: center;
    color: inherit;
    display: flex;
    padding: 1vmin;
    gap: 5%;
    border-radius: 1vmin;
    transition: background-color 0.3s, border-color 0.3s;
    text-decoration: none;

    
}

.header-logo img {
    height: 3.5vmin;
    width: auto;
}

.header-logo:hover {
    background-color: var(--header-light);
    text-decoration: none;
}

.header-logo-text {
    font-weight: 500;
    color: var(--alternate-text);
    font-style: normal;
    text-decoration: none;
    font-size: 2vmin;
}

.header-box{
    display: flex;
    align-items: center;
    gap: 2vmin;
    justify-content: flex-start;
    max-width: 90%;
    padding: 0.75vmin;

}

/* Header Buttons (Light and dark) */
.header-button {
    background-color: var(--header); 
    border: 0.3vmin solid var(--header-light); 
    border-radius: 20%;

    height: 4vmin;
    width: 4vmin;

    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
    padding: 0.2vmin;
    flex-shrink: 0;
    
}

.header-button:hover {
    background-color: var(--header-light);
    cursor: pointer;
    flex-shrink: 0
}

.header-button i {
    color: var(--header-button);
    font-size: 2.25vmin;
}


@media only screen and (max-width: 720px) {
    header {
        min-height: 12vmin;
    }
    .header-logo img {
        height: 5vmin;
        width: auto;
    }
    .header-button {
        height: 5vmin;
        width: 5vmin;
    }
    .header-button i {
        font-size: 3vmin;
    }
    .header-logo-text {
        font-size: 2.6vmin;
    }
    .header-box {
        gap: 1.5vmin;
    }

}


/* ------ */
/* FOOTER */
/* ------ */

footer {
    background-color: var(--header);
    border-top: 0.1vmin solid var(--text);
    color: var(--header-light);
    display: flex;
    gap: 3vmin;
    justify-content: center;
    padding: 1.5vmin;
    transition: background-color 0.3s, border-color 0.3s;
    box-sizing: border-box;
    height:6vmin;
    align-items: center;
    margin: 5vmin auto auto auto;

    /* For a sticky footer */
    /* position: fixed;
    bottom: 0;
    width: 100%; */  
}

/* Footer text */
footer i {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2vmin;
}

footer a {
    color: inherit;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center; 
    font-size: 2vmin;
}

footer a:hover {
    text-decoration: underline;
}

/* Footer icon */
.footer-leaf {
    position: absolute;
    margin-left: 96%; /* Push the image to the far right */

    height: 5vmin;
    width: auto;

  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  -webkit-animation-timing-function: ease-in-out;
  animation-timing-function: ease-in-out
}

.footer-leaf:hover {
    cursor: pointer;
    animation-name: bounce;
    -moz-animation-name: bounce;
}

@media only screen and (max-width: 720px) {
    .footer-leaf {
        display: none;
    }
}

/* ---------- */
/* ANIMATIONS */
/* ---------- */

@keyframes bounce {
	0%, 100%, 20%, 50%, 80% {
		-webkit-transform: translateY(0);
		-ms-transform:     translateY(0);
		transform:         translateY(0)
	}
	40% {
		-webkit-transform: translateY(-1vmin);
		-ms-transform:     translateY(-1vmin);
		transform:         translateY(-1vmin)
	}
	60% {
		-webkit-transform: translateY(-0.5vmin);
		-ms-transform:     translateY(-0.5vmin);
		transform:         translateY(-0.5vmin)
	}
}

.fadeInBottom {animation-name: fadeInBottom;}
@keyframes fadeInBottom {
    from {
        opacity: 0;
        transform: translateY(2vmin);
    }
    to { opacity: 1;
         transform: translateY(0px);
    }
}

.smallFadeInBottom {animation-name: smallFadeInBottom;}
@keyframes smallFadeInBottom {
    from {
        opacity: 0;
        transform: translateY(1vmin);
    }
    to { opacity: 1;
         transform: translateY(0px);
    }
}


/* ----- */
/* INDEX */
/* ----- */
.index-main-title {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin: 5vmin auto auto;
    transition: background-color 0.3s, border-color 0.3s;
    height: 45vmin;
    width: 45vmax;
    position: relative;
    justify-content: center;
    align-items: center;
    overflow: visible;

    min-width: 75vmin;
    min-height: 20vmax; 

    max-width: 80vmin;
    max-height: 40vmax;
}


  

.index-main-title img {
    border-radius: 2vmin;
    height: 100%;
    width: 100%;

    min-width: 35vw;
    
    object-fit: cover; /* Ensures the image covers the container */
    z-index: 1;
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.25);
    position: absolute;

    background-color: var(--showcase-box-element);

    animation-duration: 1.5s;
    animation-fill-mode: both;
}

.index-main-title-textbox {
    background-color: rgba(83, 83, 83, 0.8);
    backdrop-filter: blur(0.2vmin); /* Blur effect */
    z-index: 2; /* Ensures the text appears above the image */
    color: var(--alternate-text);
    border-radius: 2vmin;
    padding: 1.5vmin;
    text-align: left;
    font-size: 2vmin;
 

    width: 80%;
    
    min-height: 35vmin;
    height: auto;
  
    position: absolute;
    left: 30%;
    color: var(--alternate-text);
    transition: background-color 0.3s, box-shadow 0.3s ease-in-out;
    

    animation-duration: 1.2s;
    animation-fill-mode: both;
    animation-delay: 0.3s;
}

@media screen and (max-width: 720px) {
    .index-main-title-textbox {
        max-width: 75%;
        

    }
    .index-main-title {
        left: -2.5%;
    }
  }


.index-main-title-textbox:hover {
    background-color: rgba(83, 83, 83, 0.9);
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.5);
}






/* -------------- */
/* INDEX SHOWCASE */
/* -------------- */

/* Main container for projects to go in (only here to fix bug with keyframes) */

.project-container-1, .project-container-2, .project-container-3, .project-container-4, .project-container-5, .project-container-6 {
    animation-duration: 1.2s;
    animation-fill-mode: both;
    overflow: visible;
}

.project-container-1 {
    margin-top: 5vmin; 
    animation-delay: 1s;
}

.project-container-2 {
    animation-delay: 1.4s;
}

.project-container-3 {
    animation-delay: 1.6s;
}

.project-container-4 {
    animation-delay: 1.8s;
}

.project-container-5 {
    animation-delay: 2s;
}

.project-container-6 {
    animation-delay: 2.2s;
}

/* Main container for the project showcase */
.index-main-showcase-unfinished, .index-main-showcase {
    display: grid;
    grid-template-columns: 35vmin auto; 



    min-height: 35vmin;
    height: auto; 
    width: 75vmax; 
    margin: 2vmin auto; 

    position: relative;
    

    border-radius: 2vmin; 

    grid-template-rows: 0.25fr 1.75fr;
    transition: background-color 0.3s, box-shadow 0.1s, transform 0.1s ease-in-out;

    max-width: 90%;
}

.index-main-showcase {
    background-color: var(--showcase-box);
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.25); 
}

.index-main-showcase-unfinished {
    background-color: var(--showcase-box-element-hover);
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.15); 
}



.index-main-showcase:hover {
    background-color: var(--showcase-box-element-hover);
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.5); 
    cursor: pointer;
}

.index-main-showcase:active {
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.25);
    transform: translateY(1vmin); 

}

.index-main-showcase-title {
    grid-column: 2; /* Take the second column */
    grid-row: 1; /* Only the first row */
    font-size: 1.5vmax; 

    font-weight: 600;
    display: flex;
    align-items: center; /* Center the title vertically */
    justify-content: center; /* Center the title horizontally */
    width: 100%;
    height: 100%;
    text-decoration: underline;
}

/* Textbox for project info, taking up the bottom-right row */
.index-main-showcase-textbox {
    color: var(--text);
    grid-column: 2;
    grid-row: 2; 
    align-items: top; 
    justify-content: left; 
    font-size: 1.75vmin; 

    border-radius: 2vmin; 

    margin: 1vmin; 

    padding: 1vmin; 

    background-color: var(--showcase-box-element);
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.1); 

}

.unfinished-project-warning{
    position: absolute;
    left: 96%;
    top: 3%;

    width: 2.5%;
    height: auto;
    
}



/* --------------- */
/* SLIDE CONTAINER */
/* --------------- */

.static-container {  /* Static version of below for inactive projects */
    grid-column: 1 / 2;
    grid-row: 1 / 4;

    height: 100%;
    width: 100%;
    position: relative; 
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/* Slide container to contain image and textbox */
.slide-container {
    grid-column: 1 / 2; 
    grid-row: 1 / 4; 

    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    

}

/* Top sliding box */
/* Container for the image */
.slide-container-image {
    display: flex;
    align-items: center;  /* Vertically center */
    justify-content: center; /* Horizontally center */
    
    width: 90%;
    height: auto;
    border-radius: 2vmin;
    margin: 1vmin;
    padding: 1vmin;

    justify-self: center;
    align-self: center;
    
    background-color: var(--showcase-box-element);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: top 0.5s ease-in-out; /* Smooth transition */
}

/* Image itself */
.slide-container-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Keeps the aspect ratio */
    border-radius: 2vmin;
}


/* Bottom sliding box */
.slide-container .slide-container-info {
    position: absolute;
    bottom: -100%; /* Initially hidden out of view */
    left: 0;
    right: 0;
    background-color: var(--showcase-box-element);
    text-align: center;
    transition: bottom 0.5s ease-in-out; 
}

.slide-container:hover .slide-container-image {
    top: -100%; /* Slide the image out of the container */
}

.slide-container:hover .slide-container-info {
    bottom: 0; /* Slide the text div into view */
}

.slide-container-info {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 2fr;
    grid-template-rows: repeat(4, 1fr);
    background-color: rgba(83, 83, 83, 0.2);
    margin: 2.5% 2.5% 2.5% 2.5%;
    padding: 2.5% 2.5% 2.5% 2.5%;
    width: 90%;
    height: 90%;
    border-radius: 2vmin; 

}

/* Icons and names of software used */
.slide-container-info-image-left, .slide-container-info-image-right {
    width: 85%;
    height: auto;
    justify-self: center; 
    align-self: center;
}

.slide-container-info-text-left, .slide-container-info-text-right {
    text-align: left; 
    align-self: center; 
    padding: 0px 0.5vmin; 

    font-size: 1.75vmin; 

    font-weight: 600;
    color: var(--text);
}

.slide-container-info-image-left {
    grid-column: 1;
}

.slide-container-info-text-left {
    grid-column: 2;
}

.slide-container-info-image-right {
    grid-column: 3;
}

.slide-container-info-text-right {
    grid-column: 4;
}

/* ------------- */
/* Project Pages */
/* ------------- */



.github-card-container{

    animation-duration: 1s;
    animation-delay: 1s;
    animation-fill-mode: both;
    overflow: visible;
    display: flex;

    position: absolute;
    right: 1vmin;
    top: 7vmin;


}

.github-card {
    background-color: var(--showcase-box);

    border-radius: 1.5vmin;
    padding: 1vmin;
    position: relative;
    min-width: 15vw;


    max-height: 15vmin;
    max-width: 35vw;
    

    box-shadow: 0 0.2vmin 1vmin rgba(10, 10, 10, 0.15);

    transition: background-color 0.3s, box-shadow 0.1s, transform 0.1s ease-in-out;
    cursor: pointer;
}

.github-card:hover {
    background-color: var(--showcase-box-element-hover);
    box-shadow: 0 0.1vmin 1vmin rgba(10, 10, 10, 0.1);
    
}

.github-card:active {
    transform: translateY(1vmin); 
    box-shadow: 0 0.1vmin 1vmin rgba(10, 10, 10, 0.05);
}

@media screen and (max-width: 720px) {
    .github-card-container {
        top: 13vmin;
    }
    
}

.card-header {
    display: flex;
    align-items: center; 
    margin: auto auto 1vmin auto;
}

.github-card-img {
    border-radius: 50%;
    width: 6vmin;
    height: auto;
    margin-right: 1vmin;
}

.text-container {
    display: flex;
    flex-direction: column;
}

.github-card h3 {
    color: var(--header-light);
    margin: 0; 
    font-size: 1.75vmin;
}

.github-card h2 {
    color: var(--header-light);
    text-decoration: none;
    margin: 0; 
    font-size: 3vmin;
    
}


.github-card p {
    margin: 0; 
    font-size: 2vmin; 
    text-align: left;
}


.github-card a:hover {
    text-decoration: underline;
}

.github-card .description {
    font-size: 1.5vmin;
    margin-bottom: 1vmin;
}

.github-card .stats{
    display: flex;
    justify-content: space-between;
    gap: 1vmin;
    font-size: 1.5vmin;
}

.languages{
    justify-content: left;
    gap: 1vmin;
    font-size: 1.5vmin;
}


.github-card .stat-item {
    display: flex;
    align-items: center;
    gap: 1vmin;
}


.github-card-icon{
    position: absolute;
    right: 0.5vmin;
    top: 0.5vmin;

    height: 20%;
    width: auto;
}



/* Project Page */
.project-title {
    font-size: 5vmin;
    font-weight: 600; 
    text-align: center;
    margin: 13vh auto 0px auto;

    animation-duration: 1s;
    animation-fill-mode: both;
    overflow: visible;
}

.project-textbox {
    color: var(--text);
    display: flex; /* Add flex display */
    flex-direction: column; /* Align items vertically */
    align-items: flex-start; /* Align content at the top */
    justify-content: flex-start; /* Align text to the left */
    font-size: 2vmin; 
    border-radius: 2vmin; 
    margin: 2vmin auto 1vmin auto; 
    padding: 1vmin; 


    width: 75vw; /* Set a flexible width */
    min-height: 20vh; /* Use min-height instead of max-height */

    background-color: var(--showcase-box);
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.1); 

    transition: box-shadow 0.2s ease-in-out;

    animation-duration: 1s;
    animation-fill-mode: both;
    overflow: visible;
}

.project-textbox:hover {
    box-shadow: 0 1vmin 2vmin rgba(10, 10, 10, 0.2);
}




/* ---------- */
/* PDF Viewer */
/* ---------- */

.pdfViewerContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80vw; 
    height: auto;
    
    margin: 5vmin auto auto; 

    animation-duration: 1s;
    animation-fill-mode: both;
    overflow: visible;

    flex: 1; /* This will allow the main content to grow and fill the available space */
}

.pdfViewer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-decoration: underline;
    font-weight: 600;
    width: 100%;
    height: auto;
    border-bottom-left-radius: 1vmin; 

    border-bottom-right-radius: 1vmin; 

    background-color: var(--background);
    overflow: hidden;
    max-height: 0; /* Collapsed initially */
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;


    /* position: relative; */ /* This might fix some issues */
}

.pdfViewer.active {
    max-height: 100vmin; 
    opacity: 1;
}




@media (max-width: 720px) { /* Adjust based on your breakpoint */
    .desktop {
        display: none; /* Hide the desktop view on mobile */
    }
}


.toggleButton {
    background-color: var(--text);
    color: var(--alternate-text);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 8vmin; 


    font-size: 3vmin;

    border-top-left-radius: 1vmin; 

    border-top-right-radius: 1vmin; 

    border-bottom-left-radius: 1vmin; 

    border-bottom-right-radius: 1vmin; 

    transition: 
    background-color 0.3s, 
    border-radius 0.3s ease-in-out 0.1s;
}

.toggleButton:hover {
    background-color: var(--text-hover);
}

.arrow {
    font-size: 2vmax; 

    position: absolute;
    margin-left: calc(80vw - 4vmax);
    transition: transform 0.3s ease;
}

.arrow.rotate {
    transform: rotate(180deg);
}


/* --------------- */
/*  Certificaitons */
/* --------------- */

.certification-container {
    margin: 5vmin auto 2vmin auto;
    justify-self: center;
    align-self: center;
    align-content: center;
    justify-content: center;
    width: 80vw;
    height: auto;
    display: flex; 
    flex-wrap: wrap; 
    gap: 1vmin; 
    overflow: visible;

    animation-duration: 1.2s;
    animation-fill-mode: both;
    animation-delay: 0.8s;
}

.card {
    width: 20vmin; 
    height: 20vmin; 
    border-radius: 2vmin;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    cursor: pointer;
    position: relative;
    transition: 0.3s ease-in-out;
    background-color: var(--showcase-box);
    box-shadow: 0 1vmin 1vmin rgba(10, 10, 10, 0.25);

}

.card:hover {
    flex-grow: 8;
    background-color: var(--showcase-box-element-hover);
}

.card > .card-content {
    display: flex;
    justify-content: center; 
    align-items: center; 
    position: relative;
    width: 100%;
    height: 100%;
    transition: 0.3s ease-in-out;
    z-index: 10;

    text-wrap: nowrap;
}

.card-content > .certification-image {
    width: 100%;
    height: 100%;
   
    display: flex;
    justify-content: center;
    align-items: center; 
    overflow: hidden;
}

.certification-image img {
    width: 95%;
    height: 95%;
    object-fit: contain; /* Ensures the image scales properly without distortion */
}

/* Title with width change effect */
.card-content > .title {
    width: 0; /* Hidden width by default */
    opacity: 0;
    transition: 0.5s ease-in-out;
    font-size: 2vmin;
    font-weight: 500;
}

.card:hover .title {
    margin-left: 1vmin;
    margin-right: 1vmin;
    opacity: 1;
    width: 100%;
}






