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

:root {
    --color-bg: rgb(17, 17, 17);
    --color-text: #f0f0f0;
    --color-accent: #034DA2;
    --color-accent-hover: #023b7a;
    --color-red: #EC1D25;
    --color-nav-bg: rgba(17, 17, 17, 0.95);
    --color-card-bg: rgba(30, 30, 30, 0.95);
}


body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(90deg, rgba(200,200,200,0.04) 0%, rgba(17,17,17,1) 50%, rgba(200,200,200,0.04) 100%);
    background-color: var(--color-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Banner Styles */
.banner {
    width: 100%;
    height: 0;
    padding-bottom: 9.28%;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner > .container {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: white;
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.banner-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.banner-content p {
    font-size: 1.25rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Media Queries for different screen sizes */
@media screen and (max-width: 768px) {
    .banner-content h1 {
        font-size: 2rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
}

/* Navigation Styles */
.main-nav {
    background: transparent;
    position: relative;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

.main-nav .container {
    max-width: 400px; /* You can adjust this as needed */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;

    background: linear-gradient(90deg, #44484a 0%, #232526 50%, #44484a 100%);
    background-blend-mode: lighten;
    opacity: 0.96;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 0.3rem 1rem;
    position: relative;
}

.logo {
    display: none;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 400;
    padding: 0.3rem 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: rgba(3, 77, 162, 0.8);
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 0.5rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .main-nav {
        padding: 0.5rem;
        margin: 0 auto;
    }
}

/* Content Section Styles */
.content-section {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 2rem;
}

.content-section h2 {
    position: relative;
    display: inline-block;
    margin: 0 0 2rem;
    text-align: left;
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-text);
    width: auto;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80%;
    height: 3px;
    background: #024FA2;
    border-radius: 2px;
}

/* Post Grid Styles */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--color-card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.post-image {
    height: 200px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-bg));
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--color-accent-hover);
}

/* About Section Styles */
.about-content {
    background: var(--color-card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Resources Grid Styles */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--color-card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.resource-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.resources-list h2, .resources-list h3, .resources-list h4 {
    margin-top: 2.2rem;
    margin-bottom: 1.1rem;
}

.resources-list h3 {
    margin-top: 2.5rem;
}

.resources-list h4 {
    margin-top: 2rem;
    font-size: 1.1rem;
}

/* Footer Styles */
footer {
    background: var(--color-bg);
    color: var(--color-text);
    padding: 4rem 0 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    flex: 1;
    padding: 0 2rem;
    text-align: center;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.footer-image {
    width: 100px;
    margin: 0 auto;
    display: block;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-content h1 {
        font-size: 2.5rem;
    }

    .banner-content p {
        font-size: 1.25rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .main-nav {
        padding: 1rem;
    }
}

/* Blog Styles */
.blog-content {
    width: 100%;
}

.blog-content h2 {
    margin-bottom: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Full Blog Post Styles */
article.blog-post {
    max-width: 1250px;
    margin: 1.5rem auto;
    padding: 0 2.5rem;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: rgb(163, 161, 157);

    display: grid;
    grid-template-columns: 1fr min(100%, 750px) 1fr; /* Center column for content */
    gap: 2rem;
    position: center;
}

.post-header {
    max-width: 768px; /* keeps the post content narrow and centered */
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
    text-align: center; /* center all content inside */
    display: block;
}

.post-header img {
    width: 100%;
    max-width: 600px; /* medium size image */
    height: auto;
    margin: 0 0 1.5rem 0; /* spacing below image */
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    object-fit: cover; /* keep cropping */
    margin-left: auto;
    margin-right: auto; /* center the image */
}

.post-header h1 {
    font-size: 2.5rem; /* slightly smaller for balance */
    margin: 0 0 1rem 0;
    color: #ffffff;
    text-align: center; /* center title */
}

.post-meta {
    color: rgb(163, 161, 157);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: center; /* center meta text */
}

.post-date {
    color: rgb(163, 161, 157);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.5rem;
    text-align: center; /* center date */
}

.table-of-contents {
    position: static;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem auto 2rem auto;
    height: fit-content;
    max-width: 768px; /* same width as post */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.table-of-contents h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgb(163, 161, 157);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 0.5rem 0;
}

.table-of-contents a {
    color: rgb(163, 161, 157);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    padding: 0.2rem 0;
}

.table-of-contents a:hover {
    color: rgb(157, 163, 174);
}

/* Adjust link size based on heading level */
.table-of-contents a[href^="#h1"] {
    font-size: 1.1rem;
    font-weight: 500;
}

.table-of-contents a[href^="#h2"] {
    font-size: 1rem;
    padding-left: 1rem;
}

.table-of-contents a[href^="#h3"] {
    font-size: 0.9rem;
    padding-left: 2rem;
}


article.blog-post .post-content {
    grid-column: 2;
    margin-top: 2rem;
    max-width: 950px;
    margin-left: 0;
    margin-right: auto;
    padding: 0;
    order: 3;
}

article.blog-post .post-content img {
    width: 100%;
    max-width: 1187px; /* 950px * 1.25 */
    height: auto;
    margin: 2rem 0;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

article.blog-post .post-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 2rem;
    color: rgb(163, 161, 157);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

article.blog-post .post-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
    color: rgb(163, 161, 157);
}

article.blog-post .post-content p {
    margin-bottom: 1.5rem;
    color: rgb(163, 161, 157);
}

article.blog-post .post-content code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: rgb(163, 161, 157);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

article.blog-post .post-content pre {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

article.blog-post .post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.9em;
    line-height: 1.5;
    color: rgb(163, 161, 157);
    border: none;
}

article.blog-post .post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

article.blog-post .post-content th,
article.blog-post .post-content td {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    color: rgb(163, 161, 157);
}

article.blog-post .post-content th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

article.blog-post .post-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: rgb(163, 161, 157);
}

article.blog-post .post-content li {
    margin-bottom: 0.5rem;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2.5rem 0;
}

/* Responsive adjustments */
@media (max-width: 1250px) {
    article.blog-post {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .table-of-contents {
        position: static;
        grid-column: 1;
    }

    .post-header, 
    article.blog-post .post-content {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    article.blog-post {
        padding: 0 1rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }
}

/* Card Styles */
.card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card h3 {
    color: #ffffff;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.card p {
    color: rgb(163, 161, 157);
    margin: 0;
    line-height: 1.6;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Main Image Section */
.main-image-section {
    max-width: 1200px;
    margin: 1.5rem auto 2rem;
    padding: 0 1rem;
}

.main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.footer-image {
    width: 100px;
    margin: 0 auto;
    display: block;
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .main-image-section {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
}

/* Error Page Styles */
.error-content {
    text-align: center;
    padding: 3rem 1rem;
}

.error-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.error-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.error-content .read-more {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.error-content .read-more:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

/* Image Viewer Styles */
.image-viewer {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.image-viewer:hover {
    opacity: 0.9;
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: hidden;
}

.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    cursor: move;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-zoom-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1001;
}

.zoom-button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.zoom-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Preview Card Styles */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.preview-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.preview-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Image position controls - add these classes to specific images */
.preview-image img.show-top {
    object-position: top center;
}

.preview-image img.show-bottom {
    object-position: bottom center;
}

.preview-image img.show-center {
    object-position: center center;
}

.preview-image img.show-left {
    object-position: left center;
}

.preview-image img.show-right {
    object-position: right center;
}

.preview-card:hover .preview-image img {
    transform: scale(1.05);
}

.preview-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.preview-content h3 {
    margin: 0 0 0.5rem;
    color: #ffffff;
    font-size: 1.5rem;
}

.preview-meta {
    color: rgb(163, 161, 157);
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.preview-content p {
    margin: 0 0 1rem;
    flex-grow: 1;
}

.preview-read-more {
    color: #ffffff;
    font-weight: 500;
    display: inline-block;
    position: relative;
}

.preview-read-more::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.preview-card:hover .preview-read-more::after {
    transform: translateX(5px);
}

h1 > .highlight-hash, h2 > .highlight-hash, h3 > .highlight-hash, h4 > .highlight-hash {
    color: var(--color-accent);
}

.horizontal-gray-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #bfc2c4 0%, #888b8d 50%, #bfc2c4 100%);
    opacity: 0.32;
    margin: 0;
    border: none;
} 
