/* Portfolio — lokale Schrift, 8px-Raster, ruhiges Layout */

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-400.ttf") format("truetype");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-500.ttf") format("truetype");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-600.ttf") format("truetype");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-700.ttf") format("truetype");
}

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-italic-400.ttf") format("truetype");
}

:root {
    --bg-deep: #080c10;
    --bg-elevated: #0f1419;
    --surface: rgba(22, 30, 40, 0.72);
    --surface-solid: #161e28;
    --text: #f0f3f6;
    --text-muted: #8b95a3;
    --accent: #6eb8d4;
    --accent-hover: #8ecfe8;
    --accent-dim: #4a7a9a;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --radius-lg: 16px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border);
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --spotlight-x: 50%;
    --spotlight-y: 40%;
    /* vertikales Raster (8px) */
    --s-1: 8px;
    --s-2: 16px;
    --s-3: 24px;
    --s-4: 32px;
    --s-5: 40px;
    --s-6: 48px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg-deep);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Scroll-Fortschritt (oben) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    width: 0;
    height: 3px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent), var(--accent-hover));
    box-shadow: 0 0 16px rgba(110, 184, 212, 0.35);
}

/* Skip-Link */
.skip-link {
    position: absolute;
    top: var(--s-2);
    left: var(--s-2);
    z-index: 100;
    padding: var(--s-1) var(--s-2);
    background: var(--surface-solid);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

.skip-link:focus {
    clip: auto;
    clip-path: none;
    width: auto;
    height: auto;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* äußere Begrenzung auf sehr breiten Screens */
.shell {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(var(--s-5), 6vw, var(--s-6)) clamp(var(--s-2), 4vw, var(--s-4)) var(--s-6);
}

.wrap {
    max-width: 600px;
    margin: 0 auto;
}

.content-stack {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-top: var(--s-2);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin: var(--s-3) 0 0;
    padding: 0;
    list-style: none;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.card-body {
    padding: var(--s-3);
}

.about-kicker {
    margin: 0 0 var(--s-2);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    color: var(--text);
}

.lead-text {
    margin: 0 0 var(--s-2);
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text);
    font-weight: 500;
}

.lead-text strong {
    font-weight: 600;
    color: var(--text);
}

.body-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.card-body--project {
    padding-top: var(--s-2);
}

.project-title {
    margin: 0 0 var(--s-2);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.project-desc {
    margin: 0 0 var(--s-3);
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bg-deep);
    background: linear-gradient(135deg, var(--accent), #5a9eb8);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(110, 184, 212, 0.25);
    transition:
        transform 0.2s var(--ease-out),
        box-shadow 0.2s var(--ease-out);
}

.project-cta:hover {
    color: var(--bg-deep);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(110, 184, 212, 0.35);
}

.project-cta:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
}

.contact-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
    padding-top: 0;
}

.contact-icon {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.9;
}

/* Hintergrund */
.bg-stack {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

@keyframes mesh-drift {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(1.5%, -1%) scale(1.02);
    }
    66% {
        transform: translate(-1%, 0.5%) scale(1.01);
    }
}

.bg-gradient-mesh {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(60, 100, 130, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 45% at 85% 15%, rgba(80, 120, 160, 0.2), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(40, 70, 100, 0.25), transparent 45%);
    animation: mesh-drift 28s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .bg-gradient-mesh {
        animation: none;
    }

    .avatar:hover,
    .card:hover,
    .project-cta:hover {
        transform: none;
    }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 70%);
    opacity: 0.5;
}

.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.bg-spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--spotlight-x) var(--spotlight-y),
        rgba(110, 184, 212, 0.09),
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
}

.bg-spotlight.is-active {
    opacity: 1;
}

.no-spotlight .bg-spotlight {
    display: none;
}

/* Reveal */
/* Nur Opacity — vermeidet unscharfe Darstellung durch transform/GPU-Layer beim Foto */
.reveal {
    opacity: 0;
    transition: opacity 0.65s var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transition: none;
    }
}

.reveal-delay-1 {
    transition-delay: 0.08s;
}

.reveal-delay-2 {
    transition-delay: 0.16s;
}

.reveal-delay-3 {
    transition-delay: 0.24s;
}

.reveal-delay-4 {
    transition-delay: 0.32s;
}

.reveal-delay-5 {
    transition-delay: 0.4s;
}

header {
    margin-bottom: var(--s-5);
}

.brand-row {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    margin-bottom: var(--s-2);
}

