/* ==========================================================================
   CUSTOM STYLES - Modern Academic Portfolio
   ========================================================================== */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for Webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-light);
}

/* Custom text selection */
::selection {
  background: var(--accent-blue-subtle);
  color: var(--accent-blue-dark);
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Smooth transitions for theme toggle */
.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  transition: transform 0.3s ease;
}

/* Publication entry styling */
.pub-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1em;
  padding: 1.5em;
  margin-bottom: 1.5em;
  background: var(--global-bg-color);
  border: 1px solid var(--global-border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.pub-row:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.pub-row .author {
  font-weight: 500;
  color: var(--global-text-color);
}

.pub-row .btn-group {
  display: flex;
  gap: 0.5em;
  margin-top: 1em;
  flex-wrap: wrap;
}

/* CV styling improvements */
.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-blue);
  color: var(--global-text-color);
  font-weight: 600;
}

.cv-entry {
  padding: 1em 0;
  border-bottom: 1px solid var(--global-border-color);
}

.cv-entry:last-child {
  border-bottom: none;
}

.cv-entry-title {
  font-weight: 600;
  color: var(--global-text-color);
  margin-bottom: 0.25em;
}

.cv-entry-subtitle {
  color: var(--accent-blue);
  font-size: $type-size-6;
  margin-bottom: 0.5em;
}

.cv-entry-details {
  color: var(--global-text-color-light);
  font-size: $type-size-6;
  line-height: 1.6;
}

/* Talk entries */
.talk-entry {
  padding: 1.25em;
  margin-bottom: 1.25em;
  background: var(--global-bg-color);
  border: 1px solid var(--global-border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.talk-entry:hover {
  border-color: var(--accent-blue);
  transform: translateX(4px);
}

/* Notice/alert boxes */
.notice {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--accent-blue);
  background: var(--accent-blue-subtle);
  border-radius: 0 $border-radius $border-radius 0;
  font-size: $type-size-6;
  line-height: 1.6;
}

.notice--warning {
  border-left-color: $warning-color;
  background: rgba(248, 148, 6, 0.1);
}

.notice--danger {
  border-left-color: $danger-color;
  background: rgba(238, 95, 91, 0.1);
}

.notice--success {
  border-left-color: $success-color;
  background: rgba(98, 196, 98, 0.1);
}

/* Card grid for portfolio items */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5em;
  margin: 2em 0;
}

.card {
  padding: 1.5em;
  background: var(--global-bg-color);
  border: 1px solid var(--global-border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.12);
  transform: translateY(-4px);
}

.card-title {
  font-weight: 600;
  color: var(--global-text-color);
  margin-bottom: 0.75em;
}

.card-text {
  color: var(--global-text-color-light);
  font-size: $type-size-6;
  line-height: 1.6;
}

/* Skill tags */
.skill-tag {
  display: inline-block;
  padding: 0.25em 0.75em;
  margin: 0.25em;
  font-size: $type-size-7;
  font-weight: 500;
  color: var(--accent-blue);
  background: var(--accent-blue-subtle);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: var(--accent-blue);
  color: #fff;
  transform: scale(1.05);
}

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

.animate-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Staggered animations for lists */
.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }
.animate-stagger > *:nth-child(7) { animation-delay: 0.7s; }
.animate-stagger > *:nth-child(8) { animation-delay: 0.8s; }

/* Mobile responsive adjustments */
@media screen and (max-width: 1023px) {
  .pub-row {
    flex-direction: column;
  }

  .pub-row .btn-group {
    margin-top: 0.75em;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  .masthead,
  .sidebar,
  .page__footer {
    display: none !important;
  }

  #main {
    margin-top: 0 !important;
  }
}
