:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --primary-color: #4a6fa5;
    --secondary-color: #f0f0f0;
    --border-color: #e0e0e0;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --primary-color: #6a8fc5;
    --secondary-color: #2a2a2a;
    --border-color: #444444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.theme-toggle button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 1rem;
}

nav li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

nav li.active {
    border-bottom-color: white;
    font-weight: bold;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.profile {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
}

.contact {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.works {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.work-item {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
}

.work-item h3 {
    margin-bottom: 0.5rem;
}

.work-item a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 0.5rem;
}

.diary-list {
    margin-top: 1.5rem;
}

.diary-item {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.diary-date {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.diary-content {
    white-space: pre-line;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--secondary-color);
    margin-top: 2rem;
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin-bottom: 0.5rem;
    }
}

a {
    color: limegreen;
}