:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --line-color: #000000;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --line-color: #ffffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

::selection {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 100;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 44px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #555;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: .4s;
    width: 18px;
}

input:checked + .slider {
    background-color: #ccc;
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #000;
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

#theme-text {
    margin-left: 12px;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 2rem;
}

.joke-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quantum-joke {
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1.8rem, 4vw, 4.5rem);
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.underline-wrapper {
    position: relative;
    width: 100%;
}

.thin-line {
    border: none;
    border-top: 1px solid var(--line-color);
    width: 100%;
    opacity: 0.5;
}

.asterisk {
    position: absolute;
    left: 0;
    top: 8px;
    font-size: 1rem;
    font-family: monospace;
    opacity: 0.5;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.4;
    animation: bounce 2s infinite;
    transition: opacity 0.3s;
    will-change: transform;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.arrow {
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Explanation Section */
.explanation {
    min-height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    background-color: var(--bg-color);
}

.content {
    max-width: 800px;
    text-align: left;
}

.content p {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-weight: 400;
}



.asterisk-large {
    font-size: 2.5rem;
    vertical-align: sub;
    opacity: 0.7;
    margin-right: 10px;
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
}

.footer-quote {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    text-align: center;
    opacity: 0.7;
}

.footer-quote p {
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 0.8rem;
}

.footer-quote .disclaimer {
    font-size: 0.8rem;
    opacity: 0.8;
    font-family: monospace;
    font-style: normal;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.social-links a:hover {
    opacity: 0.6;
    transform: scale(1.1);
}

.email-link {
    position: relative;
    cursor: pointer;
}

.tooltip {
    visibility: hidden;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-align: center;
    border-radius: 4px;
    padding: 6px 10px;
    position: absolute;
    z-index: 1;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-color) transparent transparent transparent;
}

.tooltip.show {
    visibility: visible;
    opacity: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.9rem;
    opacity: 0.6;
}

.impressum-link {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
    transition: opacity 0.2s;
    align-self: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.impressum-link:hover {
    opacity: 1;
}

/* New Sections */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2.5rem;
    text-align: left;
    font-weight: bold;
    letter-spacing: -0.5px;
    width: 100%;
    max-width: 900px;
}

/* Sections Shared */
.interests, .current-work, .values, .personal-info {
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 900px;
    border-top: 2px solid var(--line-color);
    padding-top: 1.5rem;
}

.interest-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: opacity 0.2s ease;
}

.interest-item:hover {
    opacity: 0.7;
}

.interest-item h3 {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.interest-item p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.interest-item .quote {
    font-style: italic;
    opacity: 0.6;
    font-size: 0.95em;
    display: block;
    margin-top: 0.5rem;
}

.interest-item a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--text-color);
    transition: opacity 0.2s;
}

.interest-item a:hover {
    opacity: 0.6;
}


.about-content {
    max-width: 900px;
    width: 100%;
    border-top: 2px solid var(--line-color);
    padding-top: 1.5rem;
}

.info-list {
    list-style: none;
    font-family: monospace;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.info-list li {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    border-bottom: 1px dotted rgba(128, 128, 128, 0.4);
    padding-bottom: 0.2rem;
    align-items: baseline;
}

[data-theme="dark"] .info-list li {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
}

.info-list .key {
    opacity: 0.7;
}

.info-list .value {
    font-weight: bold;
}

.info-list .sub-text {
    display: block;
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.7;
    margin-top: 0.3rem;
}

.info-list .sub-text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.info-list .sub-text-inline {
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.7;
    margin-left: 0.3rem;
}

.about-disclaimer {
    font-size: 0.85rem;
    font-family: monospace;
    opacity: 0.6;
    margin-top: 1.5rem;
    line-height: 1.5;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-switch-wrapper {
        top: 20px;
        right: 20px;
        transform: scale(0.9);
        transform-origin: top right;
    }
    .hero {
        padding: 0 1.5rem;
        padding-bottom: 10vh;
    }
    .quantum-joke {
        font-size: clamp(1.4rem, 6vw, 2.5rem);
        white-space: normal;
        line-height: 1.3;
    }
    .explanation {
        padding: 3rem 1.5rem;
    }
    .content p {
        font-size: 1.1rem;
    }
    .info-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        scrollbar-width: thin;
        scrollbar-color: #d1d1d1 transparent;
    }
    [data-theme="dark"] .info-list {
        scrollbar-color: #444 transparent;
    }
    .info-list::-webkit-scrollbar {
        height: 4px;
    }
    .info-list::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 4px;
    }
    .info-list::-webkit-scrollbar-thumb {
        background-color: #d1d1d1;
        border-radius: 4px;
    }
    .info-list::-webkit-scrollbar-thumb:hover {
        background-color: #a8a8a8;
    }
    [data-theme="dark"] .info-list::-webkit-scrollbar-thumb {
        background-color: #444;
    }
    [data-theme="dark"] .info-list::-webkit-scrollbar-thumb:hover {
        background-color: #666;
    }
    .info-list li {
        min-width: 550px;
        grid-template-columns: 140px 1fr;
        gap: 0.5rem;
        padding-bottom: 0.8rem;
    }
    .info-list .key {
        font-size: 0.9rem;
        opacity: 0.8;
    }
    .interests, .current-work, .values, .personal-info {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .joke-container {
        width: 100%;
    }
    .quantum-joke {
        width: 100%;
    }
    .joke-part-1, .joke-part-2, .joke-part-3 {
        display: block;
    }
    .joke-part-1 {
        text-align: left;
    }
    .joke-part-2 {
        text-align: center;
    }
    .joke-part-3 {
        text-align: right;
    }
    #theme-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .theme-switch-wrapper {
        transform: scale(0.8);
    }
    .hero {
        padding: 0 1rem;
        padding-bottom: 15vh;
    }
    .quantum-joke {
        font-size: clamp(1.3rem, 8vw, 2rem);
    }
    .explanation {
        padding: 2rem 1rem;
    }
    .content p {
        font-size: 1rem;
    }
}

