:root {
    --color-bg: #fafaf9;
    --color-text-main: #3f3f46;
    --color-primary: #0d9488;
    --color-primary-light: #5eead4;
    --color-primary-dark: #0f766e;
    --color-headers: #18181b;
    --color-accent: #0d9488;
    --color-nav-hover: #e4e4e7;
    --wrapper-height: 85vh;
    --image-max-width: 320px;
    --font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
}

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* Basic page style resets */
* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
/* Top navigation */
.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background-color: var(--color-bg);
    border-bottom: 2px solid var(--color-primary-light);
}

.site-name,
.site-name:link,
.site-name:visited {
    font-family: var(--font-family);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-headers);
    text-decoration: none;
    border-bottom: none;
    padding: 0;
    margin: 0;
}

.site-name:hover {
    color: var(--color-primary);
    background: none;
}

.nav-links {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.nav-links a,
.nav-links a:link,
.nav-links a:visited {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-main);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0;
    border-radius: 6px;
    border-bottom: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* Mobile responsive design */
@media (max-width: 640px) {
    .top-nav {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem;
    }
}

/* Page structure */
.main-content {
    flex: 1;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2rem;
    padding-top: calc(80px + 2rem); /* Account for fixed nav height */
}
body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-main);
}

/* Page load animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.top-nav {
    animation: fadeIn 0.3s ease-out;
}

.main-content {
    animation: fadeInUp 0.35s ease-out 0.05s both;
}

.main-content h1 {
    animation: fadeInUp 0.35s ease-out 0.1s both;
}

.main-content p,
.main-content ul,
.main-content h2,
.main-content h3 {
    animation: fadeInUp 0.3s ease-out 0.15s both;
}
.wrapper {
    min-height: var(--wrapper-height);
    margin: 1rem 0 0;
}
.content {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

/* Typography */
p {
    margin: 0 0 1rem 0;
    line-height: 1.5 !important;
    font-size: 1rem;
}
h1,
h2,
h3,
h4,
h5 {
    margin: 2rem 0 0.8rem;
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-headers);
}
h1 {
    margin-top: 1rem;
    margin-bottom: 1.75rem;
    font-size: 2.5rem;
    display: inline-flex;
    color: var(--color-headers);
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1.125rem;
}
small,
.text_small {
    font-size: 0.8rem;
}
ul > li,
ol > li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 1rem;
}
ul {
    padding: 0 0 0 18px;
    margin: 0;
}
ul.no-bullet {
    list-style-type: none;
}

/* Link styles (content links only) */
.main-content a:link,
.main-content a:visited {
    text-decoration: none;
    border-bottom: 2px solid var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 0.1em 0.2em;
    margin: -0.1em -0.2em;
    border-radius: 3px;
    transition: all 0.2s ease;
}
.main-content a:hover {
    background: var(--color-primary-light);
    border-bottom-color: var(--color-primary);
    color: var(--color-primary-dark);
}

/* Title style adjustments */
.title-lg {
    color: var(--color-text-main);
    font-family: var(--font-family);
    font-style: normal;
    font-weight: bold;
    line-height: 1.5;
}
.title-md {
    font-size: 2.25rem;
}

/* Layout: Home */
.home {
    justify-content: left;
    text-align: left;
}
.illo-container {
    display: flex;
    justify-content: flex-end;
}
.illustration {
    max-width: 180px;
    max-height: var(--image-max-width);
    margin-top: 1rem;
    margin-right: 2rem;
    transform: rotate(16deg);
}

/* Post */
.post {
    place-items: normal;
    text-align: left;
}
.postTitle {
    font-size: 2.5rem;
    color: var(--color-headers);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.postMeta {
    color: var(--color-text-secondary, #666);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.postMeta .separator {
    margin: 0 0.5rem;
}
.controls {
    margin: 3rem 0 2rem;
}
