/* :root ist der beste Ort für globale Variablen */
        :root {
            /* Layout Variablen */
            --site-width: 80vw; /* Breite für Hauptinhaltsblöcke */
            --site-max-width: 2200px; /* Maximale Breite für Hauptinhaltsblöcke */
            --site-margin-top: 10vh; /* Allgemeiner oberer Abstand für Sektionen */
            --site-margin-sides: 10vw; /* Allgemeiner seitlicher Abstand (falls benötigt) */
            --grid-gap: 1.5rem; /* Standardabstand wie beim Image Grid */

            /* Farb Variablen */
            --background: #0b0c0f;
            --text-primary: #f3f5f7;
            --text-secondary: #b0b5bd;
            --text-headings: #f7f9fb;
            --text-subtle: #8c929a;
            --accent-primary: #49d9c8;
            --accent-tertiary: #f1d66b;
            --accent-color: #49d9c8; /* Kept for backwards compatibility */

            /* Liquid-glass variables */
            --glass-bg: rgba(12, 14, 18, 0.62);
            --glass-bg-light: rgba(255, 255, 255, 0.06);
            --glass-border: rgba(255, 255, 255, 0.18);
            --glass-hover: rgba(255, 255, 255, 0.12);
            --glass-highlight: rgba(255, 255, 255, 0.22);
            --glass-deep: rgba(4, 6, 9, 0.92);
            --glass-deep-hover: rgba(12, 14, 18, 0.9);
            --glass-gradient-start: rgba(255, 255, 255, 0.04);
            --glass-gradient-mid: rgba(255, 255, 255, 0.015);
            --glass-gradient-end: rgba(73, 217, 200, 0.06);
            --glass-shadow-strong: 0 18px 40px rgba(0, 0, 0, 0.55);
            --glass-shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.35);

            /* Border colors based on new scheme */
            --border-color-light: rgba(255, 255, 255, 0.22);
            --border-color-medium: rgba(255, 255, 255, 0.14);
            --border-color-subtle: rgba(255, 255, 255, 0.08);

            /* Code syntax highlighting */
            --code-bg: rgba(23, 23, 23, 0.8);
            --code-text: #fafafa;
            --code-comment: #9c9f99;
            --code-keyword: var(--accent-primary);
            --code-variable: #f8e163;
            --code-value: var(--accent-primary);

            --border-radius-medium: 0;
            --border-radius-pill: 0;

            /* SVG Icon Default Size */
            --icon-size-inline: 1.1em;
            --icon-size-button: 1.2em;
            --icon-size-large: 1.5em;
        }

        /* Helper class for inline SVGs */
        .svg-icon {
            display: inline-block;
            width: var(--icon-size-inline);
            height: var(--icon-size-inline);
            vertical-align: -0.15em;
            fill: currentColor;
        }
        .cta-icon .svg-icon,
        .download-icon .svg-icon,
        .copy-icon .svg-icon,
        .expand-icon .svg-icon,
        .image-fullscreen-icon .svg-icon { /* Added image icon */
            width: var(--icon-size-button);
            height: var(--icon-size-button);
            vertical-align: -0.2em;
        }
        .file-icon .svg-icon {
            width: var(--icon-size-large);
            height: var(--icon-size-large);
            vertical-align: middle;
        }
        .marker-icon .svg-icon {
            width: 1rem;
            height: 1rem;
            vertical-align: middle;
        }
        .info-icon .svg-icon {
            width: 2.8rem;
            height: 2.8rem;
            vertical-align: middle;
        }

        /* Reset and Base Styles */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        html { scroll-behavior: smooth; overflow-x: hidden; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background:
                radial-gradient(1200px 600px at 80% -10%, rgba(73, 217, 200, 0.12), transparent 55%),
                radial-gradient(900px 500px at 10% 10%, rgba(241, 214, 107, 0.08), transparent 60%),
                linear-gradient(180deg, #0a0b0e 0%, #0b0c0f 60%, #090a0c 100%);
            min-height: 125vh;
            color: var(--text-primary);
            line-height: 1.7;
            margin: 0;
            overflow-x: hidden;
        }
        body.home-page {
            min-height: 100vh;
            overflow-x: hidden;
            overflow-y: auto;
            scrollbar-gutter: stable;
        }
        body.home-page .main-page-content {
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        body.home-page .project-files-container {
            margin-top: 15vh;
            margin-bottom: 0;
        }
        body.home-page .home-ai-note {
            margin-top: auto;
            margin-bottom: 7.5vh;
            width: var(--site-width);
            max-width: var(--site-max-width);
            margin-left: auto;
            margin-right: auto;
        }
        body.home-page .home-ai-note.info-box.note {
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0%, rgba(8, 9, 12, 0) 70%);
            border-left-color: #ffffff;
        }
        body.home-page .home-ai-note .info-text {
            color: #ffffff;
        }

        /* ======= SCROLL PROGRESS BAR STYLES START ======= */
        #scroll-progress-bar {
            position: fixed; top: 0; left: 0; height: 3px;
            background-color: var(--accent-color); width: 0%; z-index: 1001;
            transition: width 0.05s ease-out;
        }
        /* ======= SCROLL PROGRESS BAR STYLES END ======= */

        /* ======= READING PILL START ======= */
        #reading-pill {
            position: fixed;
            top: 1.2rem;
            left: 1.5rem;
            z-index: 1200;
            display: inline-flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.45rem 0.75rem;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(10, 12, 16, 0.65);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: #cfd5dd;
            font-size: 0.85rem;
            letter-spacing: 0.01em;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        #reading-pill.is-visible {
            opacity: 1;
            pointer-events: auto;
        }

        #reading-pill .reading-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: var(--accent-primary);
            box-shadow: 0 0 12px rgba(73, 217, 200, 0.55);
        }

        #reading-pill .reading-title {
            color: var(--text-headings);
            font-weight: 600;
            max-width: 220px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #reading-pill .reading-progress {
            color: #cfd5dd;
            opacity: 0.7;
        }

        @media (max-width: 768px) {
            #reading-pill {
                left: 1rem;
                top: 0.9rem;
                max-width: calc(100vw - 2rem);
            }
        }
        /* ======= READING PILL END ======= */

        /* ======= NAV BAR STYLES START ======= */
        header {
            background-color: transparent; color: var(--text-headings);
            height: 100px; position: absolute; top: 0; width: 100%; z-index: 1000;
        }
        header > div {
            max-width: var(--site-max-width); width: var(--site-width);
            margin: 0 auto; display: flex; justify-content: space-between;
            align-items: center; height: 100%;
        }
        header .logo-container a { color: var(--text-headings); text-decoration: none; font-size: 1.3rem; font-weight: 500; }
        header .logo-container a span { display: none; }
        header nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
        header nav ul li { margin-left: 2rem; }
        header nav ul li a { color: var(--text-headings); text-decoration: none; font-size: 1rem; transition: opacity 0.3s ease; }
        header nav ul li a:hover { opacity: 0.8; }
        header button { display: none; background: none; border: none; color: var(--text-headings); font-size: 1.8rem; cursor: pointer; }
        header button .svg-icon { width: 1.5em; height: 1.5em; vertical-align: middle; }
        @media (max-width: 768px) {
            header nav ul { display: none; }
            header button { display: block; }
            header { padding: 0.8rem 1rem; height: auto; }
            header > div { width: 90%; }
            header .logo-container a { font-size: 1.1rem; }
        }
        .mobile-menu-overlay {
            position: fixed;
            inset: 0;
            background: rgba(12, 14, 18, 0.7);
            backdrop-filter: blur(22px);
            -webkit-backdrop-filter: blur(22px);
            z-index: 1900;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .mobile-menu-overlay.is-open { display: flex; }
        .mobile-menu-panel {
            width: min(520px, 90vw);
            padding: 2.5rem;
            border: 1px solid var(--glass-border);
            background: var(--glass-deep);
            border-radius: var(--border-radius-medium);
            box-shadow:
                0 0 0 1px rgba(73, 217, 200, 0.35),
                0 0 30px rgba(73, 217, 200, 0.2),
                var(--glass-shadow-strong);
            text-align: center;
        }
        .mobile-menu-panel h2 {
            font-size: 1.6rem;
            font-weight: 600;
            color: var(--text-headings);
            margin: 0 0 1.5rem;
        }
        .mobile-menu-panel a {
            display: block;
            color: var(--text-headings);
            text-decoration: none;
            font-size: 1.3rem;
            padding: 0.8rem 0;
        }
        .mobile-menu-panel a + a {
            border-top: 1px solid var(--border-color-medium);
        }
        body.menu-open { overflow: hidden; }
        @media (min-width: 769px) {
            .mobile-menu-overlay { display: none !important; }
        }
        /* ======= NAV BAR STYLES END ======= */

        /* ======= INITIAL CONTENT GRID (NEW) ======= */
        .initial-content-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) clamp(280px, 28vw, 440px);
            gap: var(--grid-gap);
            width: var(--site-width);
            max-width: var(--site-max-width);
            margin: 0 auto; /* Center the grid container */
            padding: 0;
            align-items: start; /* Align items to the top of the grid cells */
            position: relative;
            min-height: 100vh;
        }
        .initial-main-content {
            grid-column: 1;
            grid-row: 1;
            width: 100%;
        }
        .initial-content-grid .assignment-intro-container {
            grid-column: 1;
            grid-row: 2;
            margin-top: var(--grid-gap);
        }

        /* ======= HERO/LANDING SECTION STYLES START (Adjusted for Grid) ======= */
        .hero-section {
            height: 125vh;
            position: relative;
            display: block;
            overflow: visible;
            width: 100%;
        }
        .hero-video {
            position: absolute;
            top: 0;
            left: 50%;
            width: 100%;
            /* max-width: 1920px; */
            height: 125vh;
            object-fit: cover;
            transform: translateX(-50%);
            z-index: 0;
            opacity: 0.6;
        }
        /* Blur overlay starting at 100vh - full viewport width (aligned with video) */
        .hero-section::before {
            content: '';
            position: absolute;
            top: 100vh;
            left: calc(-1 * (100vw - min(var(--site-width), var(--site-max-width))) / 2);
            width: 100vw;
            height: 25vh;
            backdrop-filter: blur(50px);
            -webkit-backdrop-filter: blur(50px);
            z-index: 1;
            pointer-events: none;
        }
        /* Fade to background at very bottom - full viewport width (aligned with video) */
        .hero-section::after {
            content: '';
            position: absolute;
            top: 100vh;
            left: calc(-1 * (100vw - min(var(--site-width), var(--site-max-width))) / 2);
            width: 100vw;
            height: 25vh;
            background: linear-gradient(to bottom,
                transparent 0%,
                rgba(23, 23, 23, 0.3) 30%,
                rgba(23, 23, 23, 0.7) 60%,
                var(--background) 100%);
            z-index: 2;
            pointer-events: none;
        }
        .hero-content {
            position: absolute;
            top: 50vh;
            left: 5%;
            transform: translateY(-50%);
            z-index: 3;
            color: var(--text-headings);
            max-width: 700px;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
            text-align: left;
        }
        .hero-title { font-size: 3.5rem; font-weight: 600; margin-bottom: 0.8rem; line-height: 1.2; }
        .hero-title span { font-weight: 700; }
        .hero-subtitle { font-size: 1.3rem; font-weight: 300; color: var(--text-primary); margin-bottom: 2.5rem; position: relative; padding-bottom: 0.8rem; }
        .hero-subtitle::after { content: ''; position: absolute; bottom: 0; left: 0; width: 80px; height: 1px; background-color: rgba(255, 255, 255, 0.7); }
        .hero-cta {
            display: inline-flex; align-items: center;
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: 1px solid var(--glass-border);
            color: var(--text-primary); padding: 0.9rem 2.2rem; text-decoration: none;
            border-radius: var(--border-radius-pill); font-size: 1rem; font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: none;
        }
        .hero-cta:hover {
            border-color: var(--glass-border);
            color: var(--text-headings);
            transform: translateY(-2px);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
        }
        .hero-cta .cta-icon { margin-right: 0.8rem; }
        @media (max-width: 768px) {
            .hero-title { font-size: 2.8rem; }
            .hero-subtitle { font-size: 1.1rem; }
            .hero-content {
                left: 50%;
                transform: translate(-50%, -50%);
                text-align: center;
                max-width: 84%;
            }
            .hero-subtitle::after { left: 50%; transform: translateX(-50%); }
            .hero-cta { padding: 0.8rem 1.8rem; font-size: 0.9rem; }
        }
        /* ======= HERO/LANDING SECTION STYLES END ======= */

        /* ======= GLASS INTERACTION (LIGHTWEIGHT HOVER) ======= */
        .timeline-container,
        .material-list-container,
        .info-box,
        .model-viewer-section {
            position: relative;
            overflow: hidden;
            isolation: isolate;
            transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
        }
        .timeline-container::after,
        .material-list-container::after,
        .info-box::after,
        .model-viewer-section::after {
            content: '';
            position: absolute;
            inset: -40% -30%;
            background: radial-gradient(600px 300px at 15% 20%, rgba(255, 255, 255, 0.18), transparent 60%);
            opacity: 0;
            transition: opacity 0.25s ease;
            pointer-events: none;
            z-index: 0;
        }
        .timeline-container > *,
        .material-list-container > *,
        .info-box > *,
        .model-viewer-section > * {
            position: relative;
            z-index: 1;
        }
        .model-viewer-section:hover {
            box-shadow: var(--glass-shadow-strong);
            border-color: var(--glass-border);
            background-color: var(--glass-deep-hover);
        }
        .model-viewer-section:hover::after {
            opacity: 1;
        }
        @media (hover: hover) and (pointer: fine) {
            .info-box:hover::after { opacity: 1; }
            .info-box:not(.one-liner):hover .info-icon { transform: scale(1.15); }
        }
        /* ======= GLASS INTERACTION END ======= */

        /* ======= PROJECT TIMELINE STYLES START (Adjusted for Grid) ======= */
        .timeline-container {
            grid-column: 2;
            grid-row: 1; /* Timeline starts at row 1, same as main content */
            background: rgba(0, 0, 0, 0.55);
            backdrop-filter: blur(28px);
            -webkit-backdrop-filter: blur(28px);
            border: 1px solid transparent;
            color: var(--text-primary); padding: 2.5rem;
            border-radius: var(--border-radius-medium);
            width: 100%;
            min-height: 60vh;
            box-shadow:
                var(--glass-shadow-strong),
                inset 0 1px 0 var(--glass-highlight),
                inset 0 -1px 0 rgba(0, 0, 0, 0.35);
            position: relative;
            align-self: start;
            margin-top: 40vh;
            z-index: 150;
            display: flex;
            flex-direction: column;
            background-image:
                linear-gradient(135deg,
                    var(--glass-gradient-start) 0%,
                    var(--glass-gradient-mid) 50%,
                    var(--glass-gradient-end) 100%);
            background-clip: padding-box;
        }
        .timeline-container::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--border-radius-medium);
            padding: 1px;
            background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }
        .timeline-title { font-size: 2.5rem; font-weight: 400; color: var(--text-headings); margin-bottom: 2.5rem; text-align: left; }
        .timeline-list {
            list-style: none;
            padding: 0;
            margin: 0;
            z-index: 50;
            position: relative;
            flex: 1;
            display: flex;
            flex-direction: column;
            padding-top: 15px;
            padding-bottom: 15px;
        }
        .timeline-list::before {
            content: '';
            position: absolute;
            left: 15px;
            top: 15px;
            bottom: 15px;
            width: 2px;
            background-color: var(--text-headings);
            z-index: 0;
        }
        .timeline-item {
            display: flex;
            align-items: center;
            position: relative;
            padding-bottom: 0;
            z-index: 50;
            flex: 1;
        }
        .timeline-marker {
            width: 30px; height: 30px; border-radius: 0; border: 2px solid var(--accent-primary);
            background: var(--glass-deep);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            position: relative; z-index: 2; flex-shrink: 0; margin-right: 1.5rem;
            display: flex; justify-content: center; align-items: center;
        }
        .timeline-marker::before, .timeline-marker::after {
            display: none;
        }
        .timeline-item:first-child .timeline-marker::before { display: none; }
        .timeline-item:last-child .timeline-marker::after { display: none; }
        .timeline-marker .marker-icon { color: var(--text-headings); transition: transform 0.2s ease; display: inline-flex; align-items: center; justify-content: center; }
        .timeline-item:hover .marker-icon { transform: scale(1.2); }
        .timeline-content h4 { font-size: 1.1rem; font-weight: 400; line-height: 1.4; margin: 0; }
        .timeline-content h4 a {
            color: var(--text-headings);
            text-decoration: none;
            transition: opacity 0.2s ease;
        }
        .timeline-content h4 a:hover { opacity: 0.85; }
        /* ======= PROJECT TIMELINE STYLES END ======= */

        /* ======= ASSIGNMENT INTRODUCTION STYLES START (Adjusted for Grid) ======= */
        .assignment-intro-container {
            color: var(--text-secondary);
            margin: var(--site-margin-top) auto;
            max-width: var(--site-max-width);
            width: var(--site-width);
        }
        .assignment-intro-container h1 { font-size: 2.2rem; font-weight: 600; color: var(--text-headings); margin-top: 2.5rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color-medium); }
        .assignment-intro-container h1:first-child { margin-top: 0; }
        .assignment-intro-container h2 { font-size: 1.7rem; font-weight: 600; color: var(--text-headings); margin-top: 6rem; margin-bottom: 1rem; }
        .assignment-intro-container h3 { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); margin-top: 1.5rem; margin-bottom: 0.8rem; }
        .assignment-intro-container p { font-size: 1rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 1.2rem; }
        .assignment-intro-container ul, .assignment-intro-container ol { list-style: disc; margin-left: 1.5rem; padding-left: 1rem; margin-bottom: 1.2rem; color: var(--text-secondary); }
        .assignment-intro-container li { margin-bottom: 0.5rem; line-height: 1.6; }
        .assignment-intro-container .text-columns {
            column-count: 2;
            column-gap: 2.5rem;
        }
        .assignment-intro-container .content-columns {
            display: grid;
            grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
            gap: 2.5rem;
            align-items: start;
        }
        .assignment-intro-container .content-columns > * {
            min-width: 0;
        }
        .assignment-intro-container a {
            font-family: inherit;
            color: var(--accent-primary);
            text-decoration: none;
            background-image: linear-gradient(90deg, var(--accent-primary), var(--accent-primary));
            background-size: 0% 1px;
            background-position: 50% 100%;
            background-repeat: no-repeat;
            transition: background-size 0.25s ease, text-shadow 0.25s ease;
        }
        .assignment-intro-container a:hover {
            background-size: 100% 1px;
            text-shadow: 0 0 18px rgba(73, 217, 200, 0.6);
        }
        /* ======= ASSIGNMENT INTRODUCTION STYLES END ======= */

        /* ======= SOFTWARE & TOOLS FLIPPING CARD STYLES START ======= */
        .tools-section {
            margin-top: var(--site-margin-top); padding: 3rem 0;
            margin-left: auto; margin-right: auto;
            max-width: var(--site-max-width); width: var(--site-width);
            overflow: visible;
        }
        .tools-section h1 { font-size: 2.2rem; font-weight: 600; color: var(--text-headings); margin-bottom: 2.5rem; text-align: center; }
        .tools-carousel-wrapper {
            position: relative;
            overflow: visible;
            padding: 2.5rem 0 3.5rem;
            min-height: 640px;
        }
        .tools-carousel {
            display: flex;
            gap: 1.5rem;
            padding: 1rem 0;
            -ms-overflow-style: none;
            scrollbar-width: none;
            flex-wrap: wrap;
            justify-content: center;
            align-items: flex-start;
            overflow: visible;
        }
        .tools-carousel::-webkit-scrollbar { display: none; }
        .tools-carousel.is-carousel {
            display: block;
            overflow-x: hidden;
            overflow-y: visible;
        }
        .tools-carousel.is-carousel .swiper-wrapper {
            display: flex;
            flex-wrap: nowrap;
            justify-content: flex-start;
            align-items: flex-start;
            overflow: visible;
        }
        .tools-carousel.is-carousel .swiper-slide {
            aspect-ratio: 3 / 4;
            height: auto;
            overflow: visible;
        }
        .tools-carousel.is-carousel .tool-card {
            width: 100%;
            height: 100%;
        }
        .tool-card {
            perspective: 1000px;
            width: 340px;
            height: 454px;
            cursor: pointer;
            flex-shrink: 0;
            will-change: transform;
        }
        .tool-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.7s;
            transform-style: preserve-3d;
            transform-origin: center center;
        }
        .tool-card:hover .tool-card-inner {  transform: rotateY(180deg);}
        .tool-card-front, .tool-card-back {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transform-style: preserve-3d;
            border-radius: var(--border-radius-medium);
            box-shadow:
                0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                inset 0 -1px 0 rgba(255, 255, 255, 0.05);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
            color: var(--text-primary);
            text-align: center;
            border: 1px solid transparent;
            overflow: hidden;
        }
        .tool-card-front * ,
        .tool-card-back * {
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
        .tool-card-front::after, .tool-card-back::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--border-radius-medium);
            padding: 1px;
            background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
            z-index: 10;
        }
        .tool-card-front {
            /* Default gradient - override with inline styles for custom brand colors */
            background:
                radial-gradient(circle at 110% 15%, rgba(255, 102, 0, 0.4) 0%, transparent 25%),
                radial-gradient(circle at -5% 85%, rgba(255, 102, 0, 0.35) 0%, transparent 30%),
                var(--background);
        }
        .tool-card-back {
            transform: rotateY(180deg);
            /* Background gradient set inline per card (mirrored from front) */
            /* Glass morphism overlay for readability */
        }
        .tool-card-button {
            position: absolute;
            left: 50%;
            bottom: 20px;
            transform: translateX(-50%);
            display: none;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: 1px solid var(--glass-border);
            color: var(--text-primary);
            padding: 0.5rem 1.2rem;
            border-radius: var(--border-radius-pill);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 6;
        }
        .tool-card-button:hover {
            color: var(--text-headings);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
            transform: translateX(-50%) translateY(-1px);
        }
        .tool-card-back::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            z-index: 0;
            border-radius: var(--border-radius-medium);
        }
        .tool-card-back > * {
            position: relative;
            z-index: 5;
        }
        .tool-logo-container {
            width: 200px;
            height: 200px;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
        }
        .tool-logo {
            width: 100%;
            height: auto;
            object-fit: contain;
            z-index: 1;
            filter: blur(12px);
            opacity: 0.4;
            transition: filter 0.6s ease, opacity 0.6s ease;
            transform: translateZ(0);
        }
        .tool-card--vscode .tool-logo {
            filter: blur(12px) drop-shadow(0 0 18px rgba(0, 122, 204, 0.65));
            opacity: 0.45;
        }
        .tool-card--codex .tool-logo {
            filter: blur(12px) drop-shadow(0 0 18px rgba(255, 255, 255, 0.75));
            opacity: 0.45;
        }
        .tool-card--micropython .tool-logo {
            filter: blur(12px) drop-shadow(0 0 20px rgba(60, 146, 196, 0.75));
            opacity: 0.5;
        }
        .tool-card--putty .tool-logo {
            filter: blur(12px) drop-shadow(0 0 20px rgba(53, 118, 232, 0.75));
            opacity: 0.5;
        }
        .tool-card:hover .tool-logo {
            filter: blur(0);
            opacity: 1;
        }
        .tool-logo-back {
            width: 60px;
            height: 60px;
            object-fit: contain;
            margin-bottom: 1rem;
        }
        .tool-name {
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-headings);
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
            line-height: 1.2;
        }
        .tool-category {
            position: absolute;
            top: 52px;
            left: 20px;
            font-size: 0.85rem;
            font-weight: 400;
            color: var(--text-secondary);
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
            opacity: 0.9;
        }
        .tool-card-back a { text-decoration: none; }
        .tool-card-back h3 { font-size: 2rem; font-weight: 600; color: var(--text-headings); margin: 0 0 1rem 0; }
        .tool-card-back p { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
        .tool-card-back .version-info { font-size: 1rem; color: var(--text-subtle); margin-bottom: 0.6rem; }
        .tool-card-back .license-info { font-size: 0.95rem; color: var(--text-subtle); font-style: italic; margin-bottom: 1.5rem; }
        .tool-os-icons { display: flex; gap: 1.2rem; color: var(--text-headings); align-items: center; }
        .os-icon { opacity: 0.8; transition: opacity 0.2s ease, transform 0.2s ease; width: 36px; height: 36px; }
        .os-icon:hover { opacity: 1; transform: scale(1.1); }
        .gradient-overlay-left, .gradient-overlay-right { display: none; }
        /* ======= SOFTWARE & TOOLS FLIPPING CARD STYLES END ======= */

        /* ========== TOPIC OVERVIEW ============ */
        .topic-intro{
            display: grid; grid-template-columns: 7fr 3fr; gap: var(--grid-gap);
            margin: var(--site-margin-top) auto; width: var(--site-width);
            max-width: var(--site-max-width); align-items: start;
        }
        .topic-intro.topic-intro--full {
            grid-template-columns: 1fr;
        }
        .topic-intro.topic-intro--full .topic-text {
            padding: 0;
        }
        .topic-text { color: var(--text-secondary); padding: 1rem 2rem; margin: 0 auto; width: 100%; }
        .topic-text h1 { font-size: 2.2rem; font-weight: 600; color: var(--text-headings); margin-top: 2.5rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color-medium); }
        .topic-text h1:first-child { margin-top: 0; }
        .topic-text h2 { font-size: 1.7rem; font-weight: 600; color: var(--text-headings); margin-top: 6rem; margin-bottom: 1rem; }
        .topic-text h3 { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); margin-top: 1.5rem; margin-bottom: 0.8rem; }
        .topic-text p { font-size: 1rem; line-height: 1.7; color: #cfd5dd; margin-bottom: 1.2rem; }
        .topic-text ul, .topic-text ol { margin-left: 1.5rem; padding-left: 1rem; margin-bottom: 1.2rem; color: #cfd5dd; }
        .topic-text li { margin-bottom: 0.5rem; line-height: 1.6; }
        i,
        .topic-text i,
        .main-content i,
        .assignment-intro-container i {
            font-style: italic;
            color: var(--text-headings);
            background: var(--glass-bg-light);
            padding: 0.05rem 0.35rem;
        }
        .topic-text .text-columns {
            column-count: 2;
            column-gap: 2.5rem;
        }
        .topic-text a {
            font-family: inherit;
            color: var(--accent-primary);
            text-decoration: none;
            background-image: linear-gradient(90deg, var(--accent-primary), var(--accent-primary));
            background-size: 0% 1px;
            background-position: 50% 100%;
            background-repeat: no-repeat;
            transition: background-size 0.25s ease, text-shadow 0.25s ease;
        }
        .topic-text a:hover {
            background-size: 100% 1px;
            text-shadow: 0 0 18px rgba(73, 217, 200, 0.6);
        }
        @media (max-width: 900px) {
            .topic-text .text-columns {
                column-count: 1;
            }
            .assignment-intro-container .text-columns {
                column-count: 1;
            }
            .assignment-intro-container .content-columns {
                grid-template-columns: 1fr;
            }
        }
        /* ======== TOPIC OVERVIEW END ============ */

        /* ======= MATERIAL LIST STYLES START ======= */
        .material-list-container {
            background: var(--glass-deep);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid transparent;
            color: var(--text-primary); padding: 2.5rem; border-radius: var(--border-radius-medium);
            margin: 0 auto; width: 100%;
            box-shadow:
                var(--glass-shadow-strong),
                inset 0 1px 0 var(--glass-highlight),
                inset 0 -1px 0 rgba(0, 0, 0, 0.35);
            background-image:
                linear-gradient(135deg,
                    var(--glass-gradient-start) 0%,
                    var(--glass-gradient-mid) 50%,
                    var(--glass-gradient-end) 100%);
            background-clip: padding-box;
            position: relative;
            overflow: visible;
        }
        .material-list-container::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--border-radius-medium);
            padding: 1px;
            background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }
        .material-list-container .list-title {
            font-size: 2.2rem;
            font-weight: 600;
            color: var(--text-headings);
            margin-bottom: 0.5rem;
            line-height: 1.2;
            padding-right: 100px; /* Space for button */
        }
        .material-list-container .list-subtitle { font-size: 1.1rem; color: var(--text-subtle); margin-bottom: 2.5rem; line-height: 1.5; }
        .material-list-container ul { list-style: none; padding: 0; margin: 0; }
        .material-list-container ul li { border-bottom: 1px solid var(--border-color-light); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
        .material-list-container ul li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .material-list-container ul li h4 { font-size: 1.4rem; font-weight: 500; color: var(--text-headings); margin-bottom: 0.4rem; }
        .material-list-container ul li p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
        .material-list-container .item-links { display: flex; flex-wrap: wrap; gap: 0.8rem; }
        .material-list-container .item-links a {
            display: inline-flex; align-items: center;
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: 1px solid var(--glass-border);
            color: var(--text-primary); text-decoration: none; padding: 0.4rem 1rem;
            border-radius: var(--border-radius-pill); font-size: 0.85rem;
            transition: all 0.2s ease;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px;
            box-shadow: none;
        }
        .material-list-container .item-links a:hover {
            color: var(--text-headings);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
            transform: translateY(-1px);
        }
        .material-list-container .item-links a .link-icon { margin-right: 0.5rem; }

        .material-list {
            max-height: 30vh; /* Initial height */
            overflow-y: auto;
            overflow-x: visible;
            width: calc(100% + 16px);
            margin-left: -16px;
            padding-right: 5px;
            padding-left: 16px;
            transition: max-height 0.3s ease; /* Add transition */
        }
        .material-list.is-expanded {
            max-height: 60vh; /* Expanded height */
        }

        /* Hide material list expand button by default - JS will show if needed */
        .material-list-container .expand-button {
            display: none; /* Hide initially */
            top: 2.5rem; /* Align with padding */
            right: 2.5rem;
        }

        .material-list::-webkit-scrollbar { width: 4px; }
        .material-list::-webkit-scrollbar-track { background: transparent; border-radius: 0; }
        .material-list::-webkit-scrollbar-thumb { background-color: var(--text-headings); border-radius: 0; border: transparent; }
        /* ======= MATERIAL LIST STYLES END ======= */

        /* ======= GENERIC BUTTON STYLES (for Copy, Expand, etc.) ======= */
        .action-button { /* New generic class */
            position: absolute;
            top: 1.5rem;
            display: inline-flex; align-items: center;
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: 1px solid var(--glass-border);
            color: var(--text-primary); padding: 0.4rem 1rem; border-radius: var(--border-radius-pill);
            font-size: 0.9rem; font-weight: 500; cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: none;
            z-index: 10; /* Ensure buttons are above content */
            opacity: 1; /* Default visible state */
            height: 40px;
        }
        .action-button:hover {
            border-color: var(--glass-border);
            color: var(--text-headings);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
            transform: translateY(-1px);
        }
        .action-button .copy-icon,
        .action-button .expand-icon,
        .action-button .image-fullscreen-icon { /* Target all icon spans */
            margin-right: 0.5rem;
        }

        .expand-button {
            width: 40px;
            padding: 0;
            justify-content: center;
            border-radius: 0;
        }
        .expand-button .expand-icon {
            margin-right: 0;
        }
        .copy-button {
            min-width: 110px;
            justify-content: center;
            white-space: nowrap;
        }

        /* Specific positioning for buttons in different contexts */
        .code-section-container .action-button { top: 1.5rem; } /* Explicit top positioning for code buttons */
        .code-section-container .copy-button { right: 1.5rem; }
        .code-section-container .expand-button { right: calc(1.5rem + 110px + 0.5rem); display: none; } /* Hidden */
        .code-section-container .code-ai-badge {
            right: calc(1.5rem + 110px + 0.5rem + 40px + 0.5rem);
            width: 40px;
            padding: 0;
            justify-content: center;
            border-radius: 0;
            text-decoration: none;
        }
        .code-section-container .code-ai-badge .svg-icon {
            width: var(--icon-size-button);
            height: var(--icon-size-button);
            margin: 0;
        }
        .code-section-container .code-ai-badge .code-ai-tooltip {
            position: absolute;
            right: calc(100% + 10px);
            top: 50%;
            transform: translateY(-50%) translateX(6px);
            background: rgba(18, 18, 18, 0.45);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.25);
            color: #f4efe8;
            padding: 6px 10px;
            font-size: 0.85rem;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 180ms ease, transform 180ms ease;
            pointer-events: none;
        }
        .code-section-container .code-ai-badge:hover .code-ai-tooltip {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }
        .code-ai-badge--prompt {
            z-index: 40;
        }
        .code-ai-badge--prompt .ai-reveal-overlay {
            position: absolute;
            top: calc(100% + 0.7rem);
            right: 0;
            width: 50vw;
            max-width: 50vw;
            min-width: 380px;
            opacity: 0;
            transform: translateY(-8px);
            pointer-events: none;
            transition: opacity 220ms ease, transform 220ms ease;
            background: var(--glass-deep);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.38);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            padding: 0.9rem 1rem 1rem;
            border-radius: var(--border-radius-small);
            text-align: left;
        }
        .code-ai-badge--prompt .ai-reveal-overlay::before {
            content: none;
        }
        .code-ai-badge--prompt:hover .ai-reveal-overlay,
        .code-ai-badge--prompt:focus-visible .ai-reveal-overlay {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }
        .code-ai-badge--prompt::after {
            content: 'Copy prompt';
            position: absolute;
            right: calc(100% + 10px);
            top: 50%;
            transform: translateY(-50%) translateX(6px);
            background: rgba(18, 18, 18, 0.45);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.25);
            color: #f4efe8;
            padding: 6px 10px;
            font-size: 0.85rem;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 180ms ease, transform 180ms ease;
            pointer-events: none;
        }
        .code-ai-badge--prompt:hover::after,
        .code-ai-badge--prompt:focus-visible::after {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }
        .code-ai-badge--prompt.is-copied::after {
            content: 'Copied';
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }
        .ai-reveal-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            color: var(--text-headings);
            font-size: 0.9rem;
            margin-bottom: 0.55rem;
        }
        .ai-reveal-thinking {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
        }
        .ai-reveal-toggle {
            position: relative;
            display: inline-flex;
            width: 42px;
            height: 22px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.12);
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
        }
        .ai-reveal-toggle-knob {
            position: absolute;
            top: 1px;
            left: 1px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #d8dde6;
            transition: left 180ms ease, background-color 180ms ease;
        }
        .ai-reveal-toggle.is-on {
            background: rgba(73, 217, 200, 0.25);
            border-color: rgba(73, 217, 200, 0.75);
        }
        .ai-reveal-toggle.is-on .ai-reveal-toggle-knob {
            left: 21px;
            background: var(--accent-primary);
        }
        .ai-reveal-divider {
            display: none;
        }
        .ai-reveal-prompt {
            margin: 0;
            padding: 0.72rem 0.82rem;
            border: 1px solid rgba(255, 255, 255, 0.22);
            background: rgba(14, 17, 22, 0.6);
            color: var(--text-secondary);
            font-size: 0.92rem;
            line-height: 1.55;
            cursor: copy;
            position: relative;
            font-style: italic;
            white-space: normal;
        }
        .ai-reveal-prompt::after {
            content: 'Copy prompt';
            position: absolute;
            right: 0;
            top: -1.45rem;
            font-size: 0.74rem;
            color: var(--accent-primary);
            opacity: 0;
            transform: translateY(2px);
            transition: opacity 150ms ease, transform 150ms ease;
            pointer-events: none;
            white-space: nowrap;
        }
        .ai-reveal-prompt:hover::after {
            opacity: 1;
            transform: translateY(0);
        }
        .ai-reveal-prompt.is-copied::after {
            content: 'Copied';
            opacity: 1;
            transform: translateY(0);
        }
        @media (max-width: 768px) {
            .code-ai-badge--prompt .ai-reveal-overlay {
                min-width: 0;
                width: min(92vw, 560px);
                max-width: min(92vw, 560px);
            }
            .code-ai-badge--prompt::after {
                right: auto;
                left: 0;
                top: auto;
                bottom: calc(100% + 8px);
                transform: translateY(0);
            }
            .code-ai-badge--prompt:hover::after,
            .code-ai-badge--prompt:focus-visible::after,
            .code-ai-badge--prompt.is-copied::after {
                transform: translateY(0);
            }
            .ai-reveal-head {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.45rem;
            }
            .ai-reveal-prompt::after {
                right: auto;
                left: 0;
            }
        }
        .model-viewer-section .expand-button { right: 1.5rem; }
        .material-list-container .expand-button { top: 2.5rem; right: 2.5rem; display: none; } /* Positioned & Hidden */
        .image-container .action-button {
            top: 0.8rem; right: 0.8rem;
            width: 40px; height: 40px; padding: 0;
            border-radius: 8px;
            opacity: 0; pointer-events: none;
        } /* Style for image buttons */


        /* ======= CODE SECTION STYLES START ======= */
        .code-section-container {
            background: var(--glass-deep);
            border: 1px solid transparent;
            border-radius: var(--border-radius-medium);
            margin: 1.2rem auto;
            max-width: var(--site-max-width); width: var(--site-width);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            padding: 0.375rem 1.5rem;
            position: relative;
            overflow: hidden;
        }
        .code-section-container::before { content: none; }
        .code-section-container::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--border-radius-medium);
            padding: 1px;
            background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
            z-index: 0;
        }
        .code-section-container > *:not(.action-button) {
            position: relative;
            z-index: 1;
        }
        .code-section-container .action-button {
            position: absolute;
            z-index: 10;
        }
        .code-section-container .code-title {
            font-size: 1.3rem; font-weight: 600; color: var(--text-headings);
            margin: 0 0 1rem 0;
            padding-right: 180px; /* Space for buttons */
            position: relative;
        }
        .code-section-container .code-title::after {
            content: '';
            display: inline-block;
            width: 0.35ch;
            height: 1.1em;
            margin-left: 0.3ch;
            background: var(--accent-primary);
            vertical-align: -0.15em;
            animation: cursor-blink 1s steps(2, start) infinite;
        }
        @keyframes cursor-blink {
            0%, 49% { opacity: 1; }
            50%, 100% { opacity: 0; }
        }
        .code-block {
            color: var(--code-text); background-color: transparent; margin: 0; padding: 0;
            font-family: Consolas, 'Courier New', monospace; font-size: 0.95rem; line-height: 1.6;
            white-space: pre;
            overflow-x: auto;
            overflow-y: auto; /* Always allow scroll */
            max-height: 400px; /* Initial height */
            transition: max-height 0.3s ease;
            padding-right: 10px;
        }
        .code-block.is-expanded {
            max-height: 2000px; /* Expanded height */
        }
        .code-section-container:has(.code-block.is-expanded) {
            z-index: 150;
        }

        .code-block::-webkit-scrollbar { width: 4px; height: 4px; }
        .code-block::-webkit-scrollbar-track { background: transparent; border-radius: 0; }
        .code-block::-webkit-scrollbar-thumb { background-color: var(--text-headings); border-radius: 0; border: transparent; }

        .code-block .code-comment { color: var(--code-comment); }
        .code-block .code-keyword { color: var(--code-keyword); }
        .code-block .code-variable { color: var(--code-variable); }
        .code-block .code-value { color: var(--code-value); }
        .code-block .code-operator { color: var(--code-text); }
        .code-block .code-punctuation { color: var(--code-text); }
        /* ======= CODE SECTION STYLES END ======= */

        /* ======= INFO/WARNING BOX STYLES START ======= */
        .info-box {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1.6rem 1.8rem;
            margin: 2.2rem 0;
            max-width: none;
            width: 100%;
            border-left: 3px solid var(--accent-primary);
            background: linear-gradient(90deg, rgba(73, 217, 200, 0.16) 0%, rgba(8, 9, 12, 0) 70%);
            color: var(--text-primary);
        }
        .info-box::before { content: none; }
        .info-icon {
            color: inherit;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s ease;
        }
        .info-content { flex-grow: 1; text-align: left; }
        .info-content .info-title { font-size: 1.6rem; font-weight: 600; color: var(--text-headings); margin: 0 0 0.4rem 0; line-height: 1.3; }
        .info-content .info-subtitle { font-size: 1rem; color: var(--text-headings); line-height: 1.6; margin: 0; }
        .info-content .info-instructions-title { display: block; font-size: 1.1rem; font-weight: 600; color: var(--text-headings); margin: 0 0 0.4rem 0; }
        .info-content .info-text { font-size: 1rem; line-height: 1.6; color: var(--text-headings); margin: 0; }

        .info-box.note {
            border-left-color: var(--accent-primary);
            background: linear-gradient(90deg, rgba(73, 217, 200, 0.16) 0%, rgba(8, 9, 12, 0) 70%);
        }

        .info-box.note .info-icon,
        .info-box.note .info-title,
        .info-box.note .info-instructions-title {
            color: var(--accent-primary);
        }

        .info-box.warning,
        .info-box.problem {
            border-left-color: var(--accent-tertiary);
            background: linear-gradient(90deg, rgba(241, 214, 107, 0.2) 0%, rgba(8, 9, 12, 0) 70%);
        }

        .info-box.warning .info-icon,
        .info-box.warning .info-title,
        .info-box.warning .info-instructions-title,
        .info-box.problem .info-icon,
        .info-box.problem .info-title,
        .info-box.problem .info-instructions-title {
            color: var(--accent-tertiary);
        }
        /* ======= INFO/WARNING BOX STYLES END ======= */

        /* ======= DOCUMENTATION TEXT STYLES (MAIN CONTENT) START ======= */
        .main-content {
            color: var(--text-secondary);
            margin: var(--site-margin-top) auto;
            max-width: var(--site-max-width); width: var(--site-width);
        }
        .main-content h1 { font-size: 2.2rem; font-weight: 600; color: var(--text-headings); margin-top: 2.5rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color-medium); }
        .main-content h1:first-child { margin-top: 0; }
        .main-content h2 { font-size: 1.7rem; font-weight: 600; color: var(--text-headings); margin-top: 6rem; margin-bottom: 1rem; }
        .main-content h3 { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); margin-top: 1.5rem; margin-bottom: 0.8rem; }
        .main-content p { font-size: 1rem; line-height: 1.7; color: #cfd5dd; margin-bottom: 1.2rem; }
        .main-content ul, .main-content ol { margin-left: 1.5rem; padding-left: 1rem; margin-bottom: 1.2rem; color: #cfd5dd; }
        .main-content li { margin-bottom: 0.5rem; line-height: 1.6; color: #cfd5dd; }
        .main-content .two-column-list {
            list-style: none;
            margin: 1.5rem 0 2rem;
            padding: 0;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.9rem 2.2rem;
        }
        .main-content .accent-list {
            list-style: none;
            margin: 1.2rem 0 1.6rem;
            padding: 0;
        }
        .main-content .two-column-list li {
            margin: 0;
            padding: 0.2rem 0 0.2rem 2.6rem;
            position: relative;
            color: #cfd5dd;
        }
        .main-content .accent-list li {
            margin: 0;
            padding: 0.2rem 0 0.2rem 2.6rem;
            position: relative;
            color: #cfd5dd;
        }
        .main-content .text-columns {
            column-count: 2;
            column-gap: 2.5rem;
        }
        .main-content .text-columns.text-columns--single {
            column-count: 1;
        }
        .main-content .content-columns {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 2.5rem;
        }
        .main-content .content-columns.content-columns--left-media-heading {
            margin-top: 6rem;
        }
        .main-content .content-column-heading {
            margin-top: 0;
            margin-bottom: 1rem;
        }
        .chip-compare-section {
            position: relative;
            margin: 8rem 0 6rem;
            padding: 1rem 1.5rem 1.5rem;
            background: var(--glass-deep);
            border: 1px solid transparent;
            border-radius: var(--border-radius-medium);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            overflow: hidden;
        }
        .chip-compare-section::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--border-radius-medium);
            padding: 1px;
            background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
            z-index: 0;
        }
        .chip-compare-section > * {
            position: relative;
            z-index: 1;
        }
        .chip-compare-heading-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 0;
            margin-bottom: 1rem;
        }
        .chip-compare-heading-row h2 {
            margin: 0;
        }
        .chip-compare-fullscreen-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border: 1px solid var(--glass-border);
            color: var(--text-primary);
            background: transparent;
            cursor: pointer;
            transition: all 0.2s ease;
            flex: 0 0 auto;
        }
        .chip-compare-fullscreen-button:hover {
            border-color: var(--glass-border);
            color: var(--text-headings);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
            transform: translateY(-1px);
        }
        .chip-compare-fullscreen-button .expand-icon {
            margin: 0;
            line-height: 1;
        }
        .chip-compare-section.is-details-expanded .chip-compare-fullscreen-button {
            border-color: rgba(73, 217, 200, 0.6);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.2);
            color: var(--text-headings);
        }
        .chip-compare-table-wrap {
            width: 100%;
            margin: 1rem 0 0;
        }
        .chip-compare-collapsible {
            margin-top: 0.6rem;
        }
        .chip-compare-section .chip-compare-detail-row {
            display: none;
        }
        .chip-compare-section.is-details-expanded .chip-compare-detail-row {
            display: table-row;
        }
        .chip-compare-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0 0.8rem;
            table-layout: fixed;
        }
        .chip-compare-table thead th {
            background: var(--glass-deep);
            border: 1px solid var(--glass-border);
            color: var(--text-headings);
            font-size: 1rem;
            font-weight: 600;
            padding: 1rem;
            text-align: left;
            vertical-align: bottom;
        }
        .chip-compare-table thead th:first-child {
            width: 22%;
        }
        .chip-compare-table .chip-compare-col-header {
            text-align: center;
        }
        .chip-compare-table .chip-compare-col-header > span {
            display: block;
            margin-top: 0.55rem;
            letter-spacing: 0.01em;
        }
        .chip-compare-header-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
        }
        .chip-compare-header-title {
            display: block;
            margin: 0;
            letter-spacing: 0.01em;
            color: var(--text-headings);
            text-align: center;
        }
        .chip-compare-header-meta {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.3rem;
            text-align: center;
        }
        .chip-compare-header-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            position: relative;
            color: var(--text-headings);
            text-decoration: none !important;
            font-size: 0.9rem;
            line-height: 1.35;
            overflow-wrap: anywhere;
            background-image: none !important;
            text-shadow: none !important;
            transform: translateY(0);
            transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.32s ease;
        }
        .chip-compare-header-link::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: -0.08em;
            height: 1px;
            background: var(--accent-primary);
            transform: scaleX(0);
            transform-origin: center center;
            transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .chip-compare-header-link span {
            display: inline-block;
            font-size: 0.92rem;
            line-height: 1.35;
        }
        .chip-compare-header-link-icon {
            width: 15px;
            height: 15px;
            flex: 0 0 15px;
        }
        .chip-compare-header-link:hover {
            text-decoration: none !important;
            background-size: 0% 1px !important;
            text-shadow: none !important;
        }
        .chip-compare-header-link:hover,
        .chip-compare-header-link:focus-visible {
            transform: translateY(-2px);
            text-shadow: 0 0 18px rgba(73, 217, 200, 0.6);
        }
        .chip-compare-header-link:hover::after,
        .chip-compare-header-link:focus-visible::after {
            transform: scaleX(1);
        }
        .main-content .chip-compare-header-link,
        .main-content .chip-compare-header-link:visited,
        .main-content .chip-compare-header-link:hover,
        .main-content .chip-compare-header-link:active {
            color: var(--text-headings) !important;
            text-decoration: none !important;
            background-image: none !important;
            background-size: 0% 1px !important;
            text-shadow: none !important;
        }
        .chip-compare-table.chip-compare-table--boards .chip-compare-col-header {
            width: 50%;
        }
        .chip-compare-table.chip-compare-table--boards thead th {
            border: none;
            background: transparent;
        }
        .chip-compare-board-image {
            display: block;
            width: min(190px, 100%);
            height: auto;
            margin: 0 auto;
            border: 1px solid var(--glass-border);
            background: var(--glass-bg);
            padding: 0.45rem;
        }
        .chip-compare-table.chip-compare-table--boards .chip-compare-board-image {
            border: none;
            background: transparent;
            padding: 0;
        }
        .datasheet-image-placeholder {
            width: 100%;
            height: 300px;
            max-height: 300px;
            object-fit: contain;
            display: block;
        }
        #datasheets-microcontrollers .media-card figcaption {
            width: 100%;
            min-height: 2.2rem;
            margin-top: 0.6rem;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .chip-compare-table tbody td {
            background: var(--glass-bg);
            border-top: 1px solid var(--border-color-subtle);
            border-bottom: 1px solid var(--border-color-subtle);
            color: var(--text-headings);
            font-size: 0.96rem;
            line-height: 1.55;
            padding: 1rem;
            vertical-align: top;
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }
        .chip-compare-table tbody td:first-child {
            border-left: 3px solid var(--accent-primary);
            font-weight: 600;
            color: var(--text-headings);
            background: var(--glass-bg);
        }
        .chip-compare-table.chip-compare-table--boards tbody td:first-child {
            border-left: 1px solid var(--border-color-subtle);
            font-weight: 400;
        }
        .chip-compare-table tbody td:last-child {
            border-right: 1px solid var(--border-color-subtle);
        }
        .chip-compare-table tbody tr:hover td {
            color: var(--accent-primary);
            background: rgba(73, 217, 200, 0.14);
            border-top-color: rgba(73, 217, 200, 0.5);
            border-bottom-color: rgba(73, 217, 200, 0.5);
        }
        .chip-compare-table tbody tr:hover td:first-child {
            border-left-color: var(--accent-primary);
        }
        .chip-compare-table.chip-compare-table--boards tbody tr:hover td:first-child {
            border-left-color: rgba(73, 217, 200, 0.5);
        }
        .chip-compare-table tbody tr:hover td:last-child {
            border-right-color: rgba(73, 217, 200, 0.5);
        }
        @media (min-width: 901px) {
            .main-content .content-columns.content-columns--center {
                align-items: flex-start;
            }
            .main-content .content-columns.content-columns--center .media-card {
                margin: 0;
            }
        }
        @media (max-width: 900px) {
            .main-content .content-columns {
                grid-template-columns: 1fr;
            }
            .chip-compare-header-content {
                align-items: flex-start;
            }
            .chip-compare-table-wrap {
                overflow-x: auto;
                padding-bottom: 0.2rem;
            }
            .chip-compare-table {
                min-width: 960px;
            }
        }
        .main-content .content-columns.ha-automation-result-row .media-card {
            margin: 0;
        }
        .main-content .content-columns.houdini-drive-intro-row {
            align-items: flex-start;
            margin-top: 5.5rem;
        }
        .main-content .content-columns.houdini-drive-intro-row > div h2 {
            margin-top: 0;
        }
        .main-content .content-columns.houdini-drive-intro-row > div p:first-child {
            margin-top: 0;
        }
        .main-content .content-columns.houdini-drive-intro-row .media-card {
            margin: 0;
        }
        .main-content .content-columns.houdini-drive-intro-row .houdini-sim-video-card .media-video {
            max-height: 320px;
        }
        .main-content .content-columns.houdini-drive-intro-row .houdini-sim-video-card figcaption {
            min-height: 2.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .main-content .serial-vis-result-row {
            margin-top: 5.5rem;
        }
        .main-content .serial-vis-result-row > h2 {
            margin-top: 0;
        }
        .main-content .serial-vis-result-row .serial-vis-gallery-row {
            align-items: center;
            margin-top: 1.5rem;
        }
        .main-content .serial-vis-result-row .serial-vis-video-card {
            margin: 0;
        }
        .main-content .serial-vis-result-row .serial-vis-video-card .media-video {
            max-height: 400px;
        }
        .main-content .serial-vis-result-row .serial-vis-video-card figcaption {
            min-height: 2.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .main-content .content-columns.development-board-context-row {
            align-items: center;
            margin-top: 6rem;
        }
        .main-content .content-columns.development-board-context-row .info-box {
            margin: 0;
            align-self: center;
        }
        .main-content .content-columns.development-board-context-row .media-card {
            margin: 0;
            align-self: center;
        }
        .main-content .content-columns.development-board-context-row .media-freeframe {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .main-content .content-columns.development-board-context-row .dev-board-explainer-image {
            width: 100%;
            height: 300px;
            max-height: 300px;
            object-fit: contain;
        }
        .main-content .content-columns.dev-board-resources-row {
            align-items: center;
        }
        .main-content .content-columns.dev-board-resources-row .media-card {
            margin: 0;
            align-self: center;
        }
        .main-content .content-columns.dev-board-resources-row .media-freeframe {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .main-content .content-columns.dev-board-resources-row .dev-board-resource-image {
            width: 100%;
            height: 300px;
            max-height: 300px;
            object-fit: contain;
        }
        .main-content .content-columns.ha-zigbee-add-device-row {
            align-items: flex-start;
        }
        .main-content .content-columns.ha-zigbee-add-device-row .media-card {
            margin: 0;
        }
        .main-content .content-columns.ha-zigbee-add-device-row .media-card figcaption {
            min-height: 2.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        @media (min-width: 901px) {
            .main-content .content-columns.ha-automation-result-row {
                align-items: end;
            }
        }
        .main-content .content-columns.ha-automation-result-row .media-card--free .media-video {
            height: 400px;
            max-height: 400px;
            object-fit: contain;
        }
        .main-content .content-columns.ha-automation-result-row .media-card figcaption {
            text-align: center;
        }
        @media (max-width: 900px) {
            .main-content .content-columns.ha-automation-result-row .media-card--free .media-video {
                height: auto;
                max-height: none;
            }
        }
        .main-content .two-column-list li::before {
            content: "";
            position: absolute;
            top: 0.65rem;
            left: 0.7rem;
            width: 8px;
            height: 8px;
            border: 2px solid var(--accent-primary);
            transform: rotate(45deg);
        }
        .main-content .accent-list li::before {
            content: "";
            position: absolute;
            top: 0.65rem;
            left: 0.7rem;
            width: 8px;
            height: 8px;
            border: 2px solid var(--accent-primary);
            transform: rotate(45deg);
        }
        .main-content a {
            font-family: inherit;
            color: var(--accent-primary);
            text-decoration: none;
            background-image: linear-gradient(90deg, var(--accent-primary), var(--accent-primary));
            background-size: 0% 1px;
            background-position: 50% 100%;
            background-repeat: no-repeat;
            transition: background-size 0.25s ease, text-shadow 0.25s ease;
        }
        .main-content a:hover {
            background-size: 100% 1px;
            text-shadow: 0 0 18px rgba(73, 217, 200, 0.6);
        }
        .media-row a {
            background-image: none;
        }
        .media-row a:hover {
            background-size: 0% 1px;
            text-shadow: none;
        }
        @media (max-width: 900px) {
            .main-content .text-columns {
                column-count: 1;
            }
        }
        .media-row {
            display: flex;
            gap: 1rem;
            align-items: center;
            margin-top: 1.5rem;
        }
        .media-row figure {
            flex: 1 1 0;
            margin: 0;
            text-align: center;
        }
        .media-row figcaption {
            margin-top: 0.6rem;
            color: #cfd5dd;
            font-size: 0.9rem;
        }
        .media-row video,
        .media-row img,
        .media-row model-viewer {
            flex: 1 1 0;
            width: 100%;
            height: 500px;
            object-fit: contain;
            background: transparent;
            border: none;
        }
        .media-row.media-row--compact video,
        .media-row.media-row--compact img {
            height: 320px;
        }
        @media (max-width: 900px) {
            .media-row {
                flex-direction: column;
            }
        }
        .standard-link {
            font-family: inherit;
            color: var(--accent-primary);
            text-decoration: none;
            background-image: linear-gradient(90deg, var(--accent-primary), var(--accent-primary));
            background-size: 0% 1px;
            background-position: 50% 100%;
            background-repeat: no-repeat;
            transition: background-size 0.25s ease, text-shadow 0.25s ease;
        }
        .standard-link:hover {
            background-size: 100% 1px;
            text-shadow: 0 0 18px rgba(73, 217, 200, 0.6);
        }
        /* ======= DOCUMENTATION TEXT STYLES (MAIN CONTENT) END ======= */

        /* ======= BLOG SECTION STYLES START ======= */
        #machine-usage p { margin-bottom: 1.6rem; }
        #machine-usage .info-box .info-text { margin-bottom: 0; }
        #machine-usage h2 { margin-top: 8rem; margin-bottom: 1.5rem; }
        #machine-usage .media-card { margin: 3rem 0; }
        #machine-usage .info-box { margin: 2.8rem 0; }
        #machine-usage .pull-quote { margin: 3rem 0; }
        #machine-usage .code-section-container { margin: 3rem auto; }
        #machine-usage .code-section-container { width: 100%; max-width: none; }
        #setup-micropython .code-section-container { margin: 3rem auto; }
        #setup-micropython .code-section-container { width: 100%; max-width: none; }
        #machine-usage .media-float { margin-bottom: 2.2rem; }

        #machine-usage .text-columns {
            column-count: 2;
            column-gap: 2.5rem;
        }

        @media (max-width: 900px) {
            #machine-usage .text-columns {
                column-count: 1;
            }
        }

        .media-card {
            margin: 2rem 0;
            padding: 0;
            border: none;
            background: transparent;
            position: relative;
            overflow: visible;
            width: 100%;
        }

        .media-card--text-video {
            margin: 0;
        }

        .media-card::before {
            content: "";
            position: absolute;
            inset: -30% 0;
            background-image: var(--media-bg);
            background-size: cover;
            background-position: center;
            filter: blur(70px);
            opacity: 0.5;
            z-index: -1;
            pointer-events: none;
        }

        .media-card.video::before {
            content: none;
        }

        .media-stack {
            position: relative;
            aspect-ratio: 16 / 6;
            width: 100%;
        }

        .media-row {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin: 2rem 0;
            align-items: flex-start;
        }

        .media-row .media-card {
            margin: 0;
            flex: 1 0 clamp(300px, 33%, 520px);
        }

        .media-row .media-stack {
            aspect-ratio: auto;
            height: auto;
        }

        .media-row .media-frame {
            height: auto;
        }

        .media-row .media-card img,
        .media-row .media-card video {
            height: auto;
            object-fit: contain;
        }

        .media-frame {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
        }

        .media-card img,
        .media-card video {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            cursor: zoom-in;
        }
        .embedded-programming-page .media-card img {
            height: auto;
            max-height: 420px;
            object-fit: contain;
        }
        .embedded-programming-page .datasheet-image-placeholder,
        .embedded-programming-page .dev-board-resource-image,
        .embedded-programming-page .dev-board-explainer-image {
            width: 100%;
            height: auto;
            max-height: 420px;
            object-fit: contain;
        }
        .embedded-programming-page .chip-compare-board-image {
            width: auto;
            max-width: 100%;
            height: auto;
            max-height: 240px;
            object-fit: contain;
        }

        .media-card--ratio .media-stack {
            aspect-ratio: 5 / 4;
        }

        .media-card--ratio video,
        .media-card--ratio img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .media-card--free .media-freeframe {
            width: 100%;
        }

        .media-card--free .media-video {
            width: 100%;
            height: auto;
            object-fit: contain;
            cursor: default;
        }

        .media-card--settings {
            margin: 0;
            padding: 1.4rem 1.6rem;
            border: 1px solid var(--border-color-subtle);
            background: var(--glass-bg);
        }

        .media-card--settings h3 {
            margin-top: 0;
            margin-bottom: 1rem;
            font-size: 1.3rem;
            color: var(--text-headings);
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 1rem;
        }

        .media-card--settings .settings-material {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-subtle);
            white-space: nowrap;
        }

        .media-card--settings .settings-group {
            margin-bottom: 1rem;
        }

        .media-card--settings .settings-group:last-child {
            margin-bottom: 0;
        }

        .media-card--settings .settings-group strong {
            display: block;
            font-size: 1rem;
            color: var(--text-headings);
            margin-bottom: 0.4rem;
        }

        .media-card--settings .settings-list {
            list-style: none;
            padding: 0;
            margin: 0;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .media-frame video {
            cursor: default;
        }

        .media-video {
            position: relative;
            z-index: 1;
        }

        .media-controls {
            position: absolute;
            right: 0.8rem;
            top: 0.8rem;
            display: flex;
            gap: 0.6rem;
            z-index: 2;
        }

        .media-controls.is-hidden {
            opacity: 0;
            pointer-events: none;
        }

        .media-control-button {
            background: transparent;
            color: var(--text-primary);
            border: 1px solid var(--glass-border);
            width: 40px;
            height: 40px;
            display: grid;
            place-items: center;
            cursor: pointer;
            border-radius: 0;
            box-shadow: none;
            transition: all 0.2s ease;
        }

        .media-control-button:hover {
            border-color: var(--glass-border);
            color: var(--text-headings);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
            transform: translateY(-1px);
        }

        .media-control-button svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }

        .media-play-button {
            position: absolute;
            inset: 0;
            margin: auto;
            width: 64px;
            height: 64px;
            z-index: 2;
            background: rgba(10, 12, 16, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .media-card figcaption {
            margin-top: 0.8rem;
            color: #cfd5dd;
            font-size: 0.9rem;
            position: relative;
            z-index: 1;
        }
        .figcaption-center {
            text-align: center;
        }

        .media-float {
            max-width: 45%;
            margin: 0.2rem 1.5rem 1.2rem 0;
        }

        .media-float.right {
            float: right;
            margin: 0.2rem 0 1.2rem 1.5rem;
        }

        .media-float.left {
            float: left;
        }

        .media-float img {
            width: 100%;
            display: block;
            border: 1px solid var(--border-color-subtle);
        }

        .media-float figcaption {
            margin-top: 0.6rem;
            color: #cfd5dd;
            font-size: 0.85rem;
        }

        .viewer-inline {
            position: relative;
            aspect-ratio: 4 / 3;
            background: transparent;
        }

        .viewer-inline.media-float {
            width: 45%;
        }

        #machine-usage-viewer {
            float: none;
            width: 100%;
            margin: 2rem 0;
        }

        .viewer-inline model-viewer {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            display: block;
        }

        .viewer-inline::before {
            content: "";
            position: absolute;
            inset: -25%;
            background-image: radial-gradient(circle at 20% 20%, rgba(73, 217, 200, 0.25), transparent 55%),
                radial-gradient(circle at 80% 30%, rgba(241, 214, 107, 0.22), transparent 60%);
            filter: blur(70px);
            opacity: 0.8;
            z-index: 0;
            pointer-events: none;
        }

        .viewer-inline model-viewer,
        .viewer-inline .action-button {
            z-index: 1;
        }

        .viewer-inline .action-button {
            position: absolute;
            top: 0.8rem;
            right: 0.8rem;
            z-index: 5;
        }

        .inline-gallery {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.6rem;
            position: relative;
            isolation: isolate;
        }
        .inline-gallery.inline-gallery--compact {
            max-width: none;
            margin: 0;
        }

        .inline-gallery::before {
            content: "";
            position: absolute;
            inset: -25%;
            background-image: var(--gallery-bg);
            background-size: cover;
            background-position: center;
            filter: blur(60px);
            opacity: 0.25;
            z-index: 0;
            pointer-events: none;
        }

        .inline-gallery-item {
            position: relative;
            overflow: hidden;
            border: 1px solid var(--border-color-subtle);
            aspect-ratio: 4 / 3;
            z-index: 1;
        }
        .inline-gallery.inline-gallery--compact .inline-gallery-item {
            aspect-ratio: auto;
            height: 240px;
        }
        .inline-gallery.inline-gallery--compact img,
        .inline-gallery.inline-gallery--compact video {
            object-fit: contain;
            background: transparent;
        }
        .inline-gallery.inline-gallery--compact img:hover,
        .inline-gallery.inline-gallery--compact video:hover {
            transform: none;
            filter: none;
        }

        .inline-gallery[data-count="1"],
        .inline-gallery[data-count="2"] {
            grid-template-columns: 1fr;
        }

        .inline-gallery[data-count="3"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .inline-gallery[data-count="3"] .inline-gallery-item:first-child {
            grid-column: 1 / -1;
        }

        .inline-gallery img,
        .inline-gallery video {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            border: none;
            cursor: zoom-in;
            transition: transform 0.25s ease, filter 0.25s ease;
        }

        .inline-gallery img:hover,
        .inline-gallery video:hover {
            transform: scale(1.05);
            filter: brightness(1.05);
        }

        .pull-quote {
            margin: 2.2rem 0;
            padding: 1.6rem 1.8rem;
            border-left: 3px solid var(--accent-color);
            background: linear-gradient(90deg, rgba(73, 217, 200, 0.14) 0%, rgba(8, 9, 12, 0) 70%);
            color: var(--text-headings);
            font-size: 1.2rem;
            line-height: 1.5;
        }

        .info-box.warning.one-liner {
            display: block;
            width: auto;
            max-width: none;
            margin: 2.2rem 0;
            padding: 1.6rem 1.8rem;
            border-left: 3px solid var(--accent-tertiary);
            background: linear-gradient(90deg, rgba(241, 214, 107, 0.18) 0%, rgba(8, 9, 12, 0) 70%);
        }
        .info-box.one-liner::after { content: none; }
        .info-box.one-liner { padding-left: 1.8rem; }

        .info-box.warning.one-liner .info-text {
            font-size: 1.2rem;
            line-height: 1.5;
            color: var(--text-headings);
            margin: 0;
        }

        q {
            display: block;
            margin: 1.4rem 0;
            padding: 1.2rem 1.4rem;
            border: none;
            border-left: 3px solid var(--accent-color);
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: var(--glass-shadow-soft);
            color: var(--text-headings);
            font-style: italic;
        }

        .blog-clear {
            clear: both;
        }

        @media (max-width: 900px) {
            .media-float,
            .media-float.left,
            .media-float.right {
                float: none;
                max-width: 100%;
                margin: 1.2rem 0;
            }
        }
        /* ======= BLOG SECTION STYLES END ======= */

        /* ======= HORIZONTAL CAROUSEL GALLERY STYLES START ======= */
        .carousel-section {
            margin: calc(var(--site-margin-top) * 2) auto;
            padding: 4rem 0;
        }

        .carousel-section h1 {
            font-size: 2.2rem;
            font-weight: 600;
            color: var(--text-headings);
            margin: 0 auto 3rem auto;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color-medium);
            max-width: var(--site-max-width);
            width: var(--site-width);
        }

        .carousel-container {
            position: relative;
            width: 100vw;
            left: 50%;
            right: 50%;
            margin-left: -50vw;
            margin-right: -50vw;
            height: 70vh;
            overflow: visible;
        }

        /* Großer geblurrter Hintergrund hinter dem zentrierten Bild */
        .carousel-background {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 150%;
            height: 150%;
            z-index: -1;
            opacity: 0;
            transition: opacity 0.6s ease, background-image 0.6s ease;
            filter: blur(80px);
            pointer-events: none;
        }

        .carousel-background.active {
            opacity: 0.4;
        }

        .carousel-container .swiper {
            width: 100%;
            height: 100%;
            overflow: hidden;
            position: relative;
        }

        .carousel-container .swiper-wrapper {
            display: flex;
            align-items: center;
        }

        /* Keine zusätzlichen Abstände - cleane Berechnung */

        .carousel-container .swiper-slide {
            position: relative;
            flex-shrink: 0;
            width: calc((100vw - 4vw) / 3); /* 3 Items sichtbar, minus seitliche Abstände */
            height: 85%;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
            filter: brightness(0.75);
        }

        .carousel-container .swiper-slide:not(.swiper-slide-active) {
            cursor: pointer;
        }

        .carousel-container .swiper-slide:not(.swiper-slide-active):hover {
            filter: brightness(0.9);
        }

        /* Mittleres Item: 110% größer und heller */
        .carousel-container .swiper-slide-active {
            height: 93.5% !important;
            filter: brightness(1) !important;
            z-index: 10;
        }

        .carousel-container .swiper-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: filter 0.3s ease, transform 0.35s ease;
        }

        .carousel-container .swiper-slide:not(.swiper-slide-active):hover img {
            transform: scale(1.04);
        }

        /* Text-Overlay - unten links auf dem Bild */
        .carousel-caption {
            --caption-offset-x: 1.2rem;
            --caption-offset-y: 2.5rem;
            position: absolute;
            bottom: var(--caption-offset-y);
            left: var(--caption-offset-x);
            right: var(--caption-offset-x);
            z-index: 20;
            pointer-events: none;
        }

        .carousel-caption h3 {
            font-size: 2.2rem;
            font-weight: 700;
            color: #000000;
            margin: 0 0 0.8rem 0;
            line-height: 1.2;
        }

        .carousel-caption p {
            font-size: 1rem;
            color: var(--text-primary);
            line-height: 1.6;
            margin: 0;
        }

        /* Hover-Effekt entfernt - kein Blur mehr */

        .carousel-progress-container {
            position: relative;
            width: 100%;
            height: 4px;
            margin: 1.5rem 0 0;
            overflow: visible;
            z-index: 120;
        }

        .carousel-progress-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, rgba(73, 217, 200, 0.35), var(--accent-color));
            box-shadow: 0 0 18px rgba(73, 217, 200, 0.35);
            transition: width 0.5s ease;
        }

        /* Responsive Design */
        @media (max-width: 1024px) {
            .carousel-container .swiper-slide {
                width: calc((100vw - 4vw) / 2.5);
            }

            .carousel-caption h3 {
                font-size: 1.8rem;
            }

            .carousel-caption p {
                font-size: 0.95rem;
            }
        }

        @media (max-width: 768px) {
            .carousel-container {
                height: 55vh;
            }

            .carousel-container .swiper-slide {
                width: calc((100vw - 4vw) / 1.8);
                height: 80%;
            }

            .carousel-container .swiper-slide-active {
                height: 88%;
            }

            .carousel-caption {
                --caption-offset-x: 1rem;
                --caption-offset-y: 1.5rem;
            }

            .carousel-caption h3 {
                font-size: 1.5rem;
                margin-bottom: 0.5rem;
            }

            .carousel-caption p {
                font-size: 0.85rem;
            }

            .carousel-progress-container {
                height: 3px;
                margin-top: 1.2rem;
            }
        }
        /* ======= HORIZONTAL CAROUSEL GALLERY STYLES END ======= */

        /* ======= LIGHTBOX STYLES START ======= */
        #lightbox-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(23, 23, 23, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            display: none; /* Initially hidden */
            align-items: center; justify-content: center;
            flex-direction: column;
            z-index: 2000;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        #lightbox-overlay.lightbox-visible {
            display: flex; /* Use flex to center */
            opacity: 1;
        }
        #lightbox-image {
            display: block;
            width: 80vw;
            height: 80vh;
            object-fit: contain;
            box-shadow: none;
            cursor: default; /* Prevent closing when clicking image */
        }
        #lightbox-video {
            display: none;
            width: 80vw;
            height: 80vh;
            object-fit: contain;
            box-shadow: none;
            cursor: default;
        }
        #lightbox-caption {
            margin-top: 1rem;
            color: var(--text-secondary);
            font-size: 0.95rem;
            max-width: min(720px, 90%);
            text-align: center;
            cursor: default;
        }
        #lightbox-close {
            position: absolute;
            top: 15px; right: 25px;
            font-size: 2.5rem; color: white;
            text-decoration: none; background: none; border: none;
            cursor: pointer; line-height: 1; padding: 5px;
            transition: opacity 0.2s ease;
        }
        #lightbox-close:hover {
            opacity: 0.8;
        }
        /* ======= LIGHTBOX STYLES END ======= */


        /* ======= PROJECT FILES (DOWNLOADS) STYLES START ======= */
        .project-files-container {
            color: var(--text-secondary);
            margin: var(--site-margin-top) auto; max-width: var(--site-max-width);
            width: var(--site-width); margin-bottom: 0;
        }
        .project-files-container h1 { font-size: 2.2rem; font-weight: 600; color: var(--text-headings); margin-bottom: 0.5rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border-color-medium); }
        .project-files-container h2 { font-size: 1.5rem; font-weight: 600; color: var(--text-headings); margin-top: 6rem; margin-bottom: 1.5rem; }
        .intro-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
        .intro-hero-text { flex: 1 1 320px; }
        .intro-hero-text { color: #ffffff; }
        .intro-hero-text p { margin: 0 0 1rem; line-height: normal; font-size: 1.1rem; }
        .intro-hero-text p:last-child { margin-bottom: 0; }
        .intro-hero-title { font-size: 2.1rem; font-weight: 500; display: inline-block; }
        .intro-hero-secondary { font-size: 1.1rem; }
        .intro-hero-image-wrap {
            display: inline-flex;
            border-right: 3px solid var(--accent-primary);
            position: relative;
            transition: border-color 0.4s ease;
            overflow: visible;
        }
        .intro-hero-image-clip {
            display: inline-flex;
            overflow: hidden;
        }
        .intro-ai-badge {
            position: absolute;
            right: 10px;
            bottom: 12px;
            display: inline-flex;
            align-items: center;
            z-index: 2;
            pointer-events: auto;
        }
        .intro-ai-badge img {
            width: 28px;
            height: 28px;
            filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
        }
        .intro-ai-tooltip {
            position: absolute;
            right: calc(100% + 10px);
            bottom: 50%;
            transform: translateY(50%) translateX(6px);
            background: rgba(18, 18, 18, 0.45);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.25);
            color: #f4efe8;
            padding: 6px 10px;
            border-radius: 0;
            font-size: 0.85rem;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 180ms ease, transform 180ms ease;
            pointer-events: none;
        }
        .intro-ai-badge:hover .intro-ai-tooltip {
            opacity: 1;
            transform: translateY(50%) translateX(0);
        }
        .intro-hero-image-wrap::after {
            content: "";
            position: absolute;
            top: 0;
            right: -4px;
            width: 4px;
            height: 100%;
            background: rgba(73, 217, 200, 0.95);
            box-shadow: 0 0 32px rgba(73, 217, 200, 0.8);
            transition: box-shadow 0.4s ease, background 0.4s ease;
            pointer-events: none;
        }
        .intro-hero:hover .intro-hero-image-wrap {
            border-right-color: rgba(73, 217, 200, 0.95);
        }
        .intro-hero:hover .intro-hero-image-wrap::after {
            background: rgba(73, 217, 200, 0.95);
            box-shadow: 0 0 32px rgba(73, 217, 200, 0.8);
        }
        .intro-hero-image {
            width: min(173px, 40vw);
            height: auto;
            display: block;
            transform: translateX(20px);
            transition: transform 0.4s ease-out;
        }
        .intro-hero:hover .intro-hero-image {
            transform: translateX(0);
        }
        .download-list { list-style: none; padding: 0; margin: 0; }
        .download-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color-medium); }
        .download-item:last-child { border-bottom: none; }
        .file-info { display: flex; align-items: center; }
        .file-icon { margin-right: 1rem; color: var(--icon-color-default); display: inline-flex; align-items: center; justify-content: center; }
        .file-icon.settings { color: var(--icon-color-settings); }
        .file-icon.list { color: var(--icon-color-list); }
        .file-icon.presentation { color: var(--icon-color-presentation); }
        .file-name { font-size: 1rem; color: var(--text-primary); }
        .download-button {
            display: inline-flex; align-items: center;
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: 1px solid var(--glass-border);
            color: var(--text-primary); text-decoration: none; padding: 0.5rem 1.2rem;
            border-radius: var(--border-radius-pill); font-size: 0.9rem; font-weight: 500;
            transition: all 0.2s ease; white-space: nowrap;
            box-shadow: none;
        }
        .download-button:hover {
            color: var(--text-headings);
            box-shadow: 0 0 0 1px rgba(73, 217, 200, 0.35), 0 0 18px rgba(73, 217, 200, 0.25);
            transform: translateY(-1px);
        }
        .download-item.is-soon .file-name { color: var(--text-subtle); }
        .download-button.disabled,
        .download-button[aria-disabled="true"] {
            border-color: var(--border-color-subtle);
            color: var(--text-subtle);
            cursor: not-allowed;
            opacity: 0.7;
            pointer-events: none;
        }
        .download-button .download-icon { margin-right: 0.5rem; }
        /* ======= PROJECT FILES (DOWNLOADS) STYLES END ======= */

        @media (hover: none), (pointer: coarse) {
            .hero-cta:hover,
            .action-button:hover,
            .download-button:hover,
            .media-control-button:hover,
            .material-list-container .item-links a:hover {
                color: var(--text-primary) !important;
                box-shadow: none !important;
                transform: none !important;
            }
            .material-list-container .item-links a {
                transition: none !important;
            }
        }

        /* ======= 3D MODEL VIEWER SECTION STYLES START ======= */
        .model-viewer-section {
            margin: var(--site-margin-top) auto;
            max-width: 100vw;
            width: 100vw;
            margin-left: calc(50% - 50vw);
            margin-right: calc(50% - 50vw);
            background: var(--glass-deep);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid transparent;
            border-radius: var(--border-radius-medium); overflow: hidden;
            box-shadow:
                var(--glass-shadow-strong),
                inset 0 1px 0 var(--glass-highlight),
                inset 0 -1px 0 rgba(0, 0, 0, 0.35);
            background-image:
                linear-gradient(135deg,
                    var(--glass-gradient-start) 0%,
                    var(--glass-gradient-mid) 50%,
                    var(--glass-gradient-end) 100%);
            background-clip: padding-box;
            height: 25vh;
            display: flex;
            position: relative;
            transition: height 0.3s ease;
        }
        .model-viewer-section::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: var(--border-radius-medium);
            padding: 1px;
            background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }

        .model-viewer-section.is-expanded {
            height: 50vh; /* Expanded height */
        }

        .model-viewer-section h2 {
            position: absolute;
            font-size: 1.3rem;
            font-weight: 600; color: var(--text-headings);
            margin-left: 1rem;
            margin-top: 1rem;
            padding-right: 130px; /* Space for the button */
            width: auto; /* Allow shrinking */
            z-index: 5;
        }

        model-viewer {
            margin: 0 auto;
            background-color: transparent;
            width: 100%;
            height: 100%;
            position: relative; /* Needed for z-index stacking context */
            z-index: 1; /* Below title and button */
        }
        /* ======= 3D MODEL VIEWER SECTION STYLES END ======= */

        /* Responsive Anpassungen für Breiten und Layout */
        @media (max-width: 1024px) {
            :root {
                --site-width: 90vw;
                --site-margin-sides: 5vw;
            }

            .hero-content {
                left: 50%;
                transform: translate(-50%, -50%);
                text-align: center;
            }

            .initial-content-grid {
                grid-template-columns: 1fr;
                width: var(--site-width);
                max-width: 90%;
                margin-top: 100px;
            }

            .initial-content-grid .initial-main-content { order: 1; }
            .initial-content-grid .timeline-container {
                order: 2;
                width: 100%;
                max-width: 100%;
                margin-top: var(--grid-gap);
                margin-left: auto; margin-right: auto;
                min-height: 30vh;
                position: relative; top: auto;
                z-index: 20;
            }

            .assignment-intro-container {
                width: 100%; max-width: 100%;
                margin-left: auto; margin-right: auto;
                min-height: auto;
                margin-top: var(--grid-gap);
            }

            .info-box { width: 90%; }
            .image-container { width: var(--site-width); max-width: var(--site-max-width); }
            .code-section-container { width: 90%; }
            .action-button { /* Adjust button position/size */
                top: 1rem; padding: 0.3rem 0.8rem; font-size: 0.8rem; height: 36px;
            }
            .copy-button { right: 1rem; min-width: 96px; }
            .expand-button { width: 36px; right: calc(1rem + 96px + 0.5rem); }
            .code-section-container .code-ai-badge {
                right: calc(1rem + 96px + 0.5rem + 36px + 0.5rem);
                width: 36px;
            }
            .model-viewer-section .expand-button { right: 1rem; }
            /* Adjust material list button pos */
            .material-list-container .expand-button { top: 1.5rem; right: 1.5rem; }
            .image-container .action-button { top: 0.6rem; right: 0.6rem; width: 34px; height: 34px; padding: 0; }


            .code-section-container .code-title {
                font-size: 1.1rem;
                padding-right: 150px; /* Adjust padding for smaller buttons */
            }
            .material-list-container .list-title { padding-right: 80px; } /* Adjust padding */


            .topic-intro {
                grid-template-columns: 1fr;
                width: var(--site-width); max-width: 90%;
            }
            .material-list-container {
                margin-top: var(--grid-gap);
                width: 100%; max-width: 100%;
                margin-left: auto; margin-right: auto;
                padding: 1.5rem; /* Reduce padding */
            }
            .material-list-container .expand-button { top: 1.5rem; right: 1.5rem; }


            .model-viewer-section { width: 90%; max-width: 90%; }
            .model-viewer-section h2 { padding-right: 100px; } /* Adjust title padding */
        }

        @media (max-width: 768px) {
            .initial-content-grid {
                margin-top: 80px;
                display: block;
            }
            .initial-content-grid .initial-main-content,
            .initial-content-grid .timeline-container {
                width: 100%;
            }
            .timeline-container { margin-top: 1rem; }
            .assignment-intro-container { margin-top: 2rem; }

            .image-container { width: 90%; max-width: 90%; }
            .media-row .media-card { flex-basis: 100%; }
            .info-box { width: 90%; flex-direction: row; text-align: left; gap: 1rem; padding: 1.2rem; }
            .info-content .info-title { font-size: 1.8rem; }
            .info-content .info-subtitle { font-size: 0.9rem;}
            .info-icon { margin-bottom: 0; }
            .main-content, .tools-section, .project-files-container, .topic-intro, .code-section-container, .model-viewer-section { width: 90%; max-width: 90%;}
            .code-section-container { padding: 0.25rem 1rem; }
            .code-block { font-size: 0.85rem; }
            .image-container { grid-template-columns: repeat(2, 1fr); } /* 2 columns on tablets */
            .main-content .two-column-list { grid-template-columns: 1fr; }

            /* Adjust model viewer heights for click toggle */
            .model-viewer-section { height: 30vh; }
            .model-viewer-section.is-expanded { height: 45vh; }
            /* Adjust material list heights */
            .material-list { max-height: 25vh; }
            .material-list.is-expanded { max-height: 50vh; }

            .hero-cta:hover,
            .action-button:hover,
            .download-button:hover,
            .media-control-button:hover,
            .material-list-container .item-links a:hover,
            .tool-card-button:hover {
                color: var(--text-primary);
                box-shadow: none;
                transform: none;
            }
            .tool-card-button:hover { transform: translateX(-50%); }
            .material-list-container .item-links a { transition: none; }
            .assignment-intro-container a:hover,
            .topic-text a:hover,
            .main-content a:hover {
                background-size: 0% 1px;
                text-shadow: none;
            }
            .inline-gallery img:hover,
            .inline-gallery video:hover,
            .carousel-container .swiper-slide:not(.swiper-slide-active):hover img {
                transform: none;
                filter: none;
            }
            .carousel-container .swiper-slide:not(.swiper-slide-active):hover {
                filter: brightness(0.75);
            }
            .timeline-content h4 a:hover { opacity: 1; }
            .timeline-item:hover .marker-icon { transform: none; }
            .info-box:hover::after { opacity: 0; }
            .info-box:hover .info-icon,
            .info-icon { transform: none !important; }
            .tool-card-button { display: inline-flex; }
            .tool-card:hover .tool-card-inner { transform: none; }
            .tool-card:hover .tool-logo { filter: blur(12px); opacity: 0.4; }
            .tool-card.is-flipped .tool-card-inner { transform: rotateY(180deg); }


            @media (max-width: 500px) {
                .image-container { grid-template-columns: 1fr; }
                /* Adjust model viewer heights */
                .model-viewer-section { height: 25vh; }
                .model-viewer-section.is-expanded { height: 40vh; }
                /* Adjust material list heights */
                .material-list { max-height: 20vh; }
                .material-list.is-expanded { max-height: 45vh; }

                /* Stack buttons in code section if needed */
                .code-section-container .code-title { padding-right: 10px; margin-bottom: 3.5rem; } /* Make space */
                .action-button { top: 0.8rem; height: 34px; }
                .copy-button { top: 0.8rem; right: 1rem; min-width: 90px; }
                .code-section-container .expand-button {
                    top: calc(0.8rem + 30px + 0.5rem);
                    right: 1rem;
                    /* Keep display: none; JS will override */
                }
                .code-section-container .code-ai-badge {
                    top: calc(0.8rem + 30px + 0.5rem);
                    right: calc(1rem + 34px + 0.5rem);
                    width: 34px;
                    height: 34px;
                }

                /* Stack button in material list */
                .material-list-container .list-title { padding-right: 10px; margin-bottom: 3rem; }
                .material-list-container .expand-button { top: 0.8rem; right: 1rem; }


                .model-viewer-section h2 { font-size: 1.1rem; padding-right: 80px; }
                .model-viewer-section .expand-button { top: 0.8rem; right: 1rem; }

                #lightbox-image { max-width: 95%; max-height: 80%; }
                #lightbox-close { top: 10px; right: 15px; font-size: 2rem; }
            }
        }
