/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --dark-gray: #334155;
    --card-bg: #ffffff;
    --body-bg: #f1f5f9;
    --text: #1e293b;
    --text-light: #64748b;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition: all 0.3s ease;
    --border-radius: 0.5rem;
}

/* Dark Mode Variables */
.dark-mode {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary: #34d399;
    --dark: #f8fafc;
    --light: #1e293b;
    --gray: #94a3b8;
    --light-gray: #334155;
    --dark-gray: #e2e8f0;
    --card-bg: #1e293b;
    --body-bg: #0f172a;
    --text: #f8fafc;
    --text-light: #94a3b8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--text);
    line-height: 1.6;
    transition: var(--transition);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navigation */
header {
    padding: 2rem 0;
    position: relative;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.8rem;
}

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

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

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 0;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

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

.hero-description {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--text);
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
    position: relative;
    display: inline-block;
}

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

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

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-date {
    font-size: 0.85rem;
    color: var(--text-light);
    background-color: var(--light-gray);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
}

.card-body {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--light-gray);
    color: var(--text);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.tag-secondary {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

/* About Section */
.about-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.about-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-size: 1.25rem;
}

.about-text {
    flex: 1;
}

.about-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.about-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Skills */
.skill {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 500;
}

.skill-percent {
    color: var(--text-light);
    font-size: 0.9rem;
}

.skill-bar {
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Languages */
.language {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.language-name {
    font-weight: 500;
}

.language-level {
    display: flex;
    gap: 0.25rem;
}

.language-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-gray);
}

.language-dot.filled {
    background-color: var(--primary);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Single Article */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.article-content {
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text);
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.article-content pre {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.article-content code {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--light-gray);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-light);
}

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

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
}

.back-link i {
    transition: var(--transition);
}

.back-link:hover i {
    transform: translateX(-3px);
}

/* Article Sharing */
.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.article-share span {
    font-weight: 500;
    color: var(--text-light);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--light-gray);
    color: var(--text);
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter:hover {
    background-color: #1DA1F2;
    color: white;
}

.share-btn.linkedin:hover {
    background-color: #0077B5;
    color: white;
}

.share-btn.facebook:hover {
    background-color: #4267B2;
    color: white;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-social-link {
    color: var(--text-light);
    font-size: 1.25rem;
    transition: var(--transition);
}

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

.copyright {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeIn 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-image {
        height: 250px;
    }
}