/* =========================================
   1. Global Variables & Reset
   ========================================= */
:root {
    --bg-color: #F0F4F8;    
    --text-color: #2D3748;    
    --accent-color: #3182ce;  /* The Techy Blue */
    
    /* New Navigation Colors */
    --nav-bg: var(--accent-color); 
    --nav-text: #FFFFFF;      /* White text for contrast on blue */

    /* FONTS */
    --font-header: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.7;

    /* Flex column layout to enable sticky footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Forces body to be at least the height of the screen */
    
    /* Prevent horizontal scroll issues */
    overflow-x: hidden;
    width: 100%;

}

img {
    max-width: 100%;    /* Ensures image never overflows its container */
    height: auto;       /* Maintains aspect ratio */
    display: block;     /* Removes pesky bottom spacing */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}


/* =========================================
   2. Navigation Bar (Blue & Responsive)
   ========================================= */
.navbar {
    background-color: var(--nav-bg); /* Now using the Tech Blue */
    color: var(--nav-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    min-height: 50px; /* changed height to min-height to allow growth on mobile */
    box-shadow: 0 2px 10px rgba(50, 50, 93, 0.1); /* Subtle shadow for depth */
}

/* -- Left Side (Main Nav) -- */
.nav-left {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    padding: 8px 0;
    color: var(--nav-text); /* Force white text */
}

/* Hover Slide Effect (Now White) */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #FFFFFF; /* White underline looks best on blue */
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    opacity: 0.8; /* Slight fade instead of color change */
}

/* -- Right Side (Socials) -- */
.nav-right {
    display: flex;
    gap: 30px;
    align-items: center;
    
}

.nav-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85); /* Slightly transparent white */
    font-weight: 600;
}

.nav-text:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* =========================================
   3. Hero Section
   ========================================= */
.hero {
    text-align: center;
    padding: 80px 20px; /* Reduced top padding slightly */
    max-width: 1000px;
    margin: 0 auto;

    background: #FFFFFF;  /* Keep hero white for clean entrance */

    border-left: 2px solid #D1E7FF;
    border-right: 2px solid #D1E7FF;
    border-top: 2px solid #D1E7FF;
    border-bottom: 2px solid #D1E7FF;
}

.hero-text h1 {
    font-family: var(--font-header);
    font-size: 3.5rem;
    letter-spacing: -1px;
    margin-bottom: 15px;
    color: #1A202C;
}

.subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.4rem;
    color: #4A5568;
    margin-bottom: 10px;
}

.subtitle-small {
    font-family: var(--font-header);
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 50px;
}

/* -- Profile Picture Area -- */
.profile-container {
    margin: 40px auto;
    width: 280px;
    height: 280px;
    
}

.profile-placeholder {
    width: 180px;
    height: 180px;
    background-color: #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #A0AEC0;
    font-family: var(--font-header);
    font-weight: bold;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.profile-img {
    /* Responsive width - scales down on small screens */
    width:  280px;              /* Default size (desktop) */
    max-width: 70vw;           /* 👈 ADDED:  Never exceeds 70% of viewport width */
    
    /* Maintain 1:1 aspect ratio (perfect circle) */
    height: auto;              /* 👈 CHANGED: Auto height maintains aspect ratio */
    aspect-ratio: 1 / 1;       /* 👈 ADDED: Forces square shape (modern browsers) */
    
    /* Circular shape */
    border-radius: 50%;
    object-fit: cover;         /* Ensures image fills circle without distortion */
    
    /* Visual polish */
    border: 5px solid #FFFFFF;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    
    /* Centering */
    margin: 0 auto;
    display: block;            /* 👈 ADDED: Required for margin:  auto centering */
}

/* Center the image for devices smaller than 321px */
@media (max-width: 340px) {
    .profile-img {
        margin-left: 12px;
        margin-right: 160px;
        
    }
    /* Reduce profile-container vertical spacing */
    .profile-container {
        /* much smaller top/bottom space on tiny phones */
        margin: 12px auto;
        /* let contents size naturally on small screens */
        width: auto;
        height: auto;
    }
}

/* =========================================
   4. Blog Post Styling
   ========================================= */
.content-container {
    /* Add this property to push the footer down */
    flex: 1;
    max-width: 700px;
    margin: 60px auto;
    padding: 0 20px;
}

.blog-content h1 {
    font-family: var(--font-header);
    color: #2D3748;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.blog-content p {
    color: #4A5568;
    font-size: 1.125rem;
    margin-bottom: 1em;
}

/* style.css: Fix bullet (unordered/ordered list) indentation for blog content */
.blog-content ul,
.blog-content ol {
    margin-left: 1.5em;    /* for spacing from left */
    padding-left: 1.5em;   /* ensures the bullets/icons have room */
    list-style-position: outside;
}

.blog-content li {
    margin-bottom: 0.5em;  /* optional: extra space between bullet points */
}


/* =========================================
   5. Projects Section (Grid Layout)
   ========================================= */
.projects-grid {
    display: grid;
    /* The Magic Line: Fits as many 240px cards as possible, then wraps */
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); 
    gap: 30px;          /* Space between cards */
    padding: 20px 0;
}

