/* ============================== RESET & BASE ============================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Nunito", sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
}

:root {
    --bg-color: #2d3436;
    --snd-bg-color: #1e272e;
    --text-color: #fff;
    --main-color: #135267;

    /* Accessibility focus variables */
    --focus-outline-width: 3px;
    --focus-outline-color: var(--main-color);
    --focus-ring: 0 0 0 3px rgba(19, 82, 103, 0.55);

/* THEME: light mode variables (opt-in via [data-theme="light"]) */
    transition: background-color .2s ease, color .2s ease;
}

:root[data-theme="light"] {
  --bg-color: #f6f8fa;
  --snd-bg-color: #e0e1dd;
  --text-color: #111418;
  --main-color: #135267; /* conserve l’accent f8f9fa */
}

/* petit contraste pour boxes en clair */
:root[data-theme="light"] .services-box,
:root[data-theme="light"] .education-content .content,
:root[data-theme="light"] .skills-box .skills-content,
:root[data-theme="light"] .portfolio-container .portfolio-box {
  box-shadow: 0 0 .8rem rgba(0,0,0,.08);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* === Alternance automatique des sections (global) === */
body > section {
  --section-bg: var(--bg-color);        /* défaut = fond sombre */
  background: var(--section-bg);
}

body > section:nth-of-type(even) {
  --section-bg: var(--snd-bg-color);    /* sections paires = fond secondaire */
}

/* Forcer une section particulière si besoin */
.section--light { --section-bg: var(--bg-color) !important; }
.section--dark  { --section-bg: var(--snd-bg-color) !important; }

section {
    min-height: 50vh;
    padding: 10rem 9% 2rem;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 3rem;
}

.heading span {
    color: var(--main-color);
}

.uppercase {
    text-transform: uppercase !important;
}

.mt-5 {
  margin-top: 5rem;
}

.bg-white {
    background: #fff;
}

.bold {
    font-weight: bold;
}

p {
    margin-bottom: 1rem;
}

/* ============================== HEADER ============================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 2.5rem;
    color:  var(--text-color);
    font-weight: 700;
    cursor: default;
}

.navbar a {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
    text-transform: capitalize;
}

.navbar {
    align-content: center;
    height: 4rem;
}

.navbar .flags {
    margin-left: 4rem;
}

.navbar a:hover,
.navbar a:active {
    color: var(--text-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

.flags {
    display: inline-block;
    align-content: center;
    height: 100%;
}

.flags .inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
    align-content: center;
    align-items: start;
}

.flags img {
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
}

.flags img:hover {
    cursor: pointer;
}

/* ============================== HOME ============================== */

.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* border: 1px solid yellow; */
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

.home-img {
    width: 45vw;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-2.4rem); }
    100% { transform: translateY(0); }
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-media a:hover {
    background-color: var(--main-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--text-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    cursor: pointer;
}

.btn:hover {
    box-shadow: none;
}

/* ============================== ABOUT ============================== */

/* .about {
    border: 1px solid red;
} */

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

.about-content ul {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    padding-left: 2.5rem;
}

/* ============================== SERVICES ============================== */

.services h2 {
    margin-bottom: 5rem;
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.services-container .services-box {
    flex: 1 1 30rem;
    background: var(--snd-bg-color);
    padding:  3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.services-box i {
    font-size: 7rem;
}

.services-box h3 {
    font-size: 2.6rem;
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

/* ============================== PORTFOLIO ============================== */

/* .portfolio {
} */

.portfolio h2 {
    margin-bottom: 4rem;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
}

.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
}

.portfolio-box img {
    width: 100%;
    opacity: .7;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding:  0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--text-color);
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: var(--snd-bg-color);
}

/* ============================== SKILLS ============================== */

.skills {
    /* background: var(--snd-bg-color); */
    min-height: auto;
    padding-bottom: 7rem;
}

.skills .skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.skills-row .skills-columns {
    flex: 1 1 40rem;
}

.skills-columns .title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem;
}

.skills-box .skills-content {
    position: relative;
    border: .2rem solid var(--main-color);
    padding: .5rem 1.5rem;
    margin-bottom: 1.5rem;
    z-index: 1;
    overflow: hidden;
}

.skills-box .skills-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s ease;
}

.skills-content .progress {
    padding: 1rem 0;
}

.skills-content .progress h3 {
    font-size: 1.7rem;
    display: flex;
    justify-content: space-between;
    text-transform: capitalize;
}

.skills-content .progress h3 span {
    color: var(--text-color);
}

.skills-content .progress .bar {
    height: 2.5rem;
    border-radius: .6rem;
    border: .2rem solid var(--main-color);
    padding: .5rem;
    margin: 1rem 0;
}

