/* ======================================================
 * DESIGN SYSTEM VARIABLES
 * Centralized control for colors and sizing.
  =======================================================
*/
:root {
    --brand-green: #4caf50;
    --brand-pink: #e87aa3;
    --brand-blue: #3c44de;
    --bg-page: #f4f7f6;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-light: #eeeeee;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    
    /* Image size for Desktop */
    --img-desktop: 250px; 
}

/* ==============
   GLOBAL RESET 
================= */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    margin: 0;
    padding: 0;
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 850px;
    margin: 20px auto;
    padding: 0 15px;
}

/* ==============
   HEADER MODULE 
================= */
.blog-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    text-align: center;
    padding: 1rem 15px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

.blog-header h1 {
    color: var(--brand-blue);
    font-size: clamp(1.1rem, 5vw, 1.8rem); 
    margin: 0 0 5px 0;
}

.blog-header p {
    margin: 0 0 15px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================
   NAVIGATION MODULE 
====================== */
.blog-header nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.blog-header nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.blog-header nav a:hover {
    background-color: var(--bg-page);
    color: var(--brand-pink);
    transform: translateY(-2px);
}

.blog-header nav a.active {
    background-color: var(--brand-blue);
    color: white;
}

/* ================
   THE BLOG CARD 
=================== */
.blog-card {
    display: flex;
    background: var(--bg-card);
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
}

/* =====================
   IMAGE FLIP FUNCTION 
======================== */
.card-image-container {
    flex: 0 0 var(--img-desktop);
    height: var(--img-desktop);
    perspective: 1000px;
}

.image-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.blog-card:hover .image-flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    object-fit: cover;
}

.flip-back { transform: rotateY(180deg); }

/* ================
   CONTENT MODULE 
=================== */
.card-content {
    padding: clamp(15px, 5vw, 30px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag {
    color: var(--brand-pink);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

h2 { 
    margin: 8px 0; 
    font-size: clamp(1.1rem, 4vw, 1.6rem); 
    color: var(--brand-blue); 
}

/* =============
   SKILLS GRID 
================ */
.skills-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.skill-item img { width: 18px; height: 18px; }

/* ======================
   RESPONSIVE ADAPTATION 
========================= */
@media (max-width: 650px) {
    .blog-card { flex-direction: column; }
    .card-image-container {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 300px) {
    .container { padding: 0 5px; }
    .card-content { padding: 10px; }
    .card-image-container { height: 140px; }
    .skills-mini-grid { grid-template-columns: 1fr 1fr; }
}

/* ==============
   FOOTER MODULE 
================= */
.blog-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    padding: 40px 20px;
    margin-top: 60px;
    color: var(--text-muted);
}

.footer-container {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.footer-section h3 {
    color: var(--brand-pink);
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.footer-links a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--brand-pink); }

.footer-bottom {
    font-size: 0.8rem;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-dot {
    height: 8px;
    width: 8px;
    background-color: var(--brand-green);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    box-shadow: 0 0 5px var(--brand-green);
}

@media (max-width: 350px) {
    .footer-links { flex-direction: column; gap: 10px; }
    .blog-footer { padding: 20px 10px; }
    .footer-section h3 { font-size: 1rem; }
}