.project-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px); /* Slight lift effect */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.project-title {
    font-family: var(--font-header);
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #2D3748;
}

.project-desc {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 20px;
}

/* Standard button style for "View Code" links */
.btn-link {
    display: inline-block;
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    
}

.project-card {
    display: flex;
    flex-direction: column; /* stack header, content, footer vertically */
    align-items: stretch;   /* make children fill width */

    /* If you keep a fixed height for visual consistency, keep it here.
       If you prefer cards to size naturally, remove/override this. */
    /* height: var(--project-card-height); */

    /* keep padding & box-sizing as before */
    padding: 25px;
    box-sizing: border-box;
}

/* card-content takes the available space between header and footer */
.card-content {
    flex: 1 1 auto; /* grow/shrink; crucial so footer sits at bottom */
    display: block; /* keep standard flow for text inside */
    overflow: visible; /* descriptions should flow naturally */
    margin-bottom: 0.5rem; /* small spacing before footer; tweak as needed */
}

/* Push footer to the bottom of the card */
.card-footer {
    margin-top: auto;       /* magic: pushes footer down */
    display: flex;
    gap: 12px;              /* space between buttons/links */
    align-items: center;    /* vertically center items inside footer */
    justify-content: flex-start; /* left align links/buttons */
    padding-top: 8px;       /* optional breathing room */
}

/* Make sure link-style buttons in footer are left aligned and consistent */
.card-footer .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Small screen tweak: if you previously forced card height on desktop,
   allow cards to size naturally on mobile but still keep footer at bottom. */
@media (max-width: 768px) {
    .project-card {
        /* if you had a fixed height, remove it on mobile (recommended) */
        height: auto !important;
    }
    .card-content {
        /* allow more breathing room on mobile */
        margin-bottom: 0.75rem;
    }
}

/* =========================================
   6. Mobile Responsiveness (Media Queries)
   ========================================= */
