/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099cc;
    --accent-color: #ff006e;
    --bg-dark: #0a0e27;
    --bg-darker: #050816;
    --text-light: #ffffff;
    --text-gray: #b4b4b4;
    --card-bg: #151a35;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: auto;
    padding-top: 0;
    width: 100%;
    min-width: 320px;
    box-sizing: border-box;
}

/* ===== Custom Scrollbar - Modern & Professional ===== */
/* Webkit browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: #0a0e27 !important;
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.7) 0%, rgba(102, 126, 234, 0.7) 100%) !important;
    border-radius: 10px !important;
    border: 2px solid #0a0e27 !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.9) 0%, rgba(102, 126, 234, 0.9) 100%) !important;
    border: 2px solid rgba(0, 212, 255, 0.3) !important;
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #00d4ff 0%, #667eea 100%) !important;
}

/* Firefox */
html,
body,
* {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 212, 255, 0.7) #0a0e27 !important;
}

/* Scrollbar for specific elements */
.modal-content::-webkit-scrollbar,
.code-content::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 8px !important;
}

.modal-content::-webkit-scrollbar-thumb,
.code-content::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.6) 0%, rgba(102, 126, 234, 0.6) 100%) !important;
    border-radius: 6px !important;
}

.container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    width: 100%;
    box-sizing: border-box;
}

/* Ensure container respects mobile padding */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
}

/* ===== Large Display Optimization (1920px+) ===== */
@media (min-width: 1920px) {
    .hero {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        justify-content: space-between;
        gap: clamp(4rem, 8vw, 6rem);
        padding: clamp(1.5rem, 3vw, 2rem) clamp(5%, 10vw, 10%);
        box-sizing: border-box;
    }

    .hero-content {
        padding-left: 0;
        align-items: flex-start;
        text-align: left;
    }

    .hero-animation {
        padding-right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .code-window {
        margin: 0;
    }
}

/* ===== Navbar Styles ===== */
.navbar {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.nav-container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.logo a {
    font-size: clamp(1.25rem, 2vw + 0.25rem, 1.5rem);
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Courier New', monospace;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 3px 0;
    transition: 0.4s;
}

/* ===== Hero Section ===== */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 2rem);
    gap: clamp(2rem, 6vw, 4rem);
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 2rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw + 0.5rem, 1.3rem);
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Hero Buttons - Desktop Default */
.hero-buttons {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.hero-buttons .btn {
    flex: 0 0 auto;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
}

.hero-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 2rem;
}

.code-window {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: min(480px, calc(100vw - 40px));
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

.window-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.code-content .keyword { color: #ff79c6; }
.code-content .property { color: #50fa7b; }
.code-content .string { color: #f1fa8c; }
.code-content .boolean { color: #bd93f9; }

/* ===== Features Section ===== */
.features {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    background: var(--bg-dark);
    box-sizing: border-box;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-top: 2rem;
    box-sizing: border-box;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.1);
    position: relative;
    z-index: 1;
}

/* Hover-Effekt nur auf Desktop (größer als Mobile) */
@media (min-width: 769px) {
    .feature-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    }
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-gray);
}

/* ===== About Section ===== */
.about-section {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    box-sizing: border-box;
}

.section-title {
    font-size: clamp(2rem, 5vw + 0.5rem, 3rem);
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
    align-items: center;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat,
.stat-card {
    text-align: center;
    padding: 1.8rem 2.2rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    width: 230px;
    min-height: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.stat h3,
.stat-card h3,
.stat-value {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0;
}

.stat p,
.stat-card p,
.stat-label {
    color: var(--text-gray);
    margin: 0;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background: var(--gradient-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    box-shadow: var(--shadow);
    color: rgba(255, 255, 255, 0.9);
}

.image-placeholder svg {
    width: 120px;
    height: 120px;
}

.project-image .image-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 0;
}

.project-image .image-placeholder svg {
    width: 80px;
    height: 80px;
}

.timeline {
    margin-top: 4rem;
}

.timeline h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: 100%;
    background: rgba(0, 212, 255, 0.3);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    flex: 1;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.timeline-content h3 {
    color: var(--primary-color);
}

.timeline-content h4 {
    margin: 0.5rem 0;
}

.timeline-content p {
    color: var(--text-gray);
}

/* ===== Projects Section ===== */
.projects-section {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    box-sizing: border-box;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: clamp(1rem, 2vw + 0.2rem, 1.2rem);
    margin-bottom: 3rem;
}

.section-description {
    text-align: center !important;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 100%;
    padding: 0 1rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    box-sizing: border-box;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 212, 255, 0.1);
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
}

.project-image {
    background: var(--gradient-1);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}

.project-card:nth-child(2n) .project-image {
    background: var(--gradient-2);
}

.project-card:nth-child(3n) .project-image {
    background: var(--gradient-3);
}

/* Professioneller Click-Indikator Overlay */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.4) 100%);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .view-details {
    transform: translateY(0);
}

.view-details svg {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
        transform: scale(1.1);
    }
}

