:root {
    --background-color: #1e1e2e;
    --color: #cdd6f4;
    --element-background: #6c7086	;
    --highlight-color: #313244;
    --footer-color: #bac2de;
}

html {
    font-family: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Helvetica Neue", "Arial", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

body {
    background-color: var(--background-color);
    color: var(--color);
    display: flex; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.1s;
}

body #animasjon_hvit{
    display: inline;
}

body #animasjon_sort{
    display: none;
}

body.light-mode {
    background-image: none;
    --background-color: #eff1f5;
    --element-background: #ffffff00;
    --color: #4c4f69;
    --highlight-color: #ccd0da;
}

body.light-mode #animasjon_sort{
    display: inline;
}

body.light-mode #animasjon_hvit{
    display: none;
}


.toggle-button {
    color: var(--color);
    font-size: 1.4rem;
    position: fixed;
    top: 1rem;
    left: calc(100% - 2.8rem);
    background: none;
    border: none;
    cursor: pointer;
}

.section {
    color: var(--color);
    flex: 1;
    padding: 1rem;
    width: 33%;
    text-decoration: none;
    transition: color 0.1s;
}

.section p {
    font-size: 1.2rem;
}

.section h1 {
    font-weight: bold;
    font-style: italic;
    font-size: 3.6rem;
    font-weight: 300;
    margin-bottom: 0;
}

.section img{
    width: 100%;
    height: auto;
}

.skills-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: var(--background-color);
    justify-items: left;
}

.skill-card {
    background-color: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 20px;
    box-sizing: border-box;
    width: 100%; 
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.skill-card h2{
    font-weight: 600;
}

a {
    color: var(--color);
}

footer a {
    color: var(--footer-color);
}


footer {
    margin-top: 5%;
    padding: 1em;
    text-align: center;
    font-size: 1rem;
    color: var(--footer-color);
}

#hemmelig-knapp {
    cursor: pointer;
}

@media (max-width: 1000px) {
    .section {
        width: 66%;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    html {
        font-size: 10px;
    }
}

@media (max-width: 315px) {
    html {
        font-size: 8px;
    }
}

/* For latex-logoen */
/* Takket være Sinan Ünür i dette svaret på StackOverflow: https://stackoverflow.com/questions/8160514/is-there-css-for-typesetting-the-latex-logo-in-html */

.tex sub, .latex sub, .latex sup {
    text-transform: uppercase;
}

.tex sub, .latex sub {
    vertical-align: -0.5ex;
    margin-left: -0.1667em;
    margin-right: -0.125em;
}

.tex, .latex, .tex sub, .latex sub {
    font-size: 1em;
    font-family: 'Times New Roman', Times, serif;
}

.latex sup {
    font-size: 0.85em;
    vertical-align: 0.15em;
    margin-left: -0.36em;
    margin-right: -0.15em;
}