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

body {
    font-family: 'Libre Baskerville', serif;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode {
    background-color: #fff;
    color: #000;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .subtitle {
    color: #999;
}

body.dark-mode nav > a {
    color: #e0e0e0;
}

body.dark-mode nav > a:hover {
    color: #999;
}

body.dark-mode .dropdown-toggle {
    color: #e0e0e0;
}

body.dark-mode .dropdown-menu {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .dropdown-menu a {
    color: #e0e0e0;
}

body.dark-mode .dropdown-menu a:hover {
    background-color: #333;
}

body.dark-mode .grid-item img {
    background-color: #2a2a2a;
}

body.dark-mode .grid-content .description {
    color: #ccc;
}

body.dark-mode .grid-content .date {
    color: #777;
}

body.dark-mode .page-subtitle {
    color: #999;
}

body.dark-mode .about-content {
    background-color: #2a2a2a;
    border-color: #444;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: left;
    cursor: pointer;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 40px;
    color: #666;
    text-align: left;
}

nav {
    margin-top: 40px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

nav > a {
    font-size: 1.1rem;
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav > a:hover {
    color: #666;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    font-size: 1.1rem;
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px 0;
    margin-top: 5px;
    min-width: 150px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 1rem;
    color: #000;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

.theme-toggle {
    font-size: 1.3rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-left: auto;
}

.theme-toggle:hover {
    opacity: 0.7;
}

main {
    margin-top: 60px;
}

section {
    margin-top: 80px;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: left;
}

.page-header {
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-subtitle {
    font-size: 1rem;
    font-weight: 400;
    font-style: italic;
    color: #666;
    text-align: left;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.grid-item a {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.grid-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grid-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.grid-content .description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.grid-content .date {
    font-size: 0.85rem;
    font-style: italic;
    color: #999;
}

.content-block {
    max-width: 800px;
}

.content-block p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.about-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 40px auto;
    display: block;
    border-radius: 8px;
}

.cv-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.cv-button:hover {
    background-color: #333;
}

body.dark-mode .cv-button {
    background-color: #fff;
    color: #000;
}

body.dark-mode .cv-button:hover {
    background-color: #e0e0e0;
}
