:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --link-color: rgb(255, 115, 122);
    --link-hover-color: rgb(255, 150, 150);
    --period-color: #000000;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #ffffff;
        --link-color: rgb(255, 115, 122);
        --link-hover-color: rgb(255, 150, 150);
        --period-color: #ffffff;
    }
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular.ttf')
}

@font-face {
    font-family: 'Roboto Slab';
    src: url('../fonts/RobotoSlab-Regular.ttf')
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s, color 0.4s;
}

#container {
    display: block;
    margin: 0 auto;
    margin-top: 2em;
    width: 50%;
    position: relative;
}

#header {
    width: 100%;
}

#content {
    max-width: 100%;
    min-height: 80vh;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.footer {
    min-height: 3rem;
    margin: 1rem 0 1rem 0;
    text-align: center;
}

.footer > hr {
    margin-bottom: 1rem;
}

.item {
    width: 100%;
    flex-basis: auto;
    display: inline-block;
    word-wrap: break-word;
}

.item>*:first-child {
    margin-top: 0;
} 

.break+.item {
    padding-left: 0;
}

@media all and (orientation:portrait) {
    #container {
        width: 90%;
    }
}

@media only screen and (max-width: 768px) {
    .item {
        min-width: 100%;
    }
    .item:not(:first-child) {
        padding-left: 0;
    }

    #container {
        width: 90%;
    }
}

a {
    color: var(--link-color);
    text-decoration: none;
    display: inline;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
    cursor: pointer;
}

ul li {
    font-family: 'Roboto', sans-serif;
}

ul {
    padding-left: 0;
    list-style: square inside;
}

li > ul > li {
    margin-left: 10px;
}

h1,
h2,
h3 {
    font-family: 'Roboto Slab', sans-serif;
}

h1 a {
    color: var(--text-color);
    text-decoration: none;
}

h1 a:hover {
    color: var(--link-hover-color);
    text-decoration: inherit;
}

img {
    max-width: 40%;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Tab styles */
.tabs {
    position: relative;
    width: 100%;
}

.tabs input[type="radio"] {
    display: none;
}

.tabs-nav {
    margin: 1em 0;
}

.tab {
    color: var(--link-color);
    cursor: pointer;
}

.tab:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Show tab content when corresponding radio is checked */
#tab-about:checked ~ .tab-content[data-tab="about"],
#tab-contact:checked ~ .tab-content[data-tab="contact"] {
    display: block;
    opacity: 1;
}

/* Style active tab */
#tab-about:checked ~ .tabs-nav label[for="tab-about"],
#tab-contact:checked ~ .tabs-nav label[for="tab-contact"] {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.meta > * {
    margin-top: 0;
    margin-bottom: 0;
}

.meta + .item {
    margin-top: 2em;
}

.a-period::after {
    content: ".";
    color: var(--period-color);
}

.inverted {
    filter: invert(100%);
}

.footer > p > a {
    display: inline-block;
}

#tab-content p {
    margin-top: 1rem;
    margin-bottom: 0;
}