.skills-content .progress .bar span {
    display: block;
    height: 100%;
    border-radius: .3rem;
    background: var(--main-color);
}

/* ---- Progress widths + effet hover (IDs alignés au JSON) ---- */
#js .bar span { width: 90%; }              #js .skills-content:hover:before { width: 90%; }
#htmlcss .bar span { width: 90%; }         #htmlcss .skills-content:hover:before { width: 90%; }
#nodejs .bar span { width: 90%; }          #nodejs .skills-content:hover:before { width: 90%; }
#vuejs .bar span { width: 80%; }           #vuejs .skills-content:hover:before { width: 80%; }
#reactjs .bar span { width: 80%; }         #reactjs .skills-content:hover:before { width: 80%; }
#bootstrap .bar span { width: 90%; }       #bootstrap .skills-content:hover:before { width: 90%; }

#tsql .bar span { width: 90%; }            #tsql .skills-content:hover:before { width: 90%; }
#plsql .bar span { width: 90%; }           #plsql .skills-content:hover:before { width: 90%; }
#mysql .bar span { width: 90%; }           #mysql .skills-content:hover:before { width: 90%; }
#sybase .bar span { width: 90%; }          #sybase .skills-content:hover:before { width: 90%; }
#mongodb .bar span { width: 90%; }         #mongodb .skills-content:hover:before { width: 90%; }

#cs .bar span { width: 90%; }              #cs .skills-content:hover:before { width: 90%; }
#vb .bar span { width: 70%; }              #vb .skills-content:hover:before { width: 70%; }
#api .bar span { width: 90%; }             #api .skills-content:hover:before { width: 90%; }
#wcf .bar span { width: 90%; }             #wcf .skills-content:hover:before { width: 90%; }
/* Corrigé : WF (Windows Workflow) */
#wf .bar span { width: 90%; }              #wf .skills-content:hover:before { width: 90%; }

#mvc .bar span { width: 90%; }             #mvc .skills-content:hover:before { width: 90%; }
#blaz .bar span { width: 90%; }            #blaz .skills-content:hover:before { width: 90%; }
#wpf .bar span { width: 90%; }             #wpf .skills-content:hover:before { width: 90%; }
#win .bar span { width: 90%; }             #win .skills-content:hover:before { width: 90%; }
#asp .bar span { width: 90%; }             #asp .skills-content:hover:before { width: 90%; }

#ssis .bar span { width: 80%; }            #ssis .skills-content:hover:before { width: 80%; }
#ssas .bar span { width: 70%; }            #ssas .skills-content:hover:before { width: 70%; }
#ssrs .bar span { width: 70%; }            #ssrs .skills-content:hover:before { width: 70%; }

/* CI/CD */
#azure .bar span { width: 75%; }           #azure .skills-content:hover:before { width: 75%; }
#jenkins .bar span { width: 80%; }         #jenkins .skills-content:hover:before { width: 80%; }
#teamcity .bar span { width: 80%; }        #teamcity .skills-content:hover:before { width: 80%; }
#octopus .bar span { width: 80%; }         #octopus .skills-content:hover:before { width: 80%; }
#ansible .bar span { width: 50%; }         #ansible .skills-content:hover:before { width: 50%; }
#kubernetes .bar span { width: 50%; }      #kubernetes .skills-content:hover:before { width: 50%; }
#sonarqube .bar span { width: 50%; }       #sonarqube .skills-content:hover:before { width: 50%; }

#kanban .bar span { width: 90%; }          #kanban .skills-content:hover:before { width: 90%; }
#merise .bar span { width: 90%; }          #merise .skills-content:hover:before { width: 90%; }

#git .bar span { width: 90%; }             #git .skills-content:hover:before { width: 90%; }
#tfs .bar span { width: 90%; }             #tfs .skills-content:hover:before { width: 90%; }
#gerrit .bar span { width: 70%; }          #gerrit .skills-content:hover:before { width: 70%; }

#apache .bar span { width: 60%; }          #apache .skills-content:hover:before { width: 60%; }
#iis .bar span { width: 70%; }             #iis .skills-content:hover:before { width: 70%; }
/* Serveurs web -> Azure Cloud (distinct de CI/CD/azure) */
#azurecloud .bar span { width: 80%; }      #azurecloud .skills-content:hover:before { width: 80%; }

#linux .bar span { width: 60%; }           #linux .skills-content:hover:before { width: 60%; }
#mac .bar span { width: 80%; }             #mac .skills-content:hover:before { width: 80%; }
#mswin .bar span { width: 90%; }           #mswin .skills-content:hover:before { width: 90%; }

