/* 
========================================================================
EventBridge Commerce: Enterprise Microservices Messaging Platform
Core Design System & Stylesheet (3D Apple-Style Design Edition)
========================================================================
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Custom Properties (Design System Tokens) */
:root {
    --font-sans: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Apple Space Gray Theme Colors */
    --bg-primary: #020205;          /* Deep Obsidian */
    --bg-secondary: #08080f;        /* Space Black */
    --bg-tertiary: #0e0e1b;         /* Apple Gray */
    --bg-card: rgba(14, 14, 27, 0.45);
    --bg-card-hover: rgba(22, 22, 43, 0.65);
    
    /* Borders & Neon Accents */
    --border-color: rgba(255, 255, 255, 0.045);
    --border-hover: rgba(56, 189, 248, 0.35);
    
    /* Neon Glow Palettes */
    --color-primary: #38bdf8;       /* Apple Sky Blue (Spring Boot) */
    --color-primary-glow: rgba(56, 189, 248, 0.15);
    --color-kafka: #818cf8;         /* Indigo (Kafka) */
    --color-kafka-glow: rgba(129, 140, 248, 0.15);
    --color-rabbitmq: #fb923c;      /* Orange (RabbitMQ) */
    --color-rabbitmq-glow: rgba(251, 146, 60, 0.15);
    
    /* High-contrast Status Colors */
    --color-success: #34d399;       /* Emerald */
    --color-success-glow: rgba(52, 211, 153, 0.15);
    --color-warning: #fbbf24;       /* Amber */
    --color-warning-glow: rgba(251, 191, 36, 0.15);
    --color-error: #f43f5e;         /* Rose Red */
    --color-error-glow: rgba(244, 63, 94, 0.15);

    /* Typography Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #475569;
    --text-link: #38bdf8;

    /* Spacing & Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Layout Constants */
    --max-width: 1280px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ambient space background effects */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 900px;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Grid coordinate backdrop overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.003) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.003) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* 3D Scroll Reveal Classes (Apple Style) */
.reveal {
    opacity: 0;
    transform: translate3d(0, 50px, 0) rotateX(8deg);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg);
}

/* 3D Hover Tilt Utility */
.tech-card, .resp-card, .benefit-card, .bullets-card, .diag-detail-card, .timeline-content {
    background: rgba(14, 14, 27, 0.4);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px) saturate(120%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
    transform-style: preserve-3d;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

/* Typography & Layout Utilities */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 8rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    scroll-margin-top: 80px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(2, 2, 5, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-kafka));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.95rem;
    color: #fff;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.nav-desktop {
    display: flex;
    gap: clamp(1rem, 2vw, 2.25rem);
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    margin: 0 clamp(1rem, 2vw, 2.5rem);
}

.nav-desktop a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
    transition: width var(--transition-normal);
}

.nav-desktop a:hover {
    color: var(--text-primary);
}

.nav-desktop a:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.35rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #0284c7);
    color: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7dd3fc, #0284c7);
    transform: translateY(-2px) translateZ(10px);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.5);
}

#header-cta-btn,
#mobile-cta-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), #0284c7);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

#header-cta-btn:hover,
#mobile-cta-btn:hover {
    background: linear-gradient(135deg, #7dd3fc, #0284c7);
    transform: translateY(-1.5px) translateZ(5px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
}

#header-cta-btn:active,
#mobile-cta-btn:active {
    transform: translateY(0.5px) scale(0.97);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

/* Header Actions Wrapper */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Hamburger Menu Toggle Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hamburger Active Animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay Drawer */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(2, 2, 5, 0.98);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border-color);
    z-index: 99;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding: 2rem;
}

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--text-primary);
}

.mobile-cta-btn {
    margin-top: 1.5rem;
    width: 80%;
    max-width: 300px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) translateZ(10px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 40%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content .subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

.hero-content .description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.75rem;
    max-width: 550px;
    line-height: 1.75;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
}

/* Hero Static Visual Topology */
.hero-visual {
    background: rgba(4, 4, 10, 0.7);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    position: relative;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.hero-visual-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
}

