:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --subtitle-color: #666666;
    --border-color: #eeeeee;
    --border-light: #f0f0f0;
    --link-color: #0066cc;
    --tag-color: #666666;
    --tag-hover: #333333;
    --tech-color: #555555;
    --tooltip-bg: #333333;
    --tooltip-text: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --subtitle-color: #999999;
    --border-color: #333333;
    --border-light: #2a2a2a;
    --link-color: #4da6ff;
    --tag-color: #999999;
    --tag-hover: #cccccc;
    --tech-color: #b0b0b0;
    --tooltip-bg: #333333;
    --tooltip-text: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.subtitle {
    color: var(--subtitle-color);
    margin-bottom: 3rem;
}

.section {
    margin-bottom: 3rem;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

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

.project h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.project-meta {
    color: var(--subtitle-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.project-description {
    margin-bottom: 0.5rem;
}

.project-tech {
    font-size: 0.9rem;
    color: var(--tech-color);
}

.project-tags {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--tag-color);
    transition: color 0.3s ease;
    cursor: help;
}

.tag:hover {
    color: var(--tag-hover);
}

.tag i {
    font-size: 1rem;
}

.tag .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 0.25rem;
}

.tag .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--tooltip-bg);
}

.tag:hover .tooltip {
    opacity: 1;
}

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

a:hover {
    text-decoration: underline;
}

.contact {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.contact a {
    margin: 0 1rem;
    color: var(--subtitle-color);
    transition: color 0.3s ease;
}

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

.contact i {
    font-size: 1.5rem;
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.theme-toggle:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.theme-toggle i:last-child {
    position: absolute;
    opacity: 0;
}

[data-theme="dark"] .theme-toggle i:first-child {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle i:last-child {
    opacity: 1;
}