/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background-color: #f3f4f6; /* gray-100 */
}
.dark ::-webkit-scrollbar-track {
    background-color: #1f2937; /* gray-800 */
}
::-webkit-scrollbar-thumb {
    background-color: #9ca3af; /* gray-400 */
    border-radius: 9999px; /* rounded-full */
}
.dark ::-webkit-scrollbar-thumb {
    background-color: #4b5563; /* gray-600 */
}
::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280; /* gray-500 */
}
.dark ::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280; /* gray-500 */
}

/* Disable transitions for scrollbar to prevent flickering */
::-webkit-scrollbar,
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
    transition: none !important;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Dark mode transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Link hover effect */
.link-hover {
    position: relative;
    display: inline-block;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.link-hover:hover::after {
    width: 100%;
}

/* Card hover effect */
.card-hover {
    transition: background-color 0.3s ease;
}

.card-hover:hover {
    /* transform: translateY(-4px); Removed for flat design */
}

/* Section heading decoration */
.section-heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background-color: #2c4f7c; /* Academic Blue */
    margin-right: 12px;
    vertical-align: middle;
}

/* Section link icon styles */
.section-title-container {
    position: relative;
}

.section-link-icon {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem; /* 14px */
    user-select: none;
}

/* Desktop: only show on hover */
@media (min-width: 768px) {
    .section-link-icon {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .section-title-container.group:hover .section-link-icon,
    .section-title-container:hover .section-link-icon {
        opacity: 1;
    }
}

/* Mobile: always show with reduced opacity */
@media (max-width: 767px) {
    .section-link-icon {
        opacity: 0.5;
    }

    .section-link-icon:active {
        opacity: 1;
    }
}
