/* Base Styles & Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-text: #f4f4f4;
    --bg-color: #ffffff;
    --light-bg: #f9f9f9;
    --dark-bg: #2c3e50;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --radius: 6px;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

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

a:hover {
    color: var(--accent-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--secondary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color)
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn.primary {
    background-color: var(--primary-color);
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    opacity: 0.9;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    padding-right: 15px; /* Added padding to the right side */
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
}

.nav-links a.active {
    color: var(--primary-color);
    position: relative;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero .intro {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Post Cards */
.featured-posts, .projects-preview {
    padding: 80px 0;
}

.featured-blog, .blog-preview {
    padding: 80px 0;
}

.featured-blog h2, .blog-preview h2 {
    text-align: center;
    margin-bottom: 50px;
}

.featured-posts h2, .projects-preview h2 {
    text-align: center;
    margin-bottom: 50px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background-color: white;
}

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

.post-image {
    height: 200px;
    background-color: var(--secondary-color);
    background-size: cover;
    background-position: center;
}

.post-content {
    padding: 20px;
}

.post-date {
    color: #777;
    font-size: 0.9rem;
}

.post-content h3 {
    margin: 10px 0;
}

.post-content p {
    margin-bottom: 15px;
    color: #555;
}

.read-more {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.read-more:after {
    content: "→";
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover:after {
    margin-left: 10px;
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 20px;
    background-color: white;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 180px;
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.project-card h3 {
    margin-bottom: 10px;
}

.project-card p {
    color: #555;
    margin-bottom: 15px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 8px;
}

.tags span {
    background-color: var(--light-bg);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Center Alignment Helper */
.center-align {
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

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

/* Page Header */
.page-header {
    background-color: var(--light-bg);
    padding: 60px 0;
    text-align: center;
}

.post-meta-info {
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 20px;
}

.post-meta-info span {
    margin-right: 15px;
}


/* Projects Page Specific */
.filter-options {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Blog Page Specific */
.blog-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 15px;
}

.blog-sidebar {
    position: sticky;
    top: 30px;
    height: calc(100vh - 60px); /* Set a height that accounts for some spacing */
    overflow-y: auto; /* Enable scrolling within the sidebar if needed */
    padding-right: 10px; /* Add some padding for the scrollbar */
    z-index: 10; /* Ensure it stays above other content */
}

.search-box {
    display: flex;
    margin-bottom: 30px;
}

.categories, .recent-posts {
    margin-bottom: 30px;
}

.categories h3, .recent-posts h3 {
    margin-bottom: 15px;
}

.categories ul, .recent-posts ul {
    list-style: none;
}

.categories li, .recent-posts li {
    margin-bottom: 10px;
}

.categories a, .recent-posts a {
    color: var(--text-color);
}

.categories a:hover, .recent-posts a:hover {
    color: var(--primary-color);
}

.post-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.category, .read-time {
    font-size: 0.9rem;
    color: #777;
}

.category {
    background-color: var(--light-bg);
    padding: 3px 10px;
    border-radius: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.page-number, .next-page, .prev-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.next-page, .prev-page {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

.page-number.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-number:hover:not(.active), .next-page:hover, .prev-page:hover {
    background-color: var(--light-bg);
}

/* Contact Page Specific */
.contact-content {
    display: grid;
    gap: 40px;
    padding: 60px 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.contact-method {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--light-bg);
    border-radius: var(--radius);
}

.contact-method i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-form {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: var(--radius);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.form-group textarea {
    resize: vertical;
}

/* Blog Post Page */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 15px;
}


.post-header h1 {
    margin-bottom: 15px;
}

.post-content-full h2 {
    margin-top: 40px;
}

.post-content-full p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.post-content-full img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: var(--radius);
}

.post-content-full ul, .post-content-full ol {
    margin-bottom: 20px;
    margin-left: 20px;
}

.post-content-full li {
    margin-bottom: 10px;
}

.post-content-full blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    font-style: italic;
    margin: 20px 0;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.prev-post, .next-post {
    max-width: 45%;
}

.prev-post a, .next-post a {
    display: flex;
    flex-direction: column;
}

.nav-label {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 5px;
}

/* About Page */
.about-content {
    padding: 60px 0;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.about-image {
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    min-height: 200px;
    max-height: 500px;
    background-size: cover;
    background-position: center;
}

.about-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text h2 {
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.skills {
    margin-bottom: 60px;
}

.skills h2 {
    text-align: center;
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.skill {
    text-align: center;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: var(--radius);
}

.skill i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Project Detail Page */
.project-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 15px;
}

.project-detail-header {
    margin-bottom: 40px;
}

.project-detail-header h1 {
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 8px;
}

.project-tags span {
    background-color: var(--light-bg);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-title-image {
    height: 400px;
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    margin-bottom: 30px;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.project-image-item {
    height: 200px;
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
}

.project-image-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.full-width-image {
    overflow: hidden;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    object-fit: contain;
    display: flex;
    flex-direction: column;
    justify-content: left;
    background-color: white;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    margin-bottom: 25px;
    width: 100%;
}

.full-width-image .container{
    text-align: center;
    padding: 10px 20px;
    color: var(--text-color);
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 20px;
    background-color: white;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-image {
    height: 180px;
    background-color: var(--secondary-color);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.blog-card h3 {
    margin-bottom: 10px;
}

.blog-card p {
    color: #555;
    margin-bottom: 15px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .burger {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: white;
        width: 50%;
        flex-direction: column;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 999;
        box-shadow: var(--shadow);
        padding: 20px 0;
        border-radius: var(--radius);
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .nav-links.open {
        transform: translateX(0%);
    }
    
    .about-intro, .contact-content {
        grid-template-columns: 1fr;
    }
    
    .blog-content {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        order: 2;
        position: static; /* Reset the sticky position on mobile */
        height: auto; /* Reset the height on mobile */
        overflow-y: visible; /* Reset the overflow on mobile */
    }
    
    .post-item {
        grid-template-columns: 1fr;
    }
    
    .post-image {
        height: 200px;
    }
}
