:root {
    --width: 720px;
    --font-main: Verdana, sans-serif;
    --font-secondary: Verdana, sans-serif;
    --font-scale: 1em;
    --background-color: #fff;
    --heading-color: #222;
    --text-color: #444;
    --link-color: #3273dc;
    --visited-color:  #8b6fcb;
    --code-background-color: #f2f2f2;
    --code-color: #222;
    --blockquote-color: #222;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #01242e;
        --heading-color: #eee;
        --text-color: #ddd;
        --link-color: #8cc2dd;
        --visited-color:  #8b6fcb;
        --code-background-color: #000;
        --code-color: #ddd;
        --blockquote-color: #ccc;
    }
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
}

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

a:hover {
    text-decoration: underline;
}

nav a {
    margin-right: 8px;
}

strong, b {
    color: var(--heading-color);
}

button {
    margin: 0;
    cursor: pointer;
}

time {
  	font-family: monospace;
   	font-style: normal;
   	font-size: 15px;
}

main {
    line-height: 1.6;
}

table {
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px dashed;
}

img {
    max-width: 100%;
}

code {
    font-family: monospace;
    padding: 2px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
}

blockquote {
    border-left: 1px solid #999;
    color: var(--code-color);
    padding-left: 20px;
    font-style: italic;
}

footer {
    padding: 25px 0;
    text-align: center;
}

.title:hover {
    text-decoration: none;
}

.title h2 {
    font-size: 1.5em;
}

.inline {
    width: auto !important;
}

.highlight, .code {
    padding: 1px 15px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
    margin-block-start: 1em;
    margin-block-end: 1em;
    overflow-x: auto;
}

/* blog post list */
ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
}

ul.blog-posts li span {
    flex: 0 0 130px;
}

ul.blog-posts li a:visited {
    color: var(--visited-color);
}

/* Lab section styles */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lab-item {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 1rem;
    transition: transform 0.2s ease;
}

.lab-item:hover {
    transform: translateY(-5px);
}

.lab-item h3 {
    margin-top: 0;
}

.lab-description {
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-color);
}

.lab-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 3px;
}

.full-width-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 5px;
    margin: 1rem 0;
}

.lab-metadata {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.lab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lab-tag {
    background-color: var(--code-background-color);
    color: var(--code-color);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

@media (prefers-color-scheme: dark) {
    .lab-item {
        border-color: #333;
    }
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    background-color: var(--code-background-color);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover:not(.active,.disabled) {
    background-color: var(--link-color);
    color: #fff;
    text-decoration: none;
}

.page-link.active {
    background-color: var(--link-color);
    color: #fff;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Special styling for The Circle menu item */
nav a.circle-link {
    color: #f08080;
}