.view-details span {
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.project-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.65rem 1.25rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
    transition: left 0.5s;
}

.project-link:hover::before {
    left: 100%;
}

.project-link:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
}

.project-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===== Skills Section ===== */
.skills-section {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    box-sizing: border-box;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-top: 3rem;
    box-sizing: border-box;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.skill-category h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    width: 100%;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.skill-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-3);
    border-radius: 10px;
    /* No transition - instant display */
}

.additional-skills {
    margin-top: 4rem;
}

.additional-skills h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag-cloud .tag {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* ===== Contact Section ===== */
.contact-section {
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    box-sizing: border-box;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    margin-top: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.contact-info,
.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.contact-info h2,
.contact-form h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    font-size: 2rem;
    width: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.info-icon svg {
    width: 32px;
    height: 32px;
}

.info-text h3 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.info-text p {
    color: var(--text-gray);
}

.social-links {
    margin-top: 2rem;
}

.social-links h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.social-icon:hover {
    background: var(--primary-color);
    color: var(--bg-darker);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
}

/* ===== Footer ===== */
footer {
    background: var(--bg-darker);
    padding: clamp(1.5rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    box-sizing: border-box;
}

.footer-content p {
    color: var(--text-gray);
}

/* ===== Responsive Design ===== */

/* Tablet (1024px and below) */
/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 clamp(1.5rem, 4vw, 2rem);
        box-sizing: border-box;
    }

    .hero {
        padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2rem);
        box-sizing: border-box;
    }

    .hero h1 {
        font-size: clamp(2rem, 4vw + 0.8rem, 2.8rem);
    }

    /* Better tablet grid - 2 columns with good spacing */
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
        gap: clamp(1.5rem, 3vw, 2rem);
        box-sizing: border-box;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
        gap: clamp(1.5rem, 3vw, 2rem);
        box-sizing: border-box;
    }

    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
        gap: clamp(1.5rem, 3vw, 2rem);
        box-sizing: border-box;
    }

    .about-stats {
        gap: clamp(1.5rem, 3vw, 2rem);
    }

    /* Better card sizing */
    .project-card {
        min-height: 320px;
    }

    .skill-category {
        padding: 2rem;
    }
}

