html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto Mono", monospace;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Global text selection - green background with black text */
::selection {
    background-color: #0f0;
    color: #000;
}

::-moz-selection {
    background-color: #0f0;
    color: #000;
}

/* Fix gradient text selection by overriding webkit properties */
h1::selection,
.showcase h3::selection,
.greenbox h2::selection,
.showcase i::selection {
    -webkit-text-fill-color: #000;
    -webkit-background-clip: border-box;
    background: #0f0;
}

h1::-moz-selection,
.showcase h3::-moz-selection,
.greenbox h2::-moz-selection,
.showcase i::-moz-selection {
    color: #000;
    background: #0f0;
}

/* Showcase headline - invert since it has green background normally */
.showcase h2::selection {
    background-color: #000;
    color: #0f0;
}

.showcase h2::-moz-selection {
    background-color: #000;
    color: #0f0;
}


h1 {
    color: #0f0;
    font-size: 2rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
    text-align: left;
    text-transform: none;
}

.intro h1 {
    font-size: 3rem;
    line-height: 140%;
    text-align: left;
    background: linear-gradient(135deg, #00ff00, #66ff88, #00ff00, #aaffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    animation: gradientShift 3s linear infinite;
}

.showcase h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 140%;
    text-align: left;
    color: #000;
    background: #0f0;
    display: inline-block;
    padding: 4px;
    margin: 0;
    margin-bottom: 48px;
}

.showcase h3 {
    color: #0f0;
    margin-bottom: 16px;
    margin-top: 80px;
    text-transform: uppercase;
}

.showcase h3:first-of-type {
    margin-top: 0;
}

.showcase p {
    font-size: 1rem;
    line-height: 180%;
    color: #0f0;
    font-weight: 300;
    margin-bottom: 24px;
}

.showcase i {
    font-weight: 300;
    text-transform: none;
    font-style: normal;
    color: rgba(0, 255, 0, 0.8);
    font-size: 1rem;
}

/* Logo pills */
.logo-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin: 0 4px;
    vertical-align: middle;
    max-width: 100%;
    overflow: hidden;
}

.logo-pill img {
    height: 34px !important;
    width: auto !important;
    max-width: 100% !important;
    max-height: 34px !important;
    display: block !important;
    padding: 8px;
    filter: brightness(0) invert(1);
    object-fit: contain !important;
}

/* Color variant pills - no filter, show original colors */
.logo-pill.color {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.logo-pill.color img {
    filter: none;
}

/* Reduced padding for BILD logo */
.logo-pill.bild-compact img {
    padding: 2px;
}

/* WELT brand blue background */
.logo-pill.welt-blue {
    background: #003A5A;
    border-color: rgba(0, 58, 90, 0.6);
}

/* BASF brand blue background */
.logo-pill.basf-blue {
    background: #004894;
    border-color: rgba(0, 72, 148, 0.6);
}

.showcase b {
    font-weight: 900;
}

p {
    line-height: 140%;
}

.greenbox h2 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    text-transform: uppercase;
    color: #0f0;
}

.greenbox p {
    margin: 0;
    color: #0f0;
    line-height: 200%;
}

s {
    opacity: 0.45;
}

a {
    border-bottom: 2px solid #fff;
    color: #fff;
    padding: 4px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease;
}

a:hover {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08), rgba(0, 255, 0, 0.25));
    border-bottom: 2px solid #0f0;
    color: #0f0;
}

a:focus {
    background-color: #0f0;
    outline: 2px solid #0f0;
    border-bottom: 2px solid #0f0;
    color: #000;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease, outline-color 0.2s ease;
}

a:active {
    color: #000;
    border-bottom: 2px solid #0f0;
    background-color: rgb(0, 255, 0, 0.8);
    outline: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 900px) {
    .intro h1 {
        font-size: 2rem;
    }
    section.intro {
        margin-bottom: 56px;
    }
    .showcase h2 {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }
    .greenbox h2 {
        font-size: 1.4rem;
    }
    .logo-pill img {
        height: 30px !important;
        max-height: 30px !important;
        padding: 7px;
    }
    .logo-pill.bild-compact img {
        padding: 2px;
    }
}

@media (max-width: 600px) {
    .intro h1 {
        font-size: 1.8rem;
    }
    section.intro {
        margin-bottom: 48px;
    }
    .showcase h2 {
        font-size: 1.4rem;
        margin-bottom: 32px;
    }
    .greenbox h2 {
        font-size: 1.2rem;
    }
    .logo-pill img {
        height: 26px !important;
        max-height: 26px !important;
        padding: 6px;
    }
    .logo-pill.bild-compact img {
        padding: 2px;
    }
}

