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

:root {
    --primary-bg-color: #addbee;
    --secondary-bg-color: #00BFFF;
    --primary-text-color: #333333;
    --heading-color: #ffffff;
    --accent-color: #ffd900; 
    --button-bg-color: #FFD700;
    --button-hover-bg-color: #FFA500;
    --nav-bg-color: #1E90FF;
    --link-hover-color: #ff5e00;
    --section-card-bg: #ADD8E6;

    --font-size-base: 16px;
    --heading-font: 'Windsor Elongated', sans-serif;
    --body-font: 'Windsor', sans-serif;
    --h1-font: 'MAROLA', sans-serif;

    --border-radius: 10px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-duration: 0.3s;
    --font-size-lg: 3em;
    --font-size-md: 1.8em;
    --font-size-sm: 1.3em;
}

@font-face {
    font-family: 'MAROLA';
    font-style: normal;
    font-weight: 100;
    src: url(fonts/MAROLA__.TTF) format('woff2');
}
@font-face {
    font-family: 'Windsor';
    font-style: normal;
    font-weight: normal;
    src: url(fonts/windsor-pro-cufonfonts/WindsorProRg.TTF) format('truetype');
}

@font-face{
    font-family: 'Windsor Elongated';
    font-style: normal;
    font-weight: 700;
    src: url(fonts/windsor-pro-cufonfonts/WindsorProElongated.TTF) format('truetype');
}


html {
    font-size: var(--font-size-base);
}

html,
input,
select,
button {
    font-family: var(--body-font);
}

h1{
    font-family: var(--h1-font);
}

h2,
h3,
legend {
    font-family: var(--heading-font);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at top, var(--primary-bg-color) 30%, var(--secondary-bg-color) 70%);
    color: var(--primary-text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    justify-content: center;
}