/* Medium Tablet (1024px and below) - wie Mobile */
@media (max-width: 1024px) {
    /* Navbar NOT fixed on tablet */
    .navbar {
        position: relative;
    }

    body {
        padding-top: 0;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
        gap: 2rem;
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-animation {
        max-width: 100%;
        width: 100%;
        margin: 2rem auto 0;
        padding: 0 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Code window - fixed, not draggable */
    .code-window {
        max-width: 90%;
        margin: 0 auto;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
        justify-items: stretch;
    }

    .contact-section {
        padding: 3rem 1rem;
    }

    .contact-section .section-description {
        text-align: center !important;
        padding: 0 1.5rem !important;
        line-height: 1.6 !important;
        display: block !important;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
        padding: 1.75rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }

    /* Add padding to body to prevent content from hiding under navbar */
    body {
        padding-top: 73px !important;
    }

    #navbar-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }

    .hamburger {
        display: flex;
        z-index: 1002;
        position: relative;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        bottom: 0;
        height: calc(100vh - 60px);
        flex-direction: column;
        background: linear-gradient(180deg, rgba(10, 14, 39, 0.98) 0%, rgba(5, 8, 22, 0.98) 100%);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem 0;
        gap: 0;
        z-index: 1001;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.3s; }

    .nav-link {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-animation {
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    /* MOBILE BUTTONS: UNTEREINANDER + MITTIG */
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.5rem auto 0 !important;
        padding: 0 !important;
        gap: 1rem !important;
        flex-wrap: nowrap !important;
    }

    .hero-buttons .btn {
        width: 90% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        display: block !important;
        text-align: center !important;
        flex: none !important;
    }

    .btn-primary,
    .btn-secondary {
        width: 90% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 600px;
        margin: 0 auto;
        padding: 0 1rem;
        justify-items: stretch;
    }

    .contact-section {
        padding: 3rem 1.5rem;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .info-item {
        margin-bottom: 1.25rem;
    }

    .social-icons {
        justify-content: center;
    }

    .about-stats {
        gap: 1.5rem !important;
        padding: 0 1rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        display: flex !important;
    }

    .stat,
    .stat-card {
        width: calc(50% - 0.75rem) !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 1.5rem 1rem !important;
        flex: 0 0 calc(50% - 0.75rem) !important;
        min-height: 130px !important;
        box-sizing: border-box !important;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
    }

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

    .skill-category {
        padding: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Better mobile spacing */
    .about-section,
    .projects-section,
    .skills-section,
    .contact-section {
        padding: clamp(2rem, 5vw, 3rem) clamp(0.75rem, 2vw, 1rem);
        box-sizing: border-box;
    }

    .section-title {
        font-size: clamp(1.75rem, 4vw + 0.5rem, 2.5rem);
    }

    .section-subtitle {
        font-size: clamp(0.9rem, 2vw, 1rem);
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* Contact Section Mobile Optimization */
    .contact-section {
        padding: clamp(2rem, 4vw, 2.5rem) clamp(0.75rem, 2vw, 1rem);
        text-align: center;
        box-sizing: border-box;
    }

    .contact-section .section-title {
        font-size: clamp(1.75rem, 4vw + 0.5rem, 2.5rem);
        margin-bottom: 1rem;
    }

    .contact-section .section-subtitle {
        font-size: clamp(0.95rem, 2vw, 1.1rem);
        margin-bottom: 0.5rem;
    }

    .contact-section .section-description {
        font-size: clamp(0.9rem, 2vw, 1rem) !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
        padding: 0 clamp(1rem, 3vw, 1.5rem) !important;
        line-height: 1.6 !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .contact-info,
    .contact-form {
        padding: 2rem 1.5rem;
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
        width: 100%;
        max-width: 500px;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .info-item {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .info-icon {
        width: 40px;
        font-size: 1.5rem;
    }

    .info-icon svg {
        width: 24px;
        height: 24px;
    }

    .info-text h3 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .info-text p {
        font-size: 0.9rem;
        word-break: break-word;
    }

    .social-links h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .social-links {
        text-align: center;
        margin-top: 2.5rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(0, 212, 255, 0.1);
    }

    .social-icons {
        gap: 1rem;
        justify-content: center;
    }

    .social-icon {
        width: 44px;
        height: 44px;
    }

    .social-icon svg {
        width: 22px;
        height: 22px;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        font-weight: 500;
    }

    .form-group input,
    .form-group textarea {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 8px;
        border: 1.5px solid rgba(0, 212, 255, 0.2);
        background: rgba(15, 23, 42, 0.6);
        transition: all 0.3s ease;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    }

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

    .contact-form .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-radius: 8px;
        font-weight: 600;
        margin-top: 0.5rem;
    }

    /* Fix for white button bug on mobile */
    .btn,
    button[type="submit"] {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }

    body {
        padding-top: 73px !important;
        box-sizing: border-box;
    }

    #navbar-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }

    .container {
        padding: 0 clamp(1rem, 3vw, 1.25rem);
        box-sizing: border-box;
    }

    .hero {
        padding: clamp(2rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.25rem);
        justify-content: center;
        box-sizing: border-box;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 4vw + 0.5rem, 1.85rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.85rem, 2vw, 0.95rem);
    }

    .hero-content {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-animation {
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* SMALL MOBILE BUTTONS: UNTEREINANDER + MITTIG */
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.5rem auto 0 !important;
        padding: 0 !important;
        gap: 1rem !important;
        flex-wrap: nowrap !important;
    }

    .hero-buttons .btn {
        width: 85% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
        display: block !important;
        text-align: center !important;
        flex: none !important;
    }

    .btn-primary,
    .btn-secondary {
        width: 85% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    .section-title {
        font-size: clamp(1.5rem, 4vw + 0.5rem, 2rem);
        padding: 0 clamp(0.75rem, 2vw, 1rem);
    }

    .section-subtitle {
        font-size: clamp(0.8rem, 2vw, 0.9rem);
        padding: 0 clamp(0.75rem, 2vw, 1rem);
    }

    .code-content {
        font-size: 0.7rem;
        padding: 1rem;
    }

    .feature-card,
    .project-card,
    .skill-category {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        -webkit-appearance: none;
        appearance: none;
    }

    .about-stats {
        gap: 1rem !important;
        flex-wrap: wrap !important;
        display: flex !important;
        justify-content: center !important;
    }

    .stat,
    .stat-card {
        padding: 1.25rem 0.85rem !important;
        width: calc(50% - 0.5rem) !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 0 0 calc(50% - 0.5rem) !important;
        min-height: 120px !important;
        box-sizing: border-box !important;
    }

    .stat h3,
    .stat-card h3,
    .stat-value {
        font-size: 2.25rem;
    }

    /* Contact Section - Small Mobile Optimizations */
    .contact-section {
        padding: clamp(2rem, 4vw, 2.5rem) clamp(0.5rem, 2vw, 0.75rem);
        box-sizing: border-box;
    }

    .contact-content {
        gap: clamp(1.25rem, 3vw, 1.5rem);
        padding: 0 clamp(0.25rem, 1vw, 0.5rem);
        margin-top: 2rem;
        box-sizing: border-box;
    }

    .contact-info,
    .contact-form {
        padding: 1.5rem 1.25rem;
        border-radius: 8px;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.35rem;
        margin-bottom: 1.5rem;
    }

    .info-item {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .info-icon {
        width: 42px;
        font-size: 1.5rem;
    }

    .info-icon svg {
        width: 26px;
        height: 26px;
    }

    .info-text h3 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .info-text p,
    .info-text a {
        font-size: 0.9rem;
    }

    .social-links {
        margin-top: 1.5rem;
    }

    .social-links h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .social-icons {
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
        border-radius: 6px;
    }

    .form-group textarea {
        min-height: 120px;
    }

    .contact-form .btn {
        width: 100%;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    .project-grid,
    .feature-grid,
    .skills-container {
        gap: 1.75rem;
    }

    /* Contact Section Small Mobile Optimization */
    .contact-section {
        padding: 2rem 1rem;
    }

    .contact-section .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .contact-section .section-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .contact-content {
        gap: 1.5rem;
        margin-top: 2rem;
        max-width: 100%;
    }

    .contact-info,
    .contact-form {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .info-item {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
        align-items: flex-start;
    }

    .info-icon {
        width: 40px;
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    .info-icon svg {
        width: 24px;
        height: 24px;
    }

    .info-text h3 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
        font-weight: 600;
    }

    .info-text p {
        font-size: 0.9rem;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .social-links {
        margin-top: 2rem;
        padding-top: 1.5rem;
        text-align: center;
    }

    .social-links h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .social-icons {
        gap: 0.75rem;
        justify-content: center;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .social-icon svg {
        width: 20px;
        height: 20px;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
        font-weight: 500;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.85rem;
        font-size: 0.9rem;
        border-radius: 4px;
    }

    .form-group textarea {
        min-height: 110px;
    }

    .contact-form .btn {
        width: 100%;
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
        margin-top: 0.5rem;
    }

    /* Ensure no stray elements at bottom */
    body {
        position: relative;
    }

    footer {
        margin-top: 2rem;
    }
}

/* ===== Zero Animations for Instant Loading ===== */
#content-container,
#content-container * {
    /* No transitions or animations during page load */
    animation: none !important;
    animation-duration: 0s !important;
    transition: none !important;
}

#content-container {
    opacity: 1 !important;
    /* Optimize rendering performance */
    will-change: contents;
}

/* Re-enable hover transitions after load (only for hover effects) */
.nav-link,
.btn,
.feature-card,
.project-card,
.social-icon {
    transition: all 0.2s ease !important;
}

/* Instant scroll - no smooth scroll */
html {
    scroll-behavior: auto !important;
}

body {
    scroll-behavior: auto !important;
}

/* Prevent layout shifts */
main#content-container {
    min-height: 100vh;
    contain: layout style;
}

/* ===== Project Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg-dark);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 16px;
    max-width: min(800px, 90vw);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 10001;
    box-sizing: border-box;
}

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

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10002;
}

.modal-close:hover {
    background: rgba(255, 95, 86, 0.2);
    border-color: #ff5f56;
    color: #ff5f56;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: clamp(1.5rem, 3vw, 2rem);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-sizing: border-box;
}

.modal-image {
    height: 300px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
}

.modal-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw + 0.5rem, 2rem);
    line-height: 1.3;
}

.modal-info p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.modal-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.875rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.modal-btn:hover::before {
    left: 100%;
}

.modal-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.modal-btn:hover svg {
    transform: translateX(2px);
}

/* Primary Button - Gradient Cyan */
.modal-btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.modal-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

.modal-btn-primary:active {
    transform: translateY(-1px);
}

/* Secondary Button - Outline Style */
.modal-btn-secondary {
    background: rgba(0, 212, 255, 0.05);
    border: 2px solid rgba(0, 212, 255, 0.4);
    color: var(--primary-color);
}

.modal-btn-secondary:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* Ghost Button - Minimal Style */
.modal-btn-ghost {
    background: rgba(148, 163, 184, 0.05);
    border: 2px solid rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.modal-btn-ghost:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.4);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.2);
}

/* Make project cards clickable */
.project-card {
    cursor: pointer;
    user-select: none;
}

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

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .modal-image {
        height: 200px;
    }

    .modal-info h2 {
        font-size: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }
}

/* Extra Small Mobile Devices (375px and below) */
@media (max-width: 375px) {
    .contact-section {
        padding: clamp(1.75rem, 4vw, 2rem) clamp(0.5rem, 2vw, 0.5rem);
        box-sizing: border-box;
    }

    .section-title {
        font-size: clamp(1.5rem, 4vw + 0.25rem, 1.75rem);
        padding: 0 clamp(0.5rem, 2vw, 0.5rem);
    }

    .section-subtitle {
        font-size: clamp(0.75rem, 2vw, 0.85rem);
        padding: 0 clamp(0.5rem, 2vw, 0.5rem);
    }

    .section-description {
        font-size: clamp(0.85rem, 2vw, 0.9rem);
        padding: 0 clamp(0.5rem, 2vw, 0.75rem);
        line-height: 1.5;
    }

    .contact-content {
        gap: clamp(1rem, 3vw, 1.25rem);
        padding: 0 clamp(0.25rem, 1vw, 0.25rem);
        margin-top: 1.5rem;
        box-sizing: border-box;
    }

    .contact-info,
    .contact-form {
        padding: 1.25rem 1rem;
        border-radius: 8px;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }

    .info-item {
        gap: 0.65rem;
        margin-bottom: 1rem;
    }

    .info-icon {
        width: 38px;
        font-size: 1.35rem;
    }

    .info-icon svg {
        width: 24px;
        height: 24px;
    }

    .info-text h3 {
        font-size: 0.9rem;
    }

    .info-text p,
    .info-text a {
        font-size: 0.85rem;
        word-break: break-word;
    }

    .social-links {
        margin-top: 1.25rem;
    }

    .social-links h3 {
        font-size: 0.95rem;
    }

    .social-icons {
        gap: 0.65rem;
    }

    .social-icon {
        width: 36px;
        height: 36px;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .contact-form .btn {
        width: 100%;
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }

    /* About Stats für 375px - noch kleiner */
    .about-stats {
        gap: 0.3rem !important;
        padding: 0 0.15rem !important;
    }

    .stat,
    .stat-card {
        width: calc(50% - 0.15rem) !important;
        padding: 0.45rem 0.2rem !important;
        min-height: 70px !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .stat h3,
    .stat-card h3,
    .stat-value {
        font-size: 1.3rem !important;
        margin-bottom: 0.1rem !important;
    }

    .stat p,
    .stat-card p,
    .stat-label {
        font-size: 0.55rem !important;
        line-height: 1.1 !important;
    }
}

/* iPhone 13 Pro / 14 Pro specific adjustments (up to 400px) */
@media (max-width: 400px) {
    .contact-info,
    .contact-form {
        transform: translateX(-25px) !important;
    }

    .about-stats {
        gap: 0.4rem !important;
        flex-wrap: wrap !important;
        padding: 0 0.2rem !important;
        display: flex !important;
        justify-content: center !important;
    }

    .stat,
    .stat-card {
        width: calc(50% - 0.2rem) !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0.5rem 0.25rem !important;
        flex: 0 0 calc(50% - 0.2rem) !important;
        min-height: 75px !important;
        box-sizing: border-box !important;
    }

    .stat h3,
    .stat-card h3,
    .stat-value {
        font-size: 1.4rem !important;
        margin-bottom: 0.15rem !important;
    }

    .stat p,
    .stat-card p,
    .stat-label {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
    }
}