#infrag .bar span { width: 90%; }          #infrag .skills-content:hover:before { width: 90%; }
#crystrep .bar span { width: 100%; }       #crystrep .skills-content:hover:before { width: 100%; }

/* ============================== EDUCATION ============================== */

.education {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: auto;
    padding-bottom: 5rem;
}

.education .education-row {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 5rem;
    width: 60%;
}

.education-row .education-column {
    flex: 1 1 40rem;
}

.education-column .title {
    font-size: 2.5rem;
    text-transform: capitalize;
    margin: 0 0 1.5rem 2rem;
}

.education-column .education-box {
    border-left: .2rem solid var(--main-color);
}

.education-box .education-content {
    position: relative;
    padding-left: 2rem;
}

.education-box .education-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1.1rem;
    width: 2rem;
    height: 2rem;
    background: var(--main-color);
    border-radius: 50%;
}

.education-content .content {
    position: relative;
    padding: 1.5rem;
    border: .2rem solid var(--main-color);
    border-radius: .6rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.education-content .content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--snd-bg-color);
    z-index: -1;
    transition: .5s ease;
}

.education-content .content:hover::before {
    width: 100%;
}

.education-content .content .year {
    font-size: 1.5rem;
    color:  var(--main-color);
    padding-bottom: .5rem;
}

.education-content .content .year i {
    padding-right: .5rem;
}

.education-content .content .year span {
    color: var(--text-color);
}

.education-content .content h3 {
    font-size: 2rem;
}

.education-content .content .language {
    font-size: 1.5rem;
    padding-bottom: .5rem;
}

.education-content .content .language span {
    color: var(--text-color);
}

.education-content .content img {
    width: 2rem;
    padding-right: .5rem;
}

/* ============================== TESTIMONY ============================== */

.testimony-box {
    margin-bottom: 5rem;
    padding: 3rem;
}

.testimony-quote {
    font-size: 2.6rem;
    min-height: 5rem;
}

blockquote {
	padding: 2%;
	font-style: italic;
	line-height: 145%;
	margin: 0 2.5rem;
	position: relative;
}

blockquote::before {
	content: "\201C";
	font-size: 500%;
	display: block;
	position: absolute;
	top: 0;
	left: -3rem;
}

.testimony-author {
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

.testimony-author span {
    color: var(--text-color);
    margin-right: .8rem;
}

.author-name cite {
	display: block;
    font-weight: bold;
    font-size: 2.8rem;
}

.author-role {
    text-transform: capitalize;
    font-size: 2rem;
}

.testimony-author .date {
    font-size: 1.8rem;
}

.testimony-author abbr {
    font-size: 2.8rem;
    margin-left: .8rem;
}

/* ============================== EXPERIENCES (CARDS) ============================== */

.experiences {
    /* background: var(--snd-bg-color); */
    min-height: auto;
    padding-bottom: 7rem;
}

.experiences-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
}

.experiences-column {
    overflow: hidden;
}

.card-container {
    position: relative;
    width: 400px;
    height: 520px;
}

.experiences .card {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: all .5s ease;
    border: 1px solid var(--main-color);
}

.experiences .card:hover {
    transform: rotateY(180deg);
}

.experiences .card .card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: var(--bg-color);
    padding-bottom: 2rem;
}

.experiences .card .card-front span {
    color: #fff;
}

/* Image "full top" comme avant (bord à bord, pas de fond blanc) */
.experiences .card .card-front img {
    height: 50%;
    width: 100%;
}

.experiences .card .card-front div {
    margin: 1rem 1rem 3rem;
    font-size: 1.8rem;
    text-align: left;
}

.experiences .card .card-front .role span { text-transform: capitalize; }
.experiences .card .card-front i { margin-right: 1rem; }
.experiences .card .card-front .company-name { text-transform: uppercase; }
.experiences .card .card-front .company-location { text-transform: capitalize; }

.experiences .card .card-front .duration span {
    font-size: 1.3rem;
}

.experiences .card .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: var(--main-color);
    font-size: 1.5rem;
    color: var(--text-color);
    transform: rotateY(180deg);
}

.experiences .card .card-back .top {
    height: 70%;
    padding: 3rem;
    font-size: 1.4rem;       /* lisibilité accrue */
    overflow: auto;          /* évite la disparition du texte long */
}

.experiences .card .card-back .top a {
    color: #ffc300;
    font-weight: bold;
}

.experiences .card .card-back .top a:hover {
    cursor: pointer;
    text-decoration: underline;
}

.experiences .card .card-back .top div { margin-bottom: 1rem; }

