/* ---- Layout ---- */

.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
}

.bg-decor {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 100%;
    max-width: 1200px;
    height: auto;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    animation: bg-drift 20s ease-in-out infinite;
}

@keyframes bg-drift {
    0%, 100% { rotate: 0deg;   scale: 1;    }
    25%      { rotate: 3deg;   scale: 1.05; }
    50%      { rotate: -2deg;  scale: 1.08; }
    75%      { rotate: 1deg;   scale: 1.03; }
}

.page-center > .card {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--site-padding);
}

/* ---- Sections ---- */

.section {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    scroll-margin-top: 56px;
}

.section--dark {
    background: var(--color-bg-dark);
    color: var(--color-text);
}

.section--light {
    background: #fff;
    color: var(--color-primary-text);
}

.section__title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    margin-bottom: var(--space-2xl);
}

.section__title--dark {
    color: var(--color-primary-text);
}

.section__subtitle {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-bottom: var(--space-3xl);
}

.section__subtitle--dark {
    color: var(--color-subtle);
}

/* ---- Card ---- */

.card {
    background: var(--color-bg-dark);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-2xl);
    width: 100%;
    max-width: 25rem;
    margin: var(--space-lg);
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);
}

.card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    margin-bottom: var(--space-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.card__title-main {
    font-size: 2.5rem;
    font-weight: var(--font-bold);
    line-height: 1.1;
}

.card__title-sub {
    font-size: var(--text-xl); /* Reset from inherited h1 size if needed, or keep relative */
    font-weight: var(--font-normal);
}

.card__logo {
    margin-top: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
    max-width: 100%;
}

.card__subtitle {
    font-size: var(--text-sm);
    color: var(--color-text); /* Improved contrast from color-white to color-text if needed, or keep white */
    color: #e0e0e0; /* Explicit high contrast against dark bg */
    margin-bottom: var(--space-xl);
    text-wrap: balance;
    line-height: 1.5;
}

.card__title-line {
    display: block;
}

/* ---- Header ---- */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--site-padding);
    background-color: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__brand {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    z-index: 1001;
    text-decoration: none;
}

.header__brand:hover {
    color: var(--color-heading);
}

/* -- Burger -- */

.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.burger__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-heading);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.burger.is-active .burger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.is-active .burger__line:nth-child(2) {
    opacity: 0;
}

.burger.is-active .burger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -- Navigation -- */

.header__nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4xl) var(--space-2xl);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.header__nav.is-open {
    transform: translateX(0);
}

.header__menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin: 0;
    padding: 0;
}

.header__link {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
    display: block;
    padding: var(--space-sm) 0;
}

.header__link:hover,
.header__link.is-active {
    color: var(--color-highlight);
}

.header__user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: auto;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header__user span {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.header__user a {
    font-size: var(--text-xs);
}

/* -- Overlay -- */

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* -- Desktop -- */

@media (min-width: 768px) {
    .burger {
        display: none;
    }

    .header__nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        flex-direction: row;
        align-items: center;
        padding: 0;
        transform: none;
        gap: var(--space-xl);
    }

    .header__menu {
        flex-direction: row;
        gap: var(--space-lg);
    }

    .header__link {
        font-size: var(--text-sm);
        font-weight: var(--font-normal);
        text-transform: none;
        letter-spacing: 0;
        padding: 0;
    }

    .header__user {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-left: var(--space-md);
        padding-left: var(--space-lg);
        border-left: 1px solid rgba(255, 255, 255, 0.15);
    }

    .nav-overlay {
        display: none;
    }
}

/* ---- Hero ---- */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    scroll-margin-top: 56px;
    gap: var(--space-2xl);
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero {
        padding: 0 var(--site-padding);
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        text-align: left;
    }
}

.hero__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
    max-width: 650px;
    animation: fadeInUp 1s ease-out forwards;
    padding: 0 var(--space-xl);
    order: 1;
    will-change: transform, opacity;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    text-wrap: balance;
    padding-top: var(--space-xl);
}

.hero__title-line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero__title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.text-accent {
    color: var(--color-accent);
}

.hero__text {
    font-size: var(--text-xl);
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: var(--space-xl);
    opacity: 0;
    max-width: 50ch;
    text-wrap: balance;
    word-break: break-word;
    hyphens: auto;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.hero__btn {
    display: inline-block!important;
    width: auto!important;
    text-align: center!important;
    padding: var(--space-lg)!important;
    background: var(--color-bg-dark)!important;
    color: var(--color-heading)!important;
    text-transform: uppercase!important;
}

.hero__image-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1.2s ease-out 0.5s forwards;
    order: 2;
    margin-top: auto;
    will-change: transform, opacity;
}

@media (min-width: 768px) {
    .hero__image-wrapper {
        flex: 1;
        margin-top: 0;
        background-color: transparent;
    }
}

.hero__image {
    max-width: 100%;
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.3));
    display: block;
    transform: scale(1.4) translateY(4.5rem);
}

