/* Custom Styles for Dr. Shakeel Ahmad Portfolio */

/* ===== Base Styles ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Mobile First Approach - Larger Base Font */
@media (max-width: 768px) {
    html {
        font-size: 17px;
    }
    
    body {
        line-height: 1.6;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #16a34a 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Navigation Active State */
.nav-link.active,
.mobile-nav-link.active {
    background-color: #16a34a;
    color: white;
}

.nav-link:not(.active):hover,
.mobile-nav-link:not(.active):hover {
    background-color: rgba(22, 163, 74, 0.1);
}

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

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scale-in 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #16a34a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Form Focus States */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Skill Progress Animation */
.skill-progress {
    transition: width 1.5s ease-out;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Navbar Scroll State */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Success/Error Messages */
.alert-success {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Button Hover Effects */
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ===== MOBILE RESPONSIVE FIXES ===== */

/* Mobile Font Sizes - Larger Text */
@media (max-width: 768px) {
    /* Hero Section - Larger Fonts */
    #home h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    #home h1 span:first-child {
        font-size: 2.25rem !important;
    }
    
    #home h1 span:last-child {
        font-size: 1.75rem !important;
    }
    
    /* Subtitle */
    #home .text-lg,
    #home .text-xl {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Description text */
    #home .text-base {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Section Headings */
    section h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    /* Body text in cards */
    .text-muted-foreground,
    .text-gray-500,
    .text-gray-600 {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    /* Card titles */
    .font-semibold,
    .font-medium {
        font-size: 1rem !important;
    }
    
    /* List items */
    .text-sm {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* Navigation links */
    .nav-link,
    .mobile-nav-link {
        font-size: 1rem !important;
    }
    
    /* Buttons */
    button,
    .rounded-full {
        font-size: 1rem !important;
    }
    
    /* Contact info */
    #contact .text-gray-500 {
        font-size: 0.95rem !important;
    }
    
    /* Badge text */
    .rounded-full span,
    .text-xs {
        font-size: 0.85rem !important;
    }
}

/* Reduce Spacing on Mobile */
@media (max-width: 768px) {
    /* Section Padding */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    #home {
        min-height: auto !important;
        padding-top: 5rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Container Padding */
    .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Card Padding */
    .p-6 {
        padding: 1rem !important;
    }
    
    .p-10 {
        padding: 1.25rem !important;
    }
    
    /* Section Margins */
    .mb-12 {
        margin-bottom: 1.5rem !important;
    }
    
    .mb-8 {
        margin-bottom: 1rem !important;
    }
    
    .mb-6 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    .mt-8 {
        margin-top: 1rem !important;
    }
    
    .mt-6 {
        margin-top: 0.75rem !important;
    }
    
    /* Gap between elements */
    .gap-6 {
        gap: 1rem !important;
    }
    
    .gap-8 {
        gap: 1.25rem !important;
    }
    
    .gap-12 {
        gap: 1.5rem !important;
    }
    
    .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
    
    .space-y-8 > * + * {
        margin-top: 1.25rem !important;
    }
    
    .space-y-4 > * + * {
        margin-top: 0.75rem !important;
    }
    
    /* Hero Profile Image - Smaller on Mobile */
    #home .rounded-full.w-64,
    #home .rounded-full.h-64,
    #home .rounded-full.sm\\:w-80,
    #home .rounded-full.sm\\:h-80 {
        width: 200px !important;
        height: 200px !important;
    }
    
    /* Floating badges - Smaller and closer */
    .animate-float {
        transform: scale(0.85);
    }
    
    .absolute.-right-4,
    .absolute.-left-4 {
        right: 0 !important;
        left: auto !important;
    }
    
    /* Experience timeline items */
    .space-y-8 > div {
        margin-bottom: 0.75rem !important;
    }
    
    /* Skills grid */
    .grid.md\\:grid-cols-2 {
        gap: 0.75rem !important;
    }
    
    /* Education and Achievements grid */
    .grid.md\\:grid-cols-3 {
        gap: 0.75rem !important;
    }
    
    /* Footer */
    footer {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    footer .gap-8 {
        gap: 1rem !important;
    }
    
    /* Icon sizes */
    .w-12.h-12,
    .w-14.h-14,
    .w-16.h-16 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .w-6.h-6,
    .w-7.h-7,
    .w-8.h-8 {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    /* Contact Form */
    #contact form .space-y-4 > * + * {
        margin-top: 0.75rem !important;
    }
    
    /* Publications scrollable area */
    .max-h-96 {
        max-height: 300px !important;
    }
}

/* Extra Small Devices */
@media (max-width: 400px) {
    html {
        font-size: 16px;
    }
    
    #home h1 {
        font-size: 1.75rem !important;
    }
    
    section h2 {
        font-size: 1.5rem !important;
    }
    
    /* Even smaller profile image */
    #home .rounded-full {
        width: 160px !important;
        height: 160px !important;
    }
}

/* Print Styles */
@media print {
    nav, .animate-float, button[type="submit"] {
        display: none !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
