/*
#585858
#2c2b2b
#242323 - teksti, myös #d8d8d8
#c4c3c6 - tausta
#242c25
#0a0a2a 
*/


/* Shitty code below! */

[data-theme="dark"] {
    --bg-color: #0a0a2a;
    --element-bg-color: #2c2b2b;
    --text-color: #d8d8d8;
    --text2-color: #c4c3c6;
    --shadow-color: #242323;
    --button-color: #585858;

    --nav-bar-border: rgba(255,255,255,0.2);
    --nav-bar-text-shadow: rgba(0,0,0,0.8);
}

[data-theme="light"] {
    --bg-color: #d8d8d8;
    --element-bg-color: #c4c3c6;
    --text-color: #2c2b2b;
    --text2-color: #242323;
    --shadow-color: #b6b5b5;

    --nav-bar-border: rgba(0,0,0,0.2);
    --nav-bar-text-shadow: rgba(180,180,180,0.8);
}

@font-face {
	font-family: 'Halo Dek';
	src: url('../res/Halo Dek.ttf');
	font-weight: normal;
	font-style: normal;
}

#newfont{
    font-family: 'Halo Dek';
}

* {
	padding: 0px;
	margin: 0px;
}

body {
	background-color: var(--bg-color);
}

.switch {
    display: inline-block;
    position: absolute;
    right: 1rem;
    top: .69rem;
    bottom: .5rem;
}

.switch__input {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

.switch__label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: #2B2B2B;
    border: 4px solid #5B5B5B;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.46,.03,.52,.96);
}

.switch__indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(-72%);
    display: block;
    width: 20px;
    height: 20px;
    background-color: #7B7B7B;
    border-radius: 9999px;
    box-shadow: 10px 0px 0 0 rgba(#000000, 0.2) inset;
    transition: .3s ease-in-out;

    &::before,
    &::after {
        position: absolute;
        content: '';
        display: block;
        background-color: #FFFFFF;
        border-radius: 9999px;
    }

    &::before {
        top: 7px;
        left: 7px;
        width: 9px;
        height: 9px;
        background-color: #FFFFFF;
        opacity: 0.6;
    }

    &::after {
        bottom: 6px;
        right: 7px;
        width: 15px;
        height: 15px;
        background-color: #2B2B2B;
        opacity: 1;
    }
}

.switch__decoration {
    position: absolute;
    top: 65%;
    left: 50%;
    display: block;
    width: 2.5px;
    height: 2.5px;
    background-color: #FFFFFF;
    border-radius: 9999px;
    animation: twinkle 0.8s infinite -0.6s;

    &::before,
    &::after {
        position: absolute;
        display: block;
        content: '';
        width: 2.5px;
        height: 2.5px;
        background-color: #FFFFFF;
        border-radius: 9999px;
    }

    &::before {
        top: -20px;
        left: 5px;
        opacity: 1;
        animation: twinkle 0.6s infinite;
    }

    &::after {
        top: -7px;
        left: 15px;
        animation: twinkle 0.6s infinite -0.2s;
    }
}

@keyframes twinkle {
    50% { opacity: 0.1; }
}

.switch__indicator {
    &,
    &::before,
    &::after {
        transition: all 0.3s cubic-bezier(.46,.03,.52,.96);
    }
}

.switch__input:checked + .switch__label {
    background-color: #8FB5F5;
    border-color: #347CF8;

    .switch__indicator {
        background-color: #ECD21F;
        box-shadow: none;
        transform: translate(-50%, -50%) translateX(72%);

        &::before,
        &::after {
            display: none;
        }
    }
}


.header #navbar{
	background-color: var(--element-bg-color);
	box-shadow:0px 1px 5px rgba(0,0,0,0.4);
	height:60px;
	position:fixed;
	top:0;
	left:0;
	width:100%;
	z-index:100;

    transition: .3s;
}

.header #nav{
	height:60px;
	width:499px;
	margin: 0 auto;
}

.header #nav ul{position:relative;}

.header #nav a {
    color: var(--text-color);
    text-decoration: none;
    cursor: crosshair;
}

