/* css styles */

/* Hide all Quarto metadata (Author, Keywords, etc.) - for SEO only */
.quarto-title-meta-container,
.quarto-title-meta,
.quarto-title-meta-heading,
.quarto-title-meta-contents,
.quarto-title-meta-contents p,
dl.quarto-title-meta,
dt.quarto-title-meta-heading,
dd.quarto-title-meta-contents,
.keywords,
.block-title {
  display: none !important;
  visibility: hidden !important;
}

/* Shortcut for royal purple links */
.royal-link, .royal-link:visited {
  color: #b794f6 !important;  /* Lighter, more readable purple */
  text-decoration: underline;
}
.royal-link:hover, .royal-link:focus {
  color: #d4bbff !important;  /* Even lighter purple for hover */
}

/* Make Navy blue the primary color */
:root {
  --bs-blue: #3a5ba0 !important;           /* Muted blue: pairs well with black, cream, and purple */
  --bs-primary: #3a5ba0 !important;
  --bs-body-color: #fffbe9 !important;     /* Cream */
  --bs-emphasis-color: #fffbe9 !important;
  --bs-heading-color: #fffbe9 !important;
}

[data-bs-theme="dark"] {
  --bs-blue: #3a5ba0 !important;
  --bs-primary: #3a5ba0 !important;
  --bs-body-color: #fffbe9 !important;     /* Cream */
  --bs-emphasis-color: #fffbe9 !important;
  --bs-heading-color: #fffbe9 !important;
}

/* Cream text for all body and navbar */
body,
.text-body,
.navbar,
.navbar.navbar-dark,
.navbar a,
.navbar .navbar-brand {
  color: #fffbe9 !important;
}

