:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --bg-color: #ffffff;
    --light-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

img {
    max-width: 100%;
    height: auto;
}

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

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

ul {
    list-style-type: none;
}

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

.hidden {
    display: none;
}

/* Header */
header {
    background-color: var(--bg-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.05em;
}

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

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    padding: 8rem 0 5rem;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(#e5e7eb 1px, transparent 1px),
        radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.2;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--light-text);
    max-width: 550px;
}

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

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

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

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

.btn-secondary {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 350px;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    bottom: -10px;
    left: 0;
    background-color: var(--primary-color);
}

/* About Section */
.about-content {
    background-color: var(--bg-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.about-text {
    max-width: 800px;
}

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

.about-text h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tag {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Blog Section */
.blog-posts {
    display: grid;
    gap: 2rem;
}

.blog-posts.cards {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
}

.blog-card {
    background-color: var(--bg-color);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.blog-date {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    display: block;
}

.blog-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.blog-tags .tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    color: var(--light-text);
}

.blog-tags .tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.blog-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    transition: var(--transition);
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.blog-card:hover .blog-title,
.blog-card:hover .blog-title a {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    flex-grow: 1;
}

.read-more {
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.read-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.read-more:hover::after {
    width: 100%;
}

/* Archive */
.archive-year {
    margin-bottom: 2.5rem;
}

.archive-year h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.archive-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.archive-list li a {
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.25rem 0;
    border-bottom: 1px dashed transparent;
    transition: var(--transition);
}

.archive-list li a span {
    font-size: 0.85rem;
    color: var(--light-text);
}

.archive-list li a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.archive-links {
    margin-top: 2rem;
    text-align: right;
}

.archive-link {
    font-weight: 500;
}

.blog-intro {
    max-width: 720px;
    margin-bottom: 2.5rem;
    color: var(--light-text);
}

.section-subtitle {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Projects Section */
.project-group {
    margin-bottom: 3rem;
}

.group-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

.project-card {
    background-color: var(--bg-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h4 {
    font-size: 1.3rem;
    color: var(--text-color);
}

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

.project-link {
    font-size: 1.2rem;
    color: var(--light-text);
}

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

.project-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: var(--light-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: var(--text-color);
}

/* Contact Section */
.contact-content {
    background-color: var(--bg-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.contact-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Footer */
footer {
    background-color: var(--bg-color);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--light-text);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

@media (max-width: 680px) {
    .blog-posts.cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        padding: 2rem;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
    }

    .nav-menu.active {
        left: 0;
    }

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

    .contact-info {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

    .blog-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}