/* 
   This block applies ONLY when screen width is 768px or less 
   (typical tablet/mobile size)
*/
@media (max-width: 768px) {
    
    .navbar {
        /* STACKING CONCEPT: Switch from Row to Column */
        flex-direction: column; 
        height: auto;          /* Let height expand to fit stacked content */
        padding: 20px;
    }

    .nav-left {
        /* Center the links and stack them nicely */
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px; /* Add space between Nav and Socials */
        width: 100%;
    }

    .nav-right {
        /* Center the social links */
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-text h1 {
        font-size: 2.2rem; /* Smaller font so it fits on phone screens */
    }
    
    .subtitle {
        font-size: 1.1rem;
    }

    /* Reduce excessive spacing between navbar and hero content */
    .hero {
        padding: 30px 20px;     /* 👈 Reduced from 80px to 30px (top/bottom) */
    }



    /* Optimize CV Page on smaller devices */

    /* 1. Give the container more breathing room */
    .cv-container {
        padding: 20px;      /* Reduced from 40px to save space */
        margin: 20px auto;  /* Reduce outer margin */


        /* borders for the container  */
        border-top: 2px solid #D1E7FF;
        border-bottom: 2px solid #D1E7FF;
        border-left: 2px solid #D1E7FF;
        border-right: 2px solid #D1E7FF;
    }

    /* 2. Stack the Header (Title on top, Button on bottom) */
    .cv-header {
        flex-direction: column; /* Stacks items vertically */
        align-items: flex-start; /* Aligns them to the left */
        gap: 15px;              /* Adds space between title and button */
    }

    .cv-header h1 {
        font-size: 2rem;    /* Smaller font prevents wrapping/overflow */
        line-height: 1.2;
    }

    /* Make the button full-width for easy tapping */
    .btn-download {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    /* 3. Stack the Timeline (Date on top, Details on bottom) */
    .cv-item {
        flex-direction: column; /* Stack vertically */
    }

    .cv-date {
        min-width: auto;    /* Remove the forced 120px width */
        margin-bottom: 5px; /* Small gap below the date */
        color: var(--accent-color); /* Highlight the date slightly */
    }
    
    .cv-details ul {
        padding-left: 15px; /* Save space on indentation */
    }

    /* 👇 ADD THIS:  Fix containers that might cause overflow 👇 */
    .bio-summary {
        padding: 0 15px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .content-container {
        padding: 0 15px;
        max-width:  100%;
        overflow-x: hidden;
    }

}

/* =========================================
   Bio & Tech Stack Styling
   ========================================= */

/* The container for text */
.bio-summary {
    width: 100%;           /* 👈 CHANGED: Full-width (no white edges) */
    margin: 0;             /* 👈 CHANGED:   Remove margins */
    text-align: center;
    color: #2D3748;        /* 👈 CHANGED:   Darker text for better contrast */
    padding: 40px 20px 60px 20px;
    background: #E6F2FF;   /* 👈 CHANGED:  Light blue (branded feel) */
    border-radius:  0;
    
    /* borders for the container  */
    border-top: 2px solid #D1E7FF;
    border-bottom: 2px solid #D1E7FF;
    border-left: 2px solid #D1E7FF;
    border-right: 2px solid #D1E7FF;
}

.bio-summary a,
.content-container a {
    color: var(--accent-color);
    font-family: var(--font-header);
    font-weight: 700;             /* match headings/badges */
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    letter-spacing: 0.2px;
}

.bio-summary a:hover,
.bio-summary a:focus,
.content-container a:hover,
.content-container a:focus {
    color: #256bb5; /* slightly darker for hover feedback */
    border-color: rgba(49,130,206,0.25);
    transform: translateY(-1px);
}

.bio-summary a:focus-visible,
.content-container a:focus-visible {
    box-shadow: 0 0 0 3px rgba(49,130,206,0.12);
    border-color: var(--accent-color);
}

.bio-summary a:visited,
.content-container a:visited {
    color: rgba(49,130,206,0.85);
}



/* Keep bio content centered (text, sections, etc.) */
.bio-summary > *:not(.visual-break) {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* The "Hook" paragraph */
.bio-lead {
    font-size: 1.35rem; /* Slightly larger than normal text */
    color: #2D3748;     /* Darker color for emphasis */
    margin-bottom: 5px;
    font-weight: 400;
    
}

/* Section grouping for better organization */
.bio-section {
    margin:  20px 0;         /* Space between sections */
    text-align: left;       /* Left-align for better readability */
    max-width: 800px;       /* Slightly narrower for optimal reading */
    margin-left: auto;
    margin-right: auto;
}

/* Section headings (subtle but effective) */
.section-heading {
    font-family: var(--font-header);
    font-size: 1.5rem;             /* Smaller than h1, bigger than body */
    font-weight: 700;              /* Bold but not too heavy */
    color:  var(--accent-color);    /* Use your blue for consistency */
    margin-bottom: 15px;           /* Space below heading */
    margin-top: 0;                 /* No extra space above (controlled by . bio-section margin) */
    letter-spacing: 0.5px;         /* Slight spacing for elegance */
    position: relative;            /* For the underline effect */
    padding-bottom: 10px;          /* Space for the underline */
    text-align: center;            /* Center the section headings */
}

/* Optional: Add a subtle underline accent */
.section-heading::after {
    content: '';
    position: absolute;
    left: 50%;              /* 👈 CHANGED:  Center the underline */
    transform: translateX(-50%);  /* 👈 CHANGED:   Center the underline */
    bottom: 0;
    width: 80px;            /* 👈 CHANGED:   Longer line (was 60px) */
    height: 3px;            /* 👈 CHANGED:   Thicker line (was 3px at 0.3 opacity) */
    background: var(--accent-color);
    opacity: 1;             /* 👈 CHANGED:   Fully opaque (was 0.3) */
}

/* Adjust standard paragraphs inside sections */
.bio-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;             /* Slightly smaller than 1.25rem for better flow */
    line-height: 1.8;
    color: #4A5568;
}

/* Split Layout for the detailed bio section */
.bio-split {
    display: flex;
    align-items: center; /* Vertically centers the text with the image */
    gap: 60px;          /* Space between text and image */
    margin: 50px 0;
    text-align: left;   /* Left alignment is much easier to read for long text */
}

.bio-text-side {
    flex: 1; /* Takes up available space */
}

.bio-img-side {
    flex: 1; /* Takes up available space */
    display: flex;
    justify-content: center;
}

/* Styling for the new secondary image */
.action-img {
    width: auto;
    max-width: 150px; /* Prevents it from getting too huge */
    border-radius: 12px;
    max-height: 500px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg); /* A tiny tilt adds a modern, dynamic feel */
    transition: transform 0.3s ease;
    display: inline-block; 
}

.action-img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Fix for mobile devices: Stack the bio split vertically */
@media (max-width: 900px) {
    .bio-split {
        flex-direction: column-reverse; /* Put image on top of text on mobile */
        flex-direction: column;
        gap: 30px;
        
    }
    
    .bio-split {
        text-align: center; /* Revert to center on mobile */
    }

    .tech-stack {
        margin-bottom: 20px; /* Reduce margin on mobile */
    }
}


/* Standard paragraph spacing */
.bio-summary p {
    margin-bottom: 25px;
    font-size: 1.25rem;
    line-height: 1.8;
    
}

/* The Badge Container */
.tech-stack {
    display: flex;
    flex-wrap: wrap; /* Wraps to next line on phones */
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

/* Individual Badges */
.tech-badge {
    background-color: #EBF5FF;           /* 👈 CHANGED:  Light blue tint (was gray) */
    color: #2c5aa0;                      /* 👈 CHANGED:  Darker blue text (was dark gray) */
    padding: 8px 16px;                   /* 👈 CHANGED:  Slightly larger (was 6px 12px) */
    border-radius: 20px;                 /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-header);
    border: 1px solid #93aab8;           /* 👈 CHANGED: Blue border (was gray) */
    
    /* 👇 ADDED: Hover effect */
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background-color: #bee3f8;           /* Slightly darker on hover */
    transform: translateY(-2px);         /* Subtle lift */
    box-shadow: 0 4px 8px rgba(49, 130, 206, 0.2);
}



.visual-break {
    margin: 40px 0;      /* Generous space above and below */
    text-align: center;  /* Center the image and caption */

       
}

.break-img {
    width:  auto;         /* 👈 CHANGED:  Let width be automatic */
    max-width: 600px;    /* Still limit max width */
    max-height: 500px;   /* 👈 CHANGED: Use max-height instead of fixed height */
    height: auto;        /* 👈 ADDED: Let height scale naturally */
    border-radius: 12px; 
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.15); 
    margin: 0 auto 10px auto;  /* 👈 CHANGED: Center the image horizontally */
    object-fit:  contain;   
    display: block;      /* 👈 ADDED: Required for centering */
}

.visual-break figcaption {
    font-size: 0.9rem;
    color: #718096;      /* Subtle grey text */
    font-style: italic;
    font-family: var(--font-body);
    margin-top: 8px;
}

/* Mobile Tweak: Make images slightly wider than text on phones */
@media (max-width: 768px) {
    .break-img {
        width: auto;           /* 👈 CHANGED: Let it scale naturally */
        max-width:  90vw;       /* 👈 CHANGED:  Use 90% of screen width (leaves breathing room) */
        max-height: 450px;     /* 👈 ADDED: Limit height on mobile too */
        height: auto;          /* 👈 ADDED:  Scale proportionally */
        margin-left: auto;     /* 👈 CHANGED: Center horizontally */
        margin-right: auto;    /* 👈 CHANGED: Center horizontally */
        border-radius:  12px;   /* 👈 CHANGED: Keep rounded corners on mobile */
    }
    
    .visual-break figcaption {
        padding: 0 20px;    /* Restore padding for the caption text */
    }



/* Fix for very small screens (< 500px): Prevent horizontal overflow */
    @media (max-width: 500px) {
    .visual-break {
        margin: 40px 0;          /* 👈 CHANGED: Remove negative margin (it was pulling image left) */
        padding: 0;
        max-width: 100vw;
        overflow:  hidden;
        text-align: center;      /* 👈 ADDED: Centers the image horizontally */
    }

    .break-img {
        max-width: 90vw;         /* 👈 CHANGED: 90vw instead of 100vw (leaves breathing room) */
        max-height: 500px;       /* 👈 ADDED: Prevents image from being too tall */
        height: auto;            /* 👈 ADDED: Maintains aspect ratio */
        border-radius: 8px;      /* 👈 CHANGED: Keep slight rounding (looks better than 0) */
        margin: 0 auto;          /* 👈 CHANGED: Centers horizontally (auto left/right margins) */
        display: block;          /* 👈 ADDED: Required for margin: auto to work */
    }

    .visual-break figcaption {
        padding: 10px 20px;
        margin: 0;
        text-align: center;      /* 👈 ADDED:  Centers caption text */
    }
  }

  /* =========================================
   Extra Fix for Tiny Screens (< 412px)
   Prevents image corners from being cut off
   ========================================= */
@media (max-width: 440px) {
    
    /* Force visual break container to never overflow */
    .visual-break {
        margin: 40px 0;          /* No horizontal margin */
        padding: 0;              /* No padding that could push content */
        max-width: 100vw;        /* Never exceed viewport */
        overflow: hidden;        /* Clip anything that tries to overflow */
        text-align: center;      /* Center the image */
    }

    /* Constrain image more strictly */
    .break-img {
        width: auto;             /* Let it scale naturally */
        max-width: 85vw;         /* 👈 REDUCED from 90vw to 85vw (more breathing room) */
        max-height: 450px;       /* Slightly reduce height for tiny screens */
        height: auto;            /* Maintain aspect ratio */
        border-radius: 8px;      /* Keep rounded corners */
        margin: 0 auto;          /* Center horizontally */
        display: block;          /* Required for centering */
        object-fit: contain;     /* 👈 ADDED:  Ensures entire image is visible without cropping */
    }

    /* Ensure caption stays within bounds */
    .visual-break figcaption {
        padding: 10px 15px;      /* Slightly reduce horizontal padding */
        margin: 0;
        text-align: center;
        max-width: 100%;         /* Don't exceed container */
    }

    /* 👇 EXTRA SAFETY:   Ensure bio-summary container doesn't cause overflow */
    .bio-summary {
        padding: 0 10px;         /* Reduce padding on tiny screens */
        max-width: 100%;
        overflow-x: hidden;      /* Hide any horizontal overflow */
    }
}

}


/* =========================================
   Footer Styling
   ========================================= */
.footer {
    background-color: var(--nav-bg); /* Matches Navbar Blue */
    color: var(--nav-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 60px; /* Slightly shorter than header */
    margin-top: auto; /* Extra safety to push to bottom */
}

.footer-left {
    font-size: 0.9rem;
    opacity: 0.8;
    font-family: var(--font-body);
}

.footer-right {
    display: flex;
    gap: 25px;
    align-items: center;
}

.footer-icon {
    color: rgba(255, 255, 255, 0.8); /* Transparent white */
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.footer-icon:hover {
    color: #FFFFFF;       /* Bright white */
    transform: translateY(-3px); /* Pop-up effect */
}

/* Mobile Responsiveness for Footer */
@media (max-width: 768px) {
    .footer {
        flex-direction: column; /* Stack items */
        height: auto;
        padding: 15px;
        gap: 10px;
        text-align: center;
    }

    .footer-left {
        font-size: 0.85rem;      /* 👈 Slightly smaller text on mobile */
        margin:  0;               /* 👈 Remove any default margins */
    }

    .footer-right {
        gap: 20px;               /* 👈 Reduce gap between social icons (was 25px on desktop) */
        margin:  0;               /* 👈 Remove any default margins */
    }
}

/* CV Page Specific Styles */

/* Container that looks like a paper document */
.cv-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: #fff; /* White paper look */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    color: #333;

    /* borders for the container  */
    border-top: 2px solid #D1E7FF;
    border-bottom: 2px solid #D1E7FF;
    border-left: 2px solid #D1E7FF;
    border-right: 2px solid #D1E7FF;
}

/* Header layout */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.cv-header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #2c3e50;
}

.btn-download {
    /* White button background */
    background-color: #ffffff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
    
    
}

.btn-download:hover {
    background-color: #555;
}

/* Section Styling */
.cv-section {
    margin-bottom: 30px;
}

.cv-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    border-left: 5px solid #3498db; /* Accent color bar */
    padding-left: 15px;
    margin-bottom: 20px;
}

