/**
 * ai-systems.cloud - Stylesheet (GDPR-COMPLIANT)
 *
 * Design system shared with HiCC Terminal.
 * Fonts loaded locally, no external tracking.
 */

/* ============================================================================
   1. LOCAL FONTS (GDPR-COMPLIANT)
   ============================================================================ */

@font-face {
    font-family: 'Source Serif 4';
    src: url('../assets/fonts/SourceSerif4-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
  }

/* Inter - Primary UI Font */
@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/Inter-VariableFont.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* JetBrains Mono - Monospace/Code Font */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../assets/fonts/JetBrainsMono-VariableFont.ttf') format('truetype');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ============================================================================
   2. BASE STYLES
   ============================================================================ */

:root {
    --font-quote: 'Source Serif 4', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #020617;
    color: #e2e8f0;
    position: relative;
}

.mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* STATEMENT: Hervorgehobenes Pull-Quote als Überleitung */
.statement {
    font-family: var(--font-quote);
    color: darkcyan;
    margin: 2rem 0 2.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid currentColor;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 640px) {
    .statement {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        padding: 1rem 1.25rem;
        margin: 1.5rem 0 2rem 0;
    }
}

/* AUTHOR QUOTE: Persönliches Zitat mit Kursivschrift */
.author-quote {
    font-family: var(--font-quote);
    font-style: italic;
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    line-height: 1.5;
    color: #94a3b8;
    max-width: 36rem;
    margin-top: 1rem;
}

.author-quote-attribution {
    display: block;
    font-style: normal;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #00d4ff;
    letter-spacing: 0.05em;
    margin-top: 0.75rem;
}

@media (max-width: 640px) {
    .author-quote {
        font-size: clamp(1.05rem, 4vw, 1.2rem);
    }
}

/* ============================================================================
   2b. KEYBOARD FOCUS INDICATORS (WCAG 2.4.7)
   ============================================================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

.nav-dropdown-link:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
    background: rgba(30, 41, 59, 0.7);
}

.slider-dot:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* ============================================================================
   2c. SKIP-TO-CONTENT LINK (WCAG 2.4.1)
   ============================================================================ */

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

.sr-only:focus {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1.25rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #020617;
    color: #00d4ff;
    border: 2px solid #00d4ff;
    border-radius: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    z-index: 10000;
}

/* ============================================================================
   3. GLASS/GLASSMORPHISM EFFECTS
   ============================================================================ */

.glass {
    background: rgba(30, 41, 59, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
}

/* ============================================================================
   4. NAVIGATION
   ============================================================================ */

.nav-glass {
    background: rgba(2, 6, 23, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 4b. Nav Dropdown – Unterseiten-Links */
.nav-dropdown {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: -0.5rem;
}

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 10rem;
    padding: 0.5rem 0;
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.7);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown-link:hover {
    color: #00d4ff;
    background: rgba(30, 41, 59, 0.5);
}

.nav-dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 0.5rem;
    opacity: 0.5;
}

.nav-dropdown-link:hover .nav-dropdown-arrow {
    opacity: 1;
}

/* ============================================================================
   5. SECTION LAYOUT
   ============================================================================ */

.section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-divider {
    border-top: 1px solid rgba(30, 41, 59, 0.8);
}

/* ============================================================================
   6. MOBILE NAVIGATION
   ============================================================================ */

.mobile-nav-open {
    max-height: 44rem;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
}

.mobile-nav-closed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

/* ============================================================================
   7. CUSTOM SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* ============================================================================
   8. CONTENT PROSE (Markdown-rendered content)
   ============================================================================ */

.content-prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-prose p:last-child {
    margin-bottom: 0;
}

.content-prose h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.content-prose strong {
    color: #e2e8f0;
    font-weight: 600;
}

/* ============================================================================
   9. PUBLICATION THUMBNAILS
   Consistent dimensions for all publication cards (with or without image).
   Mobile: full width, fixed height above text.
   Desktop: fixed width left of text.
   ============================================================================ */

.pub-thumb {
    width: 100%;
}

.pub-thumb-img {
    width: 100%;
    height: 10rem;
}

@media (min-width: 768px) {
    .pub-thumb {
        width: 10rem;
    }

    .pub-thumb-img {
        width: 10rem;
        height: 7rem;
    }
}

/* ============================================================================
   10. SCREENSHOT SLIDER & IMAGE MODAL
   ============================================================================ */

.screenshot-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-out;
    width: 100%;
}

.slider-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.slider-slide img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.slider-slide img:hover {
    opacity: 0.9;
}

.slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    opacity: 0.8;
}

