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

body {
    font-family: 'Inter', sans-serif;
    /* background-color: #f6e6e0; */
    color: #000000;
    /* Flexbox magic for the footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Minimum height is 100% of the viewport height */
    margin: 0;
    position: relative;
}
body::before {
    content: "";
    position: fixed; /* Keeps image in place while you scroll */
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: -1; /* Pushes this layer BEHIND your text */

    /* Image Setup */
    background-image: url('assets/homepage_background.jpg'); 
    background-size: cover;    /* Ensures it covers the whole screen */
    background-position: center;
    background-repeat: no-repeat;

    /* The Filter & Style */
    filter: grayscale(100%); /* Black and white filter */
    opacity: 0.60; /* CRITICAL: Low opacity so text stays readable */
}

main {
    flex: 1; /* This pushes the footer down by taking up all available space */
}

.bio-text {
    /* Pushes the text down away from "Hi, I'm Ydo" */
    margin-top: 15px; 
    
    /* Pushes the buttons down away from this text */
    margin-bottom: 25px; 
    
    /* Increases space between the lines of text itself so it's not squished */
    line-height: 1.8; 
    
    /* Optional: Limit width so lines aren't too long on big screens */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.logo a {
    text-decoration: none; /* Removes the underline */
    color: #333;           /* Dark grey color instead of blue */
    font-size: 1.5rem;     /* Make it larger */
    font-weight: bold;     /* Make it thick */
    letter-spacing: -0.5px; /* Slight tightening looks more modern */
}

/* Optional: Add a subtle hover effect */
.logo a:hover {
    opacity: 0.7;
}

/* Container to center content */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Layout */
.site-header {
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    backdrop-filter: blur(10px);          /* The modern "frosted glass" effect */
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Very subtle bottom border */
    padding: 15px 0;
    position: sticky; /* Keeps header at top when scrolling */
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    margin-left: 25px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Hover effect for nav links */
.site-nav a:hover {
    background-color: rgba(0,0,0,0.05);
    color: #000;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 0;
}

.profile-img {
    border-radius: 50%; /* Circular Image */
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 20px;
}

.project-tag {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.social-links a {
    display: inline-block;       /* Allows padding and dimensions */
    text-decoration: none;       /* Removes the underline */
    padding: 10px 20px;          /* Size of the box */
    border: 2px solid #000000;      /* Dark border */
    border-radius: 50px;         /* Fully rounded "pill" corners */
    margin: 0 8px;               /* Space between the buttons */
    font-weight: 600;            /* Bold text */
    font-size: 0.9rem;
    color: #000000;                 /* Text color matches border */
    transition: all 0.2s ease;   /* Smooth animation */
    background-color: transparent;
}

.social-links a:hover {
    background-color: #333;
    color: #fff;                 /* White text on dark background */
    transform: translateY(-2px); /* slight "pop up" movement */
}

/* The Grid Layout */
.card-grid {
    display: grid;
    /* This creates a responsive grid automatically */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #222; /* Darker color for hierarchy */
    line-height: 1.3;
}

.card-image {
    padding: 20px 0 0 20px; /* Adds top spacing so the logo doesn't hit the ceiling */
    text-align: left;   /* Centers the image horizontally */
}

.card-image img {
    width: 64px;          /* Forces the logo to be a specific small size */
    height: auto;         /* Maintains aspect ratio */
    display: inline-block; /* Helps with centering */
    
    /* The Filter Magic */
    filter: grayscale(100%); /* Makes it 100% Black & White */
    opacity: 0.7;            /* Optional: Fades it slightly to look "inactive" */
    transition: all 0.3s ease; /* Smooths the transition when hovering */
}

.card:hover .card-image img {
    filter: grayscale(0%); /* Removes the B&W filter */
    opacity: 1;            /* Restores full brightness */
    transform: scale(1.1); /* Optional: slight zoom pop effect */
}

.card-text {
    padding: 24px;
}

/* Dark Mode adjustments */
body.dark-mode {
    background-color: #1a1a1a !important; /* This changes the main page background */
    color: #f0f0f0; /* This changes the main text color */
}
body.dark-mode .site-header {
    background: rgba(26, 26, 26, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.dark-mode .site-nav a {
    color: #ccc;
}
body.dark-mode .site-nav a:hover {
    background-color: rgba(70, 70, 70, 0.1);
    color: #3b3b3b;
}
/* Dark Mode support for the logo */
body.dark-mode .logo a {
    color: #fff;
}
body.dark-mode .card {
    background-color: #2b2b2b; 
    color: #ffffff;            
    border: 1px solid #444;    
}
body.dark-mode .read-more {
    color: #6ebbff;
}
body.dark-mode .card h3 {
    color: #fff;
}
body.dark-mode .project-tag {
    background-color: #fff;
    color: #000;
}
body.dark-mode::before {
    opacity: 0.30; /* Much fainter to blend with the dark grey background */
    filter: grayscale(100%); /* Darkens the image itself */
}

/* Invert buttons for Dark Mode */
body.dark-mode .social-links a {
    border-color: #f0f0f0;  /* White border */
    color: #f0f0f0;         /* White text */
}

/* Hover Effect in Dark Mode */
body.dark-mode .social-links a:hover {
    background-color: #f0f0f0; /* White background fill */
    color: #000;               /* Black text */
}