:root {
    --primary: #000;
    --secondary: #fff;
    --accent: #fff;
    --transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    background: var(--primary);
    color: var(--secondary);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.8;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('image/JoergBacherle.jpg') center center no-repeat;
    background-size: cover;
    opacity: 0.1;
    filter: grayscale(100%);
    pointer-events: none;
}

.container {
    max-width: 900px;
    margin: 8vh auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    border-bottom: 1px solid #222;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    opacity: 1;
    animation: none;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--accent);
}

.highlight-role {
    color: #888;
    font-size: 1.1em;
    font-weight: 400;
    margin-top: 10px;
    letter-spacing: 0.1em;
}

.nav {
    margin: 3rem 0;
    text-align: center;
    opacity: 1;
    animation: none;
    position: relative;
}

.nav a {
    color: var(--secondary);
    text-decoration: none;
    margin: 0 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border 0.2s;
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    transform-origin: left;
    pointer-events: none;
}

.nav a:hover::after,
.nav a.active::after {
    transform: scaleX(1);
}

.nav a:hover,
.nav a.active {
    border-bottom: 2px solid var(--accent);
}

/* 直接用JS和class控制更稳妥 */
header .highlight-role {
    transition: opacity 0.5s cubic-bezier(.4,0,.2,1), filter 0.5s cubic-bezier(.4,0,.2,1);
}

.nav:hover ~ header .highlight-role,
header.hide-role .highlight-role {
    opacity: 0;
    filter: blur(8px) brightness(1.2);
    pointer-events: none;
}

main section {
    margin: 6rem 0;
    opacity: 1;
    animation: none;
    padding: 2.5rem 2rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-left: 3px solid #fff;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    margin-top: 10px;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.card {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 2rem 1.5rem;
    transition: background 0.2s, color 0.2s, border 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.card p {
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.card a {
    color: inherit;
    text-decoration: underline;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.card:hover a {
    color: #000;
}

.contact-section .contact-item {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

.contact-section .contact-item i {
    margin-right: 1rem;
}

.contact-section a {
    color: var(--secondary);
    text-decoration: underline;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.contact-section a:hover {
    color: #888;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    .nav a {
        margin: 0 1rem;
    }
    main section {
        padding: 1.2rem;
    }
    .card-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --primary: #fff;
        --secondary: #000;
        --accent: #000;
    }
    body::before {
        filter: grayscale(100%) brightness(1.2);
        opacity: 0.08;
    }
    main section, .card {
        border-left: 3px solid #000;
        border-color: #000;
    }
    .card {
        border: 1.5px solid #000;
    }
}
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #000;
        --secondary: #fff;
        --accent: #fff;
    }
    body::before {
        filter: grayscale(100%);
        opacity: 0.1;
    }
    main section, .card {
        border-left: 3px solid #fff;
        border-color: #fff;
    }
    .card {
        border: 1.5px solid #fff;
    }
}