/* style.css */

@import url('https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap');

:root {
    --accent-color: #403A36;
    --background-color: #292522;
    --text-color: #ECE1D7;
    --header-bg-color: #34302C;
    --header-text-color: #E49B5D;
    --secondary-text-color: #C1A78E;
    --border-color: #333;
    --error-color: #E07A5F;
    color-scheme: dark;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    overflow-y: scroll;
}

.page-header {
    text-align: center;
    background-color: var(--header-bg-color);
    padding: 20px 30px 30px;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 3em;
    margin: 0;
    color: var(--header-text-color);
}

h2 {
    font-size: 2em;
    margin: 0;
    padding-top: 40px;
    color: var(--header-text-color);
}

h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--secondary-text-color);
}

header p {
    font-size: 1.5em;
    color: var(--secondary-text-color);
    margin-top: 10px;
}

header#navbar {
    align-items: center;
    align-content: center;
    padding: 20px 0;
    background-color: var(--header-bg-color);
    color: var(--text-color);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s, transform 0.2s;
}

nav > a:hover {
    color: var(--secondary-text-color);
    transform: translateY(-1px);
}

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s;
}

section {
    padding: 50px 10%;
    flex-wrap: wrap;
    justify-content: space-between;
}

section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: var(--header-text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* ---------- Blog ---------- */

.blog-list .post {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.blog-list .post h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.blog-list .post h3 a {
    color: var(--header-text-color);
    text-decoration: none;
}

.blog-list .post h3 a:hover {
    color: var(--accent-color);
}

.blog-list .post .post-date {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin-bottom: 10px;
}

.blog-list .post p {
    line-height: 1.6;
}

.blog-list .post .read-more {
    color: var(--secondary-text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.blog-list .post .read-more:hover {
    color: var(--accent-color);
}

#created-on-date {
    font-size: 0.4em !important;
    color: var(--secondary-text-color);
    margin-bottom: 10px;
    display: flex;
}

/* ---------- Projects & cards ---------- */

#projects {
    justify-content: space-between;
}

.project {
    background-color: var(--header-bg-color);
    width: calc(33.333% - 20px);
    padding: 20px;
    margin: 10px;
    border-radius: 8px;
    transition: transform 0.3s;
    min-width: 200px;
    flex: 1 1 25%;
}

.project:hover {
    transform: translateY(-10px);
    background-color: var(--accent-color);
}

.project h3 {
    margin-top: 0;
    font-size: 1.8em;
    color: var(--secondary-text-color);
}

.project p {
    margin: 0;
    color: var(--text-color);
    font-size: 1em;
}

.flexwrap-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.info-list {
    background-color: var(--header-bg-color);
    width: 250px;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    transition: transform 0.3s;
    text-align: center;
    flex: 0 1 25%;
    min-width: 250px;
}

.info-list h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--secondary-text-color);
    align-content: center;
}

.info-list a {
    color: var(--text-color);
    margin: 0 auto;
    padding: 0;
    display: grid;
    font-size: 1em;
    transition: color 0.3s, transform 0.3s;
}

.info-list a:hover {
    color: var(--secondary-text-color);
    transform: translateY(-1px);
}

.logo svg {
    fill: var(--text-color);
    stroke: var(--text-color);
    text-decoration: none;
    border-bottom: unset;
    background-color: unset;
    transition: 0.3s;
}

.logo svg:hover {
    fill: var(--secondary-text-color);
}

/* ---------- Buttons & inline links ---------- */

button,
#about-button,
#pdf-button,
#contact-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

button {
    border-radius: 3px;
    padding: 10px 20px;
}

#about-button,
#pdf-button,
#contact-button {
    margin-top: 20px;
}

#contact-button {
    padding: 10px 20px;
}

button:hover,
#about-button:hover,
#pdf-button:hover,
#contact-button:hover {
    background-color: var(--header-bg-color);
    color: var(--secondary-text-color);
}

.interactive-text {
    color: var(--text-color);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    transition: 0.3s;
}

.interactive-text:hover {
    color: var(--secondary-text-color);
}

.small-interactive-text {
    color: var(--text-color);
    transition: 0.3s;
    font-size: 0.8em;
}

.small-interactive-text:hover {
    color: var(--secondary-text-color);
}

.clickable-div {
    display: block;
    height: 100%;
    width: 100%;
    text-decoration: none;
    padding: 0;
}

/* ---------- Tooltip ---------- */

.tooltip {
    display: inline-block;
    position: relative;
    text-align: center;
}

.tooltip .right {
    position: absolute;
    min-width: 200px;
    top: 50%;
    left: 100%;
    margin-left: 20px;
    transform: translate(0, -50%);
    padding: 10px 20px;
    color: var(--text-color);
    background-color: var(--accent-color);
    font-weight: normal;
    font-size: 13px;
    border-radius: 8px;
    z-index: 99999999;
    box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.8s;
}

.tooltip:hover .right {
    visibility: visible;
    opacity: 1;
}

.tooltip .right i {
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -12px;
    width: 12px;
    height: 24px;
    overflow: hidden;
}

.tooltip .right i::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    left: 0;
    top: 50%;
    transform: translate(50%, -50%) rotate(-45deg);
    background-color: var(--accent-color);
}

/* ---------- Experience & skills ---------- */

.experience {
    font-size: 1.1em;
    background-color: var(--header-bg-color);
    width: calc(90% - 100px);
    padding: 1em 30px 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    transition: transform 0.3s;
    min-width: 200px;
    flex: 1 1 25%;
}

.experience:hover {
    transform: translatex(10px);
    background-color: var(--accent-color);
}

.experience-description > p {
    padding-left: 2em;
    padding-top: 0;
    margin-top: 0;
}

.experience-skills,
.skills-list {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: left;
}

.skill-button {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1px 5px;
    transition: ease-in-out 0.1s;
    margin: 2px;
    height: fit-content;
    text-wrap: wrap;
    max-width: 40%;
    display: flex;
    flex: 0 0 auto;
    justify-content: left;
    text-overflow: ellipsis;
    min-width: fit-content;
    cursor: pointer;
}

.skill-button > a > div {
    font-size: 0.8em;
    text-wrap: wrap;
}

.skill-button:hover {
    background-color: var(--header-bg-color);
    color: var(--secondary-text-color);
    transition: background-color 0.3s;
}

.info {
    margin: 10px;
}

[x-cloak] {
    display: none !important;
}

/* ---------- About ---------- */

#about-me-images {
    max-width: calc(30% - 100px);
    align-items: center;
    display: grid;
    border-radius: 8px;
}

#about-me-images > img {
    max-width: 33vw;
    border-radius: 8px;
    margin: 20px;
}

#about-me-images > small {
    margin-left: 20px;
    max-width: 33vw;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

/* ---------- Forms ---------- */

.site-form {
    max-width: 28rem;
}

.comments .site-form {
    max-width: 22rem;
}

.site-form p,
.site-form .form-group {
    margin: 0 0 0.75rem;
}

.site-form label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--secondary-text-color);
}

.site-form input,
.site-form textarea,
.site-form select,
.form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--header-bg-color);
    color: var(--text-color);
    font: inherit;
    line-height: 1.4;
}

.site-form textarea,
textarea.form-control {
    display: block;
    resize: vertical;
}

.site-form input:focus-visible,
.site-form textarea:focus-visible,
.site-form select:focus-visible,
.form-control:focus-visible,
button:focus-visible {
    outline: 2px solid var(--header-text-color);
    outline-offset: 1px;
}

.site-form ::placeholder {
    color: var(--secondary-text-color);
    opacity: 1;
}

.site-form input:-webkit-autofill,
.site-form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px var(--header-bg-color) inset;
    -webkit-text-fill-color: var(--text-color);
}

.site-form .helptext {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8em;
    color: var(--secondary-text-color);
}

.site-form button,
.comments .btn {
    margin-top: 0.5rem;
}

.errorlist {
    list-style: none;
    margin: 0 0 0.4rem;
    padding: 0;
    color: var(--error-color);
}

.messages {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.messages li {
    padding: 0.6rem 0.75rem;
    border-radius: 5px;
    background-color: var(--header-bg-color);
    color: var(--header-text-color);
}

.hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Comments ---------- */

.comment {
    max-width: 40rem;
    margin: 0 0 1rem;
    padding: 0.6rem 0.85rem;
    border-left: 2px solid var(--border-color);
    background-color: var(--header-bg-color);
    border-radius: 5px;
}

.comment-meta {
    margin: 0 0 0.25rem;
    font-size: 0.85em;
    color: var(--secondary-text-color);
}

.comment-body {
    line-height: 1.5;
}

.comment-body p {
    margin: 0 0 0.5rem;
}

.comment-body p:last-child {
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */

@media only screen and (max-width: 768px) {
    .project {
        width: 48%;
    }
}

@media only screen and (max-width: 720px) {
    header h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    header p {
        font-size: 1.2em;
    }

    nav {
        flex-direction: column;
    }

    nav a {
        margin: 5px 0;
    }

    section {
        padding: 20px 5%;
    }

    .project {
        width: 100%;
        margin: 10px;
    }

    .experience {
        width: calc(100% - 60px);
    }

    .experience:hover {
        transform: translateY(-10px);
    }

    #about-me-images > img {
        max-width: calc(100vw - 60px);
        margin: 0;
        padding: 0;
    }

    #about-me-images > small {
        margin-left: 20px;
        margin-top: 10px;
        max-width: calc(100vw - 60px);
    }

    .container {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 480px) {
    .project {
        width: 100%;
    }
}
