* {
    box-sizing: border-box;
}
Body{
    background-color: hsl(0, 0%, 0%);
    margin: 0px;
    height: 100%; 
    overflow-x: hidden;   
}
.background{
    width: 100%;
    height: 100vh;
    background-image: url(images/Kamogelo.jpg);
    background-size: cover;
    background-position: center;
    animation-name: fadeIn;
    animation-duration: 2s;
}
.light-mode{
    background-color: white;
}
header{
    padding: 25px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
#logo img{
    height: 1.3em;
}
#logo img:hover{
    filter: drop-shadow(0 0 1em rgb(0, 38, 255));
}
.hamburger{
    display: none;
    cursor: pointer;
}
.navbuttons{
    list-style-type: none;
    display: flex;
    gap: 20px;
    text-decoration: none;
}
.navbuttons a{
    padding: 5px 5px;
    text-decoration: none;
    font: 1em arial;
    color: hsl(0, 0%, 90%);
    display: flex;
    transition: background-color 1.2s ease;
    position: relative;
}
.navbuttons a::after{
    content: '';
    height: 3px;
    width: 0%;
    background: hsl(247, 100%, 50%);
    position: absolute;
    left: 0;
    bottom: -5px;
}
.navbuttons a:hover::after{
    width: 100%;
    transition: 0.7s;
}
.navbuttons a.active{ 
    background-color: hsl(247, 100%, 27%);
    color: hsl(247, 100%, 27%);
}
#hi{
    font: 1em monospace;
    color: hsl(0, 0%, 72%);
    margin-bottom: 0%;
}
#h1intro{ 
    display: inline;
    color: hsl(0, 0%, 100%);
    font: 2em Tahoma;
    font-weight: bold;
    margin-bottom: 1%;
}
i{
    display: inline;
    color: hsl(247, 100%, 50%);
    font-style: italic;
}
#job{
    font-family:PlayfairDisplay-Italic;
    color: hsl(247, 100%, 50%);
    font-size: 1.5rem;
    margin-top: 0%;
}
.bodytext{
    color: hsl(0, 0%, 100%);
    font-family: 'Courier New', Courier, monospace;
    margin: 5% 4%;
    width: 30%;
    display: flex; 
    flex-direction: column;
    float: left;
}
.bodytext a{
    text-decoration: none;
}
#icons{
    cursor: pointer;
    margin-top: 24%;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
    width: max-content;
    animation-name: slideIn;
    animation-duration: 1.5s;
}
#icons a{
    animation-name: glow;
    animation-duration: 1.5s;
}
#icons a:hover{
    filter: drop-shadow(0px 0px 5px hsl(233, 100%, 50%));
}
#cv{
    color: hsl(247, 100%, 50%);
    background-color: hsl(0, 0%, 0%);
    border: 1px solid hsl(247, 100%, 50%);
    border-radius: 5px;
    display: inline;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 10px;
    text-align: center;
}
#cv:hover{
    background-color: hsl(0, 0%, 10%);
}
#cv img{
    margin-top: 4%;
}
.bodytext2{
    width: 30%;
    height: max-content;
    float: right;
    margin: 8% 4%; 
    color: hsl(0, 0%, 100%);
    display: flex;
    flex-direction: column;
    align-items: self-end;
    text-align: end;
}
.bodytext2 button{
    border: 1px solid black;
    padding: 10px 30px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 12px;
}
.bodytext2 button::after{
    content: "";
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: hsl(247, 100%, 50%);
    top: 0;
    left: 0;
    border-radius: 10px;
}
.bodytext2 button::before{
    content: "";
    background: linear-gradient(
        45deg,
        red, orange, yellow, green, 
        aqua, blue, indigo, violet, red
    );
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 600%;
    z-index: -1;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    filter: blur(8px);
    animation: glowing 20s linear infinite;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
    opacity: 0.4;
}
.bodytext2 button:hover::before{
    opacity: 1;
}
.bodytext2 button:active:after{
    background: transparent;
}
#contactbutton a{
    text-decoration: none;
    color: hsl(0, 0%, 100%);
    font: 1em arial;
    font-weight: bold;
}
#contactbutton a:active{
    color: hsl(0, 0%, 0%);
}
#summary{
    font: 1em;
    font-family: 'Franklin Gothic Medium';
    font-weight: bold;
    color: hsl(0, 0%, 100%);
}
#bckgrdFooter{
    text-align: right;
    color: hsl(0, 0%, 56%);
    font-family: monospace;
    bottom: 0em;
    position: absolute;
    width: 100%;
}
#bckgrdFooter div{
    padding-right: 1%;
}
#bckgrdFooter img{
    height: 1em;
}
footer{
    text-align: right;
    padding-right: 40px;
    color: hsl(0, 0%, 56%);
    font: monospace;
    bottom: 0px;
}
#footerLogo img{
    height: 1em;
}
#b-bodycontainer{
    display: flex;
    flex-direction: column;
    row-gap: 40px;
    flex-wrap: wrap; 
    animation: fadeIn;
    animation-duration: 3s;
    margin-bottom: 10%;
}
#biohead{
    color: hsl(0, 0%, 100%);
    font: 1.5em times;
    text-align: center;
}
#biop{
    color: hsl(0, 0%, 72%);
    font-size: 1em;
    font-family: arial;
    text-align: justify;
    align-items: start;
    margin: 2% 2%;
}
#p-bodycontainer{
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn;
    animation-duration: 3s;
}
#p-bodycontainer h2{
    font: 1.5em Times;
}
.scroll-wrapper {
    width: 100%;
    padding: 1rem;
}

#cardcontainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin: auto;
}
#cardcontainer a{
    text-decoration: none;
}
.card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(10px);

    transition: all 0.3s ease;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 THIS FIXES EVERYTHING */
}
/* On hover, reveal full image */
.card:hover .card-image img {
    transform: scale(1.06);
}
  /* Content Section */
.card-content {
    padding: 15px;
}

.card-content h3 {
    margin-bottom: 8px;
    color: #fff;
}

.card-content .description {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 10px;
}

.card-content .technologies {
    font-size: 0.75rem;
    color: #888;
}
  /* Category Titles */
.categories {
    font-size: 1.5rem;
    color: #fff;
    text-align: left;
    margin-left: 1rem;
    margin-top: 2rem;
}
#s-bodycontainer{
    display: flex;
    flex-direction: column;
    row-gap: 10px;
    column-gap: 8px;
    margin-bottom: 1em;
    animation: fadeIn;
    animation-duration: 3s;
}
#s-bodycontainer h1{
    color: hsl(0, 0%, 100%);
    font: 1.5em times italic;
    text-decoration: dotted;
    display: flex;
    justify-content: center;
}
#s-bodycontainer h2{
    color: hsl(247, 100%, 50%);
    font: 1.3em sans-serif;
    padding-left: 1.5%;
    margin-bottom: 2%;
    content: '';
    height: 1px;
    width: 100%;
    background: hsl(247, 100%, 50%);
    left: 0;
    top: 0px;
    bottom: -5px;
}
#s-bodycontainer div{
    display: flex;
    justify-content: center;
    flex-direction: row;
    column-gap: 100px;
}
#s-bodycontainer div img{
    height: 60px;
    animation-name: fadeIn, slideIn;
    animation-duration: 2s;
    
}
#tools{
    margin-bottom: 20px;
}
#c-bodycontainer{
    display: flex;
    flex-direction: column;
    row-gap: 20px;
    align-items: center;
    animation: fadeIn;
    animation-duration: 3s;
    height: 68vh;
    margin-bottom: 30px;
}
#c-bodycontainer h1{
    color: hsl(0, 0%, 100%);
    font: 1.9em times;
}
#c-bodycontainer a{
    text-decoration: none;
    font: 0.8em sans-serif;
    color: hsl(0, 100%, 100%);
}
#c-bodycontainer a:hover{
    color: hsl(0, 0%, 72%);
}
#c-bodycontainer a:visited{
    color: hsl(244, 100%, 62%);
}


@keyframes fadeIn{
    from {opacity: 0.2;}
    to {opacity: 1;}
}
@keyframes slideIn{
    from {transform: translate(-350%);}
}
@keyframes glow{
    40%{box-shadow: -20px 0px 15px hsla(247, 100%, 50%, 0.507);}
}
@keyframes glowing{
    0% {background-position: 0 0;}
    50% {background-position: 400% 0;}
    100% {background-position: 0 0;}
}

@media screen and (max-width : 800px){

header{
    justify-content: space-between;
}
#logo img{
    height: 1em;
}
.navbuttons{
    display: none;
    flex-direction: column;
    background-color: hsl(0, 0%, 15%);
    position: absolute;
    top: 50px;
    right: 15px;
    padding: 10px;
    border-radius: 5px;
    z-index: 1;
}
nav div{
    transform: scale(1.3);
}
.navbuttons.active{
    display: flex;
}
.hamburger{
    display: block;
    color: hsl(0, 0%, 45%);
    position: relative;
    top: -0.2em;
}
#cv{
    display: none;
}
.bodytext{
    height: 10%;
}
.bodytext2{
    text-align: right;
    align-items: end;
}
#summary{
    display: none;
}
.bodytext2 button{
    padding: 8px 10px;
}
#contactbutton{
    margin-top: 10%;
}
#contactbutton a{
    font: 0.9em arial;
    font-weight: bold;
}
.background footer{
    position: fixed;
}
#biop{
    font: 0.8em arial;
    margin: 0% 5%;
}
.card {
        width: 100%;
        min-width: unset;
}
.card:hover {
    transform: translateY(-8px);
    z-index: 10;
}
.card-image img {
        height: 120px;
}
#cardcontainer {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        padding: 0 10px; /* prevents edge overflow */
}
.description {
    font-size: 0.85em;
}
.technologies {
    font-size: 0.75em;
}
#s-bodycontainer{
    row-gap: 10px;
    column-gap: 5px;
}
#s-bodycontainer h2{
    margin-bottom: 6%;
    transition: ease-in;
    font: 1em;
}
#s-bodycontainer div{
    column-gap: 10px;
}
#s-bodycontainer div img{
    height: 40px;
    animation-name: fadeIn, slideIn;
    animation-duration: 2s;
    
}
#c-bodycontainer h2{
    font: 0.9em arial;
}
}
