/* =============================================================================
   AID-NP: AI-Data Networking Protocol - Custom Styles
   Professional infrastructure research theme | Palo Alto Research
   ============================================================================= */

/* Modern CSS Variables for AID-NP theming */
:root {
  /* Primary brand colors - trust, infrastructure, innovation */
  --primary-color: #1e40af;        /* Deep blue: trust, infrastructure */
  --primary-hover: #1d4ed8;         /* Brighter blue: interactive states */
  --primary-dark: #1e3a8a;          /* Darker blue: headers, accents */
  --primary-light: #dbeafe;         /* Light blue: backgrounds */
  
  /* Accent colors - AI/innovation */
  --accent-color: #0d9488;          /* Teal: AI innovation, forward-thinking */
  --accent-hover: #0f766e;          /* Darker teal: hover states */
  --accent-light: #ccfbf1;          /* Light teal: subtle highlights */
  
  /* Secondary & neutrals */
  --secondary-color: #64748b;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --text-on-primary: #ffffff;
  
  /* Backgrounds */
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #eff6ff;     /* Light blue accent bg */
  --background-card: #ffffff;
  --background-gradient-start: #1e40af;
  --background-gradient-end: #1e3a8a;
  
  /* Borders & shadows */
  --border-color: #e2e8f0;
  --border-color-hover: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.03);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  --gradient-subtle: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  --gradient-hero: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #0f172a 100%);
  
  /* Spacing & radii */
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-in-out;
  
  /* Component-specific */
  --card-border-width: 4px;
  --notification-border-width: 4px;
}

