:root {
    /* Colors (Firefighter Theme) Default Dark */
    --bg-color: #120A05;
    --bg-color-light: #1A0D07;
    --accent-color: #FF3B2A;
    --accent-glow: rgba(255, 59, 42, 0.4);
    --secondary-color: #FFB300;
    --text-primary: #ffffff;
    --text-secondary: #BFA59C;
    --glass-bg: rgba(31, 16, 10, 0.6);
    --glass-border: rgba(255, 59, 42, 0.15);

    /* Variable Theme Colors */
    --model-explorer-bg: rgba(0, 0, 0, 0.6);
    --model-viewer-bg: radial-gradient(circle at center, #1a0805 0%, #050201 100%);
    --model-sidebar-bg: rgba(255, 255, 255, 0.02);
    --model-list-hover: rgba(255, 59, 42, 0.1);
    --nav-bg: rgba(18, 10, 5, 0.8);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.light-mode {
    --bg-color: #f5f5f7;
    --bg-color-light: #ffffff;
    --text-primary: #120805;
    --text-secondary: #4a4a4a;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.15);

    --model-explorer-bg: rgba(255, 255, 255, 0.9);
    --model-viewer-bg: radial-gradient(circle at center, #e5e5e5 0%, #cccccc 100%);
    --model-sidebar-bg: rgba(0, 0, 0, 0.03);
    --model-list-hover: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(245, 245, 247, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography elements */
h1,
h2,
h3 {
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 15px;
}

.accent {
    color: var(--accent-color);
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Scroll Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 59, 42, 0.1);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* Sections */
.section {
    padding: 100px 5%;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.dark-bg {
    background-color: var(--bg-color-light);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 59, 42, 0.1);
    border: 1px solid rgba(255, 59, 42, 0.3);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.hero-3d-container {
    flex: 1;
    height: 80vh;
    position: absolute;
    right: 0;
    top: 10vh;
    width: 50vw;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.7;
    /* Blend hero model softly into background */
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 59, 42, 0.1), transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 59, 42, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
    text-shadow: 0 0 15px var(--accent-glow);
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Model Explorer */
.model-explorer {
    display: flex;
    height: 600px;
    overflow: hidden;
    /* Extra dark background for contrast */
    background: var(--model-explorer-bg);
}

.model-sidebar {
    width: 250px;
    background: var(--model-sidebar-bg);
    border-right: 1px solid var(--glass-border);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.model-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.model-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.model-list li {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.model-list li:hover {
    background: var(--model-list-hover);
}

.model-list li.active {
    background: linear-gradient(90deg, rgba(255, 59, 42, 0.2) 0%, transparent 100%);
    border-left: 3px solid var(--accent-color);
    color: #fff;
}

.model-viewer {
    flex: 1;
    position: relative;
    /* Very dark radial gradient to make the red model pop */
    background: var(--model-viewer-bg);
}

.viewer-ui {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
}

.instruction {
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-color);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 30px;
    border-radius: 30px;
    border: 1px solid var(--accent-color);
    z-index: 100;
    backdrop-filter: blur(5px);
}

/* Entwicklung (Timeline) */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid var(--accent-color);
    padding-left: 30px;
    position: relative;
}

.timeline-item {
    position: relative;
    padding: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -42px;
    /* 30px padding + 2px border / 2 + half width */
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 4px solid var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Gallery Section */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.gallery-item {
    width: 450px;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.image-wrapper {
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .image-wrapper img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 20px;
    text-align: center;
    font-weight: 600;
    border-top: 1px solid var(--glass-border);
}

/* Team Section */
.team-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.team-card {
    width: 300px;
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.team-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.team-card .role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer {
    background: var(--bg-color-light);
    border-top: 1px solid var(--glass-border);
    padding: 60px 5% 30px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        margin-bottom: 50px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-3d-container {
        position: relative;
        width: 100%;
        height: 40vh;
        top: 0;
    }

    .model-explorer {
        flex-direction: column;
        height: auto;
    }

    .model-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .model-viewer {
        height: 400px;
    }
}