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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --dark-bg: #0f172a;
    --dark-text: #f1f5f9;
    --light-bg: #ffffff;
    --light-text: #1e293b;
    --gray: #64748b;
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body.dark-mode {
    color: var(--dark-text);
    background: var(--dark-bg);
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo a {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

nav a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-toggle {
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.lang-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
}

.theme-toggle {
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Hero */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

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

.project-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Contact */
.contact {
    text-align: center;
    padding: 5rem 0;
}

.contact p {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
}

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

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.contact-link:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Blog */
.blog-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.blog-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.blog-header .subtitle {
    font-size: 1.25rem;
    color: var(--gray);
}

.blog-posts {
    padding: 2rem 0 5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-post-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.12);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.post-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-post-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.blog-post-card h2 a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Blog Article */
.blog-article {
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.blog-article h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blog-article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
}

.blog-article p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--light-text);
}

body.dark-mode .blog-article p {
    color: var(--dark-text);
}

.blog-article ul, .blog-article ol {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}

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

.blog-article em {
    font-style: italic;
}

.blog-article strong {
    font-weight: 700;
}

.post-cta {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius);
}

.post-cta a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.post-cta a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    nav ul {
        gap: 1rem;
    }
    .contact-links {
        flex-direction: column;
    }
    .blog-header h1 {
        font-size: 2rem;
    }
    .blog-article h1 {
        font-size: 1.8rem;
    }
}