/* Blurred window-like background with thin, equally spaced bars and blur effect */
body {
  background-color: #18181c !important; /* Set a dark base */
  background:
    repeating-linear-gradient(
      90deg,
      rgba(40,40,48,0.22) 0px,
      rgba(40,40,48,0.22) 2px,
      rgba(24,24,28,0.18) 2px,
      rgba(24,24,28,0.18) 12px
    ),
    linear-gradient(
      120deg,
      rgba(255,255,255,0.03) 0%,
      rgba(35,35,43,0.10) 100%
    );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Ensure dropdown summary text matches default text color */
details summary,
details summary span {
  color: #fffbe9 !important;
}

/* Enhanced link hover effects */
a.royal-link {
  transition: color 0.2s ease, transform 0.1s ease;
  display: inline-block;
}

a.royal-link:hover {
  transform: translateX(2px);
}

/* Smooth transitions for interactive elements */
.publication-list > div,
[style*="background: #2d3139"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.publication-list > div:hover,
[style*="background: #2d3139"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(120, 81, 169, 0.2);
  border-color: rgba(120, 81, 169, 0.6) !important;
}

/* Improved navbar styling */
.navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(24, 24, 28, 0.95) !important;
  border-bottom: 1px solid rgba(120, 81, 169, 0.3);
  padding: 0.8rem 1rem;
}

.navbar a:hover {
  color: #7851a9 !important;
  transition: color 0.2s ease;
}

/* Navbar icon styling */
.navbar .bi {
  font-size: 1.3rem;
  transition: all 0.2s ease;
}

.navbar a[aria-label]:hover .bi {
  color: #7851a9 !important;
  transform: scale(1.15);
}

.navbar-nav .nav-item {
  margin: 0 0.3rem;
}

/* Navbar right section spacing */
.navbar .navbar-nav.ms-auto {
  align-items: center;
  gap: 0.5rem;
}

/* Make navbar tagline italic */
.navbar .navbar-nav .nav-link:first-child,
.navbar .navbar-nav.ms-auto > li:first-child .nav-link {
  font-style: italic;
  opacity: 0.9;
}

/* Navbar line break and subtitle - hidden on desktop */
.navbar-break {
  display: none;
}

.navbar-subtitle {
  font-size: 1em;
}

/* Professional page layout spacing */
.quarto-title {
  margin-bottom: 2rem;
}

/* Badge and tag styling */
[style*="border-radius: 12px"] {
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

[style*="border-radius: 12px"]:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* Modern card styling with depth */
[style*="background: #2d3139"] {
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, #2d3139 0%, #262a32 100%) !important;
}

/* Subtle glow effect for interactive elements */
a[target="_blank"]:hover {
  text-shadow: 0 0 8px rgba(120, 81, 169, 0.5);
}

/* Enhanced profile image on home page */
img[alt="Adam Shepardson"] {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img[alt="Adam Shepardson"]:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(120, 81, 169, 0.5) !important;
}

/* Smooth page transitions */
.quarto-page-wrapper {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modern gradient overlays for highlighted sections */
[style*="background: rgba(120, 81, 169, 0.08)"],
[style*="background: rgba(120, 81, 169, 0.1)"] {
  position: relative;
  overflow: hidden;
}

[style*="background: rgba(120, 81, 169, 0.08)"]::before,
[style*="background: rgba(120, 81, 169, 0.1)"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transition: left 0.5s ease;
}

[style*="background: rgba(120, 81, 169, 0.08)"]:hover::before,
[style*="background: rgba(120, 81, 169, 0.1)"]:hover::before {
  left: 100%;
}

/* Improved scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #18181c;
}

::-webkit-scrollbar-thumb {
  background: #7851a9;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9370db;
}

/* Thin scrollbar for awards section */
[style*="max-height: 280px"]::-webkit-scrollbar {
  width: 6px;
}

[style*="max-height: 280px"]::-webkit-scrollbar-track {
  background: rgba(120, 81, 169, 0.1);
  border-radius: 3px;
}

[style*="max-height: 280px"]::-webkit-scrollbar-thumb {
  background: rgba(120, 81, 169, 0.4);
  border-radius: 3px;
}

[style*="max-height: 280px"]::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 81, 169, 0.6);
}


/* Comprehensive mobile responsiveness */
@media (max-width: 992px) {
  /* Home page profile section - keep three columns but allow horizontal scroll */
  .home-container > div:first-child > div {
    flex-direction: row !important;
    gap: 1.5rem !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

  /* Each column (picture, education, awards) should not shrink */
  .home-container > div:first-child > div > div {
    flex-shrink: 0 !important;
    min-width: 280px !important;
  }

  /* Restructure navbar: text on top, icons below, all centered */
  .navbar-nav.ms-auto {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100%;
  }

  /* Text takes full width and centers */
  .navbar .navbar-nav.ms-auto > li:first-child {
    width: 100% !important;
    order: 1;
    text-align: center !important;
  }

  /* Icons appear on next row, centered horizontally */
  .navbar .navbar-nav.ms-auto > li:not(:first-child) {
    order: 2;
  }

  /* Show line break and make subtitle smaller on mobile */
  .navbar-break {
    display: block !important;
  }

  .navbar-subtitle {
    font-size: 0.8em !important;
  }

  /* Adjust navbar text styling on mobile */
  .navbar .navbar-nav.ms-auto > li:first-child .nav-link {
    line-height: 1.3;
    text-align: center !important;
  }

  /* Center website title on mobile */
  .navbar-brand {
    margin: 0 auto !important;
  }

  /* Center mobile dropdown menu items */
  .navbar-collapse .navbar-nav {
    align-items: center !important;
  }

  .navbar-collapse .navbar-nav .nav-link {
    text-align: center !important;
  }

  .navbar-collapse .navbar-nav .dropdown-menu {
    text-align: center !important;
  }

  .navbar-collapse .navbar-nav .dropdown-menu .dropdown-item {
    text-align: center !important;
  }

  /* Grid layouts */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Reduce padding on mobile */
  [style*="padding: 2rem"],
  [style*="padding: 2.5rem"] {
    padding: 1.5rem !important;
  }

  /* Adjust font sizes */
  h1 {
    font-size: 1.8rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.2rem !important;
  }
}

@media (max-width: 576px) {
  /* Even smaller screens */
  .home-container > div {
    padding: 1rem !important;
  }

  [style*="padding: 1.8rem"] {
    padding: 1rem !important;
  }

  /* Make images responsive */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Adjust margins */
  [style*="margin-bottom: 2rem"] {
    margin-bottom: 1rem !important;
  }
}

/* Subtle entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.publication-list > div,
#github-repos > div > div {
  animation: fadeInUp 0.5s ease forwards;
}

/* Footer enhancements */
.page-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(120, 81, 169, 0.2);
}

.page-footer a {
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.page-footer a:hover {
  transform: scale(1.2);
  color: #9370db !important;
}

