/* --- Design System & Custom Properties --- */
:root {
    --bg-color: #0d1a2d;
    --surface: #183153;
    --surface-shade: #0a1424;
    --text-color: #f0f4fa;
    --text-muted: #a9b6cb;
    --accent-color: #74c0fc;
    --accent-hover: #a5d8ff;
    --accent-light: #74c0fc;
    --accent-soft: rgba(116, 192, 252, 0.14);
    --yellow: #ffd43b;
    --border-color: #2a4166;
    --nav-bg: rgba(24, 49, 83, 0.9);
    --radius: 16px;
    --shade-size: 5px;
    --sidebar-width: 340px;
    --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg-color: #f0f1f3;
    --surface: #ffffff;
    --surface-shade: #c3c6d1;
    --text-color: #183153;
    --text-muted: #515e72;
    --accent-color: #146ebe;
    --accent-hover: #0d5596;
    --accent-soft: #e7f5ff;
    --border-color: #dfe1e6;
    --nav-bg: rgba(255, 255, 255, 0.9);
    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-weight: 900;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 2rem;
}

/* --- Layout --- */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 48px 36px 32px;
    background-color: var(--surface);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.profile {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-initials {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.6rem;
    font-weight: 900;
    color: #183153;
    background-color: var(--yellow);
    box-shadow: 0 var(--shade-size) 0 #e0a800;
    transform: rotate(-4deg);
    flex-shrink: 0;
}

.profile-name {
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 6px;
}

.profile-name a {
    color: inherit;
    text-decoration: none;
}

.profile-headline {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 600;
}

.profile-bio {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Theme Toggle --- */
.theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent-light);
    transform: rotate(-8deg);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-moon {
    display: none;
}

:root[data-theme="light"] .theme-icon-sun {
    display: none;
}

:root[data-theme="light"] .theme-icon-moon {
    display: block;
}

/* --- Navigation --- */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 800;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link:hover {
    color: var(--text-color);
    background-color: var(--accent-soft);
}

.nav-link.active {
    color: var(--accent-color);
    background-color: var(--accent-soft);
}

/* --- Social Links --- */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.2s ease;
}

.social-icon:hover {
    color: var(--accent-color);
}

/* --- Footer --- */
.footer {
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Main Structure --- */
.main-content {
    padding: 44px 44px 40px;
}

.section {
    padding: 0 0 64px;
    margin-bottom: 64px;
    border-bottom: 2px dashed var(--border-color);
}

.section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.contact-section h2 {
    margin-bottom: 20px;
}

/* --- Buttons --- */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    font-family: inherit;
    background-color: var(--surface);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent-light);
}

.filter-btn.active {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    color: #183153;
}

.submit-btn {
    display: inline-block;
    background-color: var(--yellow);
    color: #183153;
    padding: 14px 26px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 var(--shade-size) 0 #e0a800;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #e0a800;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 36px 22px;
    padding-top: 14px;
}

.project-card {
    --card-bg: var(--surface);
    --card-text: var(--text-color);
    --card-muted: var(--text-muted);
    --card-shade: var(--surface-shade);
    --card-link: var(--text-color);
    --card-ring: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 2px var(--card-ring), 0 var(--shade-size) 0 var(--card-shade);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 2px var(--card-ring), 0 calc(var(--shade-size) + 4px) 0 var(--card-shade);
}

.project-card.hidden {
    display: none;
}

.project-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.card-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #183153;
}

