/* ==========================================================================
   Design-Tokens
   ========================================================================== */
:root {
    --bg: #0e0d0c;
    --bg-raised: #17150f;
    --text: #f3efe6;
    --text-muted: #9c9484;
    --text-faint: #625d50;
    --border: #2b2820;
    --accent: #e2672a;
    --accent-soft: rgba(226, 103, 42, .14);

    --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;

    --index-w: 220px;
    --gutter: clamp(24px, 6vw, 96px);
    --hero-img-w: 400px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #100c08; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Signatur-Element: Index-Spalte (Inhaltsverzeichnis / Scrollspy)
   ========================================================================== */
.index-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--index-w);
    height: 100vh;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--border);
    z-index: 40;
    background: var(--bg);
    overflow-y: auto;
}

.index-nav__mark {
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: .06em;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}
.index-nav__mark span { color: var(--accent); }

.index-nav__list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.index-nav__list a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
    padding: 4px 0;
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .03em;
    color: var(--text-faint);
    transition: color .2s ease;
}
.index-nav__list a:hover { color: var(--text-muted); }
.index-nav__list .num { color: var(--text-faint); transition: color .2s ease; }

.index-nav__list a.is-active {
    color: var(--text);
}
.index-nav__list a.is-active .num { color: var(--accent); }

.index-nav__foot {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-faint);
    line-height: 1.5;
    margin-top: auto;
    padding-top: 16px;
    word-break: break-all; /* Erzwingt Umbruch bei langen Mails */
}
.index-nav__foot a {
    color: var(--text-faint);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    display: inline-block;
}
.index-nav__foot a:hover { color: var(--accent); border-color: var(--accent); }

/* Mobile */
.index-nav-mobile { display: none; }

@media (max-width: 900px) {
    .index-nav { display: none; }
    .index-nav-mobile {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        padding: 16px var(--gutter);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        background: rgba(14, 13, 12, .92);
        backdrop-filter: blur(6px);
        z-index: 40;
    }
    .index-nav-mobile a {
        white-space: nowrap;
        text-decoration: none;
        font-family: var(--font-mono);
        font-size: .74rem;
        color: var(--text-faint);
    }
    .index-nav-mobile a.is-active { color: var(--accent); }
}

/* ==========================================================================
   Layout
   ========================================================================== */
.site-main {
    margin-left: var(--index-w);
}
@media (max-width: 900px) {
    .site-main { margin-left: 0; }
}

section {
    padding: 96px var(--gutter);
    border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .08em;
    color: var(--accent);
    display: block;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.2vw, 4.2rem);
    line-height: 1;
    letter-spacing: .01em;
    margin: 0 0 40px;
    max-width: 16ch;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px var(--gutter);
    position: relative;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 1100px) {
    .hero {
        padding-right: calc(var(--hero-img-w) + var(--gutter));
    }

    .hero::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: var(--hero-img-w);
        height: 100%;
        background-image: url('../images/Wallpaper.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-left: 1px solid var(--border);
        pointer-events: none;
    }
}

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-muted);
    letter-spacing: .04em;
    margin-bottom: 22px;
}

.hero__name {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 9.5vw, 8rem);
    line-height: .92;
    margin: 0 0 20px;
    letter-spacing: .005em;
}

.hero__tagline {
    font-weight: 300;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-muted);
    max-width: 42ch;
    margin: 0 0 36px;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-faint);
}
.hero__meta a { text-decoration: none; border-bottom: 1px solid transparent; }
.hero__meta a:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   About
   ========================================================================== */
.about__body {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 300;
    color: var(--text);
    max-width: 62ch;
    line-height: 1.75;
    white-space: pre-line;
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 40px;
}
.skills-group__title {
    font-family: var(--font-mono);
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 16px;
}
.skills-group__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.skills-group__list li {
    font-size: .92rem;
    padding: 6px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.project-list {
    display: flex;
    flex-direction: column;
}
.project {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 28px;
    align-items: start;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.project:first-child { border-top: none; }

.project__year {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text-faint);
    padding-top: 8px;
}

.project__title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    margin: 0 0 8px;
    line-height: 1.05;
}
.project__role {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 12px;
}
.project__desc {
    color: var(--text-muted);
    max-width: 62ch;
    margin: 0 0 14px;
    font-size: .98rem;
}
.project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.project__tags li {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-faint);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 999px;
}
.project__thumb {
    width: 220px;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.project__link-arrow {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-faint);
    padding-top: 8px;
    transition: transform .2s ease, color .2s ease;
}
a.project:hover .project__link-arrow { color: var(--accent); transform: translate(3px, -3px); }
a.project:hover .project__title { color: var(--accent); }

@media (max-width: 700px) {
    .project { grid-template-columns: 1fr; gap: 12px; }
    .project__thumb { width: 100%; height: auto; aspect-ratio: 16/10; }
}

/* ==========================================================================
   Timeline (Education & Work)
   ========================================================================== */
.timeline {
    display: flex;
    flex-direction: column;
}
.timeline-entry {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 28px;
    padding: 28px 0;
    border-top: 1px solid var(--border);
}
.timeline-entry:first-child { border-top: none; }

.timeline-entry__range {
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-faint);
    padding-top: 4px;
}
.timeline-entry__title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 4px;
}
.timeline-entry__subtitle {
    font-size: .92rem;
    color: var(--accent);
    margin: 0 0 12px;
    font-family: var(--font-mono);
    letter-spacing: .02em;
}
.timeline-entry__desc {
    color: var(--text-muted);
    max-width: 62ch;
    font-size: .96rem;
    margin: 0 0 12px;
}
.timeline-entry__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.timeline-entry__tags li {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-faint);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 999px;
}

@media (max-width: 700px) {
    .timeline-entry { grid-template-columns: 1fr; gap: 8px; }
}

/* ==========================================================================
   Writing & Speaking
   ========================================================================== */
.entry-list {
    display: flex;
    flex-direction: column;
}
.entry {
    display: block;
    padding: 26px 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.entry:first-child { border-top: none; }
.entry__meta {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text-faint);
    margin-bottom: 8px;
    letter-spacing: .02em;
}
.entry__title {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 0 0 8px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.entry__title .arrow {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-faint);
    transition: transform .2s ease, color .2s ease;
}
a.entry:hover .entry__title .arrow { color: var(--accent); transform: translate(3px, -3px); }
a.entry:hover .entry__title { color: var(--accent); }
.entry__desc {
    color: var(--text-muted);
    font-size: .96rem;
    max-width: 62ch;
    margin: 0;
}

.empty-note {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text-faint);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 56px var(--gutter) 72px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
}
.site-footer__name {
    font-family: var(--font-display);
    font-size: 1.6rem;
}
.site-footer__links {
    display: flex;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text-muted);
}
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__note {
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--text-faint);
    width: 100%;
}
