/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */
/* Reset all default margins and paddings */
* {
    margin: 0;
    padding: 0;
    /* Include padding and border in element's total width/height */
    box-sizing: border-box;
    /* Set default font family */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Body styles */
body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6; /* Improve readability */
}

/* Main container for centering content */
.container {
    max-width: 1200px; /* Maximum width on large screens */
    margin: 0 auto; /* Center horizontally */
    padding: 0 20px; /* Padding on sides */
}

/* ============================================
   HEADER & NAVIGATION STYLES
   ============================================ */
header {
    background-color: #1a365d; /* Dark blue background */
    color: white;
    padding: 1rem 0; /* Vertical padding */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    position: sticky; /* Stick to top when scrolling */
    top: 0; /* Stick to top */
    z-index: 100; /* Ensure header stays above other elements */
}

/* Flex container for header content */
.header-content {
    display: flex;
    justify-content: space-between; /* Space between logo and nav */
    align-items: center; /* Center vertically */
}

/* Logo styling */
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4dabf7; /* Light blue color */
}

/* Span inside logo for different color */
.logo span {
    color: #ff6b6b; /* Red color */
}

/* Navigation list */
nav ul {
    display: flex;
    list-style: none; /* Remove bullet points */
}

/* Navigation list items */
nav ul li {
    margin-left: 2rem; /* Space between menu items */
}

/* Navigation links */
nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease; /* Smooth hover effect */
}

/* Navigation link hover and active states */
nav ul li a:hover, 
nav ul li a.active {
    background-color: #4dabf7;
    color: white;
}

/* Mobile menu button (hidden by default) */
.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   PAGE CONTENT STYLES
   ============================================ */
/* Page sections - hidden by default */
.page {
    display: none;
    animation: fadeIn 0.5s ease; /* Fade in animation */
}

/* Active page - visible */
.page.active {
    display: block;
}

/* Fade in animation keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   HERO SECTION STYLES
   ============================================ */
.hero {
    /* Gradient overlay on background image */
    background: linear-gradient(rgba(26, 54, 93, 0.85), rgba(26, 54, 93, 0.9)), 
                url('https://images.unsplash.com/photo-1620712943543-bcc4688e7485?ixlib=rb-4.0.3&auto=format&fit=crop&w=2065&q=80');
    background-size: cover; /* Cover entire area */
    background-position: center; /* Center image */
    color: white;
    text-align: center;
    padding: 5rem 1rem; /* Large padding */
    margin-bottom: 3rem;
    border-radius: 0 0 10px 10px; /* Rounded bottom corners */
}

/* Hero main heading */
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Hero subtitle */
.hero-subtitle {
    font-size: 1.5rem;
    color: #4dabf7; /* Light blue */
    margin-bottom: 0.5rem;
}

/* Hero paragraph */
.hero p {
    font-size: 1.2rem;
    max-width: 800px; /* Limit width for readability */
    margin: 0 auto 2rem; /* Center and add bottom margin */
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn {
    display: inline-block;
    background-color: #4dabf7;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Button hover effect */
.btn:hover {
    background-color: #339af0;
    transform: translateY(-3px); /* Lift effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   CONTENT SECTION STYLES
   ============================================ */
/* Section title with underline */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a365d;
    position: relative;
    padding-bottom: 0.5rem;
}

/* Underline effect for section titles */
.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #4dabf7;
}

/* ============================================
   CARD & GRID LAYOUT STYLES
   ============================================ */
/* Grid container for responsive card layouts */
.content-grid {
    display: grid;
    /* Auto-fit columns with minimum 300px width */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem; /* Space between grid items */
    margin-bottom: 3rem;
}

/* Card component */
.card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden; /* Prevent content from overflowing rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    transition: transform 0.3s ease; /* Smooth hover animation */
}

/* Card hover effect */
.card:hover {
    transform: translateY(-10px); /* Lift card on hover */
}