/* =============================================================================
   Base Styles & Reset
   ============================================================================= */

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove default focus outline, add custom accessible focus */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* =============================================================================
   Typography
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.title.is-1 {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

.title.is-3 {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2rem !important;
}

.title.is-3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.subtitle {
  color: var(--text-secondary);
  font-weight: 400;
}

/* =============================================================================
   Hero Section - AID-NP Branding
   ============================================================================= */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: var(--text-on-primary);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-body {
  padding: 5rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.hero .title {
  color: var(--text-on-primary) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem !important;
}

.hero .subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 400;
}

.hero .publication-authors {
  color: rgba(255, 255, 255, 0.95) !important;
  margin-bottom: 2rem;
}

.hero .publication-authors a {
  color: var(--accent-light) !important;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.hero .publication-authors a:hover {
  color: #ffffff !important;
  border-bottom-color: var(--accent-color);
}

.hero .eql-cntrb {
  color: rgba(255, 255, 255, 0.8) !important;
  display: block;
  margin-top: 0.5rem;
}

/* Hero buttons */
.hero .button {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(8px);
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.hero .button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero .button.is-primary {
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

.hero .button.is-primary:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

/* =============================================================================
   Publication Links (Action Buttons)
   ============================================================================= */

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.link-block {
  display: inline-flex;
}

.link-block a {
  margin: 0 !important;
  min-width: 120px;
  justify-content: center;
}

.button.is-dark {
  background: var(--text-primary) !important;
  color: white !important;
  border: none !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  background: var(--primary-color) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button .icon {
  margin-right: 0.5rem;
}

/* =============================================================================
   Content Sections
   ============================================================================= */

.section {
  padding: 4rem 1.5rem;
}

.section.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.content.has-text-justified {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: justify;
}

.content.has-text-justified p {
  margin-bottom: 1.5rem;
}

.content.has-text-justified strong {
  color: var(--text-primary);
  font-weight: 600;
}

.content.has-text-justified em {
  color: var(--accent-color);
  font-style: italic;
}

/* =============================================================================
   Notification Boxes (Key Challenge, Notes, etc.)
   ============================================================================= */

.notification {
  border-radius: var(--border-radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-left: var(--notification-border-width) solid;
  font-size: 1rem;
  line-height: 1.6;
}

.notification.is-info {
  background-color: var(--background-accent);
  border-left-color: var(--primary-color);
  color: var(--primary-dark);
}

.notification.is-info strong {
  color: var(--primary-dark);
}

.notification.is-warning {
  background-color: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.notification.is-warning strong {
  color: #92400e;
}

/* =============================================================================
   Component Cards (AI-SP, AI-RP, AI-IP, OWA, etc.)
   ============================================================================= */

.card,
.box {
  background: var(--background-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  border-top: var(--card-border-width) solid var(--accent-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover,
.box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-top-color: var(--primary-color);
}

.card .card-content,
.box .content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card .title.is-5,
.box .title.is-5 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.25rem !important;
  color: var(--text-primary);
}

.card .subtitle.is-6,
.box .subtitle.is-6 {
  font-size: 0.95rem !important;
  color: var(--accent-color) !important;
  font-weight: 600 !important;
  margin-bottom: 0.75rem !important;
}

.card p,
.box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Carousel item cards */
.results-carousel .item {
  background: var(--background-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  border-top: var(--card-border-width) solid var(--accent-color);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin: 1rem;
  transition: var(--transition);
}

.results-carousel .item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-top-color: var(--primary-color);
}

.results-carousel .item img {
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.results-carousel .subtitle {
  font-size: 1rem !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  margin-top: 0.5rem !important;
  line-height: 1.5 !important;
}

.results-carousel .subtitle strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

/* =============================================================================
   Lists & Ordered Lists (White Paper Outline)
   ============================================================================= */

.content ol {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
}

.content ol li {
  counter-increment: item;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.content ol li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.content ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.content ul li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.content ul li::marker {
  color: var(--accent-color);
  font-weight: 600;
}

/* =============================================================================
   Get Involved Section (Boxes with Icons)
   ============================================================================= */

.box.has-text-centered {
  text-align: center !important;
  padding: 2rem 1.5rem;
}

.box .icon.is-large {
  margin-bottom: 1rem;
}

.box .icon i {
  color: var(--accent-color);
  transition: var(--transition);
}

.box:hover .icon i {
  color: var(--primary-color);
  transform: scale(1.1);
}

.box .title.is-5 {
  font-size: 1.25rem !important;
  margin-bottom: 1rem !important;
  color: var(--text-primary);
}

.box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.box a.button {
  margin-top: 0.5rem;
}

/* =============================================================================
   BibTeX / Citation Section
   ============================================================================= */

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.bibtex-header .title {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.bibtex-header .title::after {
  display: none;
}

.copy-bibtex-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.copy-bibtex-btn:active {
  transform: translateY(0);
}

.copy-bibtex-btn.copied {
  background: #059669;
}

pre {
  background: var(--background-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: 0.85rem !important;
  overflow-x: auto;
  box-shadow: var(--shadow-inner);
  margin: 0;
}

code {
  background: transparent !important;
  color: var(--text-primary) !important;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important;
  font-size: 0.9em !important;
}

pre code {
  white-space: pre;
  word-break: normal;
  word-wrap: normal;
}

/* =============================================================================
   Footer
   ============================================================================= */

.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem 2rem;
  margin-top: 2rem;
}

.footer .content {
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: center;
}

.footer p {
  margin-bottom: 0.75rem;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-color);
}

.footer small {
  color: var(--text-light);
  display: block;
  margin-top: 0.5rem;
}

/* =============================================================================
   Scroll to Top Button
   ============================================================================= */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* =============================================================================
   More Works Dropdown
   ============================================================================= */

.more-works-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.more-works-btn {
  background: var(--background-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.more-works-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--background-secondary);
  border-color: var(--primary-color);
}

.more-works-btn .dropdown-arrow {
  transition: var(--transition);
  font-size: 0.8rem;
}

.more-works-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 420px;
  max-width: 90vw;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  max-height: 70vh;
  overflow-y: auto;
}

.more-works-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--background-secondary);
  position: sticky;
  top: 0;
  z-index: 1;
}

.dropdown-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--background-accent);
  color: var(--text-primary);
}

.works-list {
  padding: 0.5rem;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  margin-bottom: 0.5rem;
}

.work-item:hover {
  background: var(--background-accent);
  transform: translateX(4px);
}

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

.work-info {
  flex: 1;
  min-width: 0;
}

.work-info h5 {
  margin: 0 0 0.35rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.work-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.work-venue {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: 500;
  display: inline-block;
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.work-item .fas {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: var(--transition);
}

.work-item:hover .fas {
  color: var(--primary-color);
  transform: translateX(2px);
}

/* =============================================================================
   Video & Media Styling
   ============================================================================= */

.publication-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--background-secondary);
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.teaser video {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

/* Tablet */
@media screen and (max-width: 1024px) {
  .hero-body {
    padding: 4rem 2rem 3rem;
  }
  
  .more-works-dropdown {
    width: 380px;
  }
}

/* Mobile */
@media screen and (max-width: 768px) {
  :root {
    --border-radius: 10px;
    --border-radius-lg: 14px;
  }
  
  .hero-body {
    padding: 3rem 1rem 2.5rem;
  }
  
  .hero .title.is-1 {
    font-size: 2.25rem !important;
  }
  
  .publication-links {
    flex-direction: column;
    align-items: center;
  }
  
  .link-block a {
    width: 100%;
    max-width: 280px;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .title.is-3 {
    font-size: 1.5rem !important;
  }
  
  .content.has-text-justified {
    font-size: 1rem;
    text-align: left;
  }
  
  .columns:not(.is-multiline) > .column {
    flex-basis: 100% !important;
  }
  
  .card,
  .box,
  .results-carousel .item {
    margin: 0.5rem 0;
  }
  
  .bibtex-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .copy-bibtex-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* More Works - Mobile positioning */
  .more-works-container {
    bottom: 1.5rem;
    right: 1rem;
    top: auto;
  }
  
  .more-works-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .more-works-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
    bottom: calc(100% + 0.5rem);
    top: auto;
    max-height: 60vh;
  }
  
  .dropdown-header {
    padding: 1rem 1.25rem;
  }
  
  .work-item {
    padding: 0.875rem 1rem;
  }
}

/* Small mobile */
@media screen and (max-width: 480px) {
  .hero .title.is-1 {
    font-size: 1.875rem !important;
  }
  
  .hero .publication-authors {
    font-size: 0.95rem !important;
  }
  
  .button {
    font-size: 0.9rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  .content ol li {
    padding-left: 2.25rem;
    font-size: 0.95rem;
  }
  
  .content ol li::before {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
  }
}

/* Large desktop */
@media screen and (min-width: 1400px) {
  .container.is-max-desktop {
    max-width: 1152px;
  }
}

/* =============================================================================
   Animations
   ============================================================================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.hero,
.section {
  animation: fadeInUp 0.5s ease-out;
}

.hero {
  animation-delay: 0.1s;
}

.section:nth-child(2) { animation-delay: 0.15s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.25s; }
.section:nth-child(5) { animation-delay: 0.3s; }

/* Hover animations for interactive elements */
.button,
.card,
.box,
.work-item,
.copy-bibtex-btn {
  will-change: transform;
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
  .more-works-container,
  .scroll-to-top,
  .copy-bibtex-btn,
  .publication-links .button .icon {
    display: none !important;
  }
  
  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }
  
  .hero {
    background: #fff !important;
    color: #000 !important;
    padding: 2rem 0;
  }
  
  .hero .title,
  .hero .subtitle,
  .hero .publication-authors {
    color: #000 !important;
  }
  
  .card,
  .box,
  .notification {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  
  a {
    text-decoration: none;
    color: #000;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }
}

/* =============================================================================
   Accessibility Enhancements
   ============================================================================= */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000;
    --text-secondary: #000;
  }
  
  .card,
  .box {
    border-width: 2px;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 1001;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* =============================================================================
   Utility Classes
   ============================================================================= */

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-accent { color: var(--accent-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }
.bg-light { background-color: var(--background-secondary) !important; }

.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.transition { transition: var(--transition) !important; }

/* =============================================================================
   AID-NP Specific Component Enhancements
   ============================================================================= */

/* Component emoji icons */
.card .title.is-5::before,
.box .title.is-5::before {
  margin-right: 0.5rem;
  font-style: normal;
}

/* Protocol acronym badges */
.protocol-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  letter-spacing: 0.05em;
}

/* Section anchor links */
.section[id] {
  scroll-margin-top: 2rem;
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
