/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    background-color: #1a1a1a;
    color: #ffffff;
    padding-bottom: 60px; /* Add padding to prevent content from being hidden behind footer */
}

.content {
    width: 55%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

/* Link styling */
a {
    text-decoration: none;
    color: #ffffff;
}

a:visited {
    color: #ffffff;
}

a:hover {
    color: #cccccc;
}

.social-media-icon {
    width: 35px;
    max-width: 100%;
    height: auto;
}

/* Navbar styling */
.navbar {
    margin: 20px 0;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 10px;
    width: 100%;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.navbar li {
    padding: 0;
}

.navbar a {
    font-weight: bold;
}

/* Main content layout */
.main-content {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Content sections styling */
.content-body {
    background-color: #2d2d2d;
    padding: 20px;
    border-radius: 5px;
    flex: 1.3; /* This will make the main content take up more space */
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
}

/* Full width content for pages without sidebar */
.full-width .content-body {
    flex: 0 0 100%;
    min-width: 0; /* Prevents flex items from overflowing */
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

.full-width .main-content {
    width: 100%;
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

.content-body img {
    max-width: 200px;
    display: block;
    height: auto;
    float: left;
    margin: 0 20px 10px 0;
    clear: left;
}

.content-body p {
    margin: 0;
    overflow: hidden;
    display: inline;
}

.sidebar {
    flex: 0.7; /* This will make the sidebar take up 30% of the space */
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.social-media,
.recent-blog-posts {
    background-color: #2d2d2d;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.social-media {
    background-color: #2d2d2d;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.social-media ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.social-media li {
    padding: 0;
}

.social-media a {
    font-weight: bold;
}

.social-media table {
    width: 100%;
    margin: 0 auto;
}

.social-media td {
    text-align: center;
    padding: 0 10px;
}

/* Footer styling */
.footer {
    margin-top: 40px;
    text-align: center;
    color: #888888;
    font-size: 0.9em;
    width: 100%;
    position: relative;
    clear: both;
}

.footer table {
    margin: 0 auto;
    align-items: center;
}

.footer td {
    text-align: center;
    padding: 0 10px;
}

/* Blog posts styling */
.blog-post,
.project {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3d3d3d;
}

.blog-post:last-child,
.project:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-post h5,
.project h5 {
    margin: 0 0 10px 0;
    color: #ffffff;
}

.blog-post h5 a,
.project h5 a {
    color: #ffffff;
    text-decoration: none;
}

.blog-post h5 a:hover,
.project h5 a:hover {
    color: #cccccc;
}

.blog-post p,
.project p {
    margin: 0 0 10px 0;
    color: #cccccc;
}

.blog-post small,
.project small {
    color: #888888;
    font-size: 0.8em;
}

/* Individual blog post and project page styling */
.blog-post-full,
.project-full {
    max-width: 100%;
}

.post-header,
.project-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3d3d3d;
}

.post-header h1,
.project-header h1 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 2.5em;
}

.post-meta,
.project-meta {
    margin-bottom: 15px;
}

.post-meta time,
.project-meta time {
    color: #888888;
    font-size: 0.9em;
}

.post-summary,
.project-summary {
    color: #cccccc;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

.post-content,
.project-content {
    color: #ffffff;
    line-height: 1.8;
    font-size: 1em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6,
.project-content h1,
.project-content h2,
.project-content h3,
.project-content h4,
.project-content h5,
.project-content h6 {
    color: #ffffff;
    margin: 25px 0 15px 0;
}

.post-content p,
.project-content p {
    margin: 0 0 15px 0;
}

.post-content a,
.project-content a {
    color: #ffffff;
    text-decoration: underline;
}

.post-content a:hover,
.project-content a:hover {
    color: #cccccc;
}

.post-content ul,
.post-content ol,
.project-content ul,
.project-content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.post-content li,
.project-content li {
    margin-bottom: 5px;
}

.post-content code,
.project-content code {
    background-color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    color: #cccccc;
}

.post-content pre,
.project-content pre {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.post-content pre code,
.project-content pre code {
    background: none;
    padding: 0;
    color: #ffffff;
}

.post-content blockquote,
.project-content blockquote {
    border-left: 4px solid #3d3d3d;
    padding-left: 15px;
    margin: 15px 0;
    color: #cccccc;
    font-style: italic;
}

/* About page specific styles */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-section {
    padding: 20px;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
    background-color: #2d2d2d;
    color: #ffffff;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

button[type="submit"] {
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button[type="submit"]:hover {
    background-color: #45a049;
}

#form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .content {
        width: 100%;
        padding: 10px;
    }

    .main-content {
        flex-direction: column;
    }

    .content-body,
    .sidebar {
        flex: 0 0 100%;
    }

    /* For pages with sidebars (like index), limit content-body height in mobile */
    .main-content:not(.full-width) .content-body {
        max-height: 65%;
        overflow-y: auto;
    }

    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #1a1a1a;
        margin-top: 0;
        padding: 10px 0;
        z-index: 1000;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    body {
        padding-bottom: 0; /* Remove the padding we added earlier since we're using fixed footer */
    }

    .social-media-icon {
        width: 25px; /* Smaller size on mobile */
    }
}