/* ============================================================================
   10b. IMAGE MODAL / LIGHTBOX
   ============================================================================ */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
    animation: modal-fade-in 0.3s ease-out;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.image-modal-close:hover {
    background: rgba(37, 99, 235, 0.8);
    color: white;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================================
   11. PCB BACKGROUND SYSTEM
   ============================================================================ */

#pcb-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

body > *:not(#pcb-background):not(.image-modal):not(#mainNav):not(.glossar-tooltip) {
    position: relative;
    z-index: 1;
}

/* Smooth transitions for branch trace reveals */
#pcb-background .pcb-branch-active {
    transition: stroke-dashoffset 0.4s ease-out;
}

/* Prevent text selection on SVG component labels */
#pcb-background text {
    user-select: none;
    pointer-events: none;
}

/* Hide PCB animation in portrait mode on mobile/tablet */
@media (orientation: portrait) and (max-width: 1024px) {
    #pcb-background {
        display: none !important;
    }
}

/* Reduced motion: no animations, show static traces */
@media (prefers-reduced-motion: reduce) {
    #pcb-background svg {
        opacity: 0.3 !important;
    }
    #pcb-background circle,
    #pcb-background path {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================================
   12. HERO LOGO ANIMATION
   ============================================================================ */

.hero-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.hero-logo {
    width: auto;
    height: 10rem;
    opacity: 0;
    transform: translateY(1.5rem) scale(0.92);
    animation: logo-entrance 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    filter: brightness(1) drop-shadow(0 0 0px rgba(0, 212, 255, 0));
}

/* Phase 1: Fade-in + slide up + scale + brightness boost */
@keyframes logo-entrance {
    0% {
        opacity: 0;
        transform: translateY(1.5rem) scale(0.92);
        filter: brightness(1) drop-shadow(0 0 0px rgba(0, 212, 255, 0));
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1.4) drop-shadow(0 0 30px rgba(0, 212, 255, 0.45));
    }
    70% {
        filter: brightness(1.5) drop-shadow(0 0 50px rgba(0, 212, 255, 0.5));
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1.15) drop-shadow(0 0 16px rgba(0, 212, 255, 0.25));
    }
}

/* Phase 2: Subtle idle glow pulse (triggered by JS after entrance) */
.hero-logo.glow-idle {
    animation: logo-glow-pulse 4s ease-in-out infinite;
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes logo-glow-pulse {
    0%, 100% {
        filter: brightness(1.15) drop-shadow(0 0 16px rgba(0, 212, 255, 0.25))
               drop-shadow(0 0 40px rgba(0, 212, 255, 0.1));
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 32px rgba(0, 212, 255, 0.4))
               drop-shadow(0 0 60px rgba(0, 212, 255, 0.15));
    }
}

/* Responsive: smaller on mobile */
@media (max-width: 640px) {
    .hero-logo {
        height: 5.5rem;
    }
    .hero-logo-container {
        margin-bottom: 1.75rem;
    }
}
@media (min-width: 641px) and (max-width: 768px) {
    .hero-logo {
        height: 7rem;
    }
}

/* Reduced motion: show immediately, no animation */
@media (prefers-reduced-motion: reduce) {
    .hero-logo {
        animation: none;
        opacity: 1;
        transform: none;
        filter: brightness(1.15) drop-shadow(0 0 16px rgba(0, 212, 255, 0.25));
    }
    .hero-logo.glow-idle {
        animation: none;
    }
}

/* ============================================================================
   12b. HERO SECTION LAYOUT
   ============================================================================ */

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 7rem 1.5rem 3rem 1.5rem;
}

@media (max-width: 640px) {
    .hero-section {
        min-height: auto;
        padding: 5rem 0 2.5rem;
        align-items: flex-start;
    }
}

/* Hero keyword bar */
.hero-keywords {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted, #475569);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-keywords-dot {
    color: #334155;
}

@media (max-width: 640px) {
    .hero-keywords {
        font-size: 0.65rem;
        gap: 0.35rem;
        letter-spacing: 0.05em;
    }
}

/* ============================================================================
   13. FEATURE CARDS STAGGERED ANIMATION
   ============================================================================ */

@keyframes feature-fade-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: feature-fade-in 0.6s ease-out both;
}

/* Fallback for browsers that don't support animations */
@media (prefers-reduced-motion: reduce) {
    .feature-card {
        animation: none;
        opacity: 1;
    }
}