.hero-visual-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    width: 130px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 2;
    transition: all var(--transition-normal);
}

.hero-visual-card.service {
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.hero-visual-card.kafka {
    border-left: 4px solid var(--color-kafka);
    background: rgba(129, 140, 248, 0.05);
    box-shadow: 0 4px 15px var(--color-kafka-glow);
}

.hero-visual-card.rabbitmq {
    border-left: 4px solid var(--color-rabbitmq);
    background: rgba(251, 146, 60, 0.05);
    box-shadow: 0 4px 15px var(--color-rabbitmq-glow);
}

.hero-visual-card.retry {
    border-left: 4px solid var(--color-warning);
    box-shadow: 0 4px 15px var(--color-warning-glow);
}

.hero-visual-card.dlq {
    border-left: 4px solid var(--color-error);
    box-shadow: 0 4px 15px var(--color-error-glow);
}

/* SVG Line overlays */
.hero-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-flow-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2.5;
    stroke-dasharray: 6 6;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 5rem auto;
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 50%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Executive Overview */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 4.5rem;
    align-items: center;
}

.overview-left h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.overview-left p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    line-height: 1.75;
}

.overview-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.benefit-card {
    border-radius: 14px;
    padding: 1.85rem;
}

.benefit-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.05), 0 0 20px rgba(0,0,0,0.3);
}

.benefit-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--color-primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--color-primary);
    font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.benefit-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Tech Stack Section (EXACT TECH STACK RULE) */
.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.tech-card {
    border-radius: 18px;
    padding: 3.25rem 2.5rem;
}

.tech-card.spring-boot:hover { border-color: var(--color-primary); box-shadow: 0 15px 35px rgba(56, 189, 248, 0.08); }
.tech-card.kafka:hover { border-color: var(--color-kafka); box-shadow: 0 15px 35px rgba(129, 140, 248, 0.08); }
.tech-card.rabbitmq:hover { border-color: var(--color-rabbitmq); box-shadow: 0 15px 35px rgba(251, 146, 60, 0.08); }

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.tech-card.spring-boot::before { background: var(--color-primary); }
.tech-card.kafka::before { background: var(--color-kafka); }
.tech-card.rabbitmq::before { background: var(--color-rabbitmq); }

.tech-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.25rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.tech-card.spring-boot .tech-icon-container { background: var(--color-primary-glow); color: var(--color-primary); }
.tech-card.kafka .tech-icon-container { background: var(--color-kafka-glow); color: var(--color-kafka); }
.tech-card.rabbitmq .tech-icon-container { background: var(--color-rabbitmq-glow); color: var(--color-rabbitmq); }

.tech-card h3 {
    font-size: 1.45rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.tech-card p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.75;
}

/* Architecture Overview Section */
.architecture-container {
    background: rgba(4, 4, 10, 0.5);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 3.5rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.45);
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    position: relative;
    padding: 2.5rem 0;
}

.diag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.diag-node {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.35rem 2.25rem;
    min-width: 190px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 5;
    position: relative;
    transition: all var(--transition-normal);
    letter-spacing: -0.01em;
}

.diag-node.client {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
}

.diag-node.service {
    border-top: 3px solid var(--color-primary);
    box-shadow: 0 4px 15px var(--color-primary-glow), 0 10px 20px rgba(0,0,0,0.3);
}

.diag-node.bus-kafka {
    border: 2px solid var(--color-kafka);
    background: var(--color-kafka-glow);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--color-kafka-glow);
}

.diag-node.bus-rabbitmq {
    border: 2px solid var(--color-rabbitmq);
    background: var(--color-rabbitmq-glow);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--color-rabbitmq-glow);
}

.diag-node.retry-node {
    border-top: 3px solid var(--color-warning);
    box-shadow: 0 4px 15px var(--color-warning-glow), 0 10px 20px rgba(0,0,0,0.3);
}

.diag-node.dlq-node {
    border-top: 3px solid var(--color-error);
    box-shadow: 0 4px 15px var(--color-error-glow), 0 10px 20px rgba(0,0,0,0.3);
}

