/* ========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ======================================== */
:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --muted-surface: #f4f6f8;
    --text: #1f2430;
    --text-muted: #54565a;
    --heading: #0f1724;
    --subheading: #2b3340;
    --muted-2: #6d6a72;
    --muted-3: #78758a;
    --muted-4: #9aa0a6;
    --placeholder: #9aa0a6;
    --danger: #9b1c1c;
    --danger-bg: #fff3f2;
    --danger-border: #fecaca;
    --success: #065f46;
    --success-bg: #f0fff4;
    --success-border: #bbf7d0;
    --accent-border: rgba(0,0,0,0.03);
    --line: #d6dbe2;
    --border: #e6e9ee;
    --accent: #3b82f6;
    --shadow-weak: rgba(31,36,48,0.04);
    --shadow-medium: rgba(31,36,48,0.08);
}

/* ========================================
   BASE STYLES
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html { overflow-x: hidden; }

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    padding-top: 64px;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 0; /* side padding handled by inner .container for alignment consistency */
    z-index: 1000;
    background-color: oklab(0.999994 0.0000455677 0.0000200868 / 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(31,36,48,0.06);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    justify-content: flex-end;
    width: 100%;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-muted);
}

nav a.active-scroll {
    color: var(--heading);
    font-weight: 700;
}

/* Nav inner layout */
nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative; /* anchor for mobile dropdown */
}

/* Brand */
.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-brand img {
    display: block;
    border-radius: 4px;
}

/* Toggle (hidden on desktop) */
.nav-toggle { 
    display: none; 
    background: transparent; 
    border: none; 
    padding: 0.25rem; 
    cursor: pointer; 
}
.nav-toggle:focus { outline: 2px solid var(--border); outline-offset: 2px; }

.burger {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.burger::before,
.burger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger::before { top: -7px; }
.burger::after  { top:  7px; }

/* When menu is open, animate into an X */
nav.open .burger { background: transparent; }
nav.open .burger::before { transform: translateY(7px) rotate(45deg); }
nav.open .burger::after  { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav behavior */
@media (max-width: 768px) {
    .nav-toggle { display: inline-block; }

    nav ul.nav-links {
        display: none;
        position: absolute;
        top: 64px; /* align to fixed nav height */
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 16px var(--shadow-weak);
        padding: 0.75rem 1.25rem 1rem;
        justify-content: flex-start;
        align-items: flex-start;
        z-index: 999;
    }

    nav.open ul.nav-links { display: flex; }

    nav ul.nav-links li { width: 100%; }
    nav ul.nav-links a { display: block; width: 100%; padding: 0.75rem 0; }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 4rem 8rem;
    position: relative;
    background-image: none;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero .wave {
    display: none;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    /* center the block within the hero while keeping text left-aligned */
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.hero-content,
.hero-content * {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--heading);
}

.hero-content h2 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
    color: var(--subheading);
}

.hero-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-weight: 400;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-self: flex-start;
    margin-left: 0;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--muted-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--muted-surface);
    transform: translateY(-2px);
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline-container {
    position: absolute;
    bottom: 4rem;
    left: 4rem;
    right: 4rem;
    height: 200px;
}

.timeline {
    position: relative;
    height: 2px;
    background: var(--line);
    margin-top: 100px;
    width: 0;
    animation: expandTimeline 2s ease-out forwards;
    animation-delay: 0.5s;
    overflow: visible; /* ensure labels like 'Heute' are visible */
}

@keyframes expandTimeline {
    to { width: 100%; }
}

.timeline-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--text);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%) scale(0);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0;
}

