/* ==========================================================================
   Custom Styles - Personal Website
   Big Tech Style: Clean, Modern, Minimalist
   ========================================================================== */

/* Base Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Body */
body {
    font-size: clamp(16px, 1vw, 18px);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Navigation Links */
.nav-link {
    position: relative;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4b5563;
    transition: color 0.2s ease;
}

.dark .nav-link {
    color: #9ca3af;
}

.nav-link:hover {
    color: #2563eb;
}

.dark .nav-link:hover {
    color: #60a5fa;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 0;
    color: #4b5563;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    padding-left: 1rem;
}

.dark .mobile-nav-link {
    color: #9ca3af;
}

.mobile-nav-link:hover {
    color: #2563eb;
    border-left-color: #2563eb;
    padding-left: 1.25rem;
}

.dark .mobile-nav-link:hover {
    color: #60a5fa;
    border-left-color: #60a5fa;
}

/* Language Selector */
.lang-selector {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.dark .lang-selector {
    background-color: #1f2937;
    color: #9ca3af;
    border-color: #374151;
}

.lang-selector:hover {
    background-color: #e5e7eb;
    border-color: #3b82f6;
}

.dark .lang-selector:hover {
    background-color: #374151;
    border-color: #60a5fa;
}

.lang-selector:focus {
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: #3b82f6;
}

/* Icon Buttons */
.icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: transparent;
    color: #4b5563;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.dark .icon-button {
    color: #9ca3af;
}

.icon-button:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.dark .icon-button:hover {
    background-color: #1f2937;
    color: #f9fafb;
}

.icon-button:active {
    transform: scale(0.95);
}

/* Theme Toggle Icons */
.dark .dark-icon {
    display: none;
}

.light-icon {
    display: none;
}

.dark .light-icon {
    display: block;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.875rem;
    font-weight: 500;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.dark .badge {
    background-color: #1e3a8a;
    color: #bfdbfe;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.dark .btn-secondary {
    color: #f9fafb;
    background-color: #111827;
    border-color: #374151;
}

.btn-secondary:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background-color: #f9fafb;
}

.dark .btn-secondary:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background-color: #1f2937;
}

/* Social Links */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    color: #6b7280;
    background-color: #f3f4f6;
    transition: all 0.2s ease;
}

.dark .social-link {
    color: #9ca3af;
    background-color: #1f2937;
}

.social-link:hover {
    color: white;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Section Title */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 2px;
}

/* Skill Cards */
.skill-card {
    padding: 1.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.dark .skill-card {
    background-color: #111827;
    border-color: #374151;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.dark .skill-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

/* Timeline */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1rem;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 2rem;
    bottom: -1rem;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6 0%, #e5e7eb 100%);
}

.dark .timeline-item:not(:last-child)::before {
    background: linear-gradient(180deg, #3b82f6 0%, #374151 100%);
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.dark .timeline-dot {
    border-color: #030712;
}

.timeline-content {
    padding: 1.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.dark .timeline-content {
    background-color: #111827;
    border-color: #374151;
}

.timeline-content:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.dark .timeline-content:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2563eb;
    background-color: #dbeafe;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.dark .tag {
    color: #bfdbfe;
    background-color: #1e3a8a;
}

.tag:hover {
    background-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.tag-sm {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
}

.dark .tag-sm {
    color: #9ca3af;
    background-color: #1f2937;
}

/* Project Cards */
.project-card {
    padding: 1.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    transition: all 0.3s ease;
    height: 100%;
}

.dark .project-card {
    background-color: #111827;
    border-color: #374151;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.dark .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

/* Contact Cards */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.dark .contact-card {
    background-color: #111827;
    border-color: #374151;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.dark .contact-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px 0 rgba(59, 130, 246, 0.5);
}

.scroll-top-btn:active {
    transform: scale(0.95);
}

/* Fade-in Animation */
.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }

/* Mobile Menu Animation */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

/* Selection Color */
::selection {
    background-color: #3b82f6;
    color: white;
}

::-moz-selection {
    background-color: #3b82f6;
    color: white;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    body {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .no-print,
    nav,
    footer,
    .scroll-top-btn {
        display: none !important;
    }
}