.diag-connector-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.diag-arrow {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2.5;
    marker-end: url(#arrowhead);
    transition: stroke var(--transition-normal), stroke-width var(--transition-normal);
}

.diag-arrow.kafka-flow { stroke: var(--color-kafka); }
.diag-arrow.rabbitmq-flow { stroke: var(--color-rabbitmq); }
.diag-arrow.failure-flow {
    stroke: var(--color-error);
    stroke-dasharray: 6 6;
}

.diag-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
}

.diag-detail-card {
    border-radius: 14px;
    padding: 1.85rem;
}

.diag-detail-card h4 {
    font-size: 1.20rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diag-detail-card h4 span {
    color: var(--color-primary);
    font-weight: 800;
}

.diag-detail-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Responsibilities Section */
.responsibilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2rem;
}

.resp-card {
    border-radius: 18px;
    padding: 2.5rem;
}

.resp-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.05), 0 0 20px rgba(0,0,0,0.3);
}

.resp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.resp-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.resp-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: var(--color-primary-glow);
    color: var(--color-primary);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.resp-body {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    flex-grow: 1;
}

.resp-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.resp-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.resp-val {
    font-size: 0.98rem;
    color: var(--text-secondary);
}

.resp-val.failure {
    color: #fca5a5;
    background: rgba(244, 63, 94, 0.05);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(244, 63, 94, 0.15);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Messaging Flow Section */
.flow-layout {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.flow-block {
    background: rgba(4, 4, 10, 0.5);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 3rem;
}

.flow-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.flow-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flow-badge.kafka {
    background: var(--color-kafka-glow);
    color: var(--color-kafka);
    border: 1px solid rgba(129, 140, 248, 0.25);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.1);
}

.flow-badge.rabbitmq {
    background: var(--color-rabbitmq-glow);
    color: var(--color-rabbitmq);
    border: 1px solid rgba(251, 146, 60, 0.25);
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.1);
}

.flow-badge.failure {
    background: var(--color-error-glow);
    color: var(--color-error);
    border: 1px solid rgba(244, 63, 94, 0.25);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.1);
}

.flow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 1rem 0;
    overflow-x: auto;
}

.flow-step-node {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1.15rem 1.45rem;
    border-radius: 12px;
    text-align: center;
    min-width: 155px;
    font-size: 0.88rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

.flow-step-arrow {
    flex-grow: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 1rem;
    position: relative;
    min-width: 40px;
}

.flow-step-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--text-muted);
    border-right: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

.flow-block-desc {
    margin-top: 2.25rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ========================================================================
   Enhanced 3D Simulation Panel Elements (Apple Perspective Edition)
   ======================================================================== */
.simulation-panel {
    position: relative;
    background: rgba(4, 4, 10, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 24px;
    padding: 4rem 3rem 3rem 3rem;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 60px rgba(56, 189, 248, 0.04);
}

/* Custom macOS Header Console Window dots */
.simulation-panel::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 28px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 18px 0 0 #ffbd2e, 36px 0 0 #27c93f;
    z-index: 10;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.sim-controls-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.sim-controls {
    display: flex;
    gap: 1rem;
}

/* Console Speed Selector */
.speed-control-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(14, 14, 27, 0.65);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
}

.speed-control-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.speed-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.speed-btn:hover {
    color: var(--text-primary);
}

.speed-btn.active {
    background: var(--color-primary-glow);
    color: var(--color-primary);
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}

/* Timeline Stepper Component */
.sim-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 3.5rem;
    padding: 0 2rem;
}

.stepper-line {
    position: absolute;
    top: 17px;
    left: 3rem;
    right: 3rem;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.stepper-line-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-kafka) 50%, var(--color-rabbitmq));
    box-shadow: 0 0 8px var(--color-primary);
    transition: width var(--transition-normal);
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-normal);
}