@media (max-width: 880px) {
    .greenbox h2 {
        font-size: 1rem;
    }
    .greenbox p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .intro h1 {
        font-size: 1.3rem;
        margin-bottom: 48px;
    }
    .showcase h2 {
        font-size: 1rem;
    }
    .greenbox h2 {
        font-size: 1rem;
    }
    .greenbox p {
        font-size: 0.8rem;
    }
    .showcase i {
        display: block;
        margin-top: 16px;
    }
    .logo-pill {
        margin: 0 2px 4px 2px !important;
    }
    .logo-pill img {
        height: 23px !important;
        max-height: 23px !important;
        padding: 5px;
    }
    .logo-pill.bild-compact img {
        padding: 2px;
    }
}


body {
    background-color: #000;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding: 0;
    position: relative;
}

#baseContainer {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body::before {
    background-image: url('/img/bgPixels.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    bottom: 0;
    content: "";
    left: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    z-index: -1;
}

/* Removed - now handled above in body section */

main section,
main header {
    margin-bottom: 48px;
    padding: 16px;
}

main header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

main section.sheet {
    background-color: rgb(0, 0, 0);
    color: #0f0;
    margin: 0 auto;
    margin-bottom: 32px;
    max-width: 100%;
    text-align: left;
    padding: 48px 24px;
}

section.intro,
section.showcase {
    margin: auto;
    max-width: 60%;
    text-align: left;
}

section.intro {
    text-align: center;
    margin-bottom: 64px;
}

section.lead {
    max-width: 60%;
}

.flex-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 60%;
    box-sizing: border-box;
    margin: auto;
}

.greenbox {
    color: #0f0;
    flex: 1 1 0;
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: rgba(0, 255, 0, 0.2) 2px solid;
    border-radius: 0px;
    box-sizing: border-box;
    padding: 24px;
    min-height: 180px;
    transition: all 0.3s ease;
}

.greenbox:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.05), rgba(0, 255, 0, 0.25));
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    border-color: rgba(0, 255, 0, 0.8);
}

.greenbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Greenbox link styling */
.greenbox a {
    border-bottom: 2px solid #fff;
    color: #fff;
    padding: 4px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease;
}

.greenbox a:hover {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08), rgba(0, 255, 0, 0.25));
    border-bottom: 2px solid #0f0;
    color: #0f0;
}

.greenbox a:focus {
    background-color: #0f0;
    outline: 2px solid #0f0;
    border-bottom: 2px solid #0f0;
    color: #000;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease, outline-color 0.2s ease;
}

.greenbox a:active {
    color: #000;
    border-bottom: 2px solid #0f0;
    background-color: rgb(0, 255, 0, 0.8);
    outline: 0;
}

/* Disabled link state for unavailable downloads */
.greenbox a.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* Disabled greenbox styling - full grey disabled state */
.greenbox-disabled {
    border-color: rgba(255, 255, 255, 0.3);
}

.greenbox-disabled h2 {
    color: rgba(255, 255, 255, 0.4);
}

.greenbox-disabled a {
    color: rgba(255, 255, 255, 0.4);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Remove hover effects from disabled greenbox */
.greenbox-disabled:hover {
    transform: none;
    background: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Download sections spacing */
.greenbox .download-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.greenbox .download-section:last-child {
    margin-bottom: 0;
}

/* Contact item spacing */
.greenbox .contact-item {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

/* Label styling for link pairings - now block display for vertical stacking */
.greenbox .link-label {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
    text-align: center;
}

/* Legacy Projects Flexbox Layout */
.legacy-project {
    display: flex;
    align-items: center;
    gap: 48px;
    margin: 80px 0;
}

.legacy-project .project-content {
    flex: 1;
}

.legacy-project .project-image {
    flex: 1;
}

.legacy-project .project-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Standard showcase images (for non-legacy projects) */
.showcaseImage {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Image Gallery for Interactive Tools */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 64px;
    margin: 48px 0 32px 0;
    justify-content: flex-start;
}


.image-gallery a {
    flex: 1 1 calc(50% - 32px);
    max-width: calc(50% - 32px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-bottom: none;
    border: 2px solid rgba(0, 255, 0, 0.15);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #000;
}

.image-gallery a:hover {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.06), rgba(0, 255, 0, 0.18));
    border-color: rgba(0, 255, 0, 0.8);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.4);
    transform: scale(1.08);
}

.gallery-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: none;
    border-radius: 0;
    display: block;
    cursor: pointer;
}

/* Improved showcase typography */
.showcase h3 {
    color: #0f0;
    margin-bottom: 12px;
    margin-top: 64px;
    text-transform: uppercase;
    font-size: 1.8rem;
    line-height: 130%;
}

.showcase h3:first-of-type {
    margin-top: 32px;
}

.showcase p {
    font-size: 1.1rem;
    line-height: 160%;
    color: #0f0;
    font-weight: 300;
    margin-bottom: 16px;
}

