/* Centralized styles – homepage (mockup), list pages (articles), detail (articleDetail) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #38bdf8;
    --primary-light: #7dd3fc;
    --primary-dark: #0ea5e9;
    --secondary: #64748b;
    --accent: #f97316;
    --accent-light: #fed7aa;
    --light-bg: #020617;
    --light-bg-2: #020617;
    --light-bg-3: #020617;
    --text-dark: #e5e7eb;
    --text-main: #e5e7eb;
    --text-gray: #d1d5db;
    --text-light: #9ca3af;
    --text-muted: #9ca3af;
    --border: #1f2937;
    --success: #22c55e;
    --bg: #020617;
    --bg-elevated: #020617;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.16) 0, transparent 40%),
        #020617;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Background Visualizations */
.bg-visualization {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.18;
    z-index: 0;
    overflow: hidden;
}

.bg-visualization svg {
    width: 100%;
    height: 100%;
}

.otel-graph {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}
.otel-graph svg {
    display: block;
    width: 100%;
    height: 100%;
}
.otel-graph .dynamic-node {
    cursor: grab;
    pointer-events: auto;
}
.otel-graph .dynamic-node:active {
    cursor: grabbing;
}

/* Zwei Puls-Graphen (X/Y), aktiv bei schneller Mausbewegung – unter dem Graph damit Kanten sichtbar bleiben */
.graph-pulse-x,
.graph-pulse-y {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}
.graph-pulse-x {
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.14) 50%, transparent 100%);
    opacity: 0;
}
.graph-pulse-y {
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.14) 50%, transparent 100%);
    opacity: 0;
}
.otel-graph .graph-pulse-x.pulse-active {
    animation: graphPulseX 1.2s ease-out forwards;
}
.otel-graph .graph-pulse-y.pulse-active {
    animation: graphPulseY 1.2s ease-out forwards;
}
@keyframes graphPulseX {
    0% { opacity: 0; transform: scaleX(0.2); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: scaleX(1); }
}
@keyframes graphPulseY {
    0% { opacity: 0; transform: scaleY(0.2); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: scaleY(1); }
}

.service-node,
.dynamic-node {
    fill: var(--primary);
    opacity: 0.8;
    animation: pulse 3s ease-in-out infinite;
}

.service-edge,
.dynamic-edge {
    stroke: var(--primary);
    stroke-width: 1.5;
    opacity: 0.5;
    stroke-dasharray: 5,5;
    animation: dash 20s linear infinite;
}

.trace-particle {
    fill: var(--primary-light);
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.8));
}

@keyframes dash {
    to { stroke-dashoffset: -100; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.code-visualization {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.22;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--primary);
    line-height: 1.6;
    max-width: 300px;
}

.code-line {
    opacity: 0;
    animation: codeAppear 0.5s forwards;
}

@keyframes codeAppear {
    to { opacity: 1; }
}

.socio-tech-visual { opacity: 0.3; }
.person-node { fill: var(--success); opacity: 0.8; }
.tech-node { fill: var(--primary); opacity: 0.8; }
.connection-line {
    stroke: var(--text-gray);
    stroke-width: 2;
    opacity: 0.5;
    animation: connectionPulse 4s ease-in-out infinite;
}
@keyframes connectionPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.web3-network { opacity: 0.3; }
.p2p-node {
    fill: #dc2626;
    opacity: 0.9;
    animation: nodePulse 2s ease-in-out infinite;
}
.p2p-connection {
    stroke: #dc2626;
    stroke-width: 1.5;
    opacity: 0.6;
}
.message-particle {
    fill: #f59e0b;
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.8));
}
@keyframes nodePulse {
    0%, 100% { r: 4; opacity: 0.5; }
    50% { r: 6; opacity: 0.8; }
}

/* Navigation – sticky so list/detail work; hero has top padding */
nav {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1.25rem 5%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.8);
    padding: 1rem 5%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}
.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

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

.nav-links a:hover { color: var(--primary-light); }
.nav-links a:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 5% 4rem;
    position: relative;
    background:
        radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(248, 113, 113, 0.12), transparent 55%),
        #020617;
    overflow: hidden;
}