/* ============================================================================
   14. ÜBER MICH — Page Layout Components
   ============================================================================ */

/* Abschnitt-Label (Mono-Eyebrow über Section-Titeln) */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #334155;
    margin-bottom: 0.75rem;
}

/* --- Positionierung: Sidebar-Layout --- */
.profile-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

.sidebar-block {
    padding-top: 1rem;
    border-top: 1px solid rgba(30, 41, 59, 0.7);
}

.sidebar-block + .sidebar-block {
    margin-top: 1.25rem;
}

.sidebar-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 0.35rem;
}

.sidebar-value {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* --- Callout-Box --- */
.callout {
    border-left: 2px solid #00d4ff;
    background: rgba(0, 212, 255, 0.04);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    border-radius: 0 0.25rem 0.25rem 0;
}

.callout p {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.7;
}

.callout strong {
    color: #e2e8f0;
    font-weight: 600;
}

/* --- Anker-Grid (Hero: Prinzip / Fokus / Zielzustand) --- */
.anchor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.5rem;
    overflow: hidden;
}

.anchor-cell {
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border-right: 1px solid rgba(30, 41, 59, 0.8);
}

.anchor-cell:last-child {
    border-right: none;
}

@media (max-width: 640px) {
    .anchor-grid {
        grid-template-columns: 1fr;
    }
    .anchor-grid .anchor-cell {
        border-right: none;
        border-bottom: 1px solid rgba(30, 41, 59, 0.7);
    }
    .anchor-grid .anchor-cell:last-child {
        border-bottom: none;
    }
}

.anchor-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 0.4rem;
}

.anchor-value {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* --- Entscheidungsarchitektur: horizontale Steps --- */
.steps-section {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid rgba(30, 41, 59, 0.6);
    border-radius: 0.75rem;
    padding: 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.step-item {
    padding: 1.5rem 1.25rem 0.75rem 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.step-item:last-child {
    border-right: none;
}

.step-item::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 32px;
    height: 1px;
    background: rgba(0, 212, 255, 0.5);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: rgba(0, 212, 255, 0.4);
    margin-bottom: 0.6rem;
    letter-spacing: 0.1em;
}

.step-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.step-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.55;
}

/* --- Failure Modes: horizontale Karten --- */
.failure-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.5rem;
    border: 1px solid rgba(30, 41, 59, 0.6);
}

.failure-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
}

@media (max-width: 640px) {
    .failure-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .failure-card:nth-child(even) {
        border-right: none;
    }
    .failure-card {
        border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    }
    .failure-card:last-child {
        border-bottom: none;
    }
}

.failure-card {
    background: rgba(10, 15, 30, 0.7);
    border-right: 1px solid rgba(30, 41, 59, 0.5);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: background 0.15s ease;
}

.failure-card:hover {
    background: rgba(15, 23, 42, 0.9);
}

.failure-card:last-child {
    border-right: none;
}

.failure-index {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: rgba(185, 50, 38, 0.75);
}

.failure-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.3;
}

.failure-desc {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.55;
}

.failure-verdict {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(185, 50, 38, 0.5);
}

.failure-verdict p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.7;
}

/* --- Substanz: Metrics-Grid --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .metric-cell:nth-child(2) {
        border-right: none;
    }
    .metric-cell:nth-child(odd) {
        border-right: 1px solid rgba(30, 41, 59, 0.8);
    }
}

.metric-cell {
    padding: 1.5rem 1.25rem;
    border-right: 1px solid rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
    background: rgba(15, 23, 42, 0.5);
}

.metric-cell:last-child,
.metric-cell:nth-child(4n) {
    border-right: none;
}

.metric-value {
    font-family: var(--font-quote);
    font-size: 1.9rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}

.metric-context {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: #475569;
    letter-spacing: 0.05em;
}

/* --- Werdegang: Phasen-Timeline --- */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
    gap: 0;
}

.timeline-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #00d4ff, rgba(30, 41, 59, 0.5));
}

@media (max-width: 640px) {
    .timeline-grid {
        grid-template-columns: 1fr;
    }
    .timeline-grid::before {
        display: none;
    }
    .timeline-phase {
        border-left: 2px solid rgba(0, 212, 255, 0.3);
        padding-left: 1rem;
        padding-top: 0.5rem;
    }
    .timeline-phase::before {
        display: none;
    }
}

.timeline-phase {
    padding: 1.5rem 1.25rem 1rem 0;
    position: relative;
}