/* Timeline Item Styling */
.cv-item {
    display: flex;
    margin-bottom: 25px;
}

.cv-date {
    min-width: 120px;
    font-weight: bold;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding-top: 5px;
}

.cv-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.cv-details h4 {
    margin: 0 0 10px 0;
    font-weight: normal;
    font-style: italic;
    color: #666;
}

.cv-details ul {
    margin: 0;
    padding-left: 20px;
}

.cv-details li {
    margin-bottom: 5px;
    line-height: 1.5;
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: #f0f2f5;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}


/* =========================================
   8. Projects Page Specifics
   ========================================= */

/* A modifier for the hero section on the projects page */
.hero-compact {
    padding-bottom: 20px;
}

/* Modifier to align tech stack badges to the left (for cards) */
.tech-stack-left {
    justify-content: flex-start;
    margin: 15px 0;
}

/* Modifier for smaller badges inside cards */
.tech-badge-small {
    font-size: 0.75rem;
    padding: 4px 10px; /* Slightly smaller padding */
}


/* =========================================
   9. Blog Index Styling
   ========================================= */

.blog-index-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    /* Uses flex column from body, but ensures it takes space */
    flex: 1; 
}

.blog-header {
    text-align: center;
    margin-bottom: 50px;
    border-left: 2px solid #D1E7FF;
    border-right: 2px solid #D1E7FF;
    border-top: 2px solid #D1E7FF;
    border-bottom: 2px solid #D1E7FF;
    background: #FFFFFF;

    padding: 40px 60px; /* Generous padding for emphasis */


    border-radius: 6px;                 /* subtle rounding like other cards */
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);

    
}