/* Card image/icon area */
.card-img {
    height: 200px;
    background-color: #4dabf7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* Card content area */
.card-content {
    padding: 1.5rem;
}

/* Card heading */
.card h3 {
    margin-bottom: 0.75rem;
    color: #1a365d;
}

/* ============================================
   PERSONAL INFO SECTION STYLES
   ============================================ */
.personal-info {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Grid layout for personal info items */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Individual info item */
.info-item {
    display: flex;
    align-items: center;
}

/* Icon styling for info items */
.info-item i {
    background-color: #4dabf7;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Circular icon */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* ============================================
   SKILLS SECTION STYLES
   ============================================ */
.skills-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Skill category container */
.skill-category {
    flex: 1; /* Take equal space */
    min-width: 300px; /* Minimum width before wrapping */
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Container for skill tags */
.skill-list {
    display: flex;
    flex-wrap: wrap; /* Allow tags to wrap */
    gap: 0.75rem; /* Space between tags */
    margin-top: 1rem;
}

/* Individual skill tag */
.skill-tag {
    background-color: #e7f5ff; /* Light blue background */
    color: #1a365d;
    padding: 0.5rem 1rem;
    border-radius: 50px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
}

/* Highlighted skill tag */
.skill-tag.highlight {
    background-color: #4dabf7;
    color: white;
}

/* ============================================
   EXPERIENCE TIMELINE STYLES
   ============================================ */
/* Timeline container */
.timeline {
    position: relative; /* Needed for the vertical line */
    max-width: 800px;
    margin: 0 auto 3rem; /* Center and add bottom margin */
}

/* Vertical line in the middle of timeline */
.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: #4dabf7;
}

/* Individual timeline item */
.timeline-item {
    display: flex;
    margin-bottom: 2rem;
}

/* Alternate timeline items (odd/even) */
.timeline-item:nth-child(odd) {
    flex-direction: row-reverse; /* Date on right, content on left */
}

/* Timeline content box */
.timeline-content {
    flex: 1; /* Take remaining space */
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative; /* Needed for the arrow */
}

/* Spacing for odd items */
.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 2rem;
}

/* Spacing for even items */
.timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
}

/* Arrow pointing to timeline */
.timeline-content:before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: white;
    transform: rotate(45deg); /* Create diamond shape */
}

/* Position arrow for odd items */
.timeline-item:nth-child(odd) .timeline-content:before {
    right: -10px;
}

/* Position arrow for even items */
.timeline-item:nth-child(even) .timeline-content:before {
    left: -10px;
}

/* Timeline date container */
.timeline-date {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 100px; /* Fixed width, don't grow or shrink */
    font-weight: 600;
    color: #4dabf7;
}

/* ============================================
   PROJECTS SECTION STYLES
   ============================================ */
.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Project header with dark background */
.project-header {
    background-color: #1a365d;
    color: white;
    padding: 1.5rem;
}

/* Project body/content */
.project-body {
    padding: 1.5rem;
}

/* Grid for project details */
.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* Individual project detail item */
.project-detail {
    display: flex;
    align-items: center;
}

/* Icon for project details */
.project-detail i {
    background-color: #e7f5ff;
    color: #4dabf7;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Container for tools/software tags */
.tools-used {
    display: flex;
    flex-wrap: wrap; /* Allow tags to wrap */
    gap: 0.5rem; /* Space between tags */
    margin-top: 1rem;
}

/* Individual tool tag */
.tool-tag {
    background-color: #e7f5ff;
    color: #1a365d;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ============================================
   CONTACT SECTION STYLES
   ============================================ */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* Contact info heading */
.contact-info h3 {
    margin-bottom: 1.5rem;
    color: #1a365d;
}

/* Contact details container */
.contact-details {
    margin-bottom: 2rem;
}

/* Individual contact item */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

/* Contact item icon */
.contact-item i {
    background-color: #4dabf7;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

/* Contact form input fields */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Contact form textarea specific styles */
.contact-form textarea {
    height: 150px;
    resize: vertical; /* Allow vertical resizing only */
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer {
    background-color: #1a365d;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Footer content container */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Social links container */
.social-links {
    display: flex;
    margin: 1.5rem 0;
}

/* Individual social link */
.social-links a {
    color: white;
    background-color: #2c4d80;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Social link hover effect */
.social-links a:hover {
    background-color: #4dabf7;
    transform: translateY(-3px);
}

/* Copyright text */
.copyright {
    color: #a5b4cb;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN MEDIA QUERIES
   ============================================ */

/* ============================================
   TABLET STYLES (768px and below)
   ============================================ */
@media (max-width: 768px) {
    /* Stack header content vertically */
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Adjust navigation for tablet */
    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap; /* Allow menu items to wrap */
        justify-content: center;
    }
    
    /* Adjust menu item spacing */
    nav ul li {
        margin: 0.25rem 0.5rem;
    }
    
    /* Reduce hero font sizes for tablet */
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Adjust timeline for tablet */
    .timeline:before {
        left: 30px; /* Move line to left side */
    }
    
    /* Stack timeline items vertically */
    .timeline-item {
        flex-direction: row !important; /* Override odd/even styles */
    }
    
    /* Adjust timeline date positioning */
    .timeline-date {
        flex: 0 0 80px;
        justify-content: flex-start; /* Align left */
    }
    
    /* Adjust timeline content margins */
    .timeline-content {
        margin-left: 3rem !important; /* Override odd/even styles */
        margin-right: 0 !important;
    }
    
    /* Position arrow on left side */
    .timeline-content:before {
        left: -10px !important;
        right: auto !important;
    }
}

/* ============================================
   MOBILE STYLES (480px and below)
   ============================================ */
@media (max-width: 480px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    /* Hide navigation by default on mobile */
    nav ul {
        display: none;
        width: 100%;
        flex-direction: column; /* Stack vertically */
        margin-top: 1rem;
    }
    
    /* Show navigation when toggled */
    nav ul.show {
        display: flex;
    }
    
    /* Adjust menu item spacing for mobile */
    nav ul li {
        margin: 0.5rem 0;
    }
    
    /* Reduce hero padding and font sizes */
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}