
/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --bg-color: #F3F6FA;
    --primary-blue: #2864F0;
    --dark-navy: #1A245E;
    --medium-grey: #525F87;
    --light-grey-border: #E5E9F4;
    --tag-bg: #E5E9F4;
    --white: #FFFFFF;
    --font-family: 'Poppins', sans-serif;
}

/* --- Global Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--medium-grey);
    font-family: var(--font-family);
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-navy);
    font-weight: 700;
}

a {
    color: var(--dark-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-blue);
}

section {
    padding: 4rem 0;
}

/* --- Navigation Bar --- */
.navbar {
    background-color: var(--bg-color);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--light-grey-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-navy);
}

.logo-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
    color: var(--primary-blue);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--light-grey-border);
    padding: 2rem 0;
    font-size: 0.875rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a svg {
    width: 20px;
    height: 20px;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.social-icons a:hover svg {
    transform: scale(1.2);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: #1c54d1;
    color: var(--white);
}

.btn-outline {
    background-color: var(--white);
    color: var(--dark-navy);
    border-color: var(--dark-navy);
}

.btn-outline:hover {
    background-color: var(--dark-navy);
    color: var(--white);
}

/* --- Cards --- */
.card {
    background-color: var(--white);
    border: 1px solid var(--light-grey-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.card-img-placeholder {
    background-color: #EAEFF7;
    width: 100%;
}

.code-placeholder {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
}

.code-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(40, 100, 240, 0.1) 50%, transparent 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 12px,
            rgba(255, 255, 255, 0.03) 12px,
            rgba(255, 255, 255, 0.03) 13px
        );
    animation: codeFlow 3s linear infinite;
}

.code-placeholder::after {
    content: '{ code }';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-blue);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(40, 100, 240, 0.3);
    z-index: 1;
}

@keyframes codeFlow {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

.blog-placeholder {
    background: linear-gradient(135deg, #2864F0 0%, #1c54d1 100%);
    position: relative;
    overflow: hidden;
}

.blog-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px, 45px 45px, 60px 60px, 75px 75px;
    animation: blogFloat 8s ease-in-out infinite;
}

.blog-placeholder::after {
    content: '📝';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    opacity: 0.8;
    animation: blogPulse 2s ease-in-out infinite;
}

@keyframes blogFloat {
    0%, 100% {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }
    50% {
        background-position: 15px 15px, -22px 22px, 30px -30px, -37px -37px;
    }
}

@keyframes blogPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

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

.card-content h3 {
    margin-top: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.card-content p {
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.6;
}

/* --- Tags --- */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: var(--tag-bg);
    color: var(--medium-grey);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--light-grey-border);
}

/* --- Highlight Effect --- */
.highlight {
    display: inline;
    line-height: 1.8;
}

/* --- Home Page --- */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 2rem 0;
}

.hero-content h1 {
    font-size: 3.25rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-social {
    margin-top: 2rem;
}

.connect-label {
    display: block;
    font-size: 0.9rem;
    color: var(--medium-grey);
    margin-bottom: 1rem;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background-color: var(--light-grey-border);
    color: var(--dark-navy);
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link.twitter:hover {
    background-color: #1DA1F2;
    color: white;
}

.social-link.linkedin:hover {
    background-color: #0077B5;
    color: white;
}

.social-link.github:hover {
    background-color: #333;
    color: white;
}

.hero-image-placeholder {
    width: 100%;
    max-width: 600px;
    height: 600px;
    background-color: #EAEFF7;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
}

.posts-grid, .projects-grid, .blog-posts-grid {
    display: grid;
    gap: 2rem;
}

.posts-grid, .blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

.post-card .card-img-placeholder {
    height: 150px;
    background-size: 94% auto;
    background-repeat: no-repeat;
    background-position: center center;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--medium-grey);
}

.post-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-card-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-arrow {
    transform: translateX(5px);
}

.projects-grid {
    grid-template-columns: repeat(2, 1fr);
}

.project-card .card-img-placeholder {
    height: 150px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.language-indicator {
    background-color: rgba(40, 100, 240, 0.1);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.stars-count {
    background-color: rgba(255, 215, 0, 0.1);
    color: #f59e0b;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.project-card .btn {
    margin-top: 0;
}

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

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.more-link {
    display: block;
    text-align: center;
    margin-top: 4rem;
    font-weight: 500;
}

.more-posts-container {
    text-align: center;
    margin-top: 3rem;
}

/* --- Blog & Projects Page --- */
.page-header {
    text-align: center;
    padding: 4rem 0;
}

.page-header h1 {
    font-size: 3rem;
    line-height: 1.4;
    display: inline-block;
    margin-bottom: 1rem;
}

.page-header .subtitle {
    font-size: 1.2rem;
    display: inline-block;
    margin-top: 1rem;
}

.filter-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 3rem;
}

.filter-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--light-grey-border);
}

.filter-pill.active {
    background-color: var(--dark-navy);
    color: var(--white);
    border-color: var(--dark-navy);
}

.filter-pill:not(.active) {
    background-color: var(--white);
    color: var(--dark-navy);
}

.filter-pill:not(.active):hover {
    background-color: #f0f3f8;
}

.blog-posts-grid {
}


/* --- About Page --- */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.about-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content .highlight {
    line-height: 2.2;
}

.about-image-placeholder {
    width: 100%;
    height: 700px;
    background-color: #EAEFF7;
    border-radius: 12px;
    overflow: hidden;
}

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

.contact-form-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--light-grey-border);
    margin-top: 4rem;
}

.contact-form-card h2 .highlight {
    font-size: 2rem;
}

.contact-form-card .subtitle {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group .highlight {
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-grey-border);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(40, 100, 240, 0.2);
}

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

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* --- AI Enhancer Page --- */
.enhancer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.enhancer-panel {
    background: var(--white);
    border: 1px solid var(--light-grey-border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.enhancer-panel h3 .highlight {
    font-size: 1.5rem;
}

.enhancer-panel .panel-subtitle .highlight {
    font-size: 0.9rem;
}

.enhancer-panel textarea {
    height: 250px;
    margin-top: 1.5rem;
}

.enhancer-panel .form-group {
    margin-top: 1.5rem;
}

.suggestions-placeholder {
    border: 2px dashed var(--light-grey-border);
    border-radius: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--medium-grey);
    padding: 2rem;
    margin-top: 1.5rem;
}

.suggestions-placeholder svg {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.btn-enhance {
    background-color: var(--dark-navy);
    margin-top: 1.5rem;
}

.btn-enhance:hover {
    background-color: #11183e;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    section { padding: 3rem 0; }
    .hero-section, .about-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-image-placeholder {
        margin: 2rem auto 0;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .about-image-placeholder {
        order: -1; /* Move image to top on mobile */
        height: auto;
        aspect-ratio: 1 / 1.16;
        margin-bottom: 2rem;
    }
    .posts-grid, .projects-grid, .blog-posts-grid {
        grid-template-columns: 1fr 1fr;
    }
    .enhancer-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .posts-grid, .projects-grid, .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .contact-form-card { padding: 2rem; }

    .about-section.text-center .about-content p {
        text-align: left;
    }
}

/* --- Pagination Styles --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: var(--white);
    border: 1px solid var(--light-grey-border);
    border-radius: 8px;
    color: var(--dark-navy);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 1px solid var(--light-grey-border);
    border-radius: 8px;
    color: var(--dark-navy);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background-color: var(--tag-bg);
    border-color: var(--primary-blue);
}

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

.pagination-dots {
    color: var(--medium-grey);
    padding: 0 0.25rem;
}

.pagination-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--medium-grey);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.5rem;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}
