/* Betterward */

/* Import fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Reference colors - literal hex values with searchable sources */
    --old-glory-blue: #002868;
    --wikipedia-blue: #3366CC;
    --anthropic-beige: #F5F0E8;
    --ubuntu-orange: #E95420;
    --github-text: #24292f;
    
    /* Functional assignments - semantic usage */
    --primary-accent: var(--old-glory-blue);
    --hover-accent: var(--ubuntu-orange);
    --active-accent: var(--wikipedia-blue);
    --background: var(--anthropic-beige);
    --text-dark: var(--github-text);
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    --border: #e0e0e0;
    --header-bg: #ffffff;
}

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

body {
    font-family: 'Merriweather', Georgia, serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--background);
    font-size: 18px;
}

h1, h2, h3, h4 {
    font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 {
    font-size: 2em;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.6em;
    margin-bottom: 0.5em;
}

h3 {
    font-size: 1.3em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Default link styles */
a {
    color: var(--primary-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--hover-accent);
    border-bottom-color: var(--hover-accent);
}

a:active {
    color: var(--active-accent);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background-color: var(--header-bg);
    border-bottom: 3px solid var(--primary-accent);
    padding: 2.5em 0 2em;
    margin-bottom: 3em;
}

header h1 {
    font-size: 2.5em;
}

/* Header title link - no underline */
header h1 a {
    color: var(--primary-accent);
    border: none;
    font-weight: 700;
}

header h1 a:hover {
    color: var(--hover-accent);
}

header h1 a:active {
    color: var(--active-accent);
}

header h1 {
    font-size: 2.5em;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1em;
}

.logo {
    height: 100px;
    width: auto;
}

.header-text {
    flex: 1;
}

.tagline {
    margin-top: 0.5em;
    font-size: 0.95em;
    color: var(--text-medium);
    font-style: italic;
}

main {
    min-height: 60vh;
    margin-bottom: 4em;
}

.intro {
    margin-bottom: 3em;
    font-size: 1.05em;
    color: var(--text-medium);
}

.blog-posts {
    margin-top: 2em;
}

.post-preview {
    margin-bottom: 3em;
    padding-bottom: 2.5em;
    border-bottom: 1px solid var(--border);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    margin-bottom: 0.3em;
}

/* Blog post title links - dark by default, no underline */
.post-preview h2 a {
    color: var(--text-dark);
    border: none;
}

.post-preview h2 a:hover {
    color: var(--hover-accent);
}

.post-preview h2 a:active {
    color: var(--active-accent);
}

.post-meta {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 0.8em;
    font-style: italic;
}

.post-excerpt {
    color: var(--text-medium);
    margin-top: 0.8em;
}

footer {
    border-top: 1px solid var(--border);
    padding: 2em 0;
    margin-top: 4em;
    background-color: var(--header-bg);
}

footer p {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9em;
}

@media (max-width: 768px) {
    body {
        font-size: 17px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    header {
        padding: 2em 0 1.5em;
    }
    
    h1 {
        font-size: 1.7em;
    }
}

/* Blog Post Styles */

.post-header {
    margin-bottom: 2.5em;
}

.post-header h1 {
    font-size: 2.2em;
    margin-bottom: 0.3em;
}

.post-subtitle {
    font-size: 1.1em;
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 0.5em;
}

.post-divider {
    text-align: center;
    margin: 1.5em 0;
    color: var(--text-light);
}

.post-content {
    margin-top: 2em;
}

.post-content p {
    margin-bottom: 1.8em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 1.5em;
}

/* Links within post content use default link styles */

.calculation-block {
    background-color: #f5f5f5;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-left: 3px solid var(--primary-accent);
    font-family: 'Courier New', monospace;
    line-height: 1.8;
    white-space: pre-line;
}

blockquote {
    border-left: 4px solid var(--primary-accent);
    padding: 1.5em;
    padding-left: 2em;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-medium);
    background-color: #f9f9f9;
}

blockquote p {
    margin-bottom: 1em;
}

blockquote p:last-child {
    margin-bottom: 0;
}

.quote-attribution {
    font-size: 0.9em;
    text-align: right;
    margin-top: 0.8em;
    color: var(--text-light);
}
