:root {
    --background-color: #ffffff;
    --card-background-color: #fff;
    --card-border-color: rgba(0, 0, 0, .125);
    --card-box-shadow: 1px 1px 1px rgba(255, 255, 255, 0.4),
                      2px 2px 1px rgba(255, 255, 255, 0.3),
                      3px 3px 1px rgba(255, 255, 255, 0.2);
    --text-primary: #000000;
    --text-secondary: #4a5568;
    --link-color: #3182ce;
    --hr-color: rgba(0, 0, 0, 0.1);
}

html.dark {
    --background-color: #1a202c;
    --card-background-color: #2d3748;
    --card-border-color: rgba(255, 255, 255, .125);
    --card-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4),
                      2px 2px 1px rgba(0, 0, 0, 0.3),
                      3px 3px 1px rgba(0, 0, 0, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --link-color: #63b3ed;
    --hr-color: rgba(255, 255, 255, 0.1);
}

/* Base styles */
body {
    background: var(--background-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: background-color 0.3s ease;
}

/* Card styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--card-background-color);
    background-clip: border-box;
    border: 1px solid var(--card-border-color);
    border-radius: .25rem;
    box-shadow: var(--card-box-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Typography */
h2, h3, h4 {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.header {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Horizontal rule */
hr {
    border: 0;
    border-top: 1px solid var(--hr-color);
    margin: 1rem 0;
    transition: border-color 0.3s ease;
}

/* Date styling */
.date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

/* List styling */
ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Image styling */
img {
    height: auto;
    width: 6rem;
    transition: filter 0.3s ease;
}

.image-line {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* Theme toggle button */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}

.theme-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.theme-button:hover {
    opacity: 0.8;
}

/* Theme icons visibility */
html:not(.dark) .dark-icon {
    display: inline-block;
}

html:not(.dark) .light-icon {
    display: none;
}

html.dark .dark-icon {
    display: none;
}

html.dark .light-icon {
    display: inline-block;
}

/* Dark mode image adjustment */
html.dark img {
    filter: brightness(0.9);
}

/* Visitor counter */
#counter {
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .name {
        font-size: 2rem;
    }
    
    .image-line {
        justify-content: center;
    }
    
    img {
        width: 5rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1rem !important;
    }
    
    .name {
        font-size: 1.75rem;
    }
    
    img {
        width: 4rem;
    }
}