.hero-content {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    pointer-events: none;
}
.hero-content a,
.hero-content .btn {
    pointer-events: auto;
}
.hero-content:has(.hero-image) {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.hero-content .hero-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
}
.hero-content .hero-text {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(30, 64, 175, 0.2);
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-dark);
}
.hero h1 .highlight { color: var(--primary); position: relative; }
.hero .subtitle {
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    color: var(--text-gray);
    margin-bottom: 1.25rem;
    font-weight: 400;
}
.hero .description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}
.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-dark);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: rgba(15, 23, 42, 1);
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.5);
}
.btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
}

.article-card:focus-visible,
.service-card:focus-visible,
.expertise-card:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
}
.footer-section a:focus-visible,
.social-links a:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Section */
section {
    padding: 6rem 5%;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    position: relative;
    z-index: 1;
}
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* About */
.about {
    background: var(--light-bg-2);
    border-radius: 1.5rem;
    padding: 4rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}
.about-intro {
    font-size: 1.125rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 3rem;
    max-width: 900px;
    position: relative;
    z-index: 1;
}
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}
.expertise-card {
    background: rgba(15, 23, 42, 0.9);
    padding: 1.5rem 1.6rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
    border-color: var(--primary);
}
.expertise-card h3 {
    color: var(--primary-light);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}
.expertise-card p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}
.service-card {
    background: rgba(15, 23, 42, 0.9);
    padding: 2.3rem 2.4rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s;
}
.service-card:hover::before { transform: scaleY(1); }
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
    border-color: var(--primary);
}
.service-number {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(56, 189, 248, 0.14);
    color: var(--primary-light);
    border-radius: 0.5rem;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
}
.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}
.service-card p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Articles (homepage + list) */
.articles-container,
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-top: 2.5rem;
}
.articles-grid { margin-top: 2rem; }

.article-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
    border-color: var(--primary);
}

.article-header { margin-bottom: 0.4rem; }

.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary-light);
}
.article-category.firefighter {
    background: rgba(185, 28, 28, 0.45);
    color: #fef2f2;
}
.article-date {
    color: var(--text-light);
    font-size: 0.8rem;
}
.article-content {
    margin-top: 0.4rem;
}
.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    line-height: 1.4;
}
.article-card p {
    color: var(--text-gray);
    margin-bottom: 0.6rem;
    line-height: 1.6;
    font-size: 0.95rem;
}
.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.article-title {
    font-size: 1.2rem;
    font-weight: 600;
}
.article-excerpt {
    font-size: 0.95rem;
    color: var(--text-main);
}
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-light);
}

/* List page */
main {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 5% 4rem;
}
.page-header { margin-bottom: 3rem; }
.page-title {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin-bottom: 0.5rem;
}
.page-subtitle {
    color: var(--text-muted);
    max-width: 600px;
}

/* Detail page */
.layout {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 5% 4rem;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
}
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}
.back-link:hover { color: var(--primary-light); }
.back-link:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--primary-light);
    font-size: 0.8rem;
}

/* Article body (detail page) */
article .article-header { margin-bottom: 2rem; }
article .article-title {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin: 1rem 0 0.5rem;
}
article .article-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}
article .article-content {
    line-height: 1.9;
    font-size: 1rem;
    color: var(--text-main);
    margin-top: 0;
}
article .article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}
article .article-content p { margin: 0.8rem 0; }
article .article-content ul { margin: 0.8rem 0 0.8rem 1.2rem; }

.sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
}
.sidebar-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}
.sidebar-card a:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
.rating-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    margin-right: 0.4rem;
}

/* Firefighter section */
.firefighter-section {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-radius: 1.5rem;
    padding: 4rem;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
}
.firefighter-section .section-title {
    color: white;
    position: relative;
    z-index: 1;
}
.firefighter-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}
.firefighter-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: var(--light-bg-2);
    color: var(--text-dark);
    padding: 4rem 5% 2rem;
    margin-top: 6rem;
    border-top: 1px solid var(--border);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-section h3 { margin-bottom: 1rem; color: var(--text-dark); }
.footer-section p,
.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    line-height: 1.8;
}
.footer-section a:hover { color: var(--primary-light); }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Simple footer (list/detail) */
body:not(.home) footer {
    border-top: 1px solid var(--border);
    padding: 2rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    section { padding: 4rem 5%; }
    .about { padding: 2rem; }
    .hero { padding: 6rem 5% 3rem; }
    .hero-content:has(.hero-image) { flex-direction: column; }
    .hero-content .hero-image { margin: 0 auto; }
    .cta-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .code-visualization { display: none; }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
