:root {
    --bg: #f7f6f3;
    --fg: #0f0f0f;
    --muted: #8a8a8a;
    --border: #e4e1db;
    --white: #ffffff;
    --nav-h: 68px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Animationen ─── */
.anim-hidden {
    opacity: 0;
}
.anim-hidden-up    { transform: translateY(28px); }
.anim-hidden-right { transform: translateX(48px); }

.anim-transition {
    transition: opacity 0.75s cubic-bezier(.25,.46,.45,.94),
                transform 0.75s cubic-bezier(.25,.46,.45,.94);
}

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    background: rgba(247, 246, 243, 0.93);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 52px;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: border-color 0.4s, height 0.3s;
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    height: 58px;
}

.nav-logo {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    height: 38px;
    overflow: hidden;
}

.nav-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 44px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--fg);
}

/* ─── Hero ─── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 400px;
    padding-top: var(--nav-h);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 52px;
    gap: 0;
}

.hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--muted);
    margin-bottom: 28px;
}

.hero-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.8rem, 7vw, 7rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -2px;
    color: var(--fg);
    margin-bottom: 40px;
}

.hero-divider {
    width: 48px;
    height: 1px;
    background: var(--border);
    margin-bottom: 32px;
}

.hero-desc {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.85;
    max-width: 400px;
    margin-bottom: 48px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}

.btn-dark {
    display: inline-block;
    background: var(--fg);
    color: var(--white);
    text-decoration: none;
    padding: 15px 34px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: opacity 0.2s;
}

.btn-dark:hover {
    opacity: 0.65;
}

.hero-link {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.hero-link:hover {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.hero-photo {
    overflow: hidden;
    position: relative;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 48% 12%;
    display: block;
    filter: grayscale(100%);
    transition: transform 0.8s;
}

.hero-photo:hover img {
    transform: scale(1.02);
}

/* ─── Skills ─── */
.skills-section {
    border-top: 1px solid var(--border);
    padding: 96px 52px;
}

.skills-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 52px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.6rem;
    color: var(--fg);
}

.section-label {
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.skill-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: #555;
    font-weight: 400;
}

.skill-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

/* ─── CV Page ─── */
.cv-wrap {
    max-width: 840px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 80px) 48px 100px;
}

.cv-page-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 72px;
    gap: 40px;
}

.cv-page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.cv-contact-meta {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 2;
    text-align: right;
}

.cv-contact-meta a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}

.cv-contact-meta a:hover {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.cv-block {
    margin-bottom: 64px;
}

.cv-block-label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #c0bcb6;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.cv-entry {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 20px;
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.cv-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cv-entry-date {
    font-size: 0.76rem;
    color: #c0bcb6;
    text-align: right;
    padding-top: 2px;
    white-space: nowrap;
}

.cv-entry-title {
    font-weight: 600;
    font-size: 0.94rem;
    margin-bottom: 3px;
    color: var(--fg);
}

.cv-entry-org {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.cv-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cv-bullets li {
    font-size: 0.84rem;
    color: #666;
    padding-left: 18px;
    position: relative;
    line-height: 1.6;
}

.cv-bullets li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #d4d0cb;
}

.cv-skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    list-style: none;
    gap: 0;
}

.cv-skills-list li {
    font-size: 0.85rem;
    color: #666;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cv-lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cv-lang-item {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.cv-lang-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--fg);
}

.cv-lang-level {
    font-size: 0.78rem;
    color: var(--muted);
}

/* ─── Contact Page ─── */
.contact-wrap {
    max-width: 500px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 100px) 48px 100px;
}

.contact-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 14px;
}

.contact-sub {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 60px;
    line-height: 1.7;
}

#contact_form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c0bcb6;
}

input, select {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-family: inherit;
    font-size: 0.94rem;
    color: var(--fg);
    outline: none;
    appearance: none;
    transition: border-color 0.25s;
}

input:focus, select:focus, textarea:focus {
    border-bottom-color: var(--fg);
}

input::placeholder, textarea::placeholder {
    color: #c8c5bf;
}

textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-family: inherit;
    font-size: 0.94rem;
    color: var(--fg);
    outline: none;
    resize: none;
    min-height: 120px;
    transition: border-color 0.25s;
    line-height: 1.7;
}

button {
    align-self: flex-start;
    background: var(--fg);
    color: var(--white);
    padding: 15px 36px;
    border: none;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 4px;
}

button:hover {
    opacity: 0.6;
}

/* ─── Toast Notification ─── */
.toast {
    position: fixed;
    bottom: 40px;
    right: 48px;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 2px solid var(--fg);
    padding: 20px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    color: var(--fg);
    max-width: 320px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.toast-error {
    border-top-color: #999;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
    .navbar {
        padding: 0 28px;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-content {
        padding: 72px 28px 56px;
    }

    .hero-name {
        font-size: clamp(3rem, 14vw, 5rem);
        letter-spacing: -1px;
    }

    .hero-photo {
        height: 480px;
    }

    .skills-section {
        padding: 72px 28px;
    }

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

    .cv-wrap {
        padding: calc(var(--nav-h) + 48px) 28px 72px;
    }

    .cv-page-header {
        grid-template-columns: 1fr;
    }

    .cv-contact-meta {
        text-align: left;
    }

    .cv-entry {
        grid-template-columns: 1fr;
    }

    .cv-entry-date {
        text-align: left;
        order: -1;
    }

    .cv-skills-list {
        grid-template-columns: 1fr;
    }

    .cv-lang-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-wrap {
        padding: calc(var(--nav-h) + 60px) 28px 72px;
    }

    .nav-links {
        gap: 22px;
    }
}

@media (max-width: 480px) {
    .cv-lang-grid {
        grid-template-columns: 1fr;
    }

    .nav-links a {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
}
