/* custom.css - Place this in assets/css/ folder */

/* ===========================
   PROJECT CARDS STANDARDIZATION
   =========================== */

/* Make cards flex containers so content can be distributed evenly */
#main > .posts > article {
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure all cards stretch to same height in grid */
}

/* Standardize all project images to same height */
#main > .posts > article .image.fit {
    height: 300px; /* Increased from 250px for less cropping */
    overflow: hidden;
    margin: 0.75rem 0 1.5rem 0; /* Reduced top margin for tighter spacing */
    flex-shrink: 0; /* Prevent image from shrinking */
}

#main > .posts > article .image.fit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Give titles consistent minimum height for alignment */
#main > .posts > article h2 {
    min-height: 3.2em;
    display: flex;
    align-items: center; /* Center text vertically */
    margin-bottom: 0.5rem; /* Reduced bottom margin */
    line-height: 1.4; /* Tighter line height for better spacing */
}

/* Standardize header height including date */
#main > .posts > article header {
    flex-shrink: 0; /* Keep header from compressing */
}

/* Ensure description paragraphs have consistent spacing */
#main > .posts > article p {
    margin-bottom: 1rem;
    flex-grow: 0;
}

/* Create a content wrapper that can grow */
#main > .posts > article p:first-of-type {
    flex-grow: 1;
    min-height: 4em; /* Ensure minimum space for description */
}

/* Push action buttons to bottom of cards */
#main > .posts > article .actions {
    margin-top: auto;
    padding-top: 1.5rem;
    flex-shrink: 0; /* Keep buttons from compressing */
}


/* ===========================
   FEATURED PROJECT IMPROVEMENTS
   =========================== */

/* More compact spacing for featured project */
#main > .post.featured {
    padding: 4rem 6rem 3rem 6rem;
}

/* Fix text alignment for featured section */
#main > .post.featured p {
    text-align: center; /* Center all text */
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Center the title */
#main > .post.featured header.major {
    text-align: center;
}

#main > .post.featured header.major h3 {
    margin-bottom: 0;
}

/* Compact featured image - centered and smaller */
#main > .post.featured .image.featured-compact {
    max-width: 600px; /* Increased from 500px */
    margin: 0 auto 2rem auto; /* No top margin since image is now first */
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
}

/* Adjust header spacing when it comes after image */
#main > .post.featured header.major {
    margin-bottom: 1.75rem;
    margin-top: 0.5rem;
}

#main > .post.featured .image.featured-compact img {
    width: 100%;
    height: auto;
}

/* Better spacing for Skills Used paragraph */
#main > .post.featured p:last-of-type {
    margin-top: 1.5rem;
    margin-bottom: 1.75rem;
    font-size: 0.95em;
    opacity: 0.9;
}

/* Center the action buttons */
#main > .post.featured .actions {
    justify-content: center;
}

/* Cleaner featured image (for .image.main if used) */
#main > .post.featured .image.main {
    margin: 2rem 0;
    border-radius: 4px;
    overflow: hidden;
}

@media screen and (max-width: 1280px) {
    #main > .post.featured {
        padding: 3rem 4rem 2.5rem 4rem;
    }
    
    #main > .post.featured .image.featured-compact {
        max-width: 550px;
    }
    
    #main > .post.featured p {
        max-width: 100%;
    }
}

@media screen and (max-width: 736px) {
    #main > .post.featured {
        padding: 2.5rem 2rem 2rem 2rem;
    }
    
    #main > .post.featured .image.featured-compact {
        max-width: 100%;
        margin: 0 auto 1.5rem auto;
    }
    
    #main > .post.featured p {
        text-align: center;
        max-width: 100%;
    }
}


/* ===========================
   HOVER EFFECTS & POLISH
   =========================== */

/* Smoother image hover transitions */
a.image img {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

a.image:hover img {
    transform: scale(1.03);
    opacity: 0.9;
}

/* Better button hover states */
.button {
    transition: all 0.2s ease-in-out;
}

.button:hover {
    transform: translateY(-2px);
}


/* ===========================
   TYPOGRAPHY REFINEMENTS
   =========================== */

/* Slightly tighter line height for descriptions */
#main > .posts > article p,
#main > .post.featured p {
    line-height: 1.8;
}

/* More readable date tags */
header > .date {
    font-size: 0.75rem;
    opacity: 0.8;
}


/* ===========================
   RESPONSIVE ADJUSTMENTS
   =========================== */

@media screen and (max-width: 980px) {
    /* Smaller image height on tablets */
    #main > .posts > article .image.fit {
        height: 270px; /* Increased from 220px */
        margin: 0.5rem 0 1.25rem 0;
    }
    
    /* Reduce title min-height on smaller screens */
    #main > .posts > article h2 {
        min-height: 3em;
        margin-bottom: 0.5rem;
    }
    
    /* Adjust content min-height */
    #main > .posts > article p:first-of-type {
        min-height: 3.5em;
    }
}

@media screen and (max-width: 736px) {
    /* Stack cards on mobile - smaller images */
    #main > .posts > article .image.fit {
        height: 240px; /* Increased from 200px */
        max-width: 500px;
        margin: 0.5rem auto 1rem auto;
    }
    
    /* Remove min-height on mobile for natural flow */
    #main > .posts > article h2 {
        min-height: auto;
        margin-bottom: 0.5rem;
    }
    
    /* Remove content min-height on mobile */
    #main > .posts > article p:first-of-type {
        min-height: auto;
    }
}