.timeline-point.animate {
    animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
    70% {
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

.timeline-point:hover {
    width: 14px;
    height: 14px;
    background: var(--heading);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.timeline-date {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--muted-4);
    white-space: nowrap;
    font-weight: 500;
}

.timeline-date::before {
    content: '';
    position: absolute;
    top: 19px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: var(--line);
}

.timeline-arrow {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid var(--text);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 2.5s;
}

.timeline-today {
    position: absolute;
    right: -50px;
    top: -30px;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 2.5s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.timeline-card {
    position: absolute;
    bottom: 30px;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-weak);
    border: 1px solid var(--border);
    min-width: 250px;
    max-width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    transform: translateY(10px);
    z-index: 100;
}

.timeline-card.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    box-shadow: 0 12px 32px rgba(31,36,48,0.08);
}

.timeline-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--heading);
    text-align: left;
}

.timeline-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    text-align: left;
}

.timeline-card a {
    color: var(--heading);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.3s;
}

.timeline-card a:hover {
    opacity: 0.8;
}

/* ========================================
   SECTIONS
   ======================================== */
section {
    min-height: 80vh;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

section:not(.contact-section) {
    background: transparent;
}

section:not(.contact-section)::before,
section:not(.contact-section)::after {
    display: none;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--heading);
    text-align: center;
    font-weight: 600;
}

section p,
section ul {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 700px;
    text-align: center;
}

section ul {
    list-style-position: inside;
    margin-top: 1rem;
}

section ul li {
    margin-bottom: 0.5rem;
}

section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(26, 26, 26, 0.3));
    pointer-events: none;
}

section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.3), transparent);
    pointer-events: none;
}

#home::before {
    display: none;
}

@media (min-width: 900px) {
    section {
        padding: 4rem 4rem;
    }
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
    padding: 4rem 2rem;
    background: transparent;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
}

.about-header h2 {
    font-size: 2rem;
    color: var(--heading);
    margin-bottom: 0.5rem;
    text-align: center;
}

.about-lead {
    color: var(--text-muted);
    max-width: 760px;
    margin: 0.25rem auto 1.5rem;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: center;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

.about-text {
    color: var(--text);
    line-height: 1.6;
    text-align: left;
}

.about-text,
.about-text p {
    text-align: left;
    margin-left: 0;
    padding-left: 0;
}

.about-text h3 {
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.about-text p {
    margin-bottom: 0.75rem;
}

.about-image .image-frame {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(31,36,48,0.06);
    border: 1px solid rgba(31,36,48,0.04);
}

.about-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlights-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 1.25rem;
}

@media (min-width: 700px) {
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.highlight-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(31,36,48,0.04);
}

.highlight-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.highlight-card h4 {
    margin: 0 0 0.25rem;
    color: var(--heading);
}

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

/* ========================================
   SKILLS SECTION
   ======================================== */
.skills-section {
    padding: 4rem 2rem;
}

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

.skills-header {
    text-align: center;
    margin-bottom: 2rem;
}

.skills-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.skills-header p {
    color: var(--muted-2);
    max-width: 720px;
    margin: 0 auto;
}

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

@media (min-width: 700px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 12px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--muted-surface);
    border-radius: 8px;
    color: var(--heading);
}

.skill-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.badge {
    background: var(--muted-surface);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    display: inline-block;
    border: 1px solid rgba(31,36,48,0.04);
}

.badge-outline {
    background: transparent;
    border: 1px solid rgba(31,36,48,0.06);
    color: var(--text-muted);
}

.expertise-box {
    margin-top: 1.75rem;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
    text-align: center;
}

.expertise-box h3 {
    margin-bottom: 0.75rem;
    color: var(--heading);
}

.expertise-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* ========================================
   BLOG SECTION
   ======================================== */
#blog {
    background: transparent;
    position: relative;
    padding: 4rem 0 2.5rem;
    min-height: auto;
    display: block;
}

/* Blog-Seite (eigene Seite) soll oben keinen Extra-Padding haben,
   damit der Abstand zur Navbar wie auf der Detailseite ist */
#blog.blog-page {
    padding: 0 0 2.5rem;
}

#blog::before,
#blog::after {
    display: none;
}

#blog > .container {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

#blog .container.grid-wrapper {
    padding-top: 1rem;
    margin-top: 0.75rem;
}

