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

:root {
    --bg: #fafafa;
    --bg-alt: #ffffff;
    --text: #171717;
    --text-muted: #525252;
    --accent: #2563eb;
    --accent-light: #dbeafe;
    --tag-text: #1e40af;
    --border: #e5e5e5;
}

[data-theme="dark"] {
    --bg: #0a0a0a;
    --bg-alt: #171717;
    --text: #fafafa;
    --text-muted: #a3a3a3;
    --accent: #3b82f6;
    --accent-light: #1e3a5f;
    --tag-text: #e0f2fe;
    --border: #262626;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.top-controls {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.lang-switch,
.theme-switch {
    display: flex;
    gap: 4px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    color: var(--text);
    background: var(--border);
}

.lang-option {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option:hover {
    color: var(--text);
}

.lang-option.active {
    background: var(--accent);
    color: white;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-label {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-name {
    font-size: clamp(44px, 10vw, 72px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-links {
    display: flex;
    gap: 12px;
}

.hero-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.8;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.skill-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.project-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #818cf8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.project-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 18px;
}

.project-arrow {
    color: var(--text-muted);
    font-size: 14px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s;
}

.project-card:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
}

.project-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
} 

.project-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-lang {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    transition: all 0.2s;
}

.view-all:hover {
    background: var(--accent);
    color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.blog-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.blog-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--border);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.blog-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.blog-date {
    font-size: 13px;
    color: var(--text-muted);
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    transition: gap 0.2s;
}

.blog-card:hover .blog-read-more {
    gap: 10px;
}

.loading {
    color: var(--text-muted);
    font-size: 14px;
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

.experience-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.experience-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: all 0.25s ease;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #818cf8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.experience-item:hover::before {
    transform: scaleX(1);
}

.experience-item:hover {
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.experience-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.experience-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 20px;
}

.experience-date {
    font-size: 12px;
    color: white;
    font-weight: 500;
    background: var(--accent);
    padding: 6px 12px;
    border-radius: 20px;
}

.experience-role {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.experience-company {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.experience-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--bg-alt);
}

.footer p {
    font-size: 14px;
    color: var(--text-muted);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeUp 0.6s ease-out backwards;
}

.hero-label { animation-delay: 0.1s; }
.hero-name { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.3s; }
.hero-links { animation-delay: 0.4s; }

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }

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

@media (max-width: 640px) {
    .top-controls {
        top: 16px;
        right: 16px;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .section {
        padding: 60px 0;
    }

    .section h2 {
        font-size: 24px;
    }

    .skill-tag {
        font-size: 13px;
        padding: 6px 12px;
    }

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

    .project-card {
        padding: 20px;
    }

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

@media (min-width: 641px) and (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .experience-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .experience-list {
        grid-template-columns: 1fr;
    }

    .experience-header {
        flex-direction: column;
        gap: 12px;
    }

    .experience-date {
        align-self: flex-start;
    }
}