.badge-live { background-color: var(--yellow); }
.badge-wip { background-color: #a9e34b; }
.badge-proto { background-color: #ffc9c9; }
.badge-done { background-color: #74c0fc; }

.card-art {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 26px 20px 0;
}

.card-art svg,
.card-art .art-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    transition: transform 0.3s ease;
}

.project-card:hover .card-art svg,
.project-card:hover .card-art .art-image {
    transform: scale(1.05) rotate(-1.5deg);
}

.project-card.featured .card-art {
    padding: 30px;
}

.project-card.featured .card-art svg,
.project-card.featured .card-art .art-image {
    max-width: 300px;
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 22px 24px;
}

.project-card.featured .project-content {
    padding: 30px 30px 30px 4px;
}

.project-label {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 3px 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-content h3 {
    min-width: 0;
    margin-bottom: 8px;
    font-size: 1.35rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.project-card.featured h3 {
    font-size: 1.9rem;
}

.project-title-link {
    color: inherit;
    text-decoration: none;
}

.card-details {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* Pfeil als Hinweis, dass die Karte zur Detailseite führt – nur auf dem Handy */
.card-go {
    display: none;
}

.project-desc {
    color: var(--card-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 3px 10px;
    border: 2px solid currentColor;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: auto;
    padding-top: 24px;
}

.card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
}

.card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--card-link);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.arrow-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.arrow-link:hover .arrow-icon {
    transform: translateX(4px);
}

.project-link {
    padding: 7px 18px;
    border: 2px solid currentColor;
    border-radius: 999px;
    background-color: color-mix(in srgb, currentColor 14%, transparent);
    color: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 3px 0 color-mix(in srgb, currentColor 35%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.project-link:hover {
    background-color: color-mix(in srgb, currentColor 26%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 4px 0 color-mix(in srgb, currentColor 35%, transparent);
}

.project-link:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 color-mix(in srgb, currentColor 35%, transparent);
}

/* Hauptknopf: gefuellt, Schrift in Kartenfarbe */
.project-link.primary {
    background-color: var(--card-text, currentColor);
    border-color: var(--card-text, currentColor);
    color: var(--card-bg, #183153);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

.project-link.primary:hover {
    background-color: var(--card-text, currentColor);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.project-link.soon {
    border-style: dashed;
    opacity: 0.7;
    cursor: default;
}

/* --- Project Themes --- */
.theme-swan-calisthenics {
    --card-bg: #183153;
    --card-text: #ffffff;
    --card-muted: #c5d3e8;
    --card-shade: #0b1a30;
    --card-link: #ffffff;
    --card-ring: rgba(255, 255, 255, 0.22);
}

.theme-minecraft-skin-merger {
    --card-bg: #a9e34b;
    --card-text: #183153;
    --card-muted: #2b4a1c;
    --card-shade: #6fa52a;
    --card-link: #183153;
}

.theme-gamehub {
    --card-bg: #6c3ce9;
    --card-text: #ffffff;
    --card-muted: #e2d9ff;
    --card-shade: #4a1fbf;
    --card-link: #ffffff;
}

.theme-strategiespiel {
    --card-bg: #0b7285;
    --card-text: #ffffff;
    --card-muted: #c3fae8;
    --card-shade: #064c5a;
    --card-link: #ffd43b;
    --card-ring: rgba(255, 255, 255, 0.2);
}

.theme-watch-shop {
    --card-bg: #0f3d2e;
    --card-text: #ffffff;
    --card-muted: #cfe3d8;
    --card-shade: #072419;
    --card-link: #e2c07a;
    --card-ring: rgba(226, 192, 122, 0.35);
}

.theme-jarvis-mobile {
    --card-bg: #f5b82e;
    --card-text: #3a2200;
    --card-muted: #5c3a08;
    --card-shade: #c98a12;
    --card-link: #3a2200;
}

.theme-adventskalender {
    --card-bg: #e3eefb;
    --card-text: #183153;
    --card-muted: #3d5478;
    --card-shade: #b3c8e3;
    --card-link: #a8262b;
}

.theme-jarvis-anleitung {
    --card-bg: #a51d2d;
    --card-text: #ffffff;
    --card-muted: #ffd9dc;
    --card-shade: #6e0f1b;
    --card-link: #ffd43b;
}

.theme-random {
    --card-bg: #ae3ec9;
    --card-text: #ffffff;
    --card-muted: #f3d9fa;
    --card-shade: #862e9c;
    --card-link: #ffd43b;
}

.theme-minecraft-creations {
    --card-bg: #2f9e44;
    --card-text: #ffffff;
    --card-muted: #d3f9d8;
    --card-shade: #1f7a31;
    --card-link: #ffd43b;
    --card-ring: rgba(255, 255, 255, 0.18);
}

.theme-modul-320 {
    --card-bg: #e8590c;
    --card-text: #ffffff;
    --card-muted: #ffe8cc;
    --card-shade: #b84408;
    --card-link: #ffec99;
}

.theme-escape-room {
    --card-bg: #f7e6c4;
    --card-text: #3b2412;
    --card-muted: #6b4a2a;
    --card-shade: #d1b07a;
    --card-link: #3b2412;
}

.theme-textbased-game {
    --card-bg: #111611;
    --card-text: #e6ffe9;
    --card-muted: #a5d6ae;
    --card-shade: #000000;
    --card-link: #39ff6a;
    --card-ring: rgba(57, 255, 106, 0.3);
}

.theme-hofladen-webshop {
    --card-bg: #ffe8cc;
    --card-text: #5c2a06;
    --card-muted: #7d4314;
    --card-shade: #f0b67a;
    --card-link: #5c2a06;
}

.theme-influencer {
    --card-bg: #ffc2d8;
    --card-text: #5a0f2e;
    --card-muted: #7d2449;
    --card-shade: #f07ba5;
    --card-link: #5a0f2e;
}

.theme-mediensammlung {
    --card-bg: #74c0fc;
    --card-text: #183153;
    --card-muted: #1d3d66;
    --card-shade: #1c7ed6;
    --card-link: #183153;
}

/* --- Contact --- */
.contact-container {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.contact-container p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Detail Page --- */
.detail {
    max-width: 1000px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 36px;
    color: var(--text-muted);
    font-weight: 800;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-color);
}

.detail-art {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 48px 24px 36px;
    margin-bottom: 40px;
    border-radius: var(--radius);
    background-color: var(--card-bg);
    box-shadow: inset 0 0 0 2px var(--card-ring, transparent), 0 var(--shade-size) 0 var(--card-shade);
}

.detail-art svg,
.detail-art .art-image {
    width: 100%;
    max-width: 420px;
    height: auto;
}

.detail-header {
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 2px dashed var(--border-color);
}

.detail-header .project-label {
    display: inline-block;
    margin-bottom: 18px;
    background-color: var(--accent-soft);
    color: var(--accent-color);
}

.detail-header h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 16px;
}

.detail-lead {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 65ch;
}

.detail-header .project-links {
    margin-top: 0;
    padding-top: 28px;
}

.detail-header .project-link {
    padding: 10px 22px;
    font-size: 1rem;
    color: var(--text-color);
}

.detail-header .project-link.primary {
    background-color: var(--yellow);
    border-color: var(--yellow);
    color: #183153;
    box-shadow: 0 4px 0 #e0a800;
}

.detail-header .project-link.primary:hover {
    background-color: var(--yellow);
    box-shadow: 0 5px 0 #e0a800;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.meta-item {
    padding: 18px 22px;
    border-radius: var(--radius);
    background-color: var(--surface);
    box-shadow: 0 4px 0 var(--surface-shade);
    font-weight: 700;
}

.meta-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-item .project-tags {
    margin-top: 4px;
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 48px;
    margin-bottom: 56px;
}

.detail-body h2, .about-block h2 {
    font-size: 1.5rem;
    margin-bottom: 14px;
}

.detail-body h2 + * {
    margin-top: 0;
}

.detail-body p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.detail-body p + h2 {
    margin-top: 28px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.feature-list li {
    position: relative;
    padding-left: 30px;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background-color: var(--accent-light);
    box-shadow: 0 3px 0 #1c7ed6;
}

.detail-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 36px;
    border-top: 2px dashed var(--border-color);
}

.pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background-color: var(--surface);
    box-shadow: 0 var(--shade-size) 0 var(--surface-shade);
    color: var(--text-color);
    font-size: 1.15rem;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.pager-link:hover {
    transform: translateY(-3px);
}

.pager-link.next {
    text-align: right;
    grid-column: 2;
}

/* --- About Page --- */
.about-block {
    margin-bottom: 56px;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.interest-card {
    padding: 22px 24px;
    border-radius: var(--radius);
    background-color: var(--surface);
    box-shadow: 0 4px 0 var(--surface-shade);
}

.interest-icon {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
    border-radius: 12px;
    background-color: var(--yellow);
    color: #183153;
    box-shadow: 0 3px 0 #e0a800;
}

.interest-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
}

.contact-card .interest-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    stroke: none;
}

.contact-card .arrow-link {
    margin-top: 14px;
    color: var(--accent-color);
}

.interest-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.interest-card p {
    color: var(--text-muted);
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

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

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 17px;
    height: 17px;
    border-radius: 6px;
    background-color: var(--yellow);
    box-shadow: 0 3px 0 #e0a800;
}

.timeline-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 900;
}

.timeline-item h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.skill-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-group {
    padding: 18px 22px;
    border-radius: var(--radius);
    background-color: var(--surface);
    box-shadow: 0 4px 0 var(--surface-shade);
}

.skill-group h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.skill-group .tag {
    color: var(--accent-color);
    opacity: 1;
}

/* --- Responsive: Large Screens --- */
@media (min-width: 2000px) {
    :root {
        --sidebar-width: 380px;
    }

    .sidebar {
        padding: 64px 48px 40px;
    }

    .main-content {
        padding: 64px 56px 48px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 44px 28px;
    }

    .project-content {
        padding: 16px 22px 24px;
    }

    .detail {
        max-width: 1200px;
    }
}

/* --- Responsive: Laptop --- */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 290px;
    }

    .sidebar {
        padding: 40px 26px 28px;
    }

    .main-content {
        padding: 48px 36px 40px;
    }
}

/* --- Responsive: Tablet & Mobile (Bottom Tab Bar) --- */
@media (max-width: 900px) {
    html {
        scroll-padding-top: 16px;
    }

    body {
        padding-bottom: 84px;
    }

    .layout {
        display: block;
    }

    .sidebar {
        position: relative;
        height: auto;
        gap: 18px;
        padding: 36px 24px 28px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow: visible;
    }

    .profile {
        flex-direction: row;
        align-items: center;
    }

    .profile-initials {
        width: 84px;
        height: 84px;
        border-radius: 22px;
        font-size: 2rem;
    }

    .profile-name {
        font-size: 1.7rem;
    }

    .social-links {
        flex-direction: row;
    }

    .footer {
        display: none;
    }

    .main-content {
        padding: 36px 24px 24px;
    }

    .project-card.featured {
        display: flex;
    }

    .project-card.featured .card-art {
        padding: 34px 28px 4px;
    }

    .project-card.featured .project-content {
        padding: 20px 32px 32px;
    }

    .detail-header h1 {
        font-size: 2.3rem;
    }

    .detail-body {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        flex-direction: row;
        gap: 4px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        background-color: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -8px 30px rgba(24, 49, 83, 0.12);
    }

    .nav-link {
        flex: 1;
        flex-direction: column;
        gap: 4px;
        padding: 8px 0;
        border-radius: 16px;
        font-size: 0.72rem;
        color: var(--text-color);
    }

    .nav-icon {
        width: 22px;
        height: 22px;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 680px) {
    h2 {
        font-size: 1.6rem;
    }

    /* Handy: zwei Karten pro Zeile, nur Bild und Titel; die ganze Karte führt zur Detailseite */
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 14px;
    }

    .project-card.featured {
        grid-column: 1 / -1;
    }

    .project-title-link::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
    }

    .art-play {
        z-index: 2;
    }

    .card-art,
    .project-card.featured .card-art {
        padding: 24px 12px 0;
    }

    .project-card.featured h3 {
        font-size: 1.7rem;
    }

    .project-content h3 {
        margin-bottom: 0;
        font-size: 1.05rem;
    }

    .project-card.featured .project-content h3 {
        font-size: 1.5rem;
    }

    .project-content,
    .project-card.featured .project-content {
        padding: 14px 14px 16px;
    }

    .project-content .project-label {
        display: none;
    }

    .card-details {
        display: none;
    }

    .card-go {
        position: absolute;
        top: 12px;
        right: 12px;
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background-color: rgba(0, 0, 0, 0.14);
        background-color: color-mix(in srgb, var(--card-link) 18%, transparent);
        color: var(--card-link);
    }

    .card-go .arrow-icon {
        width: 16px;
        height: 16px;
    }

    .project-card {
        transition: transform 0.15s ease;
    }

    .project-card:active {
        transform: scale(0.97);
    }

    .card-badge {
        top: -10px;
        font-size: 0.62rem;
        padding: 3px 9px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-container {
        align-items: stretch;
        text-align: center;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .detail-pager {
        grid-template-columns: 1fr;
    }

    .pager-link.next {
        grid-column: auto;
    }
}

/* --- Art Images --- */
.card-art .art-image {
    max-width: 190px;
}

.project-card.featured .card-art .art-image {
    max-width: 280px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.detail-art .art-image {
    max-width: 280px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

/* --- Art Frames --- */
.art-frames {
    display: grid;
    width: 100%;
    max-width: 210px;
}

.project-card.featured .card-art .art-frames {
    max-width: 280px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.detail-art .art-frames {
    max-width: 280px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.art-frames .art-frame,
.project-card.featured .card-art .art-frames .art-frame,
.detail-art .art-frames .art-frame {
    grid-area: 1 / 1;
    max-width: none;
    filter: none;
}

.art-frames .art-frame + .art-frame {
    opacity: 0;
}

.project-card:hover .card-art .art-frames .art-frame {
    transform: none;
}

.project-card:hover .art-frames,
.detail-art:hover .art-frames,
.art-frames.is-playing {
    animation: frames-bounce 1.6s ease-in-out infinite;
}

.project-card:hover .art-frames .art-frame + .art-frame,
.detail-art:hover .art-frames .art-frame + .art-frame,
.art-frames.is-playing .art-frame + .art-frame {
    animation: frames-swap 1.6s ease-in-out infinite;
}

@keyframes frames-swap {
    0%, 36% { opacity: 0; }
    42%, 78% { opacity: 1; }
    84%, 100% { opacity: 0; }
}

@keyframes frames-bounce {
    0%, 36% { transform: translateY(0); }
    42% { transform: translateY(-6px) scale(1.02); }
    50%, 78% { transform: translateY(-2px); }
    84%, 100% { transform: translateY(0); }
}

/* --- Art Layers (Swan-Klimmzug) --- */
.art-layers {
    display: grid;
    width: 100%;
    max-width: 210px;
}

.project-card.featured .card-art .art-layers {
    max-width: 280px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.detail-art .art-layers {
    max-width: 280px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.art-layer {
    position: relative;
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
}

.art-swan-calisthenics .layer-swan-arm-left,
.art-swan-calisthenics .layer-swan-arm-right {
    transform-origin: 50% 31.5%;
}

/* Läuft standardmässig in Dauerschleife (.is-looping), der Play/Pause-Knopf schaltet sie aus */
.art-swan-calisthenics.is-looping .art-layer {
    animation: 3s ease-in-out infinite;
}

.art-swan-calisthenics.is-looping .layer-swan-body {
    animation-name: swan-pullup;
}

.art-swan-calisthenics.is-looping .layer-swan-arm-left,
.art-swan-calisthenics.is-looping .layer-swan-arm-right {
    animation-name: swan-arm-strip;
}

/* --- Art Play Button --- */
.art-stage {
    position: relative;
    width: 100%;
    max-width: 190px;
}

.project-card.featured .art-stage {
    max-width: 280px;
}

.detail-art .art-stage {
    max-width: 280px;
}

.art-stage .art-layers {
    max-width: none;
}

.card-art-link {
    display: block;
}

.art-play {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background-color: rgba(13, 26, 45, 0.88);
    color: #ffffff;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.art-play:hover {
    transform: scale(1.08);
    background-color: #183153;
}

.art-play:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

.art-play svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.art-play .art-pause-icon,
.art-play[aria-pressed="true"] .art-play-icon {
    display: none;
}

.art-play[aria-pressed="true"] .art-pause-icon {
    display: block;
}

/* Arme (Faust bis Schulter, 111 px) werden um den Weg des Körpers (40 px) kürzer;
   jeder Arm-Streifen mischt Stauchen (Anteil --f) und Hochgehen wie der Körper (1 - --f) */
@keyframes swan-pullup {
    0%, 8% { transform: translateY(0); }
    40%, 56% { transform: translateY(-6.67%); }
    88%, 100% { transform: translateY(0); }
}

@keyframes swan-arm-strip {
    0%, 8% { transform: translateY(0) scaleY(1); }
    40%, 56% { transform: translateY(calc((var(--f) - 1) * 6.667%)) scaleY(calc(1 - var(--f) * 0.36)); }
    88%, 100% { transform: translateY(0) scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    .art-play {
        display: none;
    }

    .art-layer,
    .art-frames,
    .art-frames .art-frame {
        animation: none !important;
    }
}
