/* Styles de base */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --bg-color: #1F1F1F;
    --bg2-color: #303030;
    --text-color: #FFFFFF;
    --text2-col: #9E9D9D;
    --tool-col: #323D4D;
    --skill-col: #ced3f9cc;

    /* Glassmorphism tokens (dark theme default) */
    --glass-bg: rgba(48, 48, 48, 0.55);
    --glass-bg-strong: rgba(48, 48, 48, 0.78);
    --glass-bg-fallback: rgba(48, 48, 48, 0.88);
    --glass-bg-strong-fallback: rgba(48, 48, 48, 0.92);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --glass-blur: 12px;
    --glass-blur-large: 10px;
    --glass-radius: 12px;
}

.light-theme {
    --bg-color: #fafafa;
    --bg2-color: #FFFFFF;
    --text-color: #1F1F1F;
    --text2-col: #585353;
    --tool-col: #ced3f9;
    --skill-col: #323D4D;

    /* Glassmorphism tokens (light theme) */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.78);
    --glass-bg-fallback: rgba(255, 255, 255, 0.92);
    --glass-bg-strong-fallback: rgba(255, 255, 255, 0.96);
    --glass-border: rgba(31, 31, 31, 0.12);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.dark-theme {
    --bg-color: #1F1F1F;
    --bg2-color: #303030;
    --text-color: #FFFFFF;
    --text2-col: #9E9D9D;
    --tool-col: #323D4D;
    --skill-col: #ced3f9cc;

    /* Glassmorphism tokens (explicit dark theme) */
    --glass-bg: rgba(48, 48, 48, 0.55);
    --glass-bg-strong: rgba(48, 48, 48, 0.78);
    --glass-bg-fallback: rgba(48, 48, 48, 0.88);
    --glass-bg-strong-fallback: rgba(48, 48, 48, 0.92);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Glassmorphism utilities (Design System) */
.glass,
.glass-card,
.glass-chip,
.glass-input,
.glass-strong {
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.glass {
    background: var(--glass-bg);
    border-radius: var(--glass-radius);
}

.glass-strong {
    background: var(--glass-bg-strong);
    border-radius: var(--glass-radius);
}

.glass-card {
    background: var(--glass-bg);
    border-radius: var(--glass-radius);
}

.glass-chip {
    background: var(--glass-bg);
    border-radius: 999px;
}

.glass-input {
    background: var(--glass-bg);
    border-radius: 10px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass,
    .glass-card,
    .glass-chip,
    .glass-input {
        background: var(--glass-bg-fallback);
    }

    .glass-strong {
        background: var(--glass-bg-strong-fallback);
    }
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-color);
    font-family: "Hanken Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

body {
    background-color: var(--bg-color);
    font-size: 16px;
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--glass-bg-strong);
    height: 70px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 10%;
    box-shadow: var(--glass-shadow);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur-large));
    -webkit-backdrop-filter: blur(var(--glass-blur-large));
    z-index: 1000;
}

.logo {
    position: relative;
    font-size: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 800;
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg2-color);
    backdrop-filter: blur(15px);
    animation: showRight 1s ease forwards;
    animation-delay: .5s;
}


.logo span {
    color: #fb5607;
    font-size: 20px;
    font-weight: 800;
}

.navbar {
    display: flex;
    width: auto;
    position: relative;
    gap: 30px;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg2-color);
    animation: showRight 1s ease forwards;
    animation-delay: .5s;
    /* border: #0067B1 solid; */
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

/* Afficher la navbar lors du clic sur le menu burger */
.navbar.active {
    display: flex;
}

.navbar.active ~ .menu-toggle {
    color: #0067B1;
    border: 1px #0067B1 solid;
}

.navbar a {
    text-decoration: none;
    font-weight: 600;
    width: auto;
    position: relative; /* Ensure z-index works */
    z-index: 1;         /* Lift above .navbar::before */
}

.navbar select {
    margin-left: 25px;
    cursor: pointer;
    font-size: 20px;
    outline: none;
    background-color: var(--bg2-color);
    border: none;
    font-size: 15px;
    width: 7%;
    color: var(--text2-col);
    position: relative; /* Ensure z-index works */
    z-index: 1;         /* Lift above .navbar::before */
    /* border: #FFFFFF solid; */

}

.navbar a:hover,
.navbar a.active {
    color: #0067B1;
    position: relative;
}

.navbar a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: #0067B1;
}

b {
    color: var(--text2-col);
    font-weight: bold;
}

/* Conteneur du bouton de bascule */
.theme-toggle {
    --toggle-width: 52px;
    --toggle-height: 26px;
    --toggle-padding: 2px;
    --toggle-border: 1px;
    --slider-size: 20px;

    position: relative;
    z-index: 1; /* Lift above .navbar::before */
    height: var(--toggle-height); /* reduced from 30px */
    width: var(--toggle-width);  /* reduced from 60px */
    background-color: var(--bg2-color);
    border: 1px solid var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--toggle-padding);
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.theme-toggle i {
    font-size: 12px; /* reduced from 14px */
    color: var(--text-color);
    z-index: 1;
    transition: color 0.3s ease;
}