.blog-header h1 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    color: #2D3748;
    margin-bottom: 10px;
}

/* The List of Cards */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-card {
    display: block; /* Makes the whole area clickable */
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    padding: 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    text-decoration: none; /* Removes default link underline */
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--accent-color);
}

.blog-card h2 {
    font-family: var(--font-header);
    font-size: 1.5rem;
    color: #2D3748;
    margin-bottom: 10px;
    transition: color 0.3s;
    margin-top: 0;
}

.blog-date {
    display: block;
    font-size: 0.85rem;
    color: #718096;      /* Gray color */
    font-weight: 600;
    margin-bottom: 5px;
    font-family: var(--font-body);
}

.blog-card:hover h2 {
    color: var(--accent-color);
}

.read-more {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more i {
    margin-left: 5px;
    transition: margin-left 0.3s;
}

.blog-card:hover .read-more i {
    margin-left: 10px; /* clear visual feedback on hover */
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 40px;
    background: #f7fafc;
    border-radius: 8px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 1.5rem;
    }
    
    .blog-card {
        padding: 20px;
    }

    .blog-card h2 {
        font-size: 1.25rem;
    }
    
}



/* =========================================
   FADE-IN ANIMATION (Works with animations.js)
   ========================================= */

/**
 * DEFAULT STATE: Hidden
 * Sections start invisible and slightly below their final position.
 * This is the state BEFORE JavaScript adds the 'is-visible' class.
 */