@media (min-width: 1024px) {
    .hero__image {
        transform: scale(1.2) translateY(4.5rem);
    }
}

@media (min-width: 1440px) {
    .hero__image {
        transform: scale(1) translateY(4.5rem);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ---- Typography ---- */

.title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    margin-bottom: var(--space-md);
}

.subtitle {
    font-size: var(--text-md);
    color: var(--color-muted);
    margin-bottom: var(--space-3xl);
}

/* ---- Forms ---- */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-light);
    color: var(--color-label);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: var(--space-md) 14px;
    background: #fff;
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-md);
    color: var(--color-primary-text);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    text-align: center;
}

.form-input:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.25);
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    font-family: inherit;
    cursor: pointer;
    transition: opacity var(--transition), background-color var(--transition);
}

.btn:hover {
    opacity: 0.9;
}

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

.btn--primary {
    width: 100%;
    background: var(--color-accent);
    color: var(--color-surface);
}

.btn--primary:hover {
    background: #a3da00; /* Slightly darker accent for hover */
    color: #000;
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.btn--outline:hover {
    background: rgba(178, 239, 0, 0.1);
}

.btn--uppercase {
    text-transform: uppercase;
}

/* ---- Alerts ---- */

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    margin-bottom: var(--space-lg);
}

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

/* ---- Placeholder ---- */

.placeholder {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4xl) var(--space-2xl);
    text-align: center;
}

.section--light .placeholder {
    border-color: #d0d0d0;
    color: var(--color-subtle);
    color: var(--color-subtle);
}

.placeholder p {
    font-size: var(--text-base);
    margin-bottom: var(--space-sm);
}

.placeholder small {
    font-size: var(--text-xs);
    color: var(--color-faint);
}

/* ---- Scroll to top ---- */

.scroll-top {
    display: none;
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(42, 42, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-heading);
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    pointer-events: none;
}

.scroll-top:hover {
    background: var(--color-highlight);
    color: #000;
}

.scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (min-width: 768px) {
    .scroll-top {
        display: flex;
    }
}

/* ---- Utilities ---- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hello-text {
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.logout-button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* ---- Chat ---- */

.chat-section {
    background: #fff;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    scroll-margin-top: 56px;
    display: flex;
    align-items: center;
}

.chat-section .container {
    max-width: none;
    width: 100%;
    padding: var(--space-4xl) var(--site-padding);
}

.chat-heading {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary-text);
    margin-bottom: var(--space-sm);
}

.chat-subheading {
    font-size: var(--text-md);
    color: #6b6b6b;
    margin-bottom: var(--space-xl);
}

.chat-window {
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 60vh;
    height: 60dvh;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.chat-suggestion-btn {
    padding: var(--space-sm) var(--space-lg);
    background: #fff;
    border: 1px solid #d0d0d0;
    color: var(--color-primary-text);
    font-size: var(--text-sm);
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition);
}

.chat-suggestion-btn:hover {
    background: var(--color-bg-dark);
    border-color: var(--color-bg-dark);
    color: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-height: 0;
    scroll-behavior: smooth;
}

.chat-bubble {
    max-width: 80%;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    line-height: 1.55;
    animation: fadeInUp 0.3s ease-out forwards;
    position: relative;
}

.chat-bubble p {
    margin: 0;
}

.chat-bubble--assistant > *:first-child {
    margin-top: 0;
}

.chat-bubble--assistant > *:last-child {
    margin-bottom: 0;
}

.chat-bubble--assistant p + p {
    margin-top: 0.5em;
}

.chat-bubble--assistant ul,
.chat-bubble--assistant ol {
    margin: 0.4em 0;
    padding-left: 1.4em;
}

.chat-bubble--assistant li + li {
    margin-top: 0.2em;
}

.chat-bubble--assistant strong {
    font-weight: var(--font-bold);
}

.chat-bubble--assistant code {
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.chat-bubble--assistant {
    align-self: flex-start;
    background: #fff;
    color: var(--color-primary-text);
    border: 1px solid #e0e0e0;
}

.chat-bubble--assistant::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 12px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    transform: rotate(45deg);
}

.chat-bubble--user {
    align-self: flex-end;
    background: var(--color-bg-dark);
    color: #fff;
}

.chat-bubble--user::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 12px;
    width: 10px;
    height: 10px;
    background: var(--color-bg-dark);
    transform: rotate(45deg);
}

.chat-bubble--typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: var(--space-md) var(--space-lg);
    min-width: 64px;
}

.chat-bubble--typing .dot {
    width: 7px;
    height: 7px;
    background: #999;
    border-radius: 50%;
    animation: typingDot 1.2s ease-in-out infinite;
}

.chat-bubble--typing .dot:nth-child(2) {
    animation-delay: 0.15s;
}

.chat-bubble--typing .dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30%           { opacity: 1;   transform: scale(1);   }
}