.step-node.active .step-circle {
    border-color: var(--color-primary);
    background: var(--color-primary-glow);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.step-node.active .step-label {
    color: var(--text-primary);
}

.step-node.completed .step-circle {
    border-color: var(--color-success);
    background: var(--color-success-glow);
    color: var(--color-success);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.step-node.completed .step-label {
    color: var(--color-success);
}

.step-node.failed .step-circle {
    border-color: var(--color-error);
    background: var(--color-error-glow);
    color: var(--color-error);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.step-node.failed .step-label {
    color: var(--color-error);
}

.sim-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(14, 14, 27, 0.65);
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

.status-badge {
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* Badge States */
.status-healthy { color: var(--color-success); }
.status-healthy .status-dot { background: var(--color-success); box-shadow: 0 0 8px var(--color-success); }

.status-processing { color: var(--color-primary); }
.status-processing .status-dot { background: var(--color-primary); box-shadow: 0 0 8px var(--color-primary); }

.status-retrying { color: var(--color-warning); }
.status-retrying .status-dot { background: var(--color-warning); box-shadow: 0 0 8px var(--color-warning); }

.status-review { color: var(--color-error); }
.status-review .status-dot { background: var(--color-error); box-shadow: 0 0 8px var(--color-error); }

.status-completed { color: var(--color-kafka); }
.status-completed .status-dot { background: var(--color-kafka); box-shadow: 0 0 8px var(--color-kafka); }

.sim-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 2.5rem;
}

/* ========================================================================
   3D Isometric Perspective Elements (Apple Logic Board Renders)
   ======================================================================== */
.sim-visualization-wrapper {
    perspective: 1200px;
    perspective-origin: 50% 15%;
    background: rgba(1, 1, 3, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

/* Subtly rotated 3D canvas board */
.sim-visualization {
    background: radial-gradient(circle at 50% 50%, rgba(14, 14, 27, 0.6) 0%, transparent 100%);
    border: none;
    border-radius: 0;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 520px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(16deg) rotateY(-8deg) rotateZ(1.5deg);
    transition: transform var(--transition-slow);
}

/* Subtle mouse interaction tilt adjustment on board */
.sim-visualization-wrapper:hover .sim-visualization {
    transform: rotateX(10deg) rotateY(-5deg) rotateZ(1deg);
}

/* Simulator Node Styling with blinking status LEDs */
.sim-node {
    transform: translateZ(15px); /* Lift node visually off the board! */
    box-shadow: 0 12px 24px rgba(0,0,0,0.6);
}

/* The dynamic packet group hovering high above the board */
.sim-packet-group {
    transform-style: preserve-3d;
}

.sim-packet-group rect {
    transform: translateZ(30px); /* Lift packet even higher for depth! */
    filter: drop-shadow(0 15px 12px rgba(0, 0, 0, 0.7)); /* Strong shadow offset */
}

.sim-packet-group text {
    transform: translateZ(30px);
}

/* Simulator Node Styling */
.sim-nodes-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 5.5rem;
}

.sim-nodes-row:last-child {
    margin-bottom: 0;
}

.sim-node {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
    width: 135px;
    z-index: 5;
    transition: all var(--transition-normal);
}

/* Microscopic Server LED */
.sim-node::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 4px var(--text-muted);
    transition: all var(--transition-fast);
}

/* Glow ring border around active server */
.sim-node::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 16px;
    border: 2px solid transparent;
    pointer-events: none;
    transition: all var(--transition-normal);
}

.sim-node.active::after {
    border-color: var(--color-primary);
    animation: rotateGlow 1.5s linear infinite;
}

.sim-node.kafka-node.active::after { border-color: var(--color-kafka); }
.sim-node.rabbitmq-node.active::after { border-color: var(--color-rabbitmq); }

/* State highlights and blinking actions */
@keyframes blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.sim-node.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}
.sim-node.active::before {
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
    animation: blink 0.7s ease infinite;
}

.sim-node.kafka-node.active {
    border-color: var(--color-kafka);
    box-shadow: 0 0 25px rgba(129, 140, 248, 0.25);
}
.sim-node.kafka-node.active::before {
    background: var(--color-kafka);
    box-shadow: 0 0 8px var(--color-kafka);
}

.sim-node.rabbitmq-node.active {
    border-color: var(--color-rabbitmq);
    box-shadow: 0 0 25px rgba(251, 146, 60, 0.25);
}
.sim-node.rabbitmq-node.active::before {
    background: var(--color-rabbitmq);
    box-shadow: 0 0 8px var(--color-rabbitmq);
}

/* Shaking node (Poison message crash) */
.sim-node.error-state {
    border-color: var(--color-error) !important;
    background: rgba(244, 63, 94, 0.05);
    animation: shake 0.4s ease-in-out infinite;
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.4) !important;
}
.sim-node.error-state::before {
    background: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
    animation: blink 0.3s ease infinite;
}

