/* Clean, Minimalist & Professional Design Tokens */
:root {
    --bg-primary: #09090b;      /* Slate-black */
    --bg-secondary: #0f0f13;    /* Zinc-950 */
    --bg-card: #18181b;         /* Zinc-900 */
    --bg-terminal: #09090b;     /* True black */
    
    --border-color: #27272a;    /* Zinc-800 */
    --border-hover: #3f3f46;    /* Zinc-700 */
    
    --text-main: #fafafa;       /* Zinc-50 */
    --text-muted: #a1a1aa;      /* Zinc-400 */
    
    --accent-blue: #3b82f6;     /* Royal blue */
    --accent-blue-rgb: 59, 130, 246;
    
    --text-green: #10b981;      /* Success emerald */
    --text-red: #ef4444;        /* Danger red */
    --text-yellow: #f59e0b;     /* Alert amber */
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    line-height: 1.7; /* Increased for breathing room */
}

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

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Reusable Layout Container */
.section-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 95px 24px; /* Increased from 70px for spacing */
}

.section-header {
    text-align: left;
    max-width: 800px;
    margin-bottom: 45px;
    border-left: 3px solid var(--accent-blue);
    padding-left: 20px;
}

.section-tag {
    font-family: var(--font-mono);
    color: var(--accent-blue);
    font-size: 13px; /* Increased from 12px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px; /* Increased from 1.5px */
    display: inline-block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 34px; /* Increased from 30px */
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 16px; /* Increased from 15px */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px; /* Increased padding */
    font-family: var(--font-sans);
    font-size: 14.5px; /* Increased size */
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(9, 9, 11, 0.95);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px; /* Increased from 14px */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 17px; /* Increased from 16px */
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 14px; /* Increased from 13.5px */
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 4px 0;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-blue);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
}

/* Jois Lab Navigation Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}
.nav-dropdown-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 200px;
    padding: 6px;
    z-index: 1001;
}

.nav-dropdown-content a {
    color: var(--text-muted);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
}
.nav-dropdown-content a:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.04);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 6px 4px;
}

.dropdown-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4b5563;
    padding: 4px 12px;
    display: block;
}

.dropdown-placeholder {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

/* Hero / About Section */
.hero-section {
    padding-top: 150px; /* Increased spacing */
    padding-bottom: 90px;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: flex-start;
}

/* Photo Styling - Professional Minimalist */
.hero-photo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.photo-card {
    width: 260px;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%) contrast(105%);
}

.hero-socials {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}
.hero-socials a {
    width: 100%;
    padding: 9px 12px; /* Increased from 8px */
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
}
.hero-socials a i {
    width: 16px;
    text-align: center;
}
.hero-socials a:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.02);
}

/* Hero Content Styling */
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background-color: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 4px;
    color: var(--text-green);
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 18px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-green);
    border-radius: 50%;
    display: inline-block;
}

.hero-title {
    font-size: 44px; /* Increased from 40px */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 19px; /* Increased from 18px */
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.hero-institution {
    font-size: 14px;
    color: var(--accent-blue);
    margin-bottom: 22px;
    font-weight: 500;
}
.hero-institution i {
    margin-right: 4px;
}

.hero-description {
    font-size: 16px; /* Increased from 15px */
    color: var(--text-muted);
    margin-bottom: 28px;
    max-width: 720px;
    line-height: 1.7; /* Increased for breathing room */
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 22px; /* Increased from 20px */
    font-weight: 700;
    color: var(--text-main);
}
.stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

/* Projects Grid Showcase */
.projects-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); /* Expanded width since there are 2 major cards */
    gap: 28px; /* Increased gap */
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Slightly more rounded */
    padding: 30px; /* Increased padding */
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    border-color: var(--border-hover);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.project-icon {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--accent-blue);
}

/* Ongoing & Completed Badges (Requirement 5: highly visible and styled) */
.project-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-badge.ongoing {
    background-color: #f59e0b; /* Solid amber */
    color: #09090b;            /* High-contrast black */
}
.project-badge.ongoing i {
    font-size: 10px;
}