/* Avatar: Foto (bilder/profilbild.png) oder Initialen bei Ladefehler */
.avatar {
    position: relative;
    flex-shrink: 0;
    width: clamp(140px, 42vw, 176px);
    height: clamp(140px, 42vw, 176px);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(110, 184, 212, 0.35), var(--surface-solid));
    border: 1px solid var(--border-strong);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition:
        box-shadow 0.4s var(--ease-out),
        transform 0.4s var(--ease-out),
        border-color 0.4s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .avatar:hover {
        transform: scale(1.02);
        border-color: rgba(110, 184, 212, 0.45);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(110, 184, 212, 0.25),
            0 0 28px rgba(110, 184, 212, 0.18);
    }
}

.avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* bei Bedarf feinjustieren: z. B. center 42% = etwas mehr Haare */
    object-position: center 40%;
    border-radius: 50%;
    display: none;
    z-index: 1;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.avatar.avatar--photo .avatar-img {
    display: block;
}

.avatar-initials {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    z-index: 0;
}

.avatar.avatar--photo .avatar-initials {
    visibility: hidden;
}

.intro {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 var(--s-2);
}

.intro h1 {
    font-size: clamp(1.85rem, 4.5vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin: 0 0 var(--s-2);
    background: linear-gradient(125deg, #ffffff 0%, #e4edf2 42%, #8eb8cc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@supports not (background-clip: text) {
    .intro h1 {
        color: var(--text);
        background: none;
        text-shadow: none;
    }
}

.tagline {
    color: var(--text-muted);
    font-size: 1.02rem;
    font-weight: 400;
    margin: 0;
    max-width: 42ch;
}

.tagline strong {
    font-weight: 600;
    color: var(--text);
}

.card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 0;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition:
        transform 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out),
        border-color 0.4s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-3px);
        border-color: rgba(110, 184, 212, 0.18);
        box-shadow:
            0 16px 48px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(110, 184, 212, 0.12),
            0 0 40px rgba(110, 184, 212, 0.06);
    }
}

.card-header {
    padding: var(--s-3) var(--s-3) var(--s-2);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

/* „Über mich“: einklappbar (<details>) */
.about-details {
    width: 100%;
}

.about-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.about-summary::-webkit-details-marker,
.about-summary::marker {
    display: none;
    content: "";
}

.about-summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 4px;
}

.about-chevron {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.85;
    transition: transform 0.3s var(--ease-out);
}

.about-details[open] .about-chevron {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .about-chevron {
        transition: none;
    }
}

.card h2 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.contact-list {
    margin: 0;
    padding: var(--s-1) 0;
}

.contact-row {
    display: grid;
    grid-template-columns: minmax(0, 118px) 1fr;
    gap: var(--s-2);
    align-items: start;
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--border);
    transition: background 0.25s var(--ease-out);
}

.contact-row:last-child {
    border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
    .contact-row:hover {
        background: rgba(255, 255, 255, 0.03);
    }
}

.contact-row dd {
    margin: 0;
    font-size: 0.98rem;
    word-break: break-word;
}

.contact-plain {
    font-weight: 500;
    color: var(--text);
}

.email-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
}

.contact-row a:not(.btn-copy) {
    position: relative;
    display: inline;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: none;
    transition: color 0.25s var(--ease-out);
}

.contact-row a:not(.btn-copy)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transform: scaleX(0.28);
    transform-origin: left center;
    opacity: 0.65;
    transition:
        transform 0.3s var(--ease-out),
        opacity 0.3s var(--ease-out);
}

.contact-row a:not(.btn-copy):hover {
    color: var(--accent-hover);
}

.contact-row a:not(.btn-copy):hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.contact-row a:not(.btn-copy):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.contact-row a:not(.btn-copy):focus-visible::after {
    transform: scaleX(1);
    opacity: 1;
}

.btn-copy {
    flex-shrink: 0;
    margin: 0;
    padding: 6px var(--s-2);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-copy:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-copy.is-done {
    color: var(--accent);
    border-color: rgba(110, 184, 212, 0.4);
}

.muted-inline {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 400;
}

.note {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: var(--s-5) 0 0;
    padding: var(--s-3) 0 0;
    border-top: 1px solid var(--border);
}

.footer-row {
    margin-top: var(--s-5);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.footer-row a {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    text-underline-offset: 3px;
}

.footer-row a:hover {
    color: var(--text);
    text-decoration-color: rgba(255, 255, 255, 0.45);
}
