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

:root {
    --bg-color: #fff;
    --text-color: #222;
    --text-secondary: #666;
    --text-tertiary: #444;
    --text-muted: #999;
    --border-color: #eee;
    --accent-color: #6b9e00;
    --accent-bg: #000;
    --contact-border: #6b9e00;
    --contact-hover: #6b9e00;
}

[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --text-color: #e4e4e4;
    --text-secondary: #a0a0a0;
    --text-tertiary: #c0c0c0;
    --text-muted: #666;
    --border-color: #2a2a2a;
    --accent-color: #adff2f;
    --accent-bg: #1a1a1a;
    --contact-border: #adff2f;
    --contact-hover: #adff2f;
}

html {
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    margin-bottom: 60px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-bg);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    pointer-events: none;
}

/* Typography */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 60px;
    margin-bottom: 30px;
    color: var(--text-color);
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

p {
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

/* Sections */
section {
    margin-bottom: 40px;
}

#about p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-tertiary);
}

/* Projects */
.project {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

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

.project p {
    line-height: 1.7;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-color);
    background: var(--accent-bg);
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.7;
}

.project a {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Contact */
.contact-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-list li a {
    color: var(--text-color);
    border-bottom: 2px solid var(--contact-border);
    padding-bottom: 2px;
}

.contact-list li a:hover {
    color: var(--contact-hover);
    opacity: 1;
}

/* Footer */
footer {
    margin-top: 80px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.3rem;
        margin-top: 40px;
    }

    main {
        padding: 20px 10px;
    }

    .contact-list {
        flex-direction: column;
        gap: 12px;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