.header .nav-btn{
	width:99px;
	float:left;
	padding:24px 0;
	list-style:none;
	text-align:center;
	/* cursor:crosshair; */
	text-transform:uppercase;

	font-size:12px;
    font-family: sans-serif;
    font-weight: 700;

	color: var(--text-color);
	
	border-left: 1px solid var(--nav-bar-border);
	box-shadow: inset 1px rgba(0,0,0,0.5);

    border-radius: 0 0 3px 3px;
	
	text-shadow:var(--nav-bar-text-shadow) 1px 1px 0px;

    transition: .1s;
}

.header .nav-btn:first-child{
	border:none;
	box-shadow: none;
}

.header .nav-btn:hover {
	color:var(--text-color);
	background: var(--shadow-color);
    cursor: crosshair;
	box-shadow: inset 0px 1px 3px rgba(0,0,0,0.5);
}

/*--------------------BODY--------------------------*/

.boder {
	position: relative;
	align-items: center;

    margin: 0;
    padding: 0;
}

.boder .start {
    height: 60%;
}

.part-title {
    text-align: center;
    font-family: 'Arial', sans-serif;
    font-size: 2rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .075rem;

    padding: 13px;

    margin: 0 2rem 0 2rem;

    border-radius: 3px;

    background-color: var(--shadow-color);
    color: var(--text-color);

    box-shadow: 
        0 10px 20px rgba(0,0,0,0.3),
        0 6px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#intro {
    margin-top: 15rem;

    font-family: sans-serif;
    font-size: 3em;
    font-weight: 600;

    color: var(--text-color);
}

.boder .start p {
    padding: 1em;

    font-family: sans-serif;
    font-size: 1.2em;
    text-align: center;

    margin-top: -1.7rem;

    color: var(--text2-color);
}

.boder .buttons {
    display: flex;
    justify-content: center;

    margin-top: 13em;
}

.oth-button {
    padding: 6px;
    margin: 0.3em;

    background-color: #585858;
    color: #c4c3c6;
    cursor: crosshair;

	border: none;
    border-radius: 3px;

    font-family: sans-serif;
    font-weight: bolder;

    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;

    text-align: center;
    text-transform: uppercase;

    transition: .3s;
}

.oth-button:hover {
    background-color: #2c2b2b;
    color: #c4c3c6;
}

.boder .space {
    height: 50%;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    align-items: start;
    justify-items: center;
    margin: 3rem auto 0;
    max-width: 1400px;
    padding: 0 1rem;

    transform: .3s;

    /* margin-bottom: 15rem; */
}

#project {
    position: relative;
    transform-origin: center;

    align-self: start;

    border: 2px solid var(--element-bg-color);
    border-radius: 3px;

    /* width: 30%; */
    /* height: 30%; */

    width: min(100%, 30rem);

    overflow: hidden;
    --meta-height: 3.2rem;
    --image-h: 20vh;

    margin-top: 2rem;
    margin-left: 1rem;
    margin-right: 1rem;

    max-width: 40rem;

    cursor: crosshair;

    font-family: sans-serif;

    box-shadow: 
        0 10px 20px rgba(0,0,0,0.3),
        0 6px 6px rgba(0,0,0,0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
    z-index: 1;

    background-color: var(--element-bg-color);
    color: var(--text2-color);
}

.hide {
    position: absolute;
    bottom: 0%;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#project:hover {
    box-shadow:
        0 15px 30px rgba(0,0,0,0.7),
        0 10px 10px rgba(0,0,0,0.4);
    transform: translateY(-6px) scale(1.03);
    z-index: 10;
}

#project:hover .hide {
    opacity: 1;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(0);
    pointer-events: auto;
}

#project #image {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: 3px 3px 0 0;

    height: var(--image-h);

    transition: height 0.25s ease, transform 0.25s ease;
}

#project #game-title {
    background-color: var(--shadow-color);
    color: var(--text-color);
    
    padding: 5px;
}

#project #date {
    float:right;

    color: var(--text2-color);
}