#blog .blog-hero {
    padding: 0 0 1.5rem; /* oben 0, damit Abstand zur Navbar wie auf der Detailseite ist */
    background: transparent;
}

#blog .hero-center {
    text-align: center;
    padding: 1.8rem 0 1.2rem;
}

#blog .hero-center h1 {
    font-size: 2.05rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

#blog .hero-center p.muted {
    color: var(--muted-2);
    margin-bottom: 0;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.blog-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.blog-subtitle {
    font-size: 1.125rem;
    color: var(--muted-2);
    margin-left: auto;
    margin-right: auto;
}

.blog-list {
    width: 100%;
    max-width: 1280px;
    margin-top: 2rem;
    margin-bottom: 0;
}

.blog-filter {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
}

.blog-filter input[type=search] {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.blog-filter select {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.blog-filter button {
    padding: 0.5rem 0.9rem;
    background: var(--heading);
    color: #fff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

/* ========================================
   BLOG CARDS
   ======================================== */
.grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    width: 100%;
    align-items: stretch; /* stretch grid items to equal heights per row */
}

@media (min-width: 720px) {
    .grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

#blog .grid-wrapper {
    align-items: stretch; /* ensure blog cards share the same height per row */
    grid-template-columns: repeat(1, 1fr);
    gap: 1.6rem;
    margin-top: 1.2rem;
}

@media (min-width: 720px) {
    #blog .grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    #blog .grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(22,28,37,0.08);
    border: 1px solid rgba(31,36,48,0.06);
    height: 100%;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative; /* enable stretched-link and focus ring */
}

.card:hover {
    /* Keep card static: elevate shadow a bit more for depth */
    box-shadow: 0 26px 72px rgba(22,28,37,0.18);
    border-color: rgba(31,36,48,0.12);
}

#blog .card.blog-card {
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(31,36,48,0.06);
    box-shadow: 0 10px 22px rgba(22,28,37,0.06);
    background: #ffffff;
}

/* Stronger, visible hover elevation specifically for blog cards (overrides generic .card:hover) */
#blog .card.blog-card:hover {
    /* Even softer elevation on hover */
    box-shadow: 0 14px 32px rgba(22,28,37,0.10), 0 16px 36px rgba(22,28,37,0.08);
    border-color: rgba(31,36,48,0.12);
}

#blog .card {
    min-height: 320px;
}

.card-image,
#blog .card-image {
    height: 220px;
    overflow: hidden;
    min-height: 120px;
}

#blog .card-image {
    height: 170px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card-img,
#blog .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-img {
    transform: scale(1.06); /* slightly more pronounced image movement */
}

.card-thumb {
    height: 220px;
    background-size: cover;
    background-position: center;
}

#blog .blog-thumb {
    display: block;
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center center;
    border-radius: 12px;
}

.card-content,
#blog .card-content {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    align-items: flex-start; /* align text/content to left edge */
}

#blog .card-content {
    padding: 1rem 1.1rem 1.1rem 1rem; /* ensure left edge aligns with footer and title */
    gap: 0.45rem;
    font-size: 15px;
    line-height: 1.55;
    background: #ffffff;
    align-items: flex-start;
}

.card-body {
    padding: 0; /* align excerpt flush under the title (uses parent .card-content padding) */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start; /* ensure inner text aligns left */
    width: 100%;
    flex: 1; /* grow to fill space so tag row can anchor at bottom */
}

.meta-row,
#blog .meta-row {
    display: flex;
    gap: 1rem;
    color: var(--muted-4);
    font-size: 0.9rem;
    align-items: center;
}

#blog .meta-row {
    color: var(--muted-3);
    font-size: 12px;
    gap: 0.9rem;
}

/* Add breathing room between meta (date/time) and the title,
   and a bit below the title before the excerpt starts */
#blog .card-header {
    display: flex;
    flex-direction: column;
    gap: 1.3rem; /* space between meta and title */
    margin-bottom: 0.8rem; /* space below the title before excerpt */
}