.experiences .card .card-back .bottom {
    height: 30%;
    background: var(--bg-color);
    padding: 1rem 3rem;
    overflow: auto;          /* si liste d'outils très longue */
}

.experiences .card .card-back .bottom div {
    padding-bottom: 2rem;
}

.experiences .card .card-back .plus {
    color: var(--text-color);
    font-weight: bold;
    text-transform: capitalize;
    margin-right: 1rem;
}

.experiences .card .card-back .bottom .tools span {
    color: var(--text-color);
    overflow-wrap: break-word;
    text-transform: capitalize;
}

.experiences .card .card-back .bottom .profession span { color: var(--text-color); }

.key {
    text-transform: capitalize;
    margin-right: 1rem;
    font-weight: 500;
}

.profession .value { text-transform: capitalize; }

/* ============================== CONTACT ============================== */

.contact h2 {
    margin-bottom: 5rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    margin-bottom: 3rem;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--snd-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* ============================== FOOTER ============================== */

.footer {
    padding: 2rem 9%;
    color: var(--text-color);
    background: var(--snd-bg-color);
    min-height: 10vh;
    padding: 5rem;
}

.footer a {
    color: var(--text-color);
    font-size: 2.3rem;
}

.footer ul { list-style: none; }

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.footer-top h2 {
    text-transform: capitalize;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
}

.footer-top div {
    text-align: center;
    padding: 3rem;
}

.cv {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.footer-top .cv li { padding: 1rem; }
.footer-top .cv i { font-size: 4.5rem; }

.fa-file-word { color: #4895ef; }
.fa-file-pdf  { color: #d00000; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-text {
    font-size: 1.6rem;
    text-align: center;
}

.footer-text p,
.footer-text span,
.footer-text a { color: var(--text-color); }

.footer-iconTop {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem 1rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--snd-bg-color);
}

/* ============================== RESPONSIVE ============================== */

@media (max-width: 1300px) {
    html { font-size: 55%; }
}

@media (max-width: 1085px) {
    .navbar a { margin-left: 3rem; }
}

@media (max-width: 991px) {
    .header { padding: 2rem 3%; }
    section { padding: 10rem 3%; }
    .services { padding: 7rem; }
    .portfolio { padding-bottom: 7rem; }
    .contact { min-height: auto; }
    .footer { padding: 2rem 3%; }
}

@media (max-width: 872px) {
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: auto;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: 1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }
    .navbar.active { display: block; }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
    .navbar .flags { margin: 3rem 0; }
    #menu-icon { display: block; margin-right: 6rem; }
}

@media (max-width: 768px) {
    .home { flex-direction: column; margin-top: 3rem; }
    .home-content h3 { font-size: 2.6rem; }
    .home-content h1 { font-size: 5rem; }

    .home-img img { width: 100vw; margin-top: 4rem; }

    .about { flex-direction: column; }

    .services h2 { margin-bottom: 3rem; }
    .services-container { flex-direction: column; }

    .portfolio h2 { margin-bottom: 3rem; }
    .portfolio-container { grid-template-columns: repeat(2, 1fr); }

    .experiences-row { grid-template-columns: 1fr; }

    .footer-top { grid-template-columns: 1fr; }

    .testimony-author { display: flex; flex-direction: column; }
}

@media (max-width: 617px) {
    .portfolio-container { grid-template-columns: 1fr; }
    .home-img img { width: 80vw; margin-top: 8rem; }
}

@media (max-width: 450px) {
    html { font-size: 50%; }
    .contact form .input-box input { width: 100%; }
}

/* ============================== ACCESSIBILITY (FOCUS/HOVER) ============================== */

/* Global link styles */
a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 2px;
}
a:hover,
a:active {
  text-decoration: underline;
}

/* Keyboard focus styles on interactive elements */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

/* Navbar links: clear hover/focus state */
.navbar a:hover,
.navbar a:active {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.navbar a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

/* Social icons: mirror hover on focus for keyboard users */
.social-media a:focus-visible {
  background-color: var(--main-color);
  box-shadow: 0 0 1rem var(--main-color);
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: 3px;
}

/* Form fields: visible focus */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: 2px;
}

/* Portfolio & cards: focus clarity */
.portfolio-layer a:focus-visible,
.card-container a:focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-outline-color);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

/* High contrast users */
@media (prefers-contrast: more) {
  a:hover, a:active {
    text-decoration: underline;
  }
  a:focus-visible,
  button:focus-visible,
  [role="button"]:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  .btn:focus-visible {
    outline-width: calc(var(--focus-outline-width) + 1px);
  }
}