:root {
    --bg-color: #ffffff;
    --bg-color-rgb: 255, 255, 255;
    --text-color: #333333;
    --text-color-rgb: 51, 51, 51;
    --heading-color: #2c3e50;
    --border-color: #3498db;
    --job-title-color: #2980b9;
    --date-color: #7f8c8d;
    --button-color: #2c3e50;
    --link-color: #2980b9;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

#banner {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    height: 300px;
    margin-left: -50vw;
    margin-right: -50vw;
    background-image: url('banner.jpg');
    background-size: cover;
    background-position: 50% 54%;
    margin-bottom: 20px;
    overflow: hidden;
}

#banner::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, transparent 70%, var(--bg-color) 100%);
    transition: background-color 0.3s;
}

h1, h2, h3 {
    color: var(--heading-color);
}

h1 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

h2 {
    margin-top: 30px;
}

ul {
    padding-left: 20px;
}

.job-title {
    font-weight: bold;
    color: var(--job-title-color);
}

.date {
    color: var(--date-color);
    font-style: italic;
}

#controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

#mode-toggle, #scroll-toggle, #print-toggle {
    background: none;
    border: none;
    color: var(--button-color);
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
}

#mode-toggle:hover, #scroll-toggle:hover, #print-toggle:hover {
    transform: scale(1.1);
}

#mode-toggle svg, #scroll-toggle svg, #print-toggle svg {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.mode-text, .scroll-text, .print-text {
    display: none;
}

.disable-line {
    display: none;
}

#scroll-toggle[aria-pressed="true"] .disable-line {
    display: inline;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid var(--link-color);
}

a:hover {
    border-bottom: 2px solid var(--link-color);
}

#floating-index {
    position: fixed;
    top: 0;
    right: 20px;
    width: 200px;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
}

#floating-index .index-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    max-height: 80vh;
    width: 100%;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-color);
    border-radius: 15px;
    padding: 15px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

#floating-index ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#floating-index li {
    margin-bottom: 8px;
}

#floating-index a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

#floating-index a:hover {
    color: var(--link-color);
    border-bottom: none;
    transform: translateX(5px);
}

body.dark-mode {
    --bg-color: #060606;
    --bg-color-rgb: 26, 26, 26;
    --text-color: #e0e0e0;
    --text-color-rgb: 224, 224, 224;
    --heading-color: #b3c5d7;
    --border-color: #4aa3df;
    --job-title-color: #5dade2;
    --date-color: #95a5a6;
    --button-color: #e0e0e0;
    --link-color: #5dade2;
}

body.dark-mode #floating-index .index-content {
    background-color: rgba(60, 60, 60, 0.7);
    color: var(--text-color);
    border-color: rgba(80, 80, 80, 0.3);
}

body.dark-mode #floating-index a {
    color: var(--text-color);
}

body.dark-mode #floating-index a:hover {
    color: var(--link-color);
}

@media (min-width: 768px) {
    #controls {
        flex-direction: row;
    }

    .mode-text, .scroll-text, .print-text {
        display: inline;
    }
}

@media (max-width: 767px) {
    #controls {
        position: fixed;
        top: 10px;
        right: 10px;
        flex-direction: column;
    }

    #mode-toggle, #scroll-toggle, #print-toggle {
        padding: 5px;
        background-color: rgba(var(--bg-color-rgb), 0.7);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    #mode-toggle svg, #scroll-toggle svg, #print-toggle svg {
        width: 24px;
        height: 24px;
        margin-right: 0;
    }

    .mode-text, .scroll-text, .print-text {
        display: none;
    }

    #floating-index {
        display: none;
    }
}