#blog .meta-row svg {
    opacity: 0.9;
    width: 14px; /* uniform icon size */
    height: 14px;
    margin-right: 0; /* spacing handled by gap on .meta */
}

#blog .meta-row .meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem; /* consistent spacing between icon and text */
    line-height: 1; /* align baseline neatly */
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    gap: 0.75rem;
}

#blog .card-title {
    font-size: 18px;
    margin-top: 0.15rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.25;
    /* Fix title height to 2 lines so the excerpt starts at the same level across cards */
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 45px; /* 18px * 1.25 * 2 = 45px */
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

#blog .card-excerpt {
    color: var(--muted-2);
    font-size: 14px;
    margin-top: 0.15rem;
    line-height: 1.6;
    /* Clamp to 3 lines with ellipsis to keep cards compact */
    display: -webkit-box;
    /* Standard property for future compatibility */
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: 4.8em; /* 3 lines * 1.6 line-height */
}

.tag-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    align-items: center;
    min-height: 32px; /* keep at least one-line height for consistent alignment */
    margin-top: auto; /* anchor tags near bottom across cards */
    margin-bottom: 0.25rem;
}

#blog .tag-row {
    margin-top: 0.4rem;
    width: 100%;
}

/* Helper: JS toggles this when 2+2 Tag-Wrap nicht möglich ist → 4. Tag ausblenden */
#blog .tag-row.hide-last .badge:last-child {
    display: none;
}

#blog .tag-row .badge {
    background: transparent;
    color: var(--muted-3);
    border: 1px solid rgba(31,36,48,0.05);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.tag {
    background: var(--muted-surface);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text);
    border: 1px solid rgba(31,36,48,0.04);
}

.card-footer,
#blog .card-footer {
    padding: 0.75rem 1.1rem 1rem 1rem; /* ensure same left inset as content */
    margin: 0;
    background: #ffffff;
    /* remove divider line above the footer */
    border-top: 0;
    display: flex;
    align-items: center;
    margin-top: auto; /* push footer to the bottom within card-content */
    justify-content: flex-start;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-top: auto;
    background: transparent;
    color: #000000;
    border-radius: 0;
    border: none;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
}

#blog .card .read-more {
    color: #000000;
    padding: 0;
    border: none;
    border-radius: 0;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    text-decoration: none;
    margin-top: auto;
    margin-left: -10px !important; /* additional optical adjustment for perfect left alignment */
}

/* Do not animate gap; only arrow moves */

.card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    background: #ffffff;
    color: #000000;
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    border: none;
}

#blog .card .read-more .arrow-icon {
    width: 16px;
    height: 16px;
    stroke: #000000;
    transition: transform 0.3s ease;
}

/* Move arrow when hovering the link or the entire card */
#blog .card .read-more:hover .arrow-icon,
#blog .card:hover .read-more .arrow-icon {
    transform: translateX(4px);
}

.card .read-more svg.icon {
    width: 18px;
    height: 18px;
}

.icon,
svg.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    stroke: currentColor;
}

.icon.small {
    width: 16px;
    height: 16px;
}

/* ========================================
   FEATURED BLOG CARD
   ======================================== */
.blog-featured-card {
    display: flex;
    align-items: stretch;
    max-width: 1300px;
    width: 100%;
    height: 320px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.blog-featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.blog-featured-image {
    flex: 0 0 50%;
    overflow: hidden;
    position: relative;
    height: 320px;
}

.blog-featured-image .featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-featured-card:hover .blog-featured-image .featured-img {
    transform: scale(1.1);
}

.blog-featured-content {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.featured-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.featured-label {
    font-size: 14px; /* slightly larger for optical parity with 20px icon */
    line-height: 1;  /* tight line height to align with icon */
    font-weight: 600;
    color: var(--muted-2);
    margin: 0 0 0.25rem 0;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    text-align: left;
}

.featured-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    text-align: left;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--heading);
    transition: gap 0.3s ease;
}