.chat-input-area {
    display: flex;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.chat-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: #fff;
    border: none;
    color: var(--color-primary-text);
    font-size: var(--text-base);
    font-family: inherit;
    outline: none;
    text-align: left;
}

.chat-input::placeholder {
    color: #999;
}

.chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-dark);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition);
    font-family: inherit;
}

.chat-send-btn:hover {
    opacity: 0.85;
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: transparent;
    color: #999;
    border: none;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    transition: color var(--transition);
    font-family: inherit;
}

.chat-reset-btn:hover {
    color: var(--color-primary-text);
}

.chat-reset-btn[hidden] {
    display: none;
}

/* ---- Projects ---- */

#projekte {
    min-height: auto;
}

#projekte .container {
    max-width: none;
    padding-bottom: calc(var(--space-4xl) * 1.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.project-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
}

.project-card__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: rgba(0, 0, 0, 0.15);
    padding: var(--space-xl);
}

.project-card__visual:has(.project-card__img) {
    padding: 0;
}

.project-card__icon {
    width: 100%;
    max-width: 260px;
    height: auto;
}

.project-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__body {
    padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
}

.project-card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    margin-bottom: var(--space-sm);
}

.project-card__teaser {
    font-size: var(--text-base);
    color: var(--color-heading);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.project-card__link {
    display: inline-block;
    background: var(--color-bg-dark);
    color: var(--color-heading);
    border: none;
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    font-family: inherit;
    text-transform: uppercase;
    cursor: pointer;
    padding: var(--space-lg);
    transition: opacity var(--transition), background-color var(--transition);
}

.project-card__link:hover {
    opacity: 0.9;
}

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

    .project-card {
        display: flex;
    }

    .project-card__visual {
        height: auto;
        width: 160px;
        flex-shrink: 0;
        padding: var(--space-lg);
    }

    .project-card__visual:has(.project-card__img) {
        padding: 0;
    }

    .project-card__icon {
        max-width: none;
        width: 100%;
    }

    .project-card__img {
        object-position: center;
    }

    .project-card__body {
        display: flex;
        flex-direction: column;
        padding: var(--space-lg) var(--space-xl) var(--space-lg) var(--space-lg);
    }

    .project-card__title {
        font-size: var(--text-lg);
    }

    .project-card__teaser {
        flex: 1;
        margin-bottom: var(--space-lg);
    }

    .project-card__link {
        align-self: flex-start;
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-sm);
    }
}

/* ---- Downloads ---- */

#downloads {
    min-height: auto;
}

#downloads .container {
    max-width: none;
    padding-bottom: calc(var(--space-4xl) * 1.4);
}

.downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.download-card {
    display: block;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.download-card:hover {
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
    color: inherit;
}

.download-card__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: rgba(0, 0, 0, 0.05);
    padding: var(--space-xl);
    color: var(--color-bg-dark);
}

.download-card__body {
    padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
}

.download-card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-primary-text);
    margin-bottom: var(--space-sm);
}

.download-card__desc {
    font-size: var(--text-base);
    color: #666;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.download-card__action {
    display: inline-block;
    background: var(--color-bg-dark);
    color: var(--color-heading);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    padding: var(--space-lg);
    transition: opacity var(--transition);
}

.download-card:hover .download-card__action {
    opacity: 0.9;
}

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

    .download-card {
        display: flex;
    }

    .download-card__visual {
        height: auto;
        width: 120px;
        flex-shrink: 0;
        padding: var(--space-lg);
    }

    .download-card__body {
        display: flex;
        flex-direction: column;
        padding: var(--space-lg) var(--space-xl) var(--space-lg) var(--space-lg);
    }

    .download-card__title {
        font-size: var(--text-lg);
    }

    .download-card__desc {
        flex: 1;
        margin-bottom: var(--space-lg);
    }

    .download-card__action {
        align-self: flex-start;
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-sm);
    }
}

/* ---- Kontakt ---- */

#kontakt {
    min-height: auto;
}

#kontakt .container {
    padding-bottom: calc(var(--space-4xl) * 1.4);
}

.kontakt__item {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
}

.kontakt__link {
    color: var(--color-heading);
    transition: color 0.2s ease;
}

.kontakt__link:hover {
    color: var(--color-highlight);
}

/* ---- Modal ---- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal__dialog {
    position: relative;
    background: var(--color-bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.35s ease;
}

.modal.is-open .modal__dialog {
    transform: translateY(0) scale(1);
}

.modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-2xl) var(--space-2xl) 0;
}

.modal__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-heading);
}

.modal__subtitle {
    font-size: var(--text-sm);
    color: var(--color-accent);
    margin-top: var(--space-xs);
}

.modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    margin-left: var(--space-lg);
}

.modal__close:hover {
    border-color: var(--color-heading);
    color: var(--color-heading);
}

.modal__body {
    padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-text);
}

.modal__body p + p {
    margin-top: var(--space-lg);
}