/*====================
   1. CORE VARIABLES & RESET
====================*/

/* Core styles and variables */
:root {
    --primary-color: #f4f4f4;      /* Light text color */
    --secondary-color: #ff5733;     /* Vibrant red-orange */
    --accent-color: #ff5733;        /* Matching accent */
    --text-color: #ffffff;          /* White text */
    --background-color: #2a2a2a;    /* Dark gray background */
    --card-background: #333333;     /* Slightly lighter gray for cards */
}

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;         /* Include padding in element width calculations */
}

/* Base body styles */
body {
    font-family: 'Inter', sans-serif;  /* Modern, clean font */
    line-height: 1.6;                  /* Improved readability */
    color: var(--text-color);
    background-color: var(--background-color);
}

/*====================
   2. NAVIGATION & HEADER
====================*/

/* Fixed navigation header */
header {
    position: fixed;                    /* Keeps header at top while scrolling */
    width: 100%;
    top: 0;
    background: rgba(42, 42, 42, 0.95); /* Semi-transparent background */
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);  /* Subtle shadow effect */
    z-index: 1000;                     /* Ensures header stays above other content */
}

nav ul {
    display: flex;                      /* Creates horizontal navigation */
    justify-content: center;            /* Center menu items */
    list-style: none;
    gap: 2rem;                         /* Modern spacing between items */
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;                   /* Semi-bold text */
    transition: color 0.3s ease;        /* Smooth color change on hover */
}

nav a:hover {
    color: var(--accent-color);         /* Color change on hover */
}

/*====================
   3. BIO SECTION
====================*/

/* Main bio layout */
.bio-section {
    display: grid;
    grid-template-columns: 1fr 1fr;     /* Creates two equal columns */
    min-height: 100vh;                  /* Full viewport height */
    padding-top: 80px;                  /* Space for fixed header */
}

/* Bio content container */
.bio-content {
    padding: 2rem;                      /* Spacing around content */
    gap: 1rem;                          /* Space between elements */
    display: flex;
    flex-direction: column;
    justify-content: center;            /* Centers content vertically */
}

/* Bio text styling */
.bio-content p {
    font-size: 1.1rem;
    line-height: 1.3;
    color: white;
    max-width: 600px;                   /* Limits width for readability */
    margin-top: 0.1rem;
    margin-bottom: 1rem;
    background: rgba(255, 87, 51, 0.1);  /* Semi-transparent orange background */
    border: 1px solid var(--secondary-color);
    padding: 0.2rem;
    border-radius: 15px;
}

.bio-content h1 {
    font-size: 3rem;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
}

/* Profile picture section */
.bio-image {
    background-color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;                 /* For social links positioning */
}

.profile-pic {
    width: 350px;
    height: 350px;
    border-radius: 50%;                 /* Creates circular shape */
    object-fit: cover;                  /* Maintains image aspect ratio */
    object-position: center 16%;        /* Fine-tuned image position */
    border: 4px solid black;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Skills section */
.skills-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.skill-category h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;                    /* Allows tags to wrap to next line */
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(255, 87, 51, 0.1);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;                /* Pill-shaped tags */
    font-size: 0.9rem;
    border: 1px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);        /* Slight lift effect */
}

/* Social links */
.social-links {
    position: absolute;
    bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: white;
    color: var(--secondary-color);
}

/*====================
   4. PROJECTS & REFERENCES
====================*/

/* Card styling */
.project-card,
.reference-card {
    background: var(--card-background);
    border-radius: 15px;                /* Rounded corners */
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);  /* Depth effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
}

/* Card hover effects */
.project-card:hover,
.reference-card:hover {
    transform: translateY(-10px);       /* Lift effect */
    box-shadow: 0 8px 30px rgba(255, 87, 51, 0.2); /* Glowing effect */
}

/* Card content text styling */
.project-card h3,
.reference-card h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p,
.reference-card p {
    color: #b0b0b0;                    /* Lighter text for descriptions */
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Technology tag container */
.tech-stack {
    display: flex;
    flex-wrap: wrap;                    /* Wrap tags to new line if needed */
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Individual technology tag styling */
.tech-tag {
    background: rgba(255, 87, 51, 0.2); /* Semi-transparent background */
    color: var(--secondary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--secondary-color);
}

/* Repository link button styling */
.repo-link {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    background: var(--secondary-color);
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Repository link hover effect */
.repo-link:hover {
    background: #ff6b4a;               /* Brighter orange on hover */
    transform: translateX(5px);         /* Slight shift right */
}

/* Section header styling */
h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-color);
}

/* Grid layout for projects and references */
.projects-grid,
.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 2rem;
    padding: 2rem;
}

/* Section padding */
.projects-section,
.references-section {
    padding: 4rem 2rem;
}

/* References section background */
.references-section {
    background: #222222;               /* Darker background for contrast */
}

/*====================
   5. ANIMATIONS & RESPONSIVE
====================*/

/* Fade-in animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Apply animations to cards */
.project-card,
.reference-card {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .bio-section {
        grid-template-columns: 1fr;    /* Stack bio sections on mobile */
    }

    .bio-content {
        padding: 2rem;                 /* Reduced padding on mobile */
    }

    .projects-grid,
    .reference-grid {
        grid-template-columns: 1fr;    /* Single column on mobile */
        padding: 1rem;
    }
    
    .tech-stack {
        justify-content: center;       /* Center tech tags on mobile */
    }
}