.sim-node.warning-state {
    border-color: var(--color-warning) !important;
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.3) !important;
}
.sim-node.warning-state::before {
    background: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
    animation: blink 0.5s ease infinite;
}

.sim-node.success-state {
    border-color: var(--color-success) !important;
    box-shadow: 0 0 25px rgba(52, 211, 153, 0.3) !important;
}
.sim-node.success-state::before {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
}

/* SVG Overlays & Vectors */
.sim-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sim-path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.045);
    stroke-width: 2.5;
    transition: stroke var(--transition-normal), stroke-width var(--transition-normal);
}

.sim-path.active-path {
    stroke: var(--color-primary);
    stroke-width: 3.5;
}

.sim-path.active-path-kafka {
    stroke: var(--color-kafka);
    stroke-width: 3.5;
}

.sim-path.active-path-rabbitmq {
    stroke: var(--color-rabbitmq);
    stroke-width: 3.5;
}

.sim-path.active-path-failure {
    stroke: var(--color-error);
    stroke-width: 3.5;
    stroke-dasharray: 6 6;
    animation: dash 1s linear infinite;
}

/* Dynamic SVG Text Capsule */
.sim-packet-group {
    pointer-events: none;
}

.sim-packet-group rect {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

/* Sidebar: visual grid queues, broker partition log, monospace console */
.sim-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sim-panel-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.sim-panel-block h4 {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Kafka Broker Commit Logger Grid */
.kafka-broker-log {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.partition-col {
    background: rgba(3, 7, 18, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.partition-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--color-kafka);
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid rgba(129, 140, 248, 0.2);
    padding-bottom: 0.35rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.offset-record {
    background: rgba(129, 140, 248, 0.08);
    border: 1px solid rgba(129, 140, 248, 0.2);
    padding: 0.3rem;
    border-radius: 5px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* RabbitMQ Queue visual list buffer */
.rabbitmq-queue-box {
    background: rgba(3, 7, 18, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    min-height: 65px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 0.5rem;
}

.queue-card-slot {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.queue-card {
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-rabbitmq);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    animation: slideRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sim-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sim-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sim-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sim-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.sim-stat-val.healthy { color: var(--color-success); text-shadow: 0 0 10px rgba(52, 211, 153, 0.2); }
.sim-stat-val.warning { color: var(--color-warning); text-shadow: 0 0 10px rgba(251, 191, 36, 0.2); }
.sim-stat-val.error { color: var(--color-error); text-shadow: 0 0 10px rgba(244, 63, 94, 0.2); }

.console-log-panel {
    background: #020306;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.15rem;
    height: 180px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.65;
    color: #94a3b8;
}

.console-line {
    margin-bottom: 0.45rem;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
}

.console-line:hover {
    background: rgba(255, 255, 255, 0.01);
}

.console-timestamp {
    color: #475569;
    margin-right: 0.75rem;
    font-weight: 500;
}

.console-text.system { color: #38bdf8; }
.console-text.success { color: #34d399; }
.console-text.warning { color: #fbbf24; }
.console-text.error { color: #fb7185; }

/* Timeline Section (System Workflow) */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 2.5rem 0;
}

/* Beautiful color gradient timeline bar */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40px;
    width: 2.5px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-kafka) 50%, var(--color-rabbitmq) 100%);
    opacity: 0.25;
}

.timeline-item {
    display: flex;
    margin-bottom: 3.5rem;
    position: relative;
}

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

.timeline-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    z-index: 2;
    color: var(--color-primary);
    transition: all var(--transition-normal);
}

.timeline-item:hover .timeline-badge {
    border-color: var(--color-primary);
    background: var(--color-primary-glow);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.timeline-content {
    margin-left: 2rem;
    padding: 1.75rem 2rem;
    border-radius: 14px;
}

.timeline-item:hover .timeline-content {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.05);
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.timeline-content p {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Standalone portfolio section cards */
.standalone-portfolio-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Bullet list and grid styling */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.points-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.points-list li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.points-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-primary);
    font-weight: 800;
    text-shadow: 0 0 8px var(--color-primary);
}

.bullets-card {
    backdrop-filter: blur(20px) saturate(120%);
    padding: 2.25rem;
    border-radius: 16px;
    height: 100%;
}

.bullets-card h4 {
    margin-bottom: 1.25rem;
    color: var(--color-primary);
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

/* Footer Styling */
footer {
    background: #010103;
    padding: 5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 40%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0.5rem auto 0 auto;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-visual {
        min-height: 380px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .tech-stack-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sim-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .nav-desktop {
        display: none;
    }
    #header-cta-btn {
        display: none;
    }
    .hamburger-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4.5rem 0;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.35rem;
    }
    
    .nav-desktop {
        display: none; 
    }

    .diag-row {
        flex-direction: column;
        gap: 2rem;
    }
    
    .diag-connector-svg {
        display: none; 
    }

    .diag-node {
        width: 100%;
    }
    
    .diag-details {
        grid-template-columns: 1fr;
    }
    
    .responsibilities-grid {
        grid-template-columns: 1fr;
    }
    
    .flow-steps {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .flow-step-arrow {
        height: 20px;
        width: 2px;
        margin: 0.5rem 0;
    }
    
    .flow-step-arrow::after {
        top: auto;
        bottom: 0;
        right: -4px;
        transform: rotate(135deg);
    }
    
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-badge {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .timeline-content {
        margin-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    section {
        padding: 4rem 0;
    }
    .hero-content h1 {
        font-size: 2.25rem;
    }
    .hero-content .subtitle {
        font-size: 1.15rem;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .hero-cta .btn {
        width: 100%;
    }
    
    /* Header controls */
    .logo {
        font-size: 1.1rem;
    }
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    #header-cta-btn {
        padding: 4px 8px;
        font-size: 10.5px;
        height: 28px;
        border-radius: 5px;
    }

    /* Shrink visualizer node cards for mobile */
    .sim-node {
        width: 85px !important;
        padding: 0.65rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
    .sim-nodes-row {
        margin-bottom: 3.5rem !important;
    }
    
    .hero-visual-card {
        width: 80px !important;
        padding: 0.65rem 0.4rem !important;
        font-size: 0.65rem !important;
    }
    .hero-visual {
        min-height: 360px;
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    
    /* Shrink visual broker slots */
    .partition-col {
        padding: 0.4rem;
        min-height: 80px;
    }
    .partition-title {
        font-size: 0.65rem;
    }
    .offset-record {
        font-size: 0.55rem;
        padding: 0.2rem;
    }
    .rabbitmq-queue-box {
        min-height: 55px;
        padding: 0.5rem;
    }
    .queue-card {
        padding: 0.35rem 0.55rem;
        font-size: 0.65rem;
    }
    
    /* Shrink Stepper circles */
    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .step-label {
        font-size: 0.65rem;
    }
    .stepper-line {
        top: 13px;
        left: 1.5rem;
        right: 1.5rem;
    }
    
    .sim-header {
        flex-direction: column;
        align-items: stretch;
    }
    .sim-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .sim-controls {
        flex-direction: column;
    }
    .sim-controls .btn {
        width: 100%;
    }
    .speed-control-box {
        justify-content: center;
    }
    .sim-status-indicator {
        justify-content: center;
    }
    
    /* Layout columns */
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