.blog-featured-card:hover .featured-cta {
    gap: 1.25rem;
}

.cta-arrow {
    transition: transform 0.3s ease;
}

.blog-featured-card:hover .cta-arrow {
    transform: translateX(5px);
}

@media (max-width: 899px) {
    .blog-featured-card {
        flex-direction: column;
        max-width: 600px;
    }

    .blog-featured-image {
        flex: none;
        height: 300px;
    }

    .blog-featured-content {
        padding: 2rem 1.5rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   ONEPAGER BLOG TEASER
   ======================================== */
.onepager-card {
    max-width: 440px;
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: block;
}

.onepager-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 70px rgba(22,28,37,0.12);
}

.onepager-image {
    height: 320px;
    background-size: cover;
    background-position: center;
}

.onepager-content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
    text-align: left;
}

.onepager-content .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-2);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.onepager-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.4rem;
}

.onepager-excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 0.8rem;
    max-width: 50ch;
}

.onepager-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.2rem 0;
    border-radius: 6px;
    background: transparent;
    color: var(--heading);
    font-weight: 700;
}

.onepager-cta .arrow {
    transition: transform 0.25s ease;
}

.onepager-card:hover .onepager-cta .arrow {
    transform: translateX(10px);
}

@media (min-width: 900px) {
    .onepager-card {
        display: flex;
        align-items: stretch;
        min-height: 320px;
        border-radius: 14px;
    }

    .onepager-image {
        flex: 0 0 58%;
        height: 100%;
        overflow: hidden;
    }

    .onepager-image .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top left;
        display: block;
        transition: transform 0.5s ease;
    }

    .onepager-card:hover .onepager-image .card-img {
        transform: scale(1.07);
    }

    .onepager-content {
        flex: 1 1 42%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
        padding: 2rem 1.5rem;
    }

    .onepager-content h3,
    .onepager-content p {
        text-align: left;
    }

    .onepager-cta {
        margin-top: 1.25rem;
        align-self: flex-start;
        display: inline-flex;
        gap: 0.6rem;
        text-decoration: none;
        cursor: pointer;
    }

    .onepager-cta:hover {
        text-decoration: none;
    }

    .onepager-image img {
        border-top-left-radius: 14px;
        border-bottom-left-radius: 14px;
    }
}

@media (max-width: 899px) {
    .onepager-card {
        max-width: 720px;
        margin: 1.5rem auto;
    }

    .onepager-image {
        height: 320px;
        width: 100%;
        overflow: hidden;
    }

    .onepager-image .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top left;
        display: block;
    }

    .onepager-image img {
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .onepager-content {
        padding: 1.5rem 1.25rem;
    }
}

/* ========================================
   POST DETAIL PAGE
   ======================================== */
.post-detail .post {
    background: transparent;
    max-width: 820px;
    margin: 2.25rem auto;
}

/* Make entire blog cards clickable with a stretched-link pattern */
.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: -9999px; /* hide text; screen-reader text provided inside */
    overflow: hidden;
}

/* Visually hidden utility for accessible-only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure interactive elements inside the card can still sit above if needed */
.card .read-more,
.card .read-more .arrow-icon {
    position: relative;
    z-index: 2;
}

/* Focus visibility for accessibility */
.card:focus-within {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.3), 0 12px 40px rgba(22,28,37,0.12);
}
.card a:focus-visible {
    outline: 2px solid rgba(59,130,246,0.6);
    outline-offset: 2px;
    border-radius: 8px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    margin-top: 2rem; /* Abstand zur fixen Navbar */
    margin-bottom: 1.5rem;
    background: transparent;
    color: var(--heading);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    /* Keep label static; do not animate gap for back button */
    transition: color 0.2s ease;
}

/* On hover, only the arrow moves; text remains in place */

.back-btn .arrow-icon {
    width: 20px;
    height: 20px;
    stroke: var(--heading);
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.back-btn:hover .arrow-icon {
    transform: translateX(-5px);
}

.post-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem; /* mehr Luft zum Titel */
    color: var(--heading);
}

