/* --- Sleek Black Design --- */

/* Basic Reset & Typography */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    background-color: #0d0d0d; /* Off-black for depth */
    color: #e0e0e0; /* Light gray for readability */
    margin: 0;
    padding: 0;
    font-weight: 400;
}

.container {
    max-width: 1140px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

h1, h2, h3 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: #00BFFF; /* Deep Sky Blue - vibrant accent */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #ffffff;
}

/* Header */
header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #2a2a2a;
    text-align: center;
    margin-bottom: 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 0;
}

header h1 a {
    color: #ffffff;
}

header p {
    color: #a0a0a0;
    margin: 0.5rem 0 0;
}

/* Post List (index.html) */
#post-list {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: #00BFFF;
}

.post-card img.thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.post-card .thumbnail-link {
    display: block;
    line-height: 0;
}

.post-card-content {
    padding: 1.5rem 2rem 2rem;
}

.post-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
}

.post-card h2 a {
    color: #ffffff;
}
.post-card h2 a:hover {
    color: #00BFFF;
}

.post-meta {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 1.5rem;
}

.read-more {
    font-weight: 700;
    display: inline-block;
    margin-top: 1rem;
}

/* --- SINGLE POST PAGE --- */

/* Hero Header */
#post-hero-container {
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center center;
    padding: 5rem 0;
    position: relative;
    border-bottom: 1px solid #2a2a2a;
}

#post-hero-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 13, 13, 0.75);
    z-index: 1;
}

#post-hero-content {
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

#post-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}

/* Main Two-Column Layout */
.main-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

article#post-content {
    flex: 2.5;
    min-width: 0;
    background: #1a1a1a;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

aside.sidebar {
    flex: 1;
    position: sticky;
    top: 3rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a2a2a;
}

.post-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.post-details-list li {
    margin-bottom: 0.75rem;
    color: #a0a0a0;
}
.post-details-list li:last-child {
    margin-bottom: 0;
}

.post-details-list strong {
    color: #e0e0e0;
    margin-right: 0.5em;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    background-color: #0d0d0d;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
.search-input:focus {
    outline: none;
    border-color: #00BFFF;
}

/* Special Content Blocks */
.key-takeaways, .contents-box {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
}

.key-takeaways h2, .contents-box h2 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.key-takeaways ul, .contents-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.key-takeaways ul li, .contents-box ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 1rem;
}
.key-takeaways ul li:last-child, .contents-box ul li:last-child {
    margin-bottom: 0;
}

.key-takeaways ul li::before {
    content: '•';
    color: #00BFFF;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.4rem;
}

/* Styles for Markdown content */
#post-content .post-body {
    margin-top: 2rem;
}

#post-content .post-body h1,
#post-content .post-body h2,
#post-content .post-body h3 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

#post-content .post-body p {
    margin-bottom: 1.2em;
}

#post-content .post-body pre {
    background-color: #0d0d0d;
    border: 1px solid #333;
    color: #f8f8f2;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
}

#post-content .post-body code {
    font-family: "Fira Code", "Courier New", monospace;
    background: #2a2a2a;
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

#post-content .post-body pre code {
    background: none;
    padding: 0;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 700;
}