﻿/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f79ff;
    --secondary-color: #1e49c0;
    --text-main: #e8eefb;
    --text-muted: #98a8cd;
    --text-dark: #98a8cd;
    --bg-base: #05132a;
    --bg-surface: #0d2247;
    --bg-panel: #112a55;
    --border-color: rgba(255, 255, 255, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation */
.navbar {
    background-color: rgba(5, 19, 42, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0b2254 0%, #163d83 55%, #255cc0 100%);
    color: white;
    text-align: center;
    padding: 100px 20px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 600;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(79, 121, 255, 0.35);
}

/* About Section */
.about {
    padding: 60px 20px;
    background-color: var(--bg-surface);
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.about > .container > p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    background: var(--bg-panel);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 121, 255, 0.4);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.skill-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.skill-item p {
    color: var(--text-muted);
}

/* Projects Section */
.projects {
    padding: 60px 20px;
    background-color: #081a3a;
}

.projects h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

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

.project-card {
    background: var(--bg-panel);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--text-main);
}

.project-card p {
    padding: 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.project-link {
    display: inline-block;
    padding: 1rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #9bb6ff;
}

/* Contact Section */
.contact {
    padding: 60px 20px;
    background-color: #08183d;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #122250;
    color: var(--text-main);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form textarea {
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #7d8db0;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 121, 255, 0.18);
}

.submit-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(79, 121, 255, 0.32);
}

.contact-form-feedback {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background-color: rgba(13, 32, 69, 0.95);
    border-left: 4px solid var(--primary-color);
    color: var(--text-main);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-height: 0;
    overflow: hidden;
}

.contact-form-feedback--visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
}

.contact-form-feedback--error {
    border-left-color: #ff6b7f;
}

.contact-form-feedback--success {
    border-left-color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: #081229;
    color: var(--text-muted);
    padding: 2rem 20px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--bg-surface);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Ensure the hamburger bars keep the primary color when active */
    .hamburger.active span {
        background-color: var(--primary-color);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 20px;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }
}

/* Blog Section */
.blog-hero {
    background: linear-gradient(135deg, #0b2254 0%, #163d83 55%, #255cc0 100%);
    color: white;
    text-align: center;
    padding: 80px 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.blog-content {
    padding: 60px 20px;
    background-color: var(--bg-surface);
    min-height: calc(100vh - 400px);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
    border-color: rgba(79, 121, 255, 0.3);
}

.blog-header {
    margin-bottom: 1rem;
}

.blog-header h2 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.post-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title-link:hover {
    color: var(--primary-color);
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-date {
    display: flex;
    align-items: center;
}

.blog-date::before {
    content: "📅 ";
    margin-right: 0.3rem;
}

.blog-author {
    display: flex;
    align-items: center;
}

.blog-author::before {
    content: "✍️ ";
    margin-right: 0.3rem;
}

.blog-excerpt {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.read-more:hover {
    color: #9bb6ff;
}

/* Post Page */
.post-content {
    padding: 60px 20px;
    background-color: var(--bg-surface);
    min-height: 100vh;
}

.post-container {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 3rem;
}

.blog-post {
    background: var(--bg-panel);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(79, 121, 255, 0.2);
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-date::before {
    content: "📅 ";
    margin-right: 0.3rem;
}

.post-author::before {
    content: "✍️ ";
    margin-right: 0.3rem;
}

.post-body {
    line-height: 1.8;
}

.post-body h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.post-body h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.post-body p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.post-body strong {
    color: var(--text-main);
}

.post-body code {
    background-color: rgba(79, 121, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #9bb6ff;
    font-family: 'Courier New', monospace;
}

.post-body pre {
    background-color: #05132a;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-body pre code {
    background-color: transparent;
    padding: 0;
    color: #7dd3fc;
}

.post-body ul,
.post-body ol {
    margin: 1rem 0 1rem 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.post-body a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-body a:hover {
    color: #9bb6ff;
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.back-to-blog {
    background: var(--bg-panel);
    padding: 1rem;
    border-radius: 12px;
    color: var(--primary-color);
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(79, 121, 255, 0.3);
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    background-color: rgba(79, 121, 255, 0.1);
    border-color: var(--primary-color);
}

/* Blog Responsive Design */
@media (max-width: 1024px) {
    .post-container {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

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

    .blog-post {
        padding: 1.5rem;
    }

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

    .post-body h3 {
        font-size: 1.1rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 50px 20px;
        min-height: 300px;
    }

    .blog-hero h1 {
        font-size: 1.5rem;
    }

    .blog-hero p {
        font-size: 0.9rem;
    }

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

    .blog-post {
        padding: 1rem;
    }

    .post-body {
        font-size: 0.95rem;
    }
}

/* Recent Posts Section (Main Page) */
.blog {
    padding: 60px 20px;
    background-color: #081a3a;
}

.blog h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.recent-post-card {
    background: var(--bg-panel);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.recent-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(79, 121, 255, 0.3);
}

.recent-post-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.recent-post-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-link:hover {
    color: var(--primary-color);
}

.recent-post-meta {
    margin-bottom: 0.75rem;
}

.recent-post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recent-post-excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.9rem;
}

.read-more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.read-more-link:hover {
    color: #9bb6ff;
}

.blog-section-footer {
    display: flex;
    justify-content: center;
}

.view-more-posts {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.view-more-posts:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(79, 121, 255, 0.32);
}

@media (max-width: 768px) {
    .blog h2 {
        font-size: 2rem;
    }

    .recent-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog {
        padding: 40px 20px;
    }

    .blog h2 {
        font-size: 1.5rem;
    }

    .recent-post-card {
        padding: 1rem;
    }
}
