/* Geist Font - Local Version */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/geist-300.ttf') format('truetype');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/geist-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/geist-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/geist-600.ttf') format('truetype');
}

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

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: #ffffff;
    color: #000000;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
}

.skip-link:focus {
    top: 16px;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar / Linke Spalte */
.sidebar {
    background-color: #050505;
    width: 100%;
    max-width: 580px;
    min-width: 320px;
    padding: 80px clamp(32px, 20%, 96px);
    overflow-y: auto;
    position: relative;
    z-index: 10;
    box-shadow: 40px 0 80px rgba(0, 0, 0, 0.4);
}

.profile-section {
    max-width: 100%;
}

.profile-image {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    opacity: 0.01;
    animation: fadeIn 0.6s ease-out 0.25s forwards;
}

.profile-image:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.intro {
    opacity: 0.01;
    animation: fadeIn 0.6s ease-out 0.5s forwards;
}

.intro h1 {
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 24px;
}

.intro .muted {
    color: #a3a3a3; /* WCAG AA compliant contrast ratio */
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0.01;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidequests {
    opacity: 0.01;
    animation: fadeIn 0.6s ease-out 0.75s forwards;
}

/* Sidequests Navigation */
.sidequests h2 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 40px;
    color: #a3a3a3;
    position: relative;
    padding-left: 36px;
}

.sidequests h2::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 18px;
    height: 1px;
    background-color: #a3a3a3;
    transform: translateY(-50%);
}

.projects-current {
    margin-bottom: 48px;
}

.projects-legacy {
    opacity: 0.01;
    animation: fadeIn 0.6s ease-out 1s forwards;
}

.project-link {
    display: block;
    text-decoration: none;
    color: #ffffff;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #1a1a1a;
    transition: transform 0.3s ease;
}

.project-link:not(.legacy) {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.project-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-content {
    flex: 1;
    min-width: 0;
}

.project-content .project-title {
    transition: color 0.3s ease;
}

.projects-legacy .project-link:last-child {
    border-bottom: none;
}

.project-link:hover {
    transform: scale(1.03) translateX(5px);
}

.project-link:hover .project-image {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.project-link:hover .project-title {
    color: #e0e0e0;
}

.project-link .project-title {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.project-link:not(.legacy) .project-title {
    font-size: 1.125rem;
    font-weight: 300;
}

.project-link .arrow {
    display: inline-block;
    margin-left: 5px;
    font-size: 1rem;
    opacity: 0.6;
}

.project-link .project-desc {
    font-size: 0.875rem;
    color: #b8b8b8;
    line-height: 1.4;
    margin-top: 5px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.status-badge.outdated,
.status-badge.abandoned,
.status-badge.sold {
    background-color: rgba(108, 117, 125, 0.2);
    color: #b8b8b8;
}

/* Legacy Projects - muted styling */
.project-link.legacy {
    padding-bottom: 12px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.project-link.legacy .project-title {
    font-size: 0.875rem;
    font-weight: 400;
}

.project-link.legacy .arrow {
    font-size: 0.875rem;
}

.project-link.legacy .project-desc {
    font-size: 0.75rem;
}

.project-link.legacy:hover {
    opacity: 1;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 80px;
}

.social-links a {
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.social-links a:hover {
    opacity: 0.7;
}

/* Accessibility - Focus Styles */
a:focus,
.project-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
    border-radius: 4px;
}

a:focus-visible,
.project-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.profile-image:focus {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* Background Section */
.background-section {
    flex: 1;
    background-image: url('background-mobile.jpg'); /* Fallback for browsers without WebP support */
    background-image: image-set(
        url('background-mobile.webp') type('image/webp'),
        url('background-mobile.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Changed from fixed for better mobile performance */
    min-height: 100vh;
    position: sticky;
    top: 0;
    opacity: 0.01;
    animation: fadeInBackground 1s ease-out 0.5s forwards;
}

/* Responsive background images for different screen sizes */
@media (min-width: 768px) {
    .background-section {
        background-image: url('background-1080p.jpg');
        background-image: image-set(
            url('background-1080p.webp') type('image/webp'),
            url('background-1080p.jpg') type('image/jpeg')
        );
        background-attachment: fixed;
    }
}

@media (min-width: 1920px) {
    .background-section {
        background-image: url('background-2k.jpg');
        background-image: image-set(
            url('background-2k.webp') type('image/webp'),
            url('background-2k.jpg') type('image/jpeg')
        );
    }
}

@media (min-width: 2560px) and (min-resolution: 192dpi),
       (min-width: 2560px) and (-webkit-min-device-pixel-ratio: 2) {
    .background-section {
        background-image: url('background-4k.jpg');
        background-image: image-set(
            url('background-4k.webp') type('image/webp'),
            url('background-4k.jpg') type('image/jpeg')
        );
    }
}

@keyframes fadeInBackground {
    from {
        opacity: 0.01;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        max-width: 100%;
        padding: 60px 40px;
    }

    .background-section {
        min-height: 400px;
    }

    .intro h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 40px 30px;
        min-width: 320px;
    }

    .intro h1 {
        font-size: 1.5rem;
    }

    .profile-image {
        width: 60px;
        height: 60px;
    }
}
