/* ==========================================================================
   Baumannweb - styles
   ========================================================================== */

/* Inter (self-hosted, no third-party requests) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --accent: #04b4e0;
    --accent-dark: #0284a8;
    --accent-soft: rgba(4, 180, 224, 0.1);
    --ink: #0b1220;
    --ink-2: #1e293b;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-alt: #f5f8fb;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 14px 30px -10px rgba(15, 23, 42, 0.22);
    --nav-height: 68px;
    --mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.015em;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

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

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

/* --- Navbar --- */
.site-nav {
    min-height: var(--nav-height);
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-nav.scrolled,
.site-nav.menu-open {
    background: rgba(11, 18, 32, 0.88);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-nav .navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.site-nav .navbar-nav .nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    padding: 0.5rem 0.9rem;
}

.site-nav .navbar-nav .nav-link:hover,
.site-nav .navbar-nav .nav-link.active {
    color: #fff;
    text-decoration: none;
}

@media (min-width: 992px) {
    .site-nav .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        left: 0.9rem;
        right: 0.9rem;
        bottom: 0.2rem;
        height: 2px;
        border-radius: 2px;
        background: var(--accent);
        transform: scaleX(0);
        transition: transform 0.2s ease;
    }

    .site-nav .navbar-nav .nav-link:hover::after,
    .site-nav .navbar-nav .nav-link.active::after {
        transform: scaleX(1);
    }
}

@media (max-width: 991.98px) {
    .site-nav .navbar-collapse {
        padding: 0.5rem 0 1rem;
    }
}

.site-nav .navbar-toggler {
    border: 0;
    padding: 0.4rem 0.5rem;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 2rem) 0 5rem;
    background-color: var(--ink);
    background-image:
        linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(11, 18, 32, 0.35) 45%, rgba(11, 18, 32, 0.8) 100%),
        url('../img/hero.jpg');
    background-image:
        linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(11, 18, 32, 0.35) 45%, rgba(11, 18, 32, 0.8) 100%),
        image-set(url('../img/hero.webp') type('image/webp'), url('../img/hero.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: center;
}

.hero-title {
    color: #fff;
    font-family: var(--mono);
    font-weight: 700;
    font-size: clamp(1.9rem, 7.5vw, 4.75rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.live-typing {
    display: inline-block;
    min-height: 1.15em;
    padding-right: 0.08em;
    border-right: 0.08em solid rgba(255, 255, 255, 0.85);
    animation: blink-caret 0.85s step-end infinite;
    white-space: nowrap;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: rgba(255, 255, 255, 0.85); }
}

.hero-subtitle {
    display: inline-block;
    min-width: min(100%, 22rem);
    margin-bottom: 2rem;
    padding: 0.55rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(11, 18, 32, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hero-subtitle .carousel-item p {
    margin: 0;
    font-size: clamp(1.05rem, 3.5vw, 1.35rem);
    font-weight: 600;
    white-space: nowrap;
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
}

.hero-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.1rem;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hero-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px);
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.3rem;
    animation: bounce 2.2s ease-in-out infinite;
}

.scroll-hint:hover {
    color: #fff;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* --- Sections --- */
.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 0.75rem;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), #6366f1);
}

.section-title.text-center::after {
    margin-left: auto;
    margin-right: auto;
}

#resume .section-title,
#contact .section-title {
    margin-bottom: 3rem;
}

.block-title {
    margin: 3rem 0 1.5rem;
    overflow: hidden;
    font-size: 1.3rem;
    font-weight: 700;
}

.block-title span {
    color: var(--accent);
}

.block-title::after {
    content: '';
    display: inline-block;
    width: 100%;
    height: 1px;
    margin-left: 0.85rem;
    margin-right: -100%;
    vertical-align: middle;
    background: var(--line);
}

.row > [class*='col'] > .block-title:first-child,
#resume .col-lg-5 > .block-title:first-child {
    margin-top: 0;
}

@media (max-width: 991.98px) {
    #resume .col-lg-5 > .block-title:first-child {
        margin-top: 3rem;
    }
}

/* --- About --- */
.profile-picture {
    width: 220px;
    max-width: 70%;
    height: auto;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg);
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.75;
    color: var(--ink-2);
    margin-bottom: 0;
}

.intro {
    margin-bottom: 1rem;
}

.card-tile {
    height: 100%;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(4, 180, 224, 0.35);
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 1.35rem;
}

.card-tile h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.card-tile p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.fun-fact {
    height: 100%;
    padding: 2rem 1rem 1.6rem;
    text-align: center;
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--ink) 0%, #16233b 100%);
    color: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease;
}

.fun-fact:hover {
    transform: translateY(-4px);
}

.fun-fact i {
    font-size: 1.6rem;
    color: var(--accent);
}

.fun-fact-block-value {
    display: block;
    margin: 0.6rem 0 0.2rem;
    font-size: clamp(2.2rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.fun-fact h4 {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
}

/* --- Timeline (Education & Experience) --- */
.timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 0 0 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 7px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(4, 180, 224, 0.15));
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0.3rem;
    left: calc(-2rem + 1px);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.item-period {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
}

.item-title {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.item-company {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* --- Skills --- */
.skill + .skill {
    margin-top: 1rem;
}

.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

.skill-head h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.skill-value {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.8rem;
}

.skill-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.skill-bar span {
    display: block;
    height: 100%;
    width: var(--value);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #6366f1);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .skills:not(.visible) .skill-bar span {
    width: 0;
}

/* --- Knowledges (tags) --- */
.knowledges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.knowledges li {
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(4, 180, 224, 0.25);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #035f78;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.3;
}

.knowledges-alt li {
    border-color: var(--line);
    background: #fff;
    color: var(--ink-2);
}

/* --- Contact --- */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 1.75rem 1.25rem;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(4, 180, 224, 0.4);
    color: var(--text);
    text-decoration: none;
}

.contact-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.9rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 1.3rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-card:hover i {
    background: var(--accent);
    color: #fff;
}

.contact-label {
    color: var(--ink);
    font-weight: 700;
}

.contact-value {
    color: var(--accent-dark);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

/* --- Footer --- */
.site-footer {
    padding: 2.5rem 0;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

.site-footer .footer-links {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

.site-footer a {
    color: #fff;
    font-weight: 500;
}

.site-footer a:hover {
    color: var(--accent);
}

/* --- Legal pages (Impressum / Datenschutz) --- */
.legal-page .site-nav {
    background: rgba(11, 18, 32, 0.95);
}

.legal-content {
    max-width: 820px;
    margin: calc(var(--nav-height) + 3rem) auto 4rem;
    padding: 0 15px;
}

.legal-content,
.legal-content p,
.legal-content li,
.legal-content span {
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.7;
}

.legal-content h2,
.legal-content h2 span {
    font-family: inherit !important;
    font-size: 1.5rem !important;
    margin-top: 2rem !important;
}

.legal-content h2:first-child,
.legal-content h2:first-child span {
    margin-top: 0 !important;
}

/* --- Reveal on scroll --- */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .section {
        padding: 4.5rem 0;
    }

    .intro {
        text-align: center;
    }

    .intro .section-title::after {
        margin-left: auto;
        margin-right: auto;
    }

    .intro-text {
        font-size: 1.08rem;
    }

    .hero-title {
        font-size: 9vw;
    }

    .contact-card {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
        align-items: center;
        padding: 1rem 1.25rem;
        text-align: left;
    }

    .contact-card i {
        grid-row: span 2;
        margin-bottom: 0;
    }

    #contact .col-sm-6 {
        margin-bottom: 0.85rem !important;
    }
}