.fade-in-section {
    opacity: 0;                    /* Invisible by default */
    transform: translateY(30px);   /* Slightly below final position (moves up during fade) */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;  /* Smooth 0.8s transition */
}

/**
 * VISIBLE STATE: Fully visible
 * Applied by JavaScript when element enters viewport.
 * JavaScript adds the 'is-visible' class, which triggers this CSS.
 */
.fade-in-section.is-visible {
    opacity: 1;                    /* Fully visible */
    transform: translateY(0);      /* At final position (no offset) */
}

/**
 * DELAY VARIANTS (Optional - not currently used)
 * Use these classes to stagger animations (e.g., for elements in a row).
 * Example: <div class="fade-in-section delay-1">
 */
.fade-in-section.delay-1 {
    transition-delay: 0.2s;        /* Starts 0.2s after entering viewport */
}

.fade-in-section.delay-2 {
    transition-delay: 0.4s;
}

.fade-in-section.delay-3 {
    transition-delay: 0.6s;
}

/**
 * ACCESSIBILITY:  Respect user's motion preferences
 * If user has "reduce motion" enabled in their OS settings,
 * skip all animations and show content immediately.
 */
@media (prefers-reduced-motion:  reduce) {
    .fade-in-section {
        opacity:  1;                /* Always visible (no fade) */
        transform: none;           /* No movement */
        transition: none;          /* No animation */
    }
}