.theme-toggle .fa-sun {
    color: #f39c12; /* Sun color */
}

.theme-toggle .fa-moon {
    color: #f1c40f; /* Moon color */
    opacity: 0.5;
}

/* Style du slider (cercle) à l'intérieur */
.theme-toggle .toggle-slider {
    position: absolute;
    top: 50%; /* Center vertically */
    left: var(--toggle-padding); /* Light mode default */
    width: var(--slider-size); 
    height: var(--slider-size); 
    border-radius: 50%;
    background-color: var(--text-color);
    transition: left 0.3s ease, background-color 0.3s ease;
    z-index: 2;
    transform: translateY(-50%); /* Default vertical center */
}

/* Thème Sombre (Défaut) */
body.dark-theme .theme-toggle .toggle-slider {
    left: calc(100% - var(--toggle-padding) - var(--slider-size));
    transform: translateY(-50%);
    background-color: #FFFFFF;
}

body.dark-theme .theme-toggle .fa-moon {
    opacity: 1;
}
body.dark-theme .theme-toggle .fa-sun {
    opacity: 0.5;
}

/* Thème Clair */
body.light-theme .theme-toggle .toggle-slider {
    left: var(--toggle-padding);
    transform: translateY(-50%);
    background-color: #333333;
}

body.light-theme .theme-toggle .fa-sun {
    opacity: 1;
}
body.light-theme .theme-toggle .fa-moon {
    opacity: 0.5;
}

#lang-mobile {
    display: none;
}

#mobile-nav {
    display: none;
}


/* -------------------------------------------------------------------------------------------------------------------- */
/* Margin */
.home {
    margin: 200px auto;
    padding: 20px 0;
}

.about,
.compet,
.works,
.blog,
.contacts {
    padding: 20px 0;
    margin: 50px auto;
}   

section {
    scroll-margin-top: 150px;
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Home */
.home {
    display: flex;
    max-width: 1050px;
    height: auto;
    align-items: center;
    /* border: #0067B1 solid; */
    gap: 5%;

}

.home-content {
    display: block;
    max-width: 600px;
}

.pic-home {
    /* border: #0067B1 solid; */
    max-width:250px;
    height: 100%;
    justify-content: center;
    margin: 100px;
    position: relative;
}

.pic-home img {
    width: 100%;
    object-fit: cover;
}

.pic-home::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: 1s;
}

.home-content h1 {
    font-size: 44px;
    font-weight: 800;
    position: relative;
}

.home-content h2 {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
    position: relative;
}

.home-content h1::before, .home-content h2::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: .7s;
}

.home-content p {
    margin-bottom: 40px;
    line-height: 1.6;
    color: var(--text2-col);
    position: relative;
}

.home-content p::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: .9s;
}

.bulles {
    display: flex;
    align-items: self-start;
    position: relative;
}

.bulles::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: .9s;
}

.about-home {
    display: inline-flex;
    padding: 12px;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 7px;
    width: 180px;
    height: 100%;
    text-decoration: none;
    font-weight: 800;
    background-color: #0067B1;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    transition: color .5s ease, background-color .5s ease;
    border: 2px solid transparent;
    z-index: 1;
}

.about-home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0067B1;
    transition: transform 0.4s ease;
    z-index: -1;
    transform: translateX(0);
}

.about-home:hover::before {
    transform: translateX(100%);
}

.about-home:hover {
    background-color: #ced3f9;
    color: #1F1F1F;
    border: 2px solid #0067B1;
}

.bulle-contact {
    margin-left: 20px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: auto;
}

.bulle-contact a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 5px;
    background-color: var(--bg-color);
    margin-left: 1px;
    width: 50px;
    height: 50px;
    text-align: center;
    color: var(--text-color);
    font-size: 25px;
    z-index: 1;
    overflow: hidden;
    transition: background-color 0.5s ease;
}

.bulle-contact a:hover {
    background-color: #ced3f9cc;
    color: var(--text-color);
}

.bulle-contact a i {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.bulle-contact a i:hover {
    color: #0067B1;
}


/* -------------------------------------------------------------------------------------------------------------------- */
/* About */
.about {
    /* border: #FFFFFF solid; */
    display: flex;
    flex-direction: row;
    max-width: 1050px;
    height: auto;
    align-items: stretch;
    justify-content: center;
}

.pic-about {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    margin-right: 50px;
}

.ppc {
    border-radius: 7px;
    height: 100%;
    width: auto;
    max-width: 350px;
    display: block;
    object-fit: contain;
    transform: scale(1.1);
    transform-origin: center;
}

.about-content {
    height: auto;
    gap: 0;
}

.about-content h1 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 5px;
}

.about-content h2 {
    margin-bottom: 5px;
    font-size: 18px;
    font-weight: 400;
    color: var(--text2-col);
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text2-col);
}

.btn-about {
    display: flex;
    justify-content: baseline;
    width: auto;
    height: 50px;
}

