/* ==========================================================================
   CSS MAGICIAN: Teleradiology Presentation 2026
   Glassmorphism, Scroll Reveals, Premium Dark Theme
   ========================================================================== */

   :root {
    /* Color Palette - Dark Premium */
    --bg-base: #0a0c10;
    --bg-alt: #12151c;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    
    /* Neon Accents */
    --primary: #58a6ff;
    --secondary: #3fb950;
    --accent: #d2a8ff;
    --warning: #f0883e;
    --error: #f85149;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #58a6ff 0%, #3fb950 100%);
    --grad-brand: linear-gradient(135deg, #8a2be2 0%, #4a00e0 100%);
    --grad-1: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --grad-2: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
    --grad-3: linear-gradient(135deg, #4c1d95 0%, #8b5cf6 100%);
    --grad-4: linear-gradient(135deg, #7f1d1d 0%, #ef4444 100%);
  
    /* Glassmorphism */
    --glass-bg: rgba(22, 27, 34, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    
    /* Shadows & Effects */
    --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(88, 166, 255, 0.2);
    --backdrop-blur: blur(12px);
    
    /* Spacing & Layout */
    --nav-width: 80px;
    --section-pad: 120px 5%;
  }
  
  /* Light Theme Overrides (Toggled via JS) */
  body.light-theme {
    --bg-base: #f8fafc;
    --bg-alt: #f1f5f9;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-highlight: rgba(0, 0, 0, 0.02);
    --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(88, 166, 255, 0.1);
  }
  
  /* ==========================================================================
     GLOBAL RESET & BASE
     ========================================================================== */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    scroll-behavior: smooth;
    font-size: 16px;
  }
  
  body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
  }
  
  /* Selection */
  ::selection {
    background: var(--primary);
    color: #fff;
  }
  
  /* Custom Scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-base);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
  }
  
  /* ==========================================================================
     TYPOGRAPHY & UTILITIES
     ========================================================================== */
  h1, h2, h3, h4, h5 {
    line-height: 1.3;
    font-weight: 700;
  }
  
  .gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .text-primary { color: var(--primary); }
  .text-secondary { color: var(--secondary); }
  .text-accent { color: var(--accent); }
  .text-warning { color: var(--warning); }
  .text-error { color: var(--error); }
  
  .max-w-5xl { max-width: 1024px; }
  .max-w-6xl { max-width: 1152px; }
  .max-w-7xl { max-width: 1280px; }
  .mx-auto { margin-left: auto; margin-right: auto; }
  .mt-8 { margin-top: 2rem; }
  .mt-10 { margin-top: 2.5rem; }
  .mt-12 { margin-top: 3rem; }
  .mb-2 { margin-bottom: 0.5rem; }
  .mb-3 { margin-bottom: 0.75rem; }
  .mb-4 { margin-bottom: 1rem; }
  .mb-6 { margin-bottom: 1.5rem; }
  .mb-8 { margin-bottom: 2rem; }
  .mb-10 { margin-bottom: 2.5rem; }
  
  .grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  @media (min-width: 768px) {
    .grid-2col { grid-template-columns: 1fr 1fr; }
  }
  
  /* ==========================================================================
     BACKGROUND EFFECTS (GLASS & ORBS)
     ========================================================================== */
  .bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
  }
  
  .glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out alternate;
  }
  
  body.light-theme .glow-orb {
    opacity: 0.3;
    filter: blur(100px);
  }
  
  .orb-primary {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
  }
  
  .orb-secondary {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
  }
  
  .orb-tertiary {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: 40%;
    left: 40%;
    animation-duration: 25s;
    animation-delay: -10s;
  }
  
  .noise-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    mix-blend-mode: overlay;
  }
  
  @keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.05); }
    100% { transform: translate(-5%, -5%) scale(0.95); }
  }
  
  /* ==========================================================================
     NAVIGATION & TOPBAR
     ========================================================================== */
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .glass {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
  }
  
  .brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .brand-icon {
    color: var(--primary);
  }
  
  .actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  
  .author-credit {
    font-size: 0.8rem;
    opacity: 0.8;
    background: var(--glass-highlight);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
  }
  
  .icon-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  
  .icon-btn:hover {
    background: var(--glass-highlight);
    transform: scale(1.05);
  }
  
  body.light-theme .sun-icon { display: none; }
  body:not(.light-theme) .moon-icon { display: none; }
  
  /* Side Navigation */
  .side-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--nav-width);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 90;
  }
  
  .nav-progress-bar {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
    border-radius: 2px;
  }
  
  .nav-progress-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: var(--shadow-glow);
    transition: height 0.1s;
  }
  
  .nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
    padding-left: 10px;
  }
  
  .nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
  }
  
  .nav-links a:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    transform: scale(1.2);
  }
  
  .nav-links a.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.2);
  }
  
  /* Tooltip */
  .nav-links a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 35px;
    background: var(--bg-alt);
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
  }
  
  .nav-links a:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
  
  @media (max-width: 1024px) {
    .side-nav { display: none; }
    .presentation-wrapper { margin-left: 0 !important; }
  }
  
  /* ==========================================================================
     LAYOUT & SECTIONS
     ========================================================================== */
  .presentation-wrapper {
    margin-left: var(--nav-width);
  }
  
  .slide {
    min-height: 100vh;
    padding: var(--section-pad);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
  }
  
  .bg-alt {
    background-color: rgba(0, 0, 0, 0.15);
  }
  
  body.light-theme .bg-alt {
    background-color: rgba(0, 0, 0, 0.02);
  }
  
  .slide-content {
    width: 100%;
    opacity: 1; /* Managed by JS/reveal classes */
  }
  
  /* ==========================================================================
     COMPONENTS
     ========================================================================== */
  
  /* Glass Card / Panel */
  .glass-panel, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
  }
  
  .glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  }
  
  body.light-theme .glass-card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
  }
  
  .hover-glow {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .hover-glow:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.2);
  }
  
  /* Section Header */
  .section-header {
    margin-bottom: 3rem;
  }
  
  .section-number {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 12px;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
  }
  
  .section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
  }
  
  .section-lead {
    font-size: 1.125rem;
    color: var(--text-muted);
  }
  
  /* Hero Specifics */
  .kicker-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  .kicker {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
  }
  .kicker-line {
    height: 1px;
    width: 60px;
    background: var(--primary);
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.8;
  }
  
  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
  }
  
  .metric-card {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--glass-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
  }
  
  .metric-data h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
  }
  .metric-data p {
    font-size: 0.875rem;
    color: var(--text-muted);
  }
  
  .scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  
  .animate-bounce {
    animation: bounce 2s infinite;
  }
  
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
  }
  
  /* Styled Lists */
  .styled-list {
    list-style: none;
  }
  .styled-list li {
    padding-left: 1.5em;
    position: relative;
  }
  .styled-list li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
  }
  
  /* Timeline */
  .interactive-timeline {
    position: relative;
    padding: 2rem 0;
  }
  
  .timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
    transform: translateX(-50%);
  }
  
  .timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
  }
  
  .timeline-item.right-align {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
  }
  
  .timeline-content {
    width: calc(100% - 40px);
    padding: 1.5rem;
    position: relative;
  }
  
  .timeline-item:not(.right-align) .timeline-content {
    text-align: right;
  }
  
  .timeline-dot {
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 3px solid var(--primary);
    z-index: 2;
  }
  
  .highlight-dot {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(210, 168, 255, 0.5);
  }
  
  .target-dot {
    width: 20px;
    height: 20px;
    border-color: var(--secondary);
    background: var(--secondary);
    box-shadow: 0 0 20px rgba(63, 185, 80, 0.8);
  }
  
  .timeline-date {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
  }
  
  .right-align .timeline-date {
    color: var(--accent);
  }
  
  .bg-gradient-brand {
    background: var(--grad-primary);
    border: none;
  }
  
  /* Bento Grid */
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
  @media (min-width: 1024px) {
    .bento-grid {
      grid-template-columns: repeat(3, 1fr);
    }
    .span-2 {
      grid-column: span 2;
    }
  }
  
  /* Table */
  .glass-table-wrap {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
  }
  
  .badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
  }
  .badge-success {
    background: rgba(63, 185, 80, 0.2);
    color: #5de4c7; /* Adjusting for contrast */
    border: 1px solid rgba(63, 185, 80, 0.3);
  }
  .badge-error {
    background: rgba(248, 81, 73, 0.2);
    color: #ff7b72;
    border: 1px solid rgba(248, 81, 73, 0.3);
  }
  
  /* Cards & Viewpoints */
  .cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  @media (min-width: 768px) {
    .cols-2 { grid-template-columns: 1fr 1fr; }
  }
  
  .stakeholder-card {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .sh-header {
    padding: 1.5rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .sh-header h3 { font-size: 1.25rem; font-weight: 800; margin: 0;}
  .sh-role { font-size: 0.8rem; opacity: 0.9; }
  
  .bg-gradient-1 { background: var(--grad-1); }
  .bg-gradient-2 { background: var(--grad-2); }
  .bg-gradient-3 { background: var(--grad-3); }
  .bg-gradient-4 { background: var(--grad-4); }
  
  .action-steps .action-card {
    text-align: left;
    transition: transform 0.3s ease;
  }
  .action-steps .action-card:hover {
    transform: translateY(-5px);
    background: var(--glass-highlight);
  }
  
  /* ==========================================================================
     ANIMATION (Scroll Reveal via JS)
     ========================================================================== */
  .reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
  }
  
  .reveal-up { transform: translateY(40px); }
  .reveal-left { transform: translateX(-40px); }
  .reveal-right { transform: translateX(40px); }
  
  .reveal-active {
    opacity: 1;
    transform: translate(0, 0);
  }
  
  .delay-1 { transition-delay: 100ms; }
  .delay-2 { transition-delay: 200ms; }
  .delay-3 { transition-delay: 300ms; }
  .delay-4 { transition-delay: 400ms; }
  .delay-5 { transition-delay: 500ms; }
  
  /* Utilities */
  .flex { display: flex; }
  .items-center { align-items: center; }
  .justify-center { justify-content: center; }
  .gap-2 { gap: 0.5rem; }
  .gap-3 { gap: 0.75rem; }
  .p-4 { padding: 1rem; }
  .p-6 { padding: 1.5rem; }
  .p-8 { padding: 2rem; }
  .font-bold { font-weight: 700; }
  .font-black { font-weight: 900; }
  .text-sm { font-size: 0.875rem; }
  .text-lg { font-size: 1.125rem; }
  .text-xl { font-size: 1.25rem; }
  .text-2xl { font-size: 1.5rem; }
  .text-3xl { font-size: 1.875rem; }
  .text-4xl { font-size: 2.25rem; }
  .tracking-wider { letter-spacing: 0.05em; }
  .opacity-70 { opacity: 0.7; }
  .opacity-80 { opacity: 0.8; }
  .opacity-90 { opacity: 0.9; }
  .rounded-lg { border-radius: 0.5rem; }
  .rounded-xl { border-radius: 0.75rem; }
  .text-center { text-align: center; }
  
  /* Make sure timeline looks ok on mobile */
  @media (max-width: 768px) {
    .timeline-line { left: 24px; }
    .timeline-item { padding-right: 0; padding-left: 60px; justify-content: flex-start; }
    .timeline-item.right-align { padding-left: 60px; }
    .timeline-content { width: 100%; text-align: left !important; }
    .timeline-dot { left: 24px; }
  }
