/* Custom styles for portfolio */
.hero-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Timeline specific styles */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #e5e7eb, #d1d5db);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    min-height: 120px;
}

.timeline-content {
    width: calc(50% - 2rem);
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Left side items (odd) */
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 2rem;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: '';
    position: absolute;
    right: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Right side items (even) */
.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 8px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1rem;
    height: 1rem;
    background: #9ca3af;
    border: 4px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-item:hover .timeline-dot {
    background: #374151;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .timeline-line {
        left: 1.5rem;
    }
    
    .timeline-item {
        justify-content: flex-start !important;
        padding-left: 3rem;
    }
    
    .timeline-item .timeline-content {
        width: calc(100% - 3rem);
        margin: 0 !important;
        text-align: left !important;
    }
    
    .timeline-item .timeline-content::after {
        display: none;
    }
    
    .timeline-dot {
        left: 1.5rem;
    }
}

.tech-tag {
    background: rgba(115, 115, 115, 0.1);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #374151;
    transition: width 0.3s ease;
}

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

.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-fade-in.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Project status badges */
.status-completed {
    background-color: #dcfce7;
    color: #166534;
}

.status-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-planning {
    background-color: #fef3c7;
    color: #92400e;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animation delays for staggered reveals */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Publications page specific styles */
.publication-item {
    transition: all 0.3s ease;
}

.publication-item:hover {
    border-color: #d1d5db;
}

.filter-btn.active {
    background-color: #262626 !important;
    color: white !important;
    border-color: #262626 !important;
}

.filter-btn:hover:not(.active) {
    background-color: #262626;
    color: white;
    border-color: #262626;
}

/* Publication status badges */
.publication-item .status-published {
    background-color: #f3f4f6;
    color: #374151;
}

.publication-item .status-accepted {
    background-color: #fef3c7;
    color: #92400e;
}

.publication-item .status-in-press {
    background-color: #fed7aa;
    color: #9a3412;
}

.publication-item .status-under-review {
    background-color: #fee2e2;
    color: #dc2626;
}

/* BibTeX copy button feedback */
.copy-success {
    color: #059669 !important;
}

/* Details/Summary styling */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

/* Smooth expand/collapse for publication abstracts */
details[open] > summary ~ * {
    animation: slideDown 0.3s ease-out;
}

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

/* Blog specific styles */
.blog-post {
    transition: all 0.3s ease;
}

.blog-post:hover {
    border-color: #d1d5db;
}

.tag-card {
    transition: all 0.3s ease;
}

.tag-card:hover {
    transform: translateY(-2px);
}

/* Tag section highlighting */
.highlight-section {
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% { background-color: transparent; }
    50% { background-color: #f3f4f6; }
}

/* Newsletter form styles */
.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Sidebar sticky positioning */
.sidebar-sticky {
    position: sticky;
    top: 6rem;
}

/* Prose styles for content formatting */
.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h1 {
    color: #111827;
    font-weight: 800;
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 2rem;
    line-height: 1.111;
}

.prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.875rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.333;
}

.prose h3 {
    color: #111827;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.prose p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.prose a {
    color: #4f46e5;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #3730a3;
}

.prose strong {
    color: #111827;
    font-weight: 600;
}

.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875rem;
    background-color: #f3f4f6;
    padding: 0.25rem 0.375rem;
    border-radius: 0.25rem;
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.714;
    margin-top: 1.714rem;
    margin-bottom: 1.714rem;
    border-radius: 0.375rem;
    padding: 1rem;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.prose ul {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #e5e7eb;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6rem;
    margin-bottom: 1.6rem;
    padding-left: 1rem;
}

.prose img {
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    line-height: 1.714;
}

.prose thead {
    color: #111827;
    font-weight: 600;
    border-bottom-width: 1px;
    border-bottom-color: #d1d5db;
}

.prose th {
    vertical-align: bottom;
    padding-right: 0.571rem;
    padding-bottom: 0.571rem;
    padding-left: 0.571rem;
}

.prose td {
    vertical-align: baseline;
    padding-top: 0.571rem;
    padding-right: 0.571rem;
    padding-bottom: 0.571rem;
    padding-left: 0.571rem;
}