.btn-about a {
    display: inline-flex;
    padding: 0 10%;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 7px;
    width: auto;
    text-decoration: none;
    font-weight: 800;
    position: relative;
    overflow: hidden;
    transition: color .5s ease, background-color .5s ease;
    z-index: 1;
}

.b1 {
    background-color: #0067B1;
    color: var(--text-color);
    margin-right: 3%;
    width: 30%;
}

.b2 {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 2px var(--text-color) solid;
}

.b1:hover {
    background-color: #fb5607;
    color: var(--bg-color);
}

.b2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    transition: transform .5s ease;
    z-index: -1;
    transform: translateX(0);
}

.b2:hover::before {
    transform: translateX(100%);
}

.b2:hover {
    background-color: #fb5607;
    color: var(--bg-color);
    border: var(--text-color);
}


/* -------------------------------------------------------------------------------------------------------------------- */
/* Works */
.works {
    /* border: var(--text-color) solid; */
    display: block;
    gap: 2%;
    max-width: 1050px;
    box-sizing: border-box;
    height: auto;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.works-content {
    width: 100%;
    height: auto;
    padding: 2%;
    display: block;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.works-content h1 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 5px;
}

.works-content h2 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 400;
    color: var(--text2-col);
}

.works-content p {
    line-height: 1.6;
    color: var(--text2-col);
}

.wk-grid {
    /* border: var(--text-color) solid; */
    display: block;
    width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.main-wk-item {
    width: 100%;
    /* border: #0067B1 solid; */
    height: auto;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 10px;

}

.main-img-wk {
    width: 40%;
    border-radius: 7px;
    /* border: #fb5607 solid; */
    height: auto;
    overflow: hidden;
}

.main-img-wk img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* border-radius: 7px; */
}

.main-content-wk {
    width: 60%;
    /* border: #fb5607 solid; */
    text-align: left;
}

/* Editer le txt */

