/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-gray: #ecf0f1;
    --border-color: #ddd;
    --max-width: 800px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    padding: 20px;
}

/* Header and Navigation */
header {
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

nav {
    margin-top: 1rem;
}

nav a {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Introduction Section */
.intro {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.intro h2 {
    margin-top: 0;
}

/* Blog and Tools Listings */
.post-list, .tool-list {
    list-style: none;
    margin: 2rem 0;
}

.post-item, .tool-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child, .tool-item:last-child {
    border-bottom: none;
}

.post-item h3, .tool-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-excerpt {
    color: #555;
    margin-bottom: 0.5rem;
}

.read-more {
    color: var(--accent-color);
    font-weight: 500;
}

/* Blog Post Content */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header h1 {
    margin-bottom: 0.5rem;
}

.post-content {
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 4px;
}

.post-content pre {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content code {
    background-color: var(--light-gray);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

.post-content pre code {
    padding: 0;
    background-color: transparent;
}

/* Tool Cards */
.tool-card {
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tool-card h3 {
    margin-top: 0;
}

.tool-demo {
    margin-top: 2rem;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Buttons */
button, .button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover, .button:hover {
    background-color: var(--primary-color);
    text-decoration: none;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    max-width: var(--max-width);
    margin: 4rem auto 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav a {
        margin-right: 1rem;
        font-size: 0.9rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .intro {
        padding: 1.5rem;
    }
}
