@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --base: #303030;
    --mantle: #1e1e1e;
    --crust: #474747;
    --text: #dce0e8;
    --subtext: #b3b8c3;
    --overlay: #8c8fa3;
    --lavender: #7287fd;
    --blue: #89b4fa;
    --sapphire: #74a8d4;
    --sky: #99d1f2;
    --teal: #9ecddd;
    --green: #a6d98f;
    --yellow: #f4d48f;
    --peach: #ee9e72;
    --red: #e7827f;
    --maroon: #ea989c;
    --rosewater: #f2becc;
}

* {
    box-sizing: border-box;
}

html {
    background-color: var(--base);
    color: var(--text);
}

body {
    max-width: 90ch;
    padding: 1em 3em;
    margin: auto;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    background-color: var(--base);
    color: var(--text);
}

h1, h2, h3, h4 {
    font-family: "JetBrains Mono", monospace;
    text-wrap: balance;
    line-height: 1.1em;
    color: var(--text);
}

h1 {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 0em;
    margin-bottom: 0.4em;
}

h2 {
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 0.6em;
    margin-bottom: 0.4em;
}

h3 {
    font-size: 1em;
    font-weight: 600;
    margin-top: 0.6em;
    margin-bottom: 0.2em;
}

a:link {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px dotted;
}

a:visited {
    color: var(--overlay);
    text-decoration: none;
    border-bottom: 1px dotted;
}

a:hover {
    text-decoration: none;
    border-bottom: 3px dotted;
}

ul {
    list-style-type: square;
}

li {
    padding-bottom: 0.3em;
}

img {
    max-width: 100%;
}

.sideimage {
    margin-left: 1em;
    margin-bottom: 1em;
    padding-left: 1em;
    float: right;
    width: 20%;
}

.fullimage {
    width: 95%;
    margin: 1em auto;
    display: block;
}

.covers {
    margin-left: 0em;
    padding-left: 0em;
}

.covers td {
    padding: 0em 1em 1em 0em;
    background: var(--mantle);
    border: 0;
}

table {
    border-style: none;
    border-collapse: collapse;
    margin-left: 1em;
    margin-right: 1em;
    margin-top: 1em;
    margin-bottom: 1em;
}

code, pre, tt {
    font-family: "JetBrains Mono", monospace;
}

pre {
    clear: none;
    background-color: var(--mantle);
    border-color: var(--crust);
    margin: 0.5em;
    padding: 0.5em;
    border-style: solid;
    border-width: 1px;
    white-space: pre-wrap;
}

blockquote {
    margin: 1em 0em;
    padding: 0.5em 1.5em;
    background-color: var(--mantle);
    border-style: solid;
    border-width: 1px;
    border-color: var(--crust);
    overflow: hidden;
    color: var(--text);
}

.note, .tip {
    background-color: var(--mantle);
    padding: 1em;
    margin: 1em 0;
    border-left: 4px solid var(--yellow);
    color: var(--text);
}

.note:before {
    content: "Note: ";
    font-weight: bold;
}

.back-link {
    font-size: 0.9em;
    margin-bottom: 1em;
    display: inline-block;
    color: var(--blue);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1em;
    margin-top: 1em;
}

.project-card {
    border: 1px solid var(--crust);
    padding: 1em;
    background-color: var(--mantle);
}

.project-card h3 {
    margin-top: 0;
    font-size: 1.1em;
}

.project-card p {
    font-size: 0.95em;
    line-height: 1.4em;
    margin-bottom: 0.5em;
}

.skill-section {
    margin-bottom: 1.5em;
}

.skill-section h3 {
    font-size: 1em;
    margin-bottom: 0.5em;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1em;
}

.skill-item {
    background-color: var(--mantle);
    padding: 0.3em 0.8em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "JetBrains Mono", monospace;
    border: 1px solid var(--crust);
    color: var(--text);
}

.tech-stack {
    background-color: var(--mantle);
    padding: 1em;
    margin-top: 1.5em;
    border: 1px solid var(--crust);
}

.tech-stack h3 {
    margin-top: 0;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 0.5em;
}

.tech-item {
    background-color: var(--mantle);
    padding: 0.3em 0.8em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "JetBrains Mono", monospace;
    border: 1px solid var(--crust);
}

.topic-card {
    margin-bottom: 1.5em;
    cursor: pointer;
}

.topic-card .topic-title {
    display: block;
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 0.2em;
    color: var(--text);
}

.topic-card .topic-date {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    font-style: oblique;
    text-align: left;
    margin-bottom: 1em;
    color: var(--subtext);
}

.topic-card p {
    color: var(--subtext);
}

footer {
    text-align: center;
    padding: 1em;
    background-color: var(--mantle);
    border-top: 1px solid var(--crust);
    margin-top: 2em;
}

footer a {
    color: var(--blue);
}

@media (max-width: 768px) {
    body {
        padding: 1em;
    }

    .sideimage {
        float: none;
        width: 50%;
        margin: 1em auto;
        display: block;
    }
}