:root {
    --bg: #fafafa;
    --bg2: #f5f5f5;
    --text: #111;
    --subtext: #555;
    --card-project: #FFF0DD;
    --card-work: #E8F4F8;
    --divider: #ddd;
}

body.dark {
    --bg: #0f0f0f;
    --bg2: #141414;
    --text: #f1f1f1;
    --subtext: #bbbbbb;
    --card-project: #4A90E2;
    --card-work: #7C5EFF;
    --divider: #333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(to bottom, var(--bg) 0%, var(--bg2) 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg2);
}

::-webkit-scrollbar-thumb {
    background: var(--text);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid var(--divider);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    font-size: 1.1rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: rgba(0,0,0,0.05);
}

body.dark .theme-toggle:hover {
    background: rgba(255,255,255,0.05);
}

.main {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
}

.profile-img {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.name {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.about {
    font-size: 1.2rem;
    color: var(--subtext);
    margin-bottom: 1.5rem;
}

.intro {
    font-size: 1.05rem;
    color: var(--subtext);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0;
    flex-wrap: wrap;
}

.links li a {
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.links li a:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.section-divider {
    max-width: 600px;
    margin: 4rem auto 3rem;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--divider), transparent);
}

.projects {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
    padding: 2rem;
}

.projects h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.projects ul {
    list-style: none;
    padding-left: 0;
}

.projects li {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-project);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.projects li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.project-tech {
    font-size: 0.9rem;
    color: var(--subtext);
    margin-top: 0.5rem;
    font-style: italic;
}

.projects a {
    color: var(--text);
    text-decoration: underline;
    margin-left: 0.5rem;
    transition: opacity 0.2s ease;
}

.projects a:hover {
    opacity: 0.6;
}

.work-experience {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
    padding: 2rem;
}

.work-experience h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.work-experience ul {
    list-style: none;
    padding-left: 0;
}

.work-experience li {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-work);
    border-radius: 10px;
    line-height: 1.7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.work-experience li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.work-experience strong {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

footer {
    max-width: 600px;
    margin: 5rem auto 0;
    padding: 2rem;
    text-align: center;
    color: var(--subtext);
    font-size: 0.9rem;
    border-top: 1px solid var(--divider);
}

footer p {
    margin: 0.3rem 0;
}

.fun-fact {
    margin-top: 1rem;
    font-style: italic;
    color: var(--subtext);
}

@media (max-width: 640px) {
    .name {
        font-size: 2.2rem;
    }

    .links ul {
        gap: 1rem;
    }

    .projects, .work-experience {
        padding: 1.5rem;
    }
}
