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

:root {
    --bg: #0a0a0c;
    --bg-secondary: #121215;
    --text: #d4d4d4;
    --text-secondary: #9a9a9a;
    --text-muted: #6a6a6a;
    --border: #2a2a2e;
    --link: #7cb3f0;
    --link-hover: #9ecaff;
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-secondary: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border: #e5e5e5;
    --link: #2563eb;
    --link-hover: #1d4ed8;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.animate {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 0.5s ease forwards;
    will-change: opacity, transform;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: color 0.2s;
}

.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }

.header-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-image {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.header-content { flex: 1; min-width: 0; }

.name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    transition: all 0.15s;
}

nav a:hover { 
    color: var(--text);
    background: var(--bg-secondary);
}

nav a.active { color: var(--text); }

section { margin-bottom: 2.5rem; }

h2 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.about p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.about p:last-child { margin-bottom: 0; }

.project {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.project:last-child { 
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.project-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.project h3 {
    font-size: 0.95rem;
    font-weight: 500;
}

.project h3 a { color: var(--text); }
.project h3 a:hover { color: var(--link); }

.project .status {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.project p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

.project .tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project .tags span:not(:last-child)::after { content: "·"; margin-left: 0.4rem; }

.project-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    display: inline-block;
}

.blog-item {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.blog-item:last-child { border-bottom: none; }
.blog-item:hover { text-decoration: none; }

.blog-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.blog-item h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.blog-item:hover h3 { color: var(--link); }

.blog-header .status { font-size: 0.7rem; color: var(--text-muted); }

.blog-item .meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.blog-item > p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.blog-item .tags {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.blog-item .tags span:not(:last-child)::after { content: "·"; margin-left: 0.4rem; }

.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
}

.skill-group { margin-bottom: 0.5rem; }

.skill-group h4 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.skill-group ul { list-style: none; }

.skill-group li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

footer span { width: 100%; text-align: center; margin-top: 0.75rem; }

footer a {
    color: var(--text-muted);
    transition: color 0.15s;
}

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

footer a svg { width: 20px; height: 20px; fill: currentColor; }

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    transition: color 0.15s;
}

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

.post-content { margin-top: 1rem; }

.post-content h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-content .post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.post-content h2 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.post-content h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.post-content li { margin-bottom: 0.35rem; }

.post-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85em;
    background: var(--bg-secondary);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.post-content pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.post-content pre code { background: none; padding: 0; }

.post-content blockquote {
    border-left: 2px solid var(--border);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 600px) {
    .container { padding: 2rem 1.25rem; }
    
    .theme-toggle { top: 0.75rem; right: 0.75rem; }
    
    .header-profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .profile-image { width: 64px; height: 64px; }
    .name { font-size: 1.25rem; }
    nav { gap: 0.15rem; }
    nav a { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
    
    h2 { font-size: 0.65rem; margin-bottom: 0.75rem; }
    .project { margin-bottom: 1.25rem; padding-bottom: 1.25rem; }
    .project h3 { font-size: 0.9rem; }
    .project p { font-size: 0.85rem; }
    .project .tags { font-size: 0.7rem; }
    
    .skills { grid-template-columns: 1fr; gap: 0.75rem; }
    .skill-group li { font-size: 0.8rem; }
    
    .blog-item { padding: 0.6rem 0; }
    .blog-item h3 { font-size: 0.85rem; }
    .blog-item > p { font-size: 0.8rem; }
    
    footer a svg { width: 22px; height: 22px; }
    
    .post-content h1 { font-size: 1.25rem; }
    .post-content p { font-size: 0.9rem; }
    .post-content ul, .post-content ol { font-size: 0.9rem; }
}