.post-header .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem; /* etwas grösserer Abstand */
    color: var(--muted-2);
    font-size: 0.95rem;
    margin: 0.75rem 0 1rem 0; /* mehr Luft um die Meta-Zeile */
}

.post-header .meta-row .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-header .meta-row svg {
    width: 18px;
    height: 18px;
    color: var(--muted-3);
}

.post-header .lead {
    color: var(--muted-2);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 0.5rem; /* etwas mehr Abstand zum Untertitel */
}

/* Mehr Abstand vom Header (Titel/Meta/Lead) zum folgenden Inhalt */
.post-header {
    margin-bottom: 1.2rem;
}

.post-body {
    line-height: 1.8;
    color: var(--text);
    font-size: 1.05rem;
}

.post-body h2, .post-body h3, .post-body h4 {
    color: var(--heading);
    margin-top: 1.6rem;
    margin-bottom: 0.6rem;
}

.post-body p { margin: 0.9rem 0; }

.post-body ul, .post-body ol { padding-left: 1.25rem; margin: 0.75rem 0; }
.post-body li { margin: 0.3rem 0; }

.post-body blockquote {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid rgba(31,36,48,0.15);
    background: rgba(31,36,48,0.03);
    color: var(--muted-1);
    border-radius: 6px;
}

.post-body pre, .post-body code, .post-body .codehilite pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.post-body pre, .post-body .codehilite pre {
    background: #0b1220;
    color: #e6edf3;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    overflow: auto;
    line-height: 1.6;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.post-body code:not(pre code) {
    background: rgba(31,36,48,0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Links im Blogpost: behalten Textfarbe, sind unterstrichen */
.post-body a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.post-body a:hover {
    opacity: 0.7;
}

.post-hero img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Abstand zwischen Hero-Bild und Titel */
.post-hero {
    margin-bottom: 1.5rem;
}

.post-footer {
    background: transparent; /* sicherstellen, dass kein graues Rechteck erscheint */
    margin-top: 2.5rem; /* etwas mehr Abstand nach dem Inhalt */
    padding-top: 1.25rem;
    border-top: 1px solid rgba(31,36,48,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.post-footer .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem; /* minimal mehr Abstand zwischen den Tags */
}

.post-footer .badge {
    background: transparent;
    color: var(--muted-3);
    border: 1px solid rgba(31,36,48,0.08);
    padding: 4px 8px;
    border-radius: 999px;
}

.post-footer .back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Hover-Animation wie beim "Zurück"-Button: nur der Pfeil bewegt sich */
.post-footer .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.post-footer .back-link .arrow-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}
.post-footer .back-link:hover .arrow-icon {
    transform: translateX(-4px);
}

.blog-meta {
    padding: 0;
}

.blog-meta .eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
}

.blog-meta h3 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    color: var(--text);
}

.blog-meta p {
    color: var(--text-muted);
    line-height: 1.6;
}

.blog-meta a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.blog-card-link .blog-thumb {
    flex: 0 0 45%;
}

.blog-card-link .blog-meta {
    flex: 1;
}

.blog-card-link:hover {
    text-decoration: none;
}

.blog-card .cta {
    font-weight: 700;
}

@media (max-width: 800px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-thumb {
        flex: 0 0 auto;
        height: 180px;
    }
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    min-height: 90vh;
    max-width: 100%;
    background: transparent;
    padding: 3.5rem 4rem 6rem;
    position: relative;
}

.contact-section::before,
.contact-section::after {
    display: none;
}

.contact-info {
    margin-top: 2rem;
    text-align: center;
}

.contact-info p {
    text-align: center;
}

.contact-info a {
    color: var(--heading);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(31,36,48,0.06);
    transition: opacity 0.2s;
}

.contact-info a:hover {
    opacity: 0.7;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto 0; /* center the grid within the section */
}

.contact-left h3,
.contact-right h3 {
    font-size: 1.3rem;
    color: var(--heading);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: left;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    box-shadow: 0 6px 18px rgba(31,36,48,0.04);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgb(243, 243, 245);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--heading);
    flex-shrink: 0;
}

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

