/* CSS Custom Properties for consistent theming */
:root {
    --color-primary: #000000;
    --color-primary-light: #333333;
    --color-text: #000000;
    --color-text-light: #555555;
    --color-text-lighter: #777777;
    --color-background: #ffffff;
    --color-background-alt: #fafafa;
    --color-border: #e0e0e0;
    --color-border-light: #f0f0f0;
    --color-link: #0000FF;
    --color-link-hover: #000000;
    --font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
            --max-width: 1035px;
    --border-radius: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
}

/* Dark mode variables */
[data-theme="dark"] {
    --color-primary: #ffffff;
    --color-primary-light: #cccccc;
    --color-text: #ffffff;
    --color-text-light: #aaaaaa;
    --color-text-lighter: #888888;
    --color-background: #1a1a1a;
    --color-background-alt: #2a2a2a;
    --color-border: #404040;
    --color-border-light: #333333;
    --color-link: #4a9eff;
    --color-link-hover: #ffffff;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

        /* Container and layout */
        .container {
            max-width: var(--max-width);
            margin: 0 auto;
            margin-left: 5rem;
            padding: 2rem;
            background-color: var(--color-background);
            min-height: 100vh;
            transition: background-color 0.3s ease;
        }

                /* Controls container */
        .controls-container {
            position: fixed;
            bottom: 1rem;
            left: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            align-items: center;
            z-index: 1000;
        }

        /* Theme toggle */
        .theme-toggle {
            background: var(--color-background);
            border: 1px solid var(--color-border);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: var(--shadow);
        }

        .theme-toggle:hover {
            background: var(--color-background-alt);
            transform: scale(1.05);
        }

        .theme-toggle svg {
            width: 20px;
            height: 20px;
            fill: var(--color-text);
            transition: fill 0.3s ease;
        }

        /* Font size controls */
        .font-controls {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            align-items: center;
            background: var(--color-background);
            padding: 0.25rem;
            border-radius: 20px;
            border: 1px solid var(--color-border);
            box-shadow: var(--shadow);
        }

        .font-controls button {
            background: var(--color-background);
            border: 1px solid var(--color-border);
            border-radius: 50%;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: var(--shadow);
            font-size: 16px;
            font-weight: bold;
            color: var(--color-text);
            min-width: 36px;
        }

        .font-controls button:hover {
            background: var(--color-background-alt);
            transform: scale(1.05);
        }

        .font-controls button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

/* Typography */
h1, h2, h3, h4 {
    color: var(--color-text);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

        h1 { 
            font-size: clamp(2.25rem, 5.5vw, 3.25rem);
            font-weight: 600;
            margin-bottom: 0rem;
        }

        h2 { 
            font-size: clamp(1.75rem, 4.5vw, 2.25rem);
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--color-border-light);
            font-weight: 500;
            transition: border-color 0.3s ease;
        }

h2:first-of-type {
    margin-top: 0;
}

        h3 { 
            font-size: 1.375rem;
            margin-top: 0;
            margin-bottom: 0.5rem;
        }

        p {
            margin: 0 0 1.25rem 0;
            color: var(--color-text);
            font-size: 1.125rem;
            transition: color 0.3s ease;
        }

/* Links */
a {
    color: var(--color-link) !important;
    text-decoration: underline var(--color-link) !important;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--color-link-hover) !important;
    text-decoration-color: var(--color-link-hover) !important;
}

/* Header */
header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-border);
    transition: border-color 0.3s ease;
}

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

.header-text h1 {
    margin-bottom: 0.75rem;
}

        .header-text p {
            font-size: 1.25rem;
            color: var(--color-text-light);
            margin: 0;
            font-weight: 500;
            transition: color 0.3s ease;
        }

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

        .social-links a {
            font-size: 1.125rem;
            color: var(--color-text-light);
            text-decoration: none;
            transition: color 0.2s ease;
        }

.social-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

/* Experience section */
.experience-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
    transition: border-color 0.3s ease;
}

        .experience-item .date {
            font-size: 1rem;
            color: var(--color-text-lighter);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            transition: color 0.3s ease;
        }

.experience-item .details h3 {
    margin-bottom: 0.25rem;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.experience-item .details .company {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

        .experience-item .details .description {
            font-size: 1.125rem;
            color: var(--color-text-light);
            line-height: 1.6;
            transition: color 0.3s ease;
        }

/* Publications */
.publication-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border-light);
    transition: border-color 0.3s ease;
}

        .publication-title {
            font-weight: 600;
            color: var(--color-text);
            margin-bottom: 0.1rem;
            font-size: 1.125rem;
            transition: color 0.3s ease;
        }

        .publication-year {
            color: var(--color-text-lighter);
            font-style: italic;
            margin-bottom: 0.1rem;
            font-size: 1rem;
            transition: color 0.3s ease;
        }

        .publication-description {
            color: var(--color-text-light);
            margin-bottom: 0.5rem;
            font-size: 1.125rem;
            transition: color 0.3s ease;
        }

.publication-links {
    display: flex;
    font-style: italic;
    gap: 1rem;
    flex-wrap: wrap;
}

        .publication-links a {
            font-size: 1rem;
            font-weight: 500;
            padding: 0.25rem 0;
            color: var(--color-primary);
            text-decoration: underline;
            text-decoration-color: var(--color-text-lighter);
            text-underline-offset: 2px;
            transition: all 0.2s ease;
        }

.publication-links a:hover {
    text-decoration-color: var(--color-primary);
}

/* Bookshelf */
.bookshelf-list {
    list-style: none;
    padding: 0;
}

.book-item {
    margin-bottom: 0.5rem;
}

        .book-title {
            font-weight: 500;
            color: var(--color-text);
            font-size: 1.125rem;
            transition: color 0.3s ease;
        }

        .book-meta {
            font-size: 1rem;
            color: var(--color-text-lighter);
            font-style: italic;
            transition: color 0.3s ease;
        }

/* Footer */
        footer {
            text-align: left;
            margin-top: 3rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--color-border-light);
            font-size: 1rem;
            color: var(--color-text-lighter);
            transition: border-color 0.3s ease, color 0.3s ease;
        }

footer a {
    font-weight: 500;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive design */
                @media (max-width: 768px) {
            .container {
                padding: 1.5rem;
                margin: 0 auto;
                margin-left: 2rem;
                margin-right: 2rem;
            }

            .controls-container {
                display: none;
            }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .experience-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .experience-item .date {
        order: -1;
        font-size: 0.8rem;
    }

    .bookshelf-grid {
        grid-template-columns: 1fr;
    }

    h2 {
        margin-top: 2.5rem;
    }

    section {
        margin-bottom: 3rem;
    }
}

        @media (max-width: 480px) {
            .container {
                padding: 1rem;
                margin: 0 auto;
                margin-left: 1rem;
                margin-right: 1rem;
            }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .publication-links {
        flex-direction: column;
    }

    .publication-links a {
        text-align: left;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        max-width: none;
    }
    
    .theme-toggle,
    .font-controls {
        display: none;
    }
    
    .experience-item:hover,
    .book-card:hover {
        transform: none;
        box-shadow: none;
    }
} 