header h1 {
    font-size: var(--font-size-lg);
    color: var(--heading-color);
    text-align: center;
    animation: fadeInDown 3s ease-in-out;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes comeInDown {
    0% {
        transform: translateY(-1000px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes wiggleWiggle{
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    50% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

nav ul {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 15px;
    flex-flow: row wrap;
    list-style-type: none;
    border-radius: 15px;
    animation: fadeInDown 2.5s ease-in-out;
    font-size: var(--font-size-md);
    font-weight: bold;
    margin-bottom: 30px;
}

nav ul li a {
    display: flex;
    background-color: var(--accent-color);
    color: var(--primary-text-color);
    font-family: var(--heading-font);
    font-size: 1em;
    border-radius: 15px;
    padding: 5px;
    text-decoration: none;
    transition: color var(--transition-duration);
    flex-wrap: nowrap;
}

nav ul li a:hover {
    background-color: var(--link-hover-color);
    transform: translateY(-3px);
    
}

.mynd-eg{
    display: flex;
    justify-content: center;
    align-items: center;
}
.mynd-eg img{
    max-width: 100%;
    width: 60vw;
    animation: comeInDown 3s ease-in-out, wiggleWiggle  2s infinite ease-in-out 3s;
}



.verkefni a{
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 100%; 
    height: 100%;
    padding: 0; 
    margin: 0 auto;
}
.project {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    text-align: center;
   
}

.project h3 {
    font-size:3em;
    color: var(--accent-color);
    margin: 10px 0;
}

.project .image-container {
    position: relative;
    width: 60vw;
    height: 60vw;
    overflow: hidden;
}

.project .image-container img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.project .static-img {
    display: block;

}

.project .animated-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

@media(hover: hover){
.project:hover .static-img {
    display: none;
}

.project:hover .animated-img {
    display: block;
}
}

.verkefni h2 {
    margin-top: 20px;
    font-size: 3em;
    text-align: center;
    color: var(--primary-text-color);
}


button {
    background-color: var(--button-bg-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--heading-font);
    cursor: pointer;
    font-size: var(--font-size-md);
    transition: background-color var(--transition-duration), transform 0.2s ease;
}

button:hover {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-3px);
}


footer {
    background: radial-gradient( #00BFFF, #009ACD, #1E90FF);
    color: #ffffff;
    padding: 20px;
    text-align: center;
    width: 100%;
    font-size: var(--font-size-sm);
}

footer a {
    color: #ffdd77;
    font-family: var(--heading-font);
}

footer a:hover {
    color: var(--link-hover-color);
}
.no-show-mynd{
    display: none;
}
.socialMedia a{
    text-decoration: none;
    color: var(--primary-text-color);
    font-size: 1.5em;
    
    margin-top: 20px;

}
.socialMedia img{
    width: 50px;
    height: 50px;
    margin: 10px;
}
.socialMedia img:hover{
    transform: scale(1.1);
}
#background-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}





@media(min-width: 768px){
    .mynd-eg img{
        max-width: 100%;
        width: 30vw;
        height: auto;
        overflow: hidden;
        animation: comeInDown 3s ease-in-out, wiggleWiggle  2s infinite ease-in-out 3s;
    }


    .project {
        display: inline-block;
        width: 30%;
        margin: 1%;
        text-align: center;
        vertical-align: top;
    }
    
    .project h3 {
        font-size: var(--font-size-md);
        color: var(--heading-color);
        margin: 10px 0;
    }
    
    .project .image-container {
        position: relative;
        width: 100%;
        height: 50vh;
        height: 50vh;
        max-height: 50vh;
    }
    
    .project .image-container img {
        width: 100%;
        height: 100%;
        height: auto;
        border-radius: 0;

    }
    
    .project .static-img {
        display: block;
        
    }
    
    .project .animated-img {
        position: absolute;
        top: 0;
        left: 0;
        display: none;
    }
    
    .project:hover .static-img {
        display: none;
    }
    
    .project:hover .animated-img {
        display: block;
    }
    
    .project p {
        font-size: var(--font-size-sm);
        color: var(--primary-text-color);
        margin-top: 10px;
    }
    
}



@media(min-width: 1100px){

body {
    background: radial-gradient(circle at top, var(--primary-bg-color) 30%, var(--secondary-bg-color) 70%);
    color: var(--primary-text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    justify-content: center;
    height: 100vh;
}


    
header h1 {
    position: absolute;
    top: 5%;
    left: 40%;
    justify-content: center;
    text-align: center; 
    font-size: var(--font-size-lg);
    color: var(--heading-color);
    animation: fadeInDown 3s ease-in-out;
}
    
nav ul {
    display: none;
}
    
nav ul li a {
   display: none;
}
    
nav ul li a:hover {
    display: none;
}

.mynd-eg{  
    position: absolute;
    top: 25%;
    right: 3%; 
    display: flex;
    justify-content: center;
    align-items: center;
}
.mynd-eg img{
    max-width: 100%;
    width: 20vw;
    height: auto;
    overflow: hidden;
    animation: comeInDown 3s ease-in-out, wiggleWiggle  2s infinite ease-in-out 3s;
}



.verkefni{
    position: absolute;
    top: 20%;
    left: 10%;
    display: flex;
    flex-direction: row;
    width: 65vw;
    height: 50vh;
}

.verkefni h2 {
    display: none;
}

.verkefni a{
    text-decoration: none;
    align-items: center; 
    width: 100%; 
    padding: 0; 
    margin: 0 auto;
}


.project {
    width: 100%;
    max-width: 60vw;
    margin: 0px auto;
}
    
.project h3 {
    font-size:3em;
    color: var(--accent-color);
    margin: 0;
}
    
.project .image-container {
    position: relative;
    width: 20vh;
    height: 20vh;
    overflow: hidden;
}
    
.project .image-container img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}
    
.project .static-img {
    display: block;
}
    
.project .animated-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}
    
.project:hover .static-img {
    display: none;
}
    
.project:hover .animated-img {
    display: block;
}
    
.project p {
    font-size: var(--font-size-sm);
    color: var(--primary-text-color);
    margin-top: 10px;
}
    
button {
    background-color: var(--button-bg-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--heading-font);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background-color var(--transition-duration), transform 0.2s ease;
}

button:hover {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-3px);
}


footer {
    position: absolute;
    bottom: 0;
    right: 0;
    background: radial-gradient( #00BFFF, #009ACD, #1E90FF);
    color: #ffffff;
    padding: 0;
    width: 100%;
}
#samband{
    display: none;
}
#download-cv{
    display: none;
}
.no-show-mynd{
    display: block;
}
.socialMedia{
    display:flex;
    flex-direction: row;
    justify-content: center;
    gap: 5%;
}


footer a:hover {
    color: var(--link-hover-color);
}
.socialMedia a{
    text-decoration: none;
    color: var(--primary-text-color);
    font-size: 1.5em;
    margin-top: 20px;

}
.socialMedia img{
    width: 50px;
    height: 50px;
    margin: 10px;
}
.socialMedia img:hover{
    transform: scale(1.1);
}

#background-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -100;
}
@keyframes animateCloud {
    0% {
        margin-left: -1000px;
    }
    100% {
        margin-left: 100%;
    }
}
}

@keyframes fadeInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
.animate-on-scroll {
    opacity: 0;
    transform: translateX(-50px);
}
.animate-on-scroll.animate {
    animation: fadeInFromLeft 2s forwards;
}




@keyframes animateCloud {
    0% {
        margin-left: -500px;
    }
    100% {
        margin-left: 100%;
    }
}

.x1 {
    animation: animateCloud 45s linear infinite;
    transform: scale(0.65);
}

.x2 {
    animation: animateCloud 20s linear infinite;
    transform: scale(0.3);
}

.x3 {
    animation: animateCloud 30s linear infinite;
    transform: scale(0.5);
}

.x4 {
    animation: animateCloud 18s linear infinite;
    transform: scale(0.4);
}

.x5 {
    animation: animateCloud 25s linear infinite;
    transform: scale(0.55);
}

.cloud {
    background: linear-gradient(to bottom, #fff 5%, #f1f1f1 100%);
    border-radius: 100px;
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    height: 120px;
    position: relative;
    width: 350px;
}

.cloud:after,
.cloud:before {
    background: #fff;
    content: '';
    position: absolute;
    z-index: -1;
}

.cloud:after {
    border-radius: 100px;
    height: 100px;
    left: 50px;
    top: -50px;
    width: 100px;
}

.cloud:before {
    border-radius: 200px;
    width: 180px;
    height: 180px;
    right: 50px;
    top: -90px;
}

.icons a{
    text-decoration: none;
    color: var(--primary-text-color);
    font-size: 0.5em;
}

@keyframes spinAround {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(360deg); 
    }
    100% {
        transform: rotate(0deg);
    }
}