.project-badge.completed {
    background-color: #10b981; /* Solid emerald green */
    color: #ffffff;
}

.project-title {
    font-size: 19px; /* Increased from 17px */
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-desc {
    font-size: 14.5px; /* Increased from 13.5px */
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.6;
}

.project-bullets {
    font-size: 13.5px; /* Increased from 13px */
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-left: 18px;
    list-style-type: disc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px; /* Space above button */
}
.project-tech span {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    padding: 3px 8px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
}

/* Skills Board Section */
.skills-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.skill-category {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 28px; /* Increased padding */
}

.category-title {
    font-size: 16px; /* Increased from 15px */
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.category-title i {
    color: var(--accent-blue);
    font-size: 15px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Increased gap */
}

.skill-tag {
    font-size: 13.5px; /* Increased from 13px */
    font-weight: 500;
    padding: 8px 14px; /* Increased padding */
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.skill-tag small {
    color: var(--text-muted);
    font-size: 10.5px;
    display: block;
    font-weight: 400;
    margin-top: 1px;
}

/* Academic Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 24px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px; /* Increased space */
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    z-index: 2;
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 28px; /* Increased padding */
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 6px;
    display: block;
}

.timeline-title {
    font-size: 18.5px; /* Increased from 17px */
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-institution {
    font-size: 14.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 12px;
}

/* Timeline score boxes (Requirement 2: separate boxes side-by-side) */
.timeline-score-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.timeline-score {
    display: inline-block;
    padding: 4px 12px; /* Increased padding */
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 13px; /* Increased from 12px */
    font-weight: 600;
}

.timeline-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.timeline-list {
    margin-top: 8px;
    padding-left: 16px;
    list-style-type: square;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* Chronological Competitive Ranks inside Pre-University (Requirement 3) */
.puc-ranks-container {
    margin-top: 18px;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.puc-ranks-header {
    font-weight: 600;
    color: var(--accent-blue) !important;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px !important;
}
.puc-ranks-header i {
    font-size: 13px;
}

/* Certifications Section Grid */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.cert-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px; /* Increased from 14px */
    display: flex;
    align-items: center;
    gap: 12px;
}
.cert-card:hover {
    border-color: var(--border-hover);
}

.cert-icon {
    width: 34px;
    height: 34px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent-blue);
}

.cert-details {
    flex: 1;
    text-align: left;
}
.cert-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}
.cert-authority {
    font-size: 11px;
    color: var(--text-muted);
}

.cert-link-icon {
    font-size: 11px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}
.cert-card:hover .cert-link-icon {
    color: var(--accent-blue);
}

/* Footer Area */
.footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding-top: 70px; /* Increased */
    padding-bottom: 35px;
}

.footer-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-header {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 40px auto;
}
.footer-header h2 {
    font-size: 26px; /* Increased */
    font-weight: 700;
    margin-bottom: 10px;
}
.footer-header p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin-bottom: 24px;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.footer-divider {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 24px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ====================================================================
   Predictive Failover Modal Overlay (Requirement 2)
   ==================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(16px);
    z-index: 2000;
    display: none; /* Hidden by default */
    overflow-y: auto;
    padding: 40px 16px;
    animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open {
    display: block;
}

.modal-content-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-header-title i {
    color: var(--accent-blue);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 26px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
    padding: 4px 10px;
    border-radius: 4px;
}
.close-modal-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.modal-overlay .failover-section {
    padding: 24px;
    border-bottom: none;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* ====================================================================
   Toast Notification Styling (Requirement 3)
   ==================================================================== */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    background-color: var(--bg-card);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    padding: 14px 20px;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification i {
    color: var(--accent-blue);
    font-size: 15px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================================================
   LeetCode Stats Link Styles (Requirement 4)
   ==================================================================== */
.clickable-stat {
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
    border-radius: 6px;
    padding: 12px;
    transition: var(--transition-fast);
}
.clickable-stat:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background-color: rgba(59, 130, 246, 0.02);
    transform: translateY(-2px);
}
.clickable-stat .stat-label i {
    opacity: 0;
    margin-left: 2px;
    transition: var(--transition-fast);
}
.clickable-stat:hover .stat-label i {
    opacity: 1;
    color: var(--accent-blue);
}

/* Failover Telemetry Widget CSS - Minimal Professional */
.failover-section {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.sim-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.sim-controls {
    grid-column: 1 / 2;
}

.sim-topology {
    grid-column: 2 / 3;
}

.sim-logs-card {
    grid-column: 1 / -1;
    padding: 0;
    background-color: transparent;
    border: none;
}

.sim-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sim-card-title i {
    color: var(--accent-blue);
    font-size: 14px;
}

.sim-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Telemetry Control slider */
.control-group {
    margin-bottom: 24px;
}
.control-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sim-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #27272a;
    outline: none;
    cursor: pointer;
}
.sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    transition: var(--transition-fast);
}

.slider-markers {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Status Panel */
.status-panel {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}
.status-label {
    color: var(--text-muted);
    font-weight: 500;
}
.status-value {
    font-weight: 600;
}

.badge-status {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    border: 1px solid;
}
.badge-status.ok {
    background-color: rgba(16, 185, 129, 0.05);
    color: var(--text-green);
    border-color: rgba(16, 185, 129, 0.15);
}
.badge-status.warn {
    background-color: rgba(245, 158, 11, 0.05);
    color: var(--text-yellow);
    border-color: rgba(245, 158, 11, 0.15);
}
.badge-status.failover {
    background-color: rgba(239, 68, 68, 0.05);
    color: var(--text-red);
    border-color: rgba(239, 68, 68, 0.15);
}

/* Actions buttons */
.sim-actions {
    display: flex;
    gap: 10px;
}

.btn-stress {
    flex: 1;
    background-color: rgba(239, 68, 68, 0.05);
    color: var(--text-red);
    border: 1px solid rgba(239, 68, 68, 0.15);
}
.btn-stress:hover {
    background-color: var(--text-red);
    color: #ffffff;
}

.btn-reset-sim {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-reset-sim:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* Topology Diagram status map (Minimal Professional) */
/* ====================================================================
   Horizontal Observe Topology Layout & SVG Pipelines
   ==================================================================== */
.topology-status-container.horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    height: 180px;
    overflow: hidden;
}

.topology-status-container.horizontal .topo-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    width: 130px;
    text-align: center;
    transition: var(--transition-fast);
}

.topology-status-container.horizontal .topo-node.active {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
}

.topology-status-container.horizontal .node-icon {
    font-size: 20px;
    color: var(--accent-blue);
}

.topology-status-container.horizontal .node-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    display: block;
}

.topology-status-container.horizontal .node-meta {
    font-size: 9px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* Link Pipelines */
.topo-pipeline {
    flex: 1;
    height: 30px;
    position: relative;
    margin: 0 8px;
}

.pipeline-svg {
    width: 100%;
    height: 100%;
}

.pipe-bg {
    stroke: #27272a;
    stroke-width: 3;
    fill: none;
}

.pipe-flow {
    stroke: var(--accent-blue);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 6 6;
    stroke-dashoffset: 120;
    opacity: 0.1;
    transition: stroke 0.3s ease, opacity 0.3s ease;
}

.pipe-flow.active {
    opacity: 1;
    animation: pipelineFlowAnim 1.8s linear infinite;
}

.pipe-flow.warn {
    stroke: var(--text-yellow);
    animation-duration: 0.9s;
}

.pipe-flow.success {
    stroke: var(--text-green);
    animation-duration: 0.6s;
}

/* Split Tree Pipeline */
.topo-pipeline-split {
    width: 80px;
    height: 100%;
    position: relative;
}

.pipeline-svg-split {
    width: 100%;
    height: 100%;
}

.pipe-bg-path {
    stroke: #27272a;
    stroke-width: 3;
    fill: none;
}

.pipe-flow-path {
    stroke: var(--accent-blue);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 6 6;
    stroke-dashoffset: 120;
    opacity: 0.1;
    transition: stroke 0.3s ease, opacity 0.3s ease;
}

.pipe-flow-path.active {
    opacity: 1;
    animation: pipelineFlowAnim 1.8s linear infinite;
}

.pipe-flow-path.warn {
    stroke: var(--text-yellow);
    animation-duration: 0.9s;
}

.pipe-flow-path.sync {
    stroke: var(--text-yellow);
    stroke-dasharray: 4 4;
    animation-duration: 1.2s;
    opacity: 0.6;
}

.pipe-flow-path.success {
    stroke: var(--text-green);
    animation-duration: 0.6s;
}

.pipe-flow-path.offline {
    stroke: var(--text-red);
    stroke-dasharray: none;
    opacity: 0.15;
    animation: none;
}

/* Targets stack */
.topo-targets-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 190px;
    justify-content: center;
}

.topo-targets-stack .topo-target-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    opacity: 0.4;
    transition: var(--transition-fast);
}