/* =========================================
   10. 404 ERROR PAGE STYLING
   ========================================= */

/**
 * ERROR PAGE CONTAINER
 * Centers the error content and provides consistent spacing
 */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;          /* Takes up most of the viewport (pushes footer down) */
    padding: 60px 20px;
    background: #FAFAFA;       /* Matches your body background */
    flex:  1;                   /* Allows footer to stick to bottom */
    

    /* borders for the container  */
    border-top: 2px solid #D1E7FF;
    border-bottom: 2px solid #D1E7FF;
    border-left: 2px solid #D1E7FF;
    border-right: 2px solid #D1E7FF;
}

.error-container {
    max-width: 700px;
    text-align: center;
    padding: 40px 20px;
    
}

/**
 * ERROR CODE (The big "404")
 * Makes the number visually striking
 */
.error-code h1 {
    font-family: var(--font-header);
    font-size: 10rem;          /* Huge!  */
    font-weight: 900;          /* Extra bold */
    color: var(--accent-color); /* Your tech blue */
    margin: 0;
    line-height: 1;
    letter-spacing: -5px;      /* Tight spacing for impact */
    
    /* Optional: Add a subtle text shadow for depth */
    text-shadow: 0 4px 8px rgba(49, 130, 206, 0.2);
}

/**
 * ERROR TITLE ("Page Not Found")
 * Secondary heading below the 404 number
 */
.error-title {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 700;
    color: #2D3748;
    margin: 20px 0 30px 0;
    letter-spacing: -0.5px;
}