.contact-text h4 {
    font-size: 0.95rem;
    color: var(--heading);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.contact-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.availability-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 1.5rem;
    box-shadow: 0 6px 18px rgba(31,36,48,0.04);
}

.availability-card h4 {
    font-size: 1rem;
    color: var(--heading);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-align: left;
}

.availability-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--heading);
    font-weight: 600;
    text-align: left;
}

.form-group input,
.form-group textarea {
    background: rgb(243, 243, 245);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem;
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(59,130,246,0.3);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--placeholder);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(31,36,48,0.04);
}

.submit-btn:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31,36,48,0.08);
}

/* ========================================
   FOOTER
   ======================================== */
footer.site-footer {
    background: var(--muted-surface);
    border-top: 1px solid var(--border);
    padding: 3rem 4rem 1.5rem;
    position: relative;
    color: var(--muted-4);
}

footer.site-footer::before {
    display: none;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-box {
    width: 40px;
    height: 40px;
    background: var(--heading);
    color: var(--surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.footer-logo span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 420px;
}

.footer-middle h4,
.footer-right h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.6rem;
}

.quick-links a {
    color: var(--muted-3);
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.quick-links a:hover {
    color: var(--muted-4);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(31,36,48,0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: rgba(31,36,48,0.04);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(31,36,48,0.06);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    color: var(--muted-2);
    font-size: 0.95rem;
    margin: 0;
}

.heart {
    color: var(--danger);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--muted-3);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text);
}

/* ========================================
   LEGAL PAGES
   ======================================== */
.legal-section .container,
main:has(.legal-section) {
    margin: 0;
    margin-left: 0;
    max-width: none;
}

section.legal-section {
    align-items: flex-start;
    margin: 1rem 0 6rem;
    margin-left: 8rem;
    max-width: none;
    padding: 0;
    min-height: auto;
}

.legal-section {
    max-width: 900px;
    margin: 0;
    margin-left: 0;
    padding: 4rem 4rem 16rem;
    background: transparent;
    text-align: left;
}

.legal-section h1,
.legal-section h2,
.legal-section h3,
.legal-section h4,
.legal-section h5,
.legal-section h6,
.legal-section p,
.legal-section li,
.legal-section a,
.legal-section span {
    text-align: left;
}

.legal-section h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 700;
    margin-left: 0;
    padding-left: 0;
    color: var(--heading);
    letter-spacing: -0.02em;
}

.legal-section h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    margin-left: 0;
    padding-left: 0;
    color: var(--heading);
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.legal-section a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.legal-section a:hover {
    opacity: 0.7;
}

/* ========================================
   MESSAGES
   ======================================== */
.messages {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 300px;
}

.message.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.message.error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* Back to Top Button removed */

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */
@media (max-width: 768px) {
    nav {
        padding: 0.8rem 0; /* use inner .container gutter */
    }

    nav ul {
        gap: 1rem;
    }

    .hero {
        padding: 2rem 1.25rem 6rem;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .timeline-container {
        left: 1.25rem;
        right: 1.25rem; /* match mobile gutter */
        overflow: visible; /* ensure labels aren't clipped */
    }

    section {
        padding: 2rem 1.25rem;
    }

    /* Contact: reduce heavy side padding from desktop to center content on mobile */
    .contact-section {
        padding: 2rem 1.25rem 4rem;
    }

    section h2 {
        font-size: 2rem;
    }

    /* Keep the 'Heute' label and arrow within the viewport */
    .timeline-today { right: 0; }
    .timeline-arrow { right: 0; }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* ensure core wrappers are centered and full-width on small screens */
    .hero-content,
    .about-container,
    .skills-inner,
    #blog > .container,
    .contact-container {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}
