/* ===================================
   CSS VARIABLES (Custom Properties)
   =================================== */
/* Define color scheme and reusable values */
:root {
    --primary: #667eea;           /* Primary purple-blue color */
    --secondary: #764ba2;         /* Secondary purple color */
    --dark: #1a1a2e;             /* Dark color for text */
    --light: #f8f9fa;            /* Light background color */
    --accent: #00d4ff;           /* Accent cyan color */
}

/* ===================================
   BASE STYLES
   =================================== */
/* Reset and base body styling */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--dark);
    overflow-x: hidden;  /* Prevent horizontal scroll */
}

/* ===================================
   NAVIGATION BAR
   =================================== */
/* Sticky navigation at top of page */
.navbar {
    background: rgba(255, 255, 255, 0.95);  /* Semi-transparent white */
    backdrop-filter: blur(10px);             /* Blur effect for modern look */
    box-shadow: 0 2px 20px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: all 0.3s ease;               /* Smooth transitions */
}

/* Brand/Logo styling with gradient text */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;           /* Clip background to text (WebKit) */
    -webkit-text-fill-color: transparent;    /* Make text transparent to show gradient */
    background-clip: text;                   /* Standard property */
}

/* Navigation link styling */
.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    position: relative;                      /* For pseudo-element positioning */
    transition: color 0.3s ease;
}

/* Hover effect for nav links */
.nav-link:hover {
    color: var(--primary) !important;
}

/* Animated underline for nav links */
.nav-link::after {
    content: '';                             /* Empty content for line */
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;                                /* Start with no width */
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);             /* Center the line */
}

/* Expand underline on hover */
.nav-link:hover::after {
    width: 80%;
}

/* ===================================
   HERO SECTION
   =================================== */
/* Full-screen hero section with gradient background */
.hero-section {
    min-height: 100vh;                       /* Full viewport height */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;                     /* Center content vertically */
}

/* Decorative SVG wave at bottom of hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* SVG wave pattern with low opacity */
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

/* Hero content positioned above decorations */
.hero-content {
    position: relative;
    z-index: 1;
    color: white;
}

/* Main hero title with animation */
.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;             /* Fade and slide up animation */
}

/* Hero subtitle with delayed animation */
.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;  /* 0.2s delay */
}

/* Hero buttons container with delayed animation */
.hero-buttons {
    animation: fadeInUp 1s ease 0.4s backwards;  /* 0.4s delay */
}

/* Keyframe animation for fade in and slide up effect */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);         /* Start 30px below */
    }
    to {
        opacity: 1;
        transform: translateY(0);            /* End at original position */
    }
}

/* ===================================
   CUSTOM BUTTONS
   =================================== */
/* Base button styling */
.btn-custom {
    padding: 12px 32px;
    border-radius: 50px;                     /* Fully rounded corners */
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid white;
}

/* Primary button style (white background) */
.btn-custom-primary {
    background: white;
    color: var(--primary);
}

/* Primary button hover effect */
.btn-custom-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);             /* Lift effect */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Outline button style (transparent background) */
.btn-custom-outline {
    background: transparent;
    color: white;
}

/* Outline button hover effect */
.btn-custom-outline:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===================================
   SECTION TITLES
   =================================== */
/* Common styling for section headings */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

/* Decorative underline for section titles */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ===================================
   CARD COMPONENTS
   =================================== */
/* Standard card styling with hover effect */
.card-custom {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;                            /* Fill parent height - KEEP THIS */
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Card hover effect - lift and enhance shadow */
.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Specific styling for "What I Do" service cards in About section only */
#about .card-custom {
    height: auto;                            /* Allow natural height based on content */
    min-height: 120px;                       /* Minimum height for consistency */
}

#about .card-custom .card-body {
    padding: 0.875rem 1rem;                  /* Compact padding */
}

#about .card-custom .card-body h5 {
    margin-bottom: 0.5rem;                   /* Minimal space below heading */
    font-size: 0.95rem;                      /* Smaller heading */
    font-weight: 600;
}

#about .card-custom .card-body p {
    margin-bottom: 0;                        /* No bottom margin */
    font-size: 0.825rem;                     /* Smaller text */
    line-height: 1.35;                       /* Tight line height */
}