/**
 * ERROR DESCRIPTION
 * Explains what happened in friendly language
 */
.error-description {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: #4A5568;
    line-height: 1.8;
    margin-bottom: 20px;
}

/**
 * ERROR SUGGESTION
 * Encourages user to navigate elsewhere
 */
.error-suggestion {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #718096;
    margin-bottom:  40px;
    font-weight: 600;
}

/**
 * ERROR ACTIONS (Navigation Buttons)
 * Grid of buttons to navigate back to valid pages
 */
.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom:  40px;
    overflow: visible !important;  /* ensures borders can overflow naturally */
    height: auto !important;       /* allow buttons to define container height */
}

/**
 * ERROR BUTTON STYLING
 * Consistent button design matching your site's aesthetic
 */
.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    color: #2D3748;
    /**background: #FFFFFF; */
    /**border: 2px solid #E2E8F0; */
    border-radius: 8px; 
    transition: all 0.3s ease;
    user-select: none;

}

.error-btn:hover {
    transform: translateY(-3px);   /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);

    
}


/**
 * PRIMARY BUTTON (Home button)
 * Stands out as the main call-to-action
 */
.error-btn.primary {
    background: #1A202C;
    color: #FFFFFF;
    border-color: #1A202C;
}

.error-btn.primary:hover {
    background: #2c5aa0;       /* Slightly darker blue on hover */
    border-color: #1A202C;
    color: #FFFFFF;
}

/**
 * BUTTON ICONS
 * Ensures Font Awesome icons are properly sized
 */
.error-btn i {
    font-size: 1.1rem;
}

/**
 * ERROR FOOTER (Optional hint/easter egg)
 * Subtle message at the bottom
 */
.error-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top:  1px solid #E2E8F0;
}

.error-hint {
    font-size: 0.9rem;
    color: #A0AEC0;
    font-style: italic;
}

.error-hint a {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.error-hint a:hover {
    color: #2c5aa0;
}

/**
 * OPTIONAL: SEARCH BOX STYLING
 * Uncomment these styles if you add the search box later
 */
/*
.error-search {
    margin:  40px 0;
    text-align: center;
}

.error-search-label {
    font-size: 1rem;
    color: #4A5568;
    margin-bottom: 15px;
    font-weight: 600;
}

.error-search-input {
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px 0 0 8px;
    width: 300px;
    max-width: 100%;
    font-family: var(--font-body);
}

.error-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.error-search-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-family: var(--font-header);
    font-weight: 700;
    background: var(--accent-color);
    color: #FFFFFF;
    border: 2px solid var(--accent-color);
    border-radius:  0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: -2px;
}

.error-search-btn:hover {
    background: #2c5aa0;
    border-color: #2c5aa0;
}
*/

/**
 * MOBILE RESPONSIVENESS
 * Adjusts sizing and layout for smaller screens
 */
@media (max-width: 768px) {
    
    /* Reduce the giant 404 number on mobile */
    .error-code h1 {
        font-size: 6rem;       /* Smaller than 10rem on desktop */
        letter-spacing: -3px;
    }
    
    /* Reduce title size */
    .error-title {
        font-size: 2rem;
    }
    
    /* Reduce description size */
    .error-description {
        font-size: 1.1rem;
    }
    
    /* Stack buttons vertically on very small screens */
    .error-actions {
        flex-direction:  column;
        align-items: stretch;  /* Full-width buttons on mobile */
    }
    
    .error-btn {
        width:  100%;           /* Full-width buttons */
        justify-content: center;
    }
    
    /* Reduce padding on mobile */
    .error-page {
        padding: 40px 15px;
        min-height: 60vh;
    }
}

/**
 * EXTRA SMALL SCREENS (< 400px)
 * Further adjustments for tiny phones
 */
@media (max-width: 400px) {
    .error-code h1 {
        font-size: 4.5rem;     /* Even smaller for tiny screens */
    }
    
    .error-title {
        font-size:  1.75rem;
    }
}