/* Base Styles */
:root {
    /* Dark theme (default) */
    --background-color: #1a1a1a;
    --text-color: #e8e8e8;
    --light-gray: #2d2d2d;
    --medium-gray: #404040;
    --dark-gray: #a0a0a0;
    --link-color: #4a9eff;
    --spacing-unit: 2rem;
}

/* Light theme */
[data-theme="light"] {
    --background-color: #ffffff;
    --text-color: #2d2d2d;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --link-color: #0066cc;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 2rem 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 500;
    line-height: 1.3;
}

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

h2 {
    font-size: 1.6rem;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Header & Navigation */
header {
    margin-bottom: 3rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    width: 100%;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li:not(:last-child) {
    margin-right: 1.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    text-decoration: underline;
}

/* Theme Switch */
.theme-switch {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.theme-toggle-btn {
    background: none;
    border: 2px solid var(--medium-gray);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: var(--light-gray);
}

.theme-toggle-btn:hover {
    border-color: var(--link-color);
    transform: scale(1.05);
}

.theme-toggle-btn:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

[data-theme="light"] .theme-icon {
    transform: rotate(180deg);
}

/* Sections */
section {
    margin-bottom: 4rem;
    transition: background-color 0.3s ease;
}

.content-block {
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

/* Profile Image */
.profile-img {
    width: 150px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

/* Interest Items */
.interest-item {
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

/* Thought Items */
.thought-item {
    margin-bottom: 3rem;
    transition: background-color 0.3s ease;
}

.date {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

/* Contact Section */
#contact a {
    word-break: break-all;
}

/* Regular Reads Table */
.reads-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.reads-table th,
.reads-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.reads-table th {
    background-color: var(--light-gray);
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.reads-table td {
    vertical-align: top;
    transition: background-color 0.3s ease;
}

.reads-table tr:hover {
    background-color: var(--light-gray);
    transition: background-color 0.3s ease;
}

.reads-table a {
    color: var(--link-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.reads-table a:hover {
    text-decoration: underline;
}

/* Category Sections */
.reads-categories {
    margin-top: 1rem;
}

.category-section {
    margin-bottom: 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.category-toggle {
    width: 100%;
    background-color: var(--light-gray);
    border: none;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.3s ease;
}

.category-toggle:hover {
    background-color: var(--medium-gray);
}

.category-toggle:focus {
    outline: none;
    background-color: var(--medium-gray);
}

.category-title {
    font-weight: 500;
    transition: color 0.3s ease;
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.category-toggle.active .toggle-icon {
    transform: rotate(45deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, background-color 0.3s ease;
    background-color: var(--background-color);
}

.category-content.active {
    max-height: 2000px;
    transition: max-height 0.5s ease-in, background-color 0.3s ease;
}

.category-content .reads-table {
    margin-top: 0;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--medium-gray);
    color: var(--dark-gray);
    font-size: 0.9rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--link-color);
    word-break: break-all;
}

.last-updated {
    margin-top: 0.5rem;
}

/* Responsive Styles */
@media (min-width: 768px) {
    body {
        padding: 3rem 2rem;
        font-size: 18px;
    }

    h1 {
        font-size: 2.5rem;
    }

    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    nav ul {
        margin-top: 0;
    }

    .profile-img {
        float: right;
        margin-left: 1.5rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 767px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}