/* Custom CSS for Wajahat Khan Portfolio */

:root {
    --primary-color: #ea580c;
    --secondary-color: #c2410c;
    --accent-color: #f97316;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-dark: #111827;
    --bg-light: #f9fafb;
    --gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --gradient-alt: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.text-gradient {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

/* Navigation */
#mainNav {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
}

#mainNav .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

#mainNav .navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
}

#mainNav .navbar-nav .nav-link:hover,
#mainNav .navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.apple-brand {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.apple-brand i {
    font-size: 1.2em;
    animation: pulse-subtle 3s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    max-width: 500px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-social {
    animation: fadeInUp 1s ease 0.8s both;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    margin-right: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    font-size: 1.5rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

/* Hero Animation */
.hero-image {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-animation {
    position: relative;
    width: 300px;
    height: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 15px;
    animation: typing 2s infinite;
}

.code-line:nth-child(1) { width: 80%; animation-delay: 0s; }
.code-line:nth-child(2) { width: 60%; animation-delay: 0.5s; }
.code-line:nth-child(3) { width: 90%; animation-delay: 1s; }
.code-line:nth-child(4) { width: 70%; animation-delay: 1.5s; }

@keyframes typing {
    0%, 50% { opacity: 0.3; }
    25% { opacity: 1; }
}

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

/* Floating animations for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

.orbit-element {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-element i {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.orbit-element:hover i {
    opacity: 1;
    transform: scale(1.2);
}

/* Tech visualization */
.tech-visualization {
    position: relative;
    height: 500px;
    width: 100%;
}

.floating-element {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.floating-element:hover {
    opacity: 1;
    transform: scale(1.1) !important;
}

/* Skills visualization */
.skills-visualization .skill-badge {
    transition: all 0.3s ease;
    animation: fadeInScale 0.8s ease forwards;
}

.skills-visualization .skill-badge:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.central-badge {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 3rem 0;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timeline-marker.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    animation: pulse-marker 2s ease-in-out infinite;
}

.timeline-marker.education {
    border-color: #4CAF50;
    color: #4CAF50;
}

@keyframes pulse-marker {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 99, 235, 0.5);
    }
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: calc(50% - 40px);
    margin: 0 40px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.timeline-header {
    margin-bottom: 1.5rem;
}

.timeline-title {
    color: var(--text-dark);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-company {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.timeline-period {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-description ul {
    margin: 0;
    padding-left: 1.2rem;
}

.timeline-description li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

.timeline-skills {
    margin-top: 1.5rem;
}

.skill-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

/* Mobile Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
    }
    
    .timeline-marker {
        left: 30px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
        margin-right: 0;
    }
}

/* Certification Cards */
.certification-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border: 2px solid transparent;
}

.certification-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.certification-card.featured-cert {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
}

.cert-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.cert-issuer {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.cert-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cert-skills {
    margin-top: auto;
}

.cert-tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0 4px 8px 0;
    transition: all 0.3s ease;
}

.featured-cert .cert-tag {
    background: var(--primary-color);
    color: white;
}

.cert-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.featured-cert .cert-tag:hover {
    background: var(--accent-color);
}

/* Sections */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-content {
    font-size: 1.125rem;
}

.about-stats .stat-item {
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0.1;
    z-index: 1;
}

/* Project Cards */
.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
    border: none;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: var(--gradient);
}

.project-card .card-body {
    padding: 2rem;
}

.project-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-card .card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.project-card .tech-stack {
    margin-bottom: 1.5rem;
}

.tech-tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Skills Section */
.skill-category {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    margin-bottom: 2rem;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.skill-tag {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.75rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: scale(1.05);
}

/* Contact Section */
.contact-item {
    padding: 2rem;
    text-align: center;
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
}

/* Page Header */
.page-header {
    background: var(--gradient);
    color: white;
    padding: 150px 0 100px;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Project Filters */
.project-filters .btn {
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.project-filters .btn.active,
.project-filters .btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .project-card .card-body {
        padding: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-image {
        margin-top: 3rem;
        height: 200px;
    }
    
    .code-animation {
        width: 250px;
        height: 150px;
        padding: 15px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styling */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

/* Custom Buttons */
.btn-primary {
    background: var(--gradient);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Utility Classes */
.text-light-50 {
    opacity: 0.5;
}

.bg-gradient {
    background: var(--gradient);
}

.bg-orange-light {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
}

.rounded-lg {
    border-radius: 1rem;
}

.shadow-custom {
    box-shadow: var(--shadow);
}

/* Experience Cards */
.experience-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.experience-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.apple-gradient {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

.commerce-gradient {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.spark-gradient {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.chevron-gradient {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.company-info {
    flex: 1;
    min-width: 0;
}

.company-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.job-period {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.experience-achievements {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.experience-achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.experience-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1em;
}

.experience-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.skill-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.skill-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Mobile responsiveness for experience cards */
@media (max-width: 768px) {
    .experience-card {
        padding: 1.5rem;
    }
    
    .experience-header {
        gap: 0.75rem;
    }
    
    .company-logo {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .company-name {
        font-size: 1.1rem;
    }
    
    .job-title {
        font-size: 1rem;
    }
    
    .job-period {
        font-size: 0.85rem;
    }
    
    .experience-achievements li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}