#about .card-custom .card-body i {
    font-size: 1.1rem;                       /* Smaller icons */
}

/* Technical Specializations cards - make them more compact */
.card-custom .card-body h5 {
    font-size: 1rem;                         /* Smaller heading */
    margin-bottom: 0.75rem;
}

.card-custom .card-body p {
    font-size: 0.875rem;                     /* Smaller paragraph text */
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.card-custom .card-body .badge {
    font-size: 0.75rem;                      /* Smaller badges */
    padding: 0.25rem 0.5rem;
}

/* Availability Card specific styles in Contact section */
/* Only apply to the left column card (Open To card) */
#contact .col-lg-5 .card-custom {
    height: auto;                            /* Allow natural height based on content */
    max-height: 280px;                       /* Prevent card from being too tall */
}

/* Form card should remain full height */
#contact .col-lg-7 .card-custom {
    height: 100%;                            /* Full height for form card */
}

#contact .card-custom .card-body h6 {
    font-size: 1rem;                         /* Appropriate heading size */
    font-weight: 600;
}

#contact .card-custom .card-body ul li {
    font-size: 0.9rem;                       /* Compact list items */
    line-height: 1.8;                        /* Comfortable spacing */
}

#contact .card-custom .card-body .list-unstyled li {
    margin-bottom: 0.5rem;                   /* Reduce space between items */
}

#contact .card-custom .card-body .list-unstyled li:last-child {
    margin-bottom: 0;                        /* No margin on last item */
}

/* ===================================
   SKILL CARDS
   =================================== */
/* Gradient skill cards */
.skill-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    height: 100%;
    transition: all 0.3s ease;
}

/* Skill card hover effect - scale up */
.skill-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

/* Icon size in skill cards */
.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===================================
   PROJECT CARDS
   =================================== */
/* Project card container */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 350px;
}

/* Overlay that appears on hover */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;                              /* Hidden by default */
    transition: all 0.3s ease;
    padding: 2rem;
    color: white;
}

/* Show overlay on hover */
.project-card:hover .project-overlay {
    opacity: 1;
}

/* Project image styling */
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;                       /* Cover entire container */
}

/* ===================================
   TIMELINE
   =================================== */
/* Timeline container */
.timeline {
    position: relative;
    padding: 2rem 0;
}

/* Vertical line in center of timeline */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--primary);
    transform: translateX(-50%);
}

/* Individual timeline item */
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

/* Timeline content box */
.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    width: calc(50% - 40px);                 /* Half width minus spacing */
}

/* Alternate timeline items on right side */
.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

/* Dot marker on timeline */
.timeline-dot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid white;
    border-radius: 50%;                      /* Perfect circle */
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);  /* Outer glow */
}

/* ===================================
   STATS SECTION
   =================================== */
/* Statistics section with gradient background */
.stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 5rem 0;
}

/* Large number display in stats */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ===================================
   CONTACT FORM
   =================================== */
/* Form input styling */
.contact-form .form-control {
    border-radius: 10px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

/* Form input focus state */
.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);  /* Glow effect */
}

/* ===================================
   SOCIAL LINKS
   =================================== */
/* Social media icon buttons */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;                      /* Circular buttons */
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Social link hover effect */
.social-links a:hover {
    transform: translateY(-5px);             /* Lift effect */
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* ===================================
   FOOTER
   =================================== */
/* Footer styling */
footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0;
}

/* ===================================
   TECHNOLOGY BADGES
   =================================== */
/* Badges for technologies/skills */
.tech-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);    /* Light purple background */
    color: var(--primary);
    border-radius: 20px;
    margin: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Badge hover effect - invert colors */
.tech-badge:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */
/* Styles for tablets and mobile devices (max-width: 768px) */
@media (max-width: 768px) {
    /* Smaller hero title on mobile */
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Timeline adjustments for mobile */
    .timeline::before {
        left: 20px;                          /* Move line to left edge */
    }
    
    .timeline-content {
        width: calc(100% - 60px);            /* Full width minus space for dot */
        margin-left: 60px !important;        /* Indent all items */
    }
    
    .timeline-dot {
        left: 20px;                          /* Align dots with line */
    }
}