.main-content-wk h2, .tdd h2 {
    /* border: var(--text-color) solid; */
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.hover-link {
    text-decoration: none; /* Pas de soulignement par défaut */
    color: inherit; /* Optionnel : pour conserver la couleur par défaut */
}

.hover-link:hover {
    text-decoration: underline; /* Ajoute le soulignement au survol */
    text-decoration-color: rgba(0, 103, 177, 0.5); /* Change la couleur du soulignement (ici en rouge) */
    text-decoration-thickness: 2px;
}


.main-content-wk p, .tdd p {
    color:var(--text2-col);
    margin-bottom: 5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tools-used {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    /* border: #fb5607 solid; */
}

.tools-used p {
    border-radius: 20px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #0067B1;
    min-width: 50px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wk-items {
    display: flex;
    margin: 0;
    /* border: var(--text-color) solid; */
    justify-content: space-between;
    align-items: center;
    text-align: center;
    margin-top: 20px;
}

.box {
    width: 33%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 7px;
    transition: all .5s ease;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.box:hover {
    background-color: var(--text-color)1a;
    box-shadow: 0 4px 20px #00000080;
    border: 1px #0067B1 solid;
}

.img-wk {
    /* border: #fb5607 solid; */
    border-radius: 7px;
    width: 100%;
    height: 150px;
    overflow: hidden;
}


.img-wk img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* border-radius: 7px; */
}


.tdd {
    width: 100%;
    /* border: #0067B1 solid; */
    text-align: left;
    margin-top: 10px;
}

/* Test edit */


.see-more {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: auto;
    /* border: var(--text-color) solid; */
}


.see-more a, .cta-button {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bg-color);
    text-decoration: none;
    width: 200px;
    height: 40px;
    border-radius: 7px;
    background-color: #fb5607;
    margin: 20px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: color .5s ease, background-color .5s ease;
    z-index: 1;
}

.see-more a:hover, .cta-button:hover {
    background-color: #0067B1;
    color: var(--text-color);
}



/* -------------------------------------------------------------------------------------------------------------------- */
/* Skills */
.compet {
    /* border: var(--text-color) solid; */
    display: block;
    justify-content: center;
    max-width: 1050px;
    height: auto;
    gap: 30px;
}

.sk-content {
    display: block;
    width: 100%;
    height: auto;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.sk-content h1 {
    font-size: 44px;
    font-weight: 600;
}

.sk-content h2 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 400;
    color: var(--text2-col);
}

.sk-content p {
    margin-bottom: 40px;
    line-height: 1.6;
    color: var(--text2-col);
}

/* Exp et certifs */
.sk-element {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}


.exp-cert {
    /* border: #0067B1 solid; */
    display: block;
    align-items: self-start;
    width: 450px;
    height: 350px;
    margin-top: 0;

    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.exp-col {
    display: block;
    gap: 10px;
    margin: 20px 0;
}

.exp-box {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    align-items: center;
}

.exp-img {
    position: relative;
    display: inline-block;
}

/* Experience tooltips: north-east positioning + animated reveal (skills tooltips unchanged) */
.exp-img .tooltip-text {
    bottom: auto;
    left: 100%;
    top: 0;
    transform: translate(10px, -10px) scale(0.96);
    transform-origin: top left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.exp-box img {
    border-radius: 10px;
    height: 60px;
    width: 60px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Tooltip behavior for experience logos (same as skills tooltip) */
.exp-img:hover .tooltip-text {
    visibility: visible;
    background-color: #0067B1;
    opacity: 1;
    transform: translate(10px, -10px) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .exp-img .tooltip-text {
        transition: none;
    }
}

.exp-box-content {
    display: block;
    align-items: self-start;
}

.exp-box-content h2 {
    font-size: 15px;
    font-weight: 600;
}

.exp-box-content p {
    color: var(--text2-col);
    font-size: 14px;
}

.cert-col {
    display: block;
    width: 100%;
    margin: 15px 0;
}

.cert-box {
    display: flex;
    width: 90%;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    transition: all .5s ease;
    text-decoration: none;
    gap: 15px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cert-box:hover {
    background-color: var(--text-color)1a;
    box-shadow: 0 4px 20px #00000080;
    border: 1px #0067B1 solid;
}

.cert-box img {
    border-radius: 7px;
    height: 40px;
    width: 40px;
    align-items: center;
    justify-content: center;
    text-align: center;

}

.cert-box-content h2 {
    font-size: 15px;
    font-weight: 600;
}

.cert-box-content p {
    color: var(--text2-col);
    font-size: 14px;
}

.cert-box-content h2 .cert-id {
    color: var(--text-color);
    font-weight: 700;
}

.skillys {
    display: block;
    justify-content: center;
    text-align: center;
    align-items: center;
    max-width: 600px;
    height: 400px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    align-content: center;
    gap: 10px;
    margin: 1px auto;
    width: fit-content;
    white-space: nowrap;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 5px;
    border-radius: 30px;
}

.filter-btn {
    color: var(--text-col);
    border: none;
    background-color: var(--bg2-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--bg2-color);
    color: var(--text-color);
}

.filter-btn.active {
    background-color: #0067B1;
    color: white;
}

/* Sliding pill indicator (Skills tabs only) */
.skillys .filter-buttons {
    position: relative;
    overflow: hidden;
}

.skillys .filter-buttons .tab-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    background-color: #0067B1;
    border-radius: 30px;
    transform: translateX(0);
    transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), width 280ms cubic-bezier(0.2, 0.8, 0.2, 1), height 280ms cubic-bezier(0.2, 0.8, 0.2, 1), top 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, width, height, top;
    z-index: 0;
    opacity: 0;
}

.skillys .filter-btn {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.skillys .filter-btn.active {
    background-color: transparent;
    color: white;
}

@media (prefers-reduced-motion: reduce) {
    .skillys .filter-buttons .tab-indicator {
        transition: none;
    }
    .skillys .filter-btn {
        transition: none;
    }
}

.filt-btn {
    color: var(--text-col);
    border: none;
    background-color: var(--bg2-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.filt-btn:hover {
    background-color: var(--bg2-color);
    color: var(--text-color);
}

.filt-btn.active {
    background-color: #0067B1;
    color: white;
}

/* Sliding pill indicator (Experiences/Certifications only) */
.exp-cert .filter-buttons {
    position: relative;
    overflow: hidden;
}

.exp-cert .filter-buttons .tab-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    background-color: #0067B1;
    border-radius: 30px;
    transform: translateX(0);
    transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), width 280ms cubic-bezier(0.2, 0.8, 0.2, 1), height 280ms cubic-bezier(0.2, 0.8, 0.2, 1), top 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, width, height, top;
    z-index: 0;
    opacity: 0;
}

.exp-cert .filt-btn {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.exp-cert .filt-btn.active {
    background-color: transparent;
    color: white;
}

.grid-data, .grid-web {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0 10%;
    margin-bottom: 20px;
}

.skill-box {
    width: 85px;
    height: 85px;
    padding: 20px;
    margin: 5px 5px;
    background-color: var(--skill-col); /* 303030; 1A202C*/
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 10px;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0px 0px 25px #0c0f0a;
    position: relative;
}

/* Invert skill-box colors between Light/Dark themes (skill-box only) */
.light-theme .skill-box {
    background-color: #ced3f9cc;
}

.dark-theme .skill-box {
    background-color: #323D4D;
}

.tooltip-text {
    visibility: hidden;
    background-color: #0067B1; /* couleur de fond du tooltip */
    color: var(--text-color); /* couleur du texte */
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* position au-dessus de l'image */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap; /* empêcher le texte de se casser en plusieurs lignes */
    font-size: 12px; /* taille du texte du tooltip */
}

/* Skill tooltips: animated reveal (positioning unchanged) */
.skill-box .tooltip-text {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0.96);
    transform-origin: bottom center;
    transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.skill-box:hover .tooltip-text {
    visibility: visible;
    background-color: #0067B1; /* afficher le tooltip au survol */
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .skill-box .tooltip-text {
        transition: none;
    }
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Blog */
.blog {
    display: block;
    max-width: 1050px;
    box-sizing: border-box;
    height: auto;
    text-align: center;
}

.posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.blog-card {
    background: var(--glass-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    height: 100%;

    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--glass-shadow);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.blog-img {
    height: 160px; /* Reduced from 200px */
    width: 100%;
    overflow: hidden;
    position: relative;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px; /* Reduced from 25px */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-content h3 {
    font-size: 1.15rem; /* Slightly reduced */
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.blog-content h3 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-content h3 a:hover {
    color: #0067B1;
}

.blog-content p {
    font-size: 0.9rem;
    color: var(--text2-col);
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    
    /* Line clamping to Limit Text Height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0067B1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.read-more:hover {
    text-decoration: underline;
    gap: 8px; /* Subtle animation */
}

/* Homepage-only: compact, text-only blog preview cards */
.posts.posts--home {
    gap: 18px;
    align-items: start;
}

.posts.posts--home .blog-card--home:not(.cta-card) {
    height: auto;
}

.posts.posts--home .blog-card--home:not(.cta-card) .blog-img {
    display: none;
}

.posts.posts--home .blog-card--home:not(.cta-card) .blog-content {
    padding: 14px 16px;
    text-align: left;
    align-items: flex-start;
}

.posts.posts--home .blog-card--home:not(.cta-card) .blog-date {
    display: block;
    font-size: 0.78rem;
    color: var(--text2-col);
    margin-bottom: 6px;
}

.posts.posts--home .blog-card--home:not(.cta-card) .blog-excerpt {
    margin-bottom: 10px;
    -webkit-line-clamp: 2;
}

.posts.posts--home .read-more:hover {
    text-decoration: none;
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Contacts */
.contacts {
    /* border: var(--text-color) solid; */
    display: flex;
    max-width: 1050px;
    height: auto;
    align-items: baseline;
    gap: 1%;
    box-sizing: border-box;
}

.contacts-content {
    max-width: 700px;
}

.contacts-content h1 {
    font-size: 44px;
    font-weight: 600;
}

.contacts-content h2 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 400;
    color: var(--text2-col);
}

.contacts-content p {
    margin-bottom: 40px;
    line-height: 1.6;
    color: var(--text2-col);
}

.location {
    display: flex;
    gap: 3%;
}

.link-contact {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.link-contact p {
    display: flex;
    margin-bottom: 7px;
    text-align: center;
}

.link-contact p span {
    font-size: 15px;
    margin-left: 5px;
    border: var(--bg-color) solid;
    color: var(--skill-col);
    text-decoration: var(--skill-col) underline;
}

.link-contact p span:hover {
    color: #0067B1;
}

.link-contact a {
    text-decoration: none;
    padding: 5px;
    display: inline-flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    background-color: var(--bg-color);
    width: 30px;
    height: 30px;
    font-size: 25px;
    z-index: 1;
    overflow: hidden;
}

.link-contact a i {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.link-contact a i:hover {
    color: #0067B1;
}

.form-contact {
    background-color: var(--glass-bg);
    padding: 15px;
    border-radius: 15px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    max-width: 450px;
    margin: 5%;
}

label {
    font-weight: 600;
    padding: 2%;
    margin-bottom: 5%;
}

input, textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    color: #fb5607;
    border-radius: 10px;
    margin-top: 2%;
    margin-bottom: 3%;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    font-size: 15px;
}

textarea {
    height: 150px;
    resize: vertical;
    transition: border 0.1s ease;
}

input {
    transition: border 0.1s ease;
}

input:focus, textarea:focus {
    border: 2px solid #fb5607;
    outline: none;
}

button {
    padding: 10px 20px;
    background-color: #D1D1D1;
    color: var(--bg-color);
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
    font-weight: 1000;
    transition: background-color .5s ease, color .5s ease;
}

button:hover {
    background-color: #fb5607;
    color: var(--bg-color);
}



/* -------------------------------------------------------------------------------------------------------------------- */
/* Footer */
.footer {
    display: flex;
    bottom: 0;
    left: 0;
    background-color: var(--glass-bg-strong);
    height: 70px;
    margin: 0;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 20px 10%;

    border-top: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Mobile Footer Fix (iPhone safe area) */
@media screen and (max-width: 600px) {
    .footer {
        flex-direction: column;
        height: auto;
        padding: 20px 5%;
        /* Safe Area Spacing */
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        gap: 15px;
        text-align: center;
    }
    
    .footer .logo {
        margin-bottom: 5px;
    }
}

.copyright span {
    color: #0067B1;
}

.to-top {
    position: fixed;
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    bottom: 90px;
    right: 20px;
    background-color: var(--skill-col);
    justify-items: center;
    align-content: center;
    text-align: center;
    padding: 5px;
    overflow: hidden;
    transition: background-color .5s ease;
    display: none;
}

.to-top:hover {
    background-color: #fb5607;
    opacity: .5;
}

.to-top i {
    color: #fafafa;
}

/* A11Y: visible keyboard focus without affecting mouse users */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0067B1;
    outline-offset: 3px;
}


/* -------------------------------------------------------------------------------------------------------------------- */
/* Medias screen */

/* Cacher l'icône burger sur les grands écrans */
/* @media screen and (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
} */

/* Personnalisation des items durant l'affichg su petit écran */
@media screen and (max-width: 750px) {
    /* Menu Toggle */
    .menu-toggle {
        display: flex;
        color: var(--text-color);
        cursor: pointer;
        border-radius: 7px;
        margin: 0;
        padding: 5px;
        width: 40px;
        height: 40px;
        justify-content: center;
        align-items: center;
        font-size: 25px;

        background-color: var(--glass-bg-strong);
        border: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        
        &:hover {
            color: #0067B1;
            border: 1px #0067B1 solid;
        }
    }

    /* Navbar Mobile */
    .navbar {
        display: none;
        position: absolute;
        flex-direction: column;
        align-items: center;
        top: 0;
        right: 0;
        margin: 60px 0;
        padding: 20px 50px;
        width: 100%;
        height: auto;
        gap: 30px;
        background-color: var(--glass-bg-strong);
        border: 1px solid var(--glass-border);
        border-bottom-color: #0067B1;
        box-shadow: var(--glass-shadow);
        backdrop-filter: blur(var(--glass-blur-large));
        -webkit-backdrop-filter: blur(var(--glass-blur-large));
        z-index: 1100;
        border-bottom: 1px #0067B1 solid;
        border-radius: 10px;
        pointer-events: auto;
        
        &.active {
            display: flex;
            backdrop-filter: blur(calc(var(--glass-blur-large) + 2px));
            -webkit-backdrop-filter: blur(calc(var(--glass-blur-large) + 2px));
        }
        
        a {
            display: inline-block;
            font-weight: 500;
            color: var(--text-color);
        }
        
        select {
            width: auto;
            margin: 0;
        }
    }

    /* Language Selector */
    #lang {
        display: none;
    }
    
    #lang-mobile {
        display: flex;
        background-color: var(--bg2-color);
        border: none;
        font-size: 15px;
        width: 30%;
        color: var(--text2-col);
    }

    /* Mobile Nav Container */
    #mobile-nav {
        display: flex;
        height: auto;
        width: auto;
        gap: 10px;
    }
    
    /* Layout Adjustments */
    .home, .about, .compet, 
    .works, .blog, .contacts {
        flex-direction: column;
        align-items: center;
        margin: 60px 20px;
    }

    /* Home Section */
    .home {
        margin: 200px 20px;
        
        .pic-home {
            margin: 50px 0;
        }
        
        .bulles {
            padding: 0;
            display: block;
            text-align: center;
            
            .about-home {
                margin-bottom: 15px;
                width: 60%;
                border-radius: 5px;
            }
            
            .bulle-contact {
                margin: 0;
                justify-content: center;
            }
        }
    }

    /* About Section */
    .about {
        height: auto;
        
        .about-content {
            margin-top: 5px;
            
            h2, h1 {
                display: flex;
                justify-content: center;
                margin: 0;
            }
        }
        
        .pic-about {
            margin: auto;
        }
        
        .btn-about {
            display: block;
            height: auto;
            width: 60%;
            margin: auto;
            text-align: center;
            
            a {
                display: flex;
                border-radius: 5px;
                width: 100%;
                margin-bottom: 10px;
                max-width: 1000px;
            }
        }
        
        .b1, .b2 {
            height: 45px;
            width: 100%;
        }
    }

    /* Works Section */
    .works-content {
        margin-bottom: 10px;
    }
    
    .main-wk-item, .wk-items {
        display: block;
        width: 100%;
        
        &:hover {
            background-color: var(--text-color)1a;
            box-shadow: 0 4px 20px #00000080;
            border: 1px #0067B1 solid;
        }
    }
    
    .main-wk-item {
        border-radius: 7px;
        height: auto;
        gap: 5px;
        padding: 10px;
        transition: all .5s ease;
    }
    
    .main-img-wk, .img-wk {
        width: 100%;
        border-radius: 7px;
        height: 205px;
        
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
    
    .main-content-wk {
        width: 100%;
        text-align: left;
    }
    
    .box {
        width: 100%;
        padding: 10px;
        margin-top: 10px;
        border-radius: 7px;
        transition: all .5s ease;
    }

    /* Competences Section */
    .compet {
        display: block;
        height: auto;
        
        .sk-content {
            display: block;
            width: 100%;
            height: auto;
            text-align: center;
        }
        
        .sk-element {
            display: block;
            padding: 0;
            margin: 0;
            gap: 0;
        }
        
        .exp-cert {
            display: block;
            height: auto;
            margin: 0 40px;
            width: auto;
            
            .cert {
                margin-bottom: 15px;
            }
            
            .ttl-exp {
                margin-bottom: 10px;
                margin-left: 0;
                display: flex;
                justify-content: center;
                width: auto;
                text-decoration: underline;
            }
        }
        
        .skillys {
            margin: auto;
            height: auto;

            .grid-data, .grid-web {
                margin: 0;
                padding: 10px 0;
            }

            .grid-data {
                margin: 0;
                padding: 10px 0;
            }
        }
    }

    /* Blog Section definitions removed to prevent overriding Grid layout */


    /* Contacts Section */
    .contacts-content {
        margin-bottom: 20px;
        
        h2 {
            width: 100%;
            text-align: center;
        }
        
        p {
            margin-bottom: 10px;
        }
    }
    
    .location {
        margin: 15px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        
        p {
            padding: 0;
            margin: 0;
        }
    }
    
    .copyright {
        font-size: small;
    }

    /* Stronger readability for the opened panel in LIGHT mode (mobile only) */
    .light-theme .navbar.active {
        background-color: rgba(255, 255, 255, 0.78);
        border-color: rgba(0, 0, 0, 0.14);
        border-bottom-color: #0067B1;
    }
}

@media screen and (min-width: 750px) and (max-width: 1050px) {
    /* Menu Toggle */
    .menu-toggle {
        display: flex;
        color: var(--text-color);
        cursor: pointer;
        border-radius: 7px;
        margin: 0;
        padding: 5px;
        width: 40px;
        height: 40px;
        justify-content: center;
        align-items: center;
        font-size: 25px;
        
        &:hover {
            color: #0067B1;
            border: 1px #0067B1 solid;
        }
    }

    /* Navbar Mobile */
    .navbar {
        display: none;
        position: absolute;
        flex-direction: column;
        align-items: center;
        top: 0;
        right: 0;
        margin: 60px 0;
        padding: 20px 50px;
        width: 100%;
        height: auto;
        gap: 30px;
        border-bottom: 1px #0067B1 solid;
        border-radius: 10px;
        backdrop-filter: blur(12px);
        
        &.active {
            display: flex;
        }
        
        a {
            display: inline-block;
            font-weight: 500;
            color: var(--text-color);
        }
        
        select {
            width: auto;
            margin: 0;
        }
    }

    /* Language Selector */
    #lang {
        display: none;
    }
    
    #lang-mobile {
        display: flex;
        background-color: var(--bg2-color);
        border: none;
        font-size: 15px;
        width: 30%;
        color: var(--text2-col);
    }

    /* Mobile Nav Container */
    #mobile-nav {
        display: flex;
        height: auto;
        width: auto;
        gap: 10px;
    }
    
    /* Layout Adjustments */
    .home, .compet, 
    .works, .blog, .contacts {
        flex-direction: column;
        align-items: center;
        margin: 60px 20px;
    }

    /* Home Section */
    .home {
        margin: 200px 20px;
        
        .pic-home {
            margin: 50px 0;
        }
        
        .bulles {
            padding: 0;
            display: block;
            text-align: center;
            
            .about-home {
                margin-bottom: 15px;
                width: 50%;
                border-radius: 5px;
            }
            
            .bulle-contact {
                margin: 0;
                justify-content: center;
            }
        }
    }

    /* About Section */
    .about {
        height: auto;
        flex-direction: column;
        align-items: center;
        margin: 60px 80px;
        
        .about-content {
            margin-top: 5px;
            
            h2, h1 {
                display: flex;
                justify-content: center;
                margin: 0;
            }
        }
        
        .pic-about {
            margin: auto;
        }
        
        .btn-about {
            display: block;
            height: auto;
            margin: 0 auto;
            width: 50%;
            text-align: center;
            
            a {
                display: flex;
                border-radius: 5px;
                width: 100%;
                margin-bottom: 10px;
                max-width: 1000px;
            }
        }
        
        .b1, .b2 {
            height: 45px;
            width: 100px;
        }
    }

    /* Works Section */
    .works-content {
        margin-bottom: 10px;
    }

    .wk-items {
        display: inline-grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-wk-item {
        border-radius: 7px;
        height: auto;
        gap: 5px;
        padding: 10px;
        transition: all .5s ease;
        display: block;
        width: 100%;
        margin-bottom: 0;
    }

    .main-wk-item:hover {
        background-color: var(--text-color)1a;
        box-shadow: 0 4px 20px #00000080;
        border: 1px #0067B1 solid;
    }
    
    .main-img-wk, .img-wk {
        width: auto;
        border-radius: 7px;
        height: 200px;
        
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
    
    .main-content-wk {
        width: 100%;
        text-align: left;
    }
    
    .box {
        width: auto;
        height: 100%;
        border-radius: 7px;
        transition: all .5s ease;
    }

    /* Competences Section */
    .compet {
        display: block;
        height: auto;
        
        .sk-content {
            display: block;
            width: 100%;
            height: auto;
            text-align: center;
        }
        
        .sk-element {
            display: block;
            padding: 0;
            margin: 0;
            gap: 0;
        }
        
        .exp-cert {
            display: block;
            height: auto;
            margin: 0 250px;
            width: auto;
            
            .exp, .cert {
                margin-bottom: 15px;
            }
            
            .ttl-exp {
                margin-bottom: 10px;
                margin-left: 0;
                display: flex;
                justify-content: center;
                width: auto;
                text-decoration: underline;
            }
        }
        
        .skillys {
            margin: auto;
            height: auto;

            .grid-data, .grid-web {
                margin: 0;
                padding: 10px 0;
            }
        }
    }

    /* Blog Section definitions removed to prevent overriding Grid layout */


    /* Contacts Section */
    .contacts-content {
        margin-bottom: 20px;
        
        h2 {
            width: 100%;
            text-align: center;
        }
        
        p {
            margin-bottom: 10px;
        }
    }
    
    .location {
        margin: 15px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        
        p {
            padding: 0;
            margin: 0;
        }
    }
    
    .copyright {
        font-size: small;
    }
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Animations */
@keyframes showRight {
    100% {
        width: 0;
    }
}

html {
    scroll-behavior: smooth;
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Blog Post Blockquote Styles */
.post-body blockquote {
    border-left: 4px solid var(--text-color);
    margin: 1.5em 0;
    padding: 1rem;
    font-style: italic;
    color: var(--text-color);
    background-color: var(--bg2-color);
    border-radius: 0 4px 4px 0;
}

.post-body em, 
.post-body i {
    font-style: italic;
}

.post-body strong, 
.post-body b {
    font-weight: 700;
}

.post-body ul,
.post-body ol {
    margin-left: 20px;
    padding-left: 20px;
    margin-bottom: 1em;
}

.post-body li {
    margin-bottom: 0.5em;
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* Mobile Post Layout */

/* Mobile TOC */
.mobile-toc-container {
    display: none; /* Hidden by default on desktop */
    margin: 30px 0;
    padding: 20px;
    background: var(--bg2-color); /* Same as sidebar */
    border-radius: 12px;
    border: 1px solid var(--tool-col);
}

.mobile-toc-container .post-toc-title {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.mobile-toc-container .post-toc li {
    margin-bottom: 8px;
    list-style: none; /* Already likely handled, but ensure clean list */
}

.mobile-toc-container .post-toc a {
    color: var(--text2-col);
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-toc-container .post-toc a:hover {
    color: #0067B1;
}

/* Mobile Actions */
.mobile-actions {
    display: none; /* Hidden on desktop */
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1000px) {
    /* Show Mobile Elements */
    .mobile-toc-container {
        display: block;
    }
    
    .mobile-actions {
        display: flex;
    }
    
    /* Hide Desktop Sidebar */
    .post-sidebar {
        display: none;
    }
    
    .post-container {
        flex-direction: column;
    }
}



/* =========================================
   Blog Post Content Fixes (Layout Protection)
   ========================================= */ 
/* 
   Prevents large images/media from overflowing the container 
   and causing "auto-zoom" or horizontal scroll on mobile.
*/
.post-body img, 
.post-body video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px auto;
    box-sizing: border-box;
    border-radius: 8px;
}

.post-body svg,
.post-body iframe {
    max-width: 100% !important;
    box-sizing: border-box;
    display: block; 
    margin: 20px auto;
}

/* Ensure the render container catches any other overflow */
.post-body {
    width: 100%;
    overflow-wrap: anywhere; /* Ensures text doesn't overflow */
}


/* Mobile Theme Toggle Logic */
@media (max-width: 1050px) {
    /* Hide the duplicate toggle inside the dropdown navbar */
    .navbar .theme-toggle {
        display: none !important;
    }

    /* Ensure mobile nav aligns items correctly */
    #mobile-nav {
        display: flex; /* Ensure flex is on when visible */
        align-items: center;
        gap: 15px; 
    }
}

/* =========================================
   Homepage 2x2 Blog Grid & CTA Card
   ========================================= */

/* Tablet (750px - 1050px): Show CTA (2x2 Grid), Hide "See more" button (ONLY for blog) */
@media screen and (min-width: 750px) and (max-width: 1050px) {
    #blog .posts {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Show the 4th card via Flexbox to act as CTA */
    .blog-card.cta-card {
        display: flex !important;
    }

    /* Hide the standard orange button, BUT ONLY inside the blog section */
    #blog .see-more {
        display: none !important;
    }
}

/* Desktop (> 1050px): Standard 3 cols, Hide CTA card, Show "See more" */
@media screen and (min-width: 1051px) {
    #blog .posts {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Hide the 4th card */
    .blog-card.cta-card {
        display: none !important;
    }

    /* Ensure blog button is visible on desktop */
    #blog .see-more {
        display: flex !important;
    }
}

/* CTA Card Styles (Tablet 2x2 Grid) */
.blog-card.cta-card {
    display: none; /* Default hidden (Mobile & base) */
    
    /* Match Orange CTA Button Style */
    background-color: #fb5607;
    border-radius: 7px; /* Same as .cta-button */
    border: none;
    box-shadow: none;
    
    /* Layout */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%; /* Fill grid cell */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.5s ease, transform 0.3s ease;
}

/* Hover State - Match Button Hover */
.blog-card.cta-card:hover {
    background-color: #0067B1;
    transform: translateY(-5px);
    border-color: transparent;
}

.cta-link-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 20px;
    color: var(--bg-color); /* Text color for button */
}

.cta-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: inherit;
}

.cta-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--bg-color); /* Match button text color */
}

.cta-content i {
    font-size: 1.8rem;
    color: var(--bg-color); /* Icon white like text */
    transition: transform 0.3s ease;
}

.blog-card.cta-card:hover .cta-content i {
    transform: translateX(5px);
}