.timeline-phase::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00d4ff;
    border: 2px solid #020617;
}

.timeline-years {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: #475569;
    margin-bottom: 0.4rem;
}

.timeline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
}

.timeline-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.6;
}

/* --- Testimonials: horizontale Liste --- */
.testimonial-row {
    display: grid;
    grid-template-columns: 175px 1fr;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(30, 41, 59, 0.7);
    align-items: baseline;
}

.testimonial-row:last-child {
    border-bottom: 1px solid rgba(30, 41, 59, 0.7);
}

@media (max-width: 640px) {
    .testimonial-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.testimonial-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
}

.testimonial-role {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #475569;
    letter-spacing: 0.04em;
    line-height: 1.5;
    margin-top: 0.2rem;
}

.testimonial-quote {
    font-family: var(--font-quote);
    font-size: 0.95rem;
    font-style: italic;
    color: #94a3b8;
    line-height: 1.65;
    max-width: 500px;
}

/* --- Bildung & Zertifikate: 3-Spalten-Layout --- */
.edu-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.edu-col {
    padding-right: 2rem;
    border-right: 1px solid rgba(30, 41, 59, 0.7);
    position: relative;
}

.edu-col:not(:first-child) {
    padding-left: 2rem;
}

.edu-col:last-child {
    border-right: none;
}

@media (max-width: 640px) {
    .edu-cols {
        grid-template-columns: 1fr;
    }
    .edu-cols .edu-col {
        border-right: none;
        border-bottom: 1px solid rgba(30, 41, 59, 0.7);
        padding: 0 0 1.5rem 0;
        margin-bottom: 0.5rem;
    }
    .edu-cols .edu-col:last-child {
        border-bottom: none;
    }
}

.edu-col__title {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.01em;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.35);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.edu-col__years {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: #475569;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.6);
    margin-bottom: 0;
}

.edu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 1.1rem;
}

.edu-item {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(30, 41, 59, 0.5);
}

.edu-item:first-child {
    border-top: none;
    padding-top: 0;
}

.edu-item__name {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 0.15rem;
}

.edu-item__issuer {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #475569;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

/* ============================================================================
   15. UTILITY CLASSES (Inline-Style Replacements)
   ============================================================================ */

.img-constrained-sm {
    max-height: 20rem;
}

.img-constrained-lg {
    max-height: 24rem;
}

/* ============================================================================
   16. GLOSSAR TOOLTIP SYSTEM
   ============================================================================ */

/* Inline term styling – dezente gestrichelte Unterstreichung */
.glossar-term {
    border-bottom: 1px dashed rgba(0, 212, 255, 0.4);
    cursor: help;
    transition: border-color 0.15s ease;
}

.glossar-term:hover,
.glossar-term:focus-visible {
    border-bottom-color: rgba(0, 212, 255, 0.7);
}

.glossar-term:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Tooltip container */
.glossar-tooltip {
    position: absolute;
    z-index: 200;
    max-width: 320px;
    width: max-content;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}

.glossar-tooltip.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Arrow (above) */
.glossar-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(15, 23, 42, 0.97);
    border-right: 1px solid rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

/* Arrow (below) */
.glossar-tooltip--below::after {
    bottom: auto;
    top: -5px;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid rgba(30, 41, 59, 0.8);
    border-top: 1px solid rgba(30, 41, 59, 0.8);
}

/* Tooltip content */
.glossar-tooltip__name {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.glossar-tooltip__definition {
    color: #94a3b8;
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.glossar-tooltip__link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.15s ease;
}

.glossar-tooltip__link:hover {
    text-decoration: underline;
}

/* ============================================================================
   17. GLOSSAR PAGE
   ============================================================================ */

/* Cluster navigation jump links */
.glossar-cluster-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.glossar-cluster-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #94a3b8;
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(30, 41, 59, 0.8);
    border-radius: 0.25rem;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.glossar-cluster-link:hover {
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.05);
}

/* Glossar entry */
.glossar-entry {
    padding: 2rem 0;
    border-top: 1px solid rgba(30, 41, 59, 0.5);
}

.glossar-entry:first-child {
    border-top: none;
    padding-top: 0;
}

.glossar-entry__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.75rem;
}

.glossar-entry__definition {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 42rem;
    margin-bottom: 0.75rem;
}

.glossar-entry__usage {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #475569;
}

.glossar-entry__usage a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.15s ease;
}

.glossar-entry__usage a:hover {
    text-decoration: underline;
}