#project #date,
#project #game-title {
    overflow: hidden;
    background-color: var(--shadow-color);
    transition: opacity 0.2s ease, max-height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
    max-height: 2rem;
    opacity: 1;
}

#project:hover #date,
#project:hover #game-title {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}

#project:hover #image {
    height: calc(var(--image-h) + var(--meta-height));
}

#project p {
    padding: 5px;
}

.project-popup {
    display: none;
    position: fixed;
    overflow-y: auto;
    z-index: 100;

    width: 100%;
    height: 100%;

    left: 0;
    top: 0;

    background-color:rgba(0,0,0,0.6);
}

@media screen and (min-width: 951px) {
    #project {
        /* margin-left: 3rem; */
        margin-right: 3rem;
        margin-top: 3rem;

        min-width: 15rem;

        --image-h: 14rem;
    }
}

@media screen and (max-width: 950px) {
    .projects {
        grid-template-columns: repeat(3, 33%);
    }

    #project {
        margin-left: 1rem;
        margin-right: 1rem;
        margin-top: 2rem;

        max-width: 20rem;
    }

    #project #image {
        height: 9rem;
    }
}

@media screen and (max-width: 700px) {
    #project {
        margin-left: .5rem;
        margin-right: .5rem;
        margin-top: 1rem;

        max-width: 15rem;
    }
}

/*-------------------------------------------------------------------------*/

.boder .skills {
    /* height: 100%; */

    margin-top: 20%;
    padding-bottom: 10rem;

    /* justify-content: center; */
}

.skills .skills-title {
    font-size: 2rem;
    font-family: sans-serif;

    text-align: center;
    margin-bottom: -3rem;

    padding: 10px;

    background-color: #242323;
    color: #c4c3c6;
}

.skill-boxes {
    display: flex;
    justify-content: center;
}

.boder .skills button {
    display: flex;
    position: relative;

    max-height: 1.7rem;

    top: 35rem;
}

#skill-box {
    display: relative;
    justify-content: start;

    height: 30rem;
    width: 30%;

    margin-top: 5rem;
    margin-left: .5rem;
    margin-right: 0.5rem;

    background-color: var(--element-bg-color);
    color: var(--text2-color);
    
    border: 2px solid var(--shadow-color);
    border-radius: 3px;
    font-family: sans-serif;

    box-shadow: 
        0 10px 20px rgba(0,0,0,0.3),
        0 6px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#skill-box:hover {
    transform: scale(1.03);

    transition: transform 0.2s ease;
}

#skill-box p {
    background-color: var(--shadow-color);
    color: var(--text-color);
}

.skills ul {
    padding: 1rem;
    list-style-type: square;
    list-style-position: inside;
}

.title {
    font-size: 1.1rem;
    padding: .5rem;
}

@media screen and (min-width: 651px) {
    .header .title {
        font-size: 4em;
    }
}

@media screen and (max-width: 650px) {
    .header .title {
        font-size: 3em;
    }
    .tabs {
        --tab-width: 70px;
        --tab-font-size: .8rem;
    }
}

.footer {
    background-color: var(--element-bg-color);

    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);

    overflow: hidden;
}

.footer-text {
    background-color: var(--element-bg-color);
}

.footer .cpright {
    margin: auto;
    margin-bottom: 1rem;

    text-align: center;
}

.footer p {
    font-family: sans-serif;
    font-size: .7em;

    color: var(--text-color);
}

.contact {
    justify-content: center;

    font-weight: 550;

    text-align: center;

    padding-top: 10%;
    margin-bottom: 6rem;
}

#text {
    margin: auto;

    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.btn3 {
    position: relative;

    margin: auto;

    width: 2.5em;
    height: 2.5em;
    outline: none;
    border: none;
    border-radius: 50%;
    background-color: #d8d8d8;
    transition: .3s all;
}
 
/* Default icon color inside the circular button; hover rule below already sets white */
.btn3 .git {
    fill: #000;
}
  
.btn3:hover {
    background-color: black;
}
  
.btn3:hover .git {
    fill: white;
}