:root {
    --bg-color: #002b36;
    --bg-variant: #073642;
    --primary: #cb4b16;
    --primary-variant: #dc322f;
    --secondary: #2aa198;
    --font-color: #839496;
    --selection-color: black;
}

::selection {
    background: var(--secondary);
    color: var(--selection-color);
}

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

body {
    font-family: "Courier New", Courier, monospace;
    line-height: 1.6;
    color: var(--font-color);
    background-color: var(--bg-color);
    max-width: 50rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--bg-variant);
    margin-bottom: 2.5rem;
}

nav h1 {
    font-size: 1.5rem;
}

nav h1 a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a, a {
    text-decoration: none;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
    font-weight: 600;
}

nav a:hover, a:hover {
    text-decoration: underline;
    color: var(--primary-variant);
}

.mainsection {
    text-align: center;
    margin-bottom: 3.75rem;
}

.mainsection h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.mainsection p {
    font-size: 1.125rem;
    color: var(--font-color);
    opacity: 0.8;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    font-size: 1.75rem;
    margin-top: 1.75rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    color: var(--secondary);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.skill-grid div {
    padding: 0.75rem;
    background-color: var(--bg-variant);
    text-align: center;
    border-radius: 0.25rem;
    font-weight: 500;
}

.post-preview,
.project {
    border: 1px solid var(--bg-variant);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0.5rem;
}

.post-preview h3 a,
.project h3 {
    color: var(--secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
}

.post-preview h3 a:hover {
    text-decoration: underline;
}

.post-preview time {
    color: var(--font-color);
    opacity: 0.7;
    font-size: 0.875rem;
}

.project a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.project a:hover {
    text-decoration: underline;
}

.post-content {
    border-top: 1px solid var(--bg-variant);
    padding-top: 2.5rem;
}

footer {
    border-top: 1px solid var(--bg-variant);
    margin-top: 3.75rem;
    padding: 2.5rem 0 1.25rem 0;
    text-align: center;
    color: var(--font-color);
    opacity: 0.8;
    font-size: 0.875rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    margin-right: 1.25rem;
    font-weight: 600;
}

footer a:hover {
    color: var(--primary-variant);
    text-decoration: underline;
}

table:not(.gist-data *) {
    border-collapse: collapse;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

th:not(.gist-data *) {
    font-weight: bold;
    background-color: var(--bg-variant);
    padding: .5rem;
    text-align: left;
}

td:not(.gist-data *) {
    text-align: left;
    padding: .5rem;
    border-bottom: 2px solid var(--bg-variant);
}

@media (max-width: 37.5rem) {
    body {
        padding: 0 1rem;
    }
    nav {
        flex-direction: column;
        gap: 1.25rem;
    }
    nav ul {
        gap: 1.25rem;
    }
    .mainsection h2 {
        font-size: 1.75rem;
    }
    .skill-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
