/* Shared styles for static pages: about, blog, videos, etc. */

body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.header {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.header-title {
    font-size: clamp(1.25rem, 5vw, 2.25rem);
    font-weight: 600;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: #58a6ff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.content-section {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.content-section h2 {
    color: #c9d1d9;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #30363d;
}

.content-section p {
    color: #c9d1d9;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.content-section ul {
    color: #c9d1d9;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-section a {
    color: #58a6ff;
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

.content-section img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #30363d;
    margin: 1rem 0;
}

/* Smaller in-content images for blog posts – less dominant, better flow */
.content-section img.blog-post-img {
    max-width: min(420px, 100%);
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Blog post: text left, image right, top-aligned */
.blog-text-image-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem 0;
}
.blog-text-image-table td {
    vertical-align: top;
    padding: 0 0 1.5rem 0;
}
.blog-text-image-table td:first-child {
    padding-right: 1.5rem;
    width: 55%;
}
.blog-text-image-table td:last-child {
    width: 45%;
}
.blog-text-image-table .blog-image-cell a {
    display: block;
    cursor: pointer;
}
.blog-text-image-table .blog-image-cell a:focus {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
}
.blog-text-image-table .blog-image-cell img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #30363d;
    display: block;
}
.blog-text-image-table .blog-image-cell img:hover {
    border-color: #58a6ff;
}
.blog-text-image-table tr:last-child td {
    padding-bottom: 0;
}
@media (max-width: 767px) {
    .blog-text-image-table td,
    .blog-text-image-table td:first-child,
    .blog-text-image-table td:last-child {
        display: block;
        width: 100%;
        padding-right: 0;
        padding-bottom: 1rem;
    }
    .blog-text-image-table .blog-image-cell {
        padding-bottom: 1.5rem;
    }
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
}

.video-wrapper:first-child {
    margin-top: 0;
}

.video-wrapper:last-child {
    margin-bottom: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
}

/* Blog index */
.blog-entry {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.25rem 0;
    border-bottom: 1px solid #30363d;
}

.blog-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-entry:first-child {
    padding-top: 0;
}

.blog-thumb-wrap {
    flex-shrink: 0;
    width: 320px;
    max-width: 100%;
    height: 200px;
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.blog-meta {
    flex: 1;
    min-width: 0;
}

.blog-date {
    color: #8b949e;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.blog-entry h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-entry h2 a {
    color: #c9d1d9;
    text-decoration: none;
}

.blog-entry h2 a:hover {
    color: #58a6ff;
}

.blog-desc {
    color: #c9d1d9;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 575px) {
    .blog-entry {
        flex-direction: column;
    }
    .blog-thumb-wrap {
        width: 100%;
    }
}

/* Site footer – used by blog, about, videos, etc. */
.site-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #30363d;
}

.site-footer .site-footer-text {
    color: #8b949e;
    font-size: 0.875rem;
}
