/* Custom styles and animations */

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

/* Navigation link styles */
.nav-link {
    @apply text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 transition-colors duration-200 font-medium;
}

/* Fade in animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out;
}

/* Section transitions */
section {
    scroll-margin-top: 4rem;
}

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

::-webkit-scrollbar-track {
    @apply bg-gray-100 dark:bg-gray-800;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-300 dark:bg-gray-600 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400 dark:bg-gray-500;
}

/* Focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Form input transitions */
input,
textarea {
    transition: all 0.2s ease-in-out;
}

/* Button hover effects */
button,
a[role="button"] {
    transition: all 0.2s ease-in-out;
}

/* Dark mode transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Career timeline bullet points - consistent spacing and left alignment */
#career-timeline ul {
    text-align: left !important;
}

#career-timeline ul li {
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    text-align: left !important;
}

#career-timeline ul li > span:first-child {
    flex-shrink: 0;
    margin-right: 0.5rem;
    display: inline-block;
    text-align: left;
    width: auto;
}

#career-timeline ul li > span:last-child {
    flex: 1;
    display: inline-block;
    text-align: left !important;
}

/* Name animation - typewriter effect with blinking cursor */
#name-animation {
    display: inline-block;
    position: relative;
}

#name-animation.typing::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
    color: currentColor;
    display: inline-block;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Light mode improvements only */
html:not(.dark) body {
    background: linear-gradient(to bottom, #f1f5f9 0%, #fafbfc 100%);
}

html:not(.dark) #home {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 30%, #fafbfc 100%);
}

html:not(.dark) section:nth-child(even):not(#home) {
    background: linear-gradient(to bottom, #ffffff, #f5f7fa);
}

html:not(.dark) section:nth-child(odd):not(#home) {
    background: linear-gradient(to bottom, #f5f7fa, #f1f5f9);
}

html:not(.dark) nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(2, 132, 199, 0.08);
    border-color: #cbd5e1;
}

html:not(.dark) #career-timeline .bg-white {
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.12);
    border-color: #bae6fd;
    background: linear-gradient(135deg, #ffffff 0%, #f5f9fc 100%);
    border-left: 3px solid #0ea5e9;
}

html:not(.dark) .bg-white {
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
    background: linear-gradient(to bottom, #ffffff, #f5f7fa);
}

html:not(.dark) #tech-stack .bg-white {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9fc 100%);
    border-top: 2px solid #bae6fd;
}

html:not(.dark) .education-formal {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    border-left: 3px solid #0ea5e9;
}

html:not(.dark) .education-certificate {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9fc 100%);
    border-left: 3px solid #bae6fd;
}

html:not(.dark) #about {
    background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

html:not(.dark) #contact {
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
}

/* Timeline responsive styles */
#career-timeline {
    position: relative;
    min-height: 200px;
}

/* Mobile timeline gap spacers */
#career-timeline .timeline-gap {
    position: relative;
}

/* Vertical line segments in gap spacers (mobile) */
#career-timeline .timeline-line-segment {
    width: 2px !important; /* w-0.5 = 2px, ensure vertical */
    top: 0 !important;
    bottom: 0 !important;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

html:not(.dark) #career-timeline .timeline-line-segment {
    background-color: #60a5fa !important; /* blue-400 */
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

html.dark #career-timeline .timeline-line-segment {
    background-color: #4b5563 !important; /* gray-600 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Desktop vertical timeline line */
#career-timeline .timeline-line-vertical {
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

html:not(.dark) #career-timeline .timeline-line-vertical {
    background-color: #94a3b8 !important; /* gray-300 */
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
}

html.dark #career-timeline .timeline-line-vertical {
    background-color: #374151 !important; /* gray-700 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#career-timeline .timeline-card {
    position: relative;
}

@media (min-width: 768px) {
    #career-timeline .timeline-line-horizontal {
        display: none;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    #theme-toggle,
    #lang-toggle,
    #mobile-menu-btn {
        display: none;
    }
}