.topo-targets-stack .topo-target-node.active {
    opacity: 1;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
}

.topo-targets-stack .topo-target-node.backup-mode {
    opacity: 1;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.topo-targets-stack .node-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3f3f46;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.topo-targets-stack .topo-target-node.active .node-status-indicator {
    background-color: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

.topo-targets-stack .topo-target-node.backup-mode .node-status-indicator {
    background-color: var(--text-green);
    box-shadow: 0 0 8px var(--text-green);
}

.topo-targets-stack .topo-target-node.offline {
    border-color: rgba(239, 68, 68, 0.3);
    opacity: 0.5;
}

.topo-targets-stack .topo-target-node.offline .node-status-indicator {
    background-color: var(--text-red);
    box-shadow: 0 0 6px var(--text-red);
}

.target-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    text-align: left;
}
.target-ip {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
    display: block;
    text-align: left;
}

@keyframes pipelineFlowAnim {
    to {
        stroke-dashoffset: 0;
    }
}

/* Metric Display values */
.analytics-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Failover Observability widgets sizing */
.mini-metric {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
}
.metric-lbl {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: 600;
}
.metric-val {
    font-size: 16px;
    font-weight: 700;
    margin-top: 2px;
    display: block;
}

/* System Console Log Screen */
.console-log-box {
    background-color: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    height: 120px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.console-log-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.blink-dot {
    width: 5px;
    height: 5px;
    background-color: var(--accent-blue);
    border-radius: 50%;
}

.console-log-body {
    padding: 10px 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.log-line {
    line-height: 1.4;
}
.log-line.info { color: var(--text-muted); }
.log-line.success { color: var(--text-green); }
.log-line.warn { color: var(--text-yellow); }
.log-line.danger { color: var(--text-red); }

/* Mobile Nav Toggle / Responsiveness */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 32px;
        justify-items: center;
    }
    .hero-content {
        text-align: center;
        align-items: center;
    }
    .hero-badge {
        align-self: center;
    }
    .hero-socials {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .hero-socials a {
        width: auto;
    }
    .hero-stats {
        width: 100%;
    }
    .hero-actions {
        justify-content: center;
    }
    
    .simulator-grid {
        grid-template-columns: 1fr;
    }
    .sim-controls { grid-column: 1 / -1; }
    .sim-topology { grid-column: 1 / -1; }
    
    .topology-status-container.horizontal {
        overflow-x: auto;
        justify-content: flex-start;
        gap: 16px;
        padding: 16px;
    }
    .topology-status-container.horizontal .topo-node {
        min-width: 120px;
        flex-shrink: 0;
    }
    .topo-pipeline {
        min-width: 60px;
        flex-shrink: 0;
    }
    .topo-pipeline-split {
        min-width: 80px;
        flex-shrink: 0;
    }
    .topo-targets-stack {
        min-width: 170px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    .section-title {
        font-size: 24px;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        gap: 12px;
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-link.active::after {
        display: none;
    }
    .nav-dropdown {
        width: 100%;
        text-align: center;
    }
    .nav-dropdown-btn {
        margin: 0 auto;
        width: 100%;
        justify-content: center;
    }
    .nav-dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: rgba(255, 255, 255, 0.02);
        margin-top: 6px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