/* Project separator */
.project-separator {
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(0, 255, 0, 0.4));
    border: none;
    margin: 80px auto;
    display: block;
}

@media (max-width: 900px) {
    .flex-row {
        grid-template-columns: repeat(2, 1fr);
        width: 60%;
    }
    .greenbox {
        min-width: 0;
        min-height: auto;
    }
    .image-gallery {
        gap: 32px;
    }
    .image-gallery a {
        flex: 1 1 calc(50% - 16px);
        max-width: calc(50% - 16px);
    }
    .showcase h3 {
        font-size: 1.6rem;
        margin-top: 48px;
    }
    .showcase p {
        font-size: 1.05rem;
    }
    .project-separator {
        margin: 64px auto;
        width: 45%;
    }
    /* Legacy projects responsive */
    .legacy-project {
        flex-direction: column;
        gap: 32px;
        margin: 64px 0;
    }
    .legacy-project .project-content,
    .legacy-project .project-image {
        flex: none;
        width: 100%;
    }
    /* Ensure text always comes before image on mobile */
    .legacy-project .project-content {
        order: 1;
    }
    .legacy-project .project-image {
        order: 2;
    }
}

@media (max-width: 600px) {
    .flex-row {
        grid-template-columns: 1fr;
        width: 66%;
    }
    .greenbox {
        min-width: 0;
        min-height: auto;
    }
    .image-gallery {
        margin: 32px 0;
    }
    .image-gallery a {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .showcase h3 {
        font-size: 1.4rem;
        margin-top: 40px;
    }
    .showcase p {
        font-size: 1rem;
    }
    .project-separator {
        margin: 48px auto;
        width: 50%;
    }
    /* Legacy projects mobile */
    .legacy-project {
        gap: 24px;
        margin: 48px 0;
    }
}

@media (max-width: 480px) {
    .flex-row {
        grid-template-columns: 1fr;
        width: 90%;
    }
    .greenbox {
        min-width: 0;
        min-height: auto;
    }
    .image-gallery a {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .image-gallery {
        gap: 24px;
        margin: 24px 0;
    }
    .showcase h3 {
        font-size: 1.2rem;
        margin-top: 32px;
    }
    .showcase p {
        font-size: 0.95rem;
        line-height: 150%;
    }
    .project-separator {
        margin: 40px auto;
        width: 60%;
    }
    /* Legacy projects small mobile */
    .legacy-project {
        gap: 20px;
        margin: 40px 0;
    }
    section.intro,
    section.showcase {
        margin: auto;
        max-width: 88%;
    }
    main section.sheet {
        padding: 24px;
    }
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: #0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover effects only for devices that can actually hover */
@media (hover: hover) {
    .back-to-top:hover {
        background-color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(255, 255, 255, 0.4);
    }
}

.back-to-top:active {
    background-color: #f0f0f0;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(240, 240, 240, 0.3);
}

/* Reset active state on touch devices */
@media (hover: none) {
    .back-to-top:active {
        background-color: #0f0;
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
    }
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: #000;
    stroke-width: 2;
}

/* Contact Section */
.contact-section {
    background-color: #000;
    padding: 80px 0;
    margin: 0;
    margin-top: auto;
    position: relative;
}

.contact-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(0, 255, 0, 0.6), transparent);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    gap: 80px;
    justify-content: center;
}

.contact-title {
    color: rgba(0, 255, 0, 0.4);
    font-size: 5rem;
    font-weight: 300;
    margin: 0;
    text-transform: uppercase;
    font-family: "Roboto Mono", monospace;
    line-height: 1;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-details p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 140%;
}

.contact-details a {
    border-bottom: 2px solid #fff;
    color: #fff;
    padding: 4px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease;
    font-family: "Roboto Mono", monospace;
}

.contact-details a:hover {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08), rgba(0, 255, 0, 0.25));
    border-bottom: 2px solid #0f0;
    color: #0f0;
}

.contact-details a:focus {
    background-color: #0f0;
    outline: 2px solid #0f0;
    border-bottom: 2px solid #0f0;
    color: #000;
    transition: color 0.2s ease, background-color 0.2s ease, border-bottom-color 0.2s ease, outline-color 0.2s ease;
}

.contact-details a:active {
    color: #000;
    border-bottom: 2px solid #0f0;
    background-color: rgb(0, 255, 0, 0.8);
    outline: 0;
}

/* Contact Section Responsive */
@media (max-width: 900px) {
    .contact-container {
        flex-direction: column;
        gap: 48px;
        text-align: center;
        padding: 0 24px;
    }
    
    .contact-title {
        font-size: 3.5rem;
    }
    
    .contact-details {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-container {
        gap: 32px;
        padding: 0 16px;
    }
    
    .contact-title {
        font-size: 2.5rem;
    }
    
    .contact-details {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-title {
        font-size: 2rem;
    }
}





