/* ══════════════════════════════════════════════
   THEME VARIABLES
   Dark = default  |  Light = [data-theme="light"]
   ══════════════════════════════════════════════ */
:root {
    --bg:           #0d1117;
    --bg2:          #161b22;
    --bg3:          #1c2330;
    --border:       #30363d;
    --border-light: #21262d;
    --green:        #3fb950;
    --green-dim:    #238636;
    --cyan:         #79c0ff;
    --cyan-dim:     #388bfd;
    --yellow:       #e3b341;
    --red:          #f85149;
    --purple:       #bc8cff;
    --text:         #e6edf3;
    --text-dim:     #8b949e;
    --text-muted:   #484f58;
    --shadow:       0 4px 16px rgba(0,0,0,.35);
    --shadow-sm:    0 1px 3px rgba(0,0,0,.25);
    --mono:         "JetBrains Mono", "Fira Code", monospace;
    --sans:         "Inter", system-ui, sans-serif;
    --radius:       8px;
}

[data-theme="light"] {
    --bg:           #ffffff;
    --bg2:          #f6f8fa;
    --bg3:          #eaeef2;
    --border:       #d0d7de;
    --border-light: #e8ecf0;
    --green:        #1a7f37;
    --green-dim:    #2da44e;
    --cyan:         #0550ae;
    --cyan-dim:     #0969da;
    --yellow:       #9a6700;
    --red:          #cf222e;
    --purple:       #8250df;
    --text:         #1f2328;
    --text-dim:     #57606a;
    --text-muted:   #8c959f;
    --shadow:       0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.06);
    --shadow-sm:    0 1px 2px rgba(31,35,40,.08);
}

/* ══════════════════════════════════════════════
   RESET
   ══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; line-height: inherit; }
ul, ol { list-style: none; }
p { margin: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

a { color: var(--cyan); text-decoration: none; transition: color 0.15s; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════ */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 1.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--green);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-logo span { color: var(--text-muted); font-weight: 400; }

.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    margin-left: auto;
    align-items: center;
}
.nav-links a {
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--text-dim);
    padding: 0.4rem 0.85rem;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-cta {
    color: var(--green) !important;
    border: 1px solid var(--green-dim) !important;
    border-radius: 6px !important;
}
.nav-cta:hover { background: rgba(63,185,80,.1) !important; }

.nav-cv-group {
    display: flex;
    align-items: center;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}
.btn-cv {
    font-family: var(--mono) !important;
    font-size: 0.72rem !important;
    padding: 0.35rem 0.9rem !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: var(--cyan) !important;
    border: 1px solid var(--border) !important;
    transition: all 0.15s !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    gap: 0.3rem !important;
}
.btn-cv:hover {
    background: var(--bg3) !important;
    border-color: var(--cyan-dim) !important;
    text-decoration: none !important;
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
    flex-shrink: 0;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); background: var(--bg2); }

/* Default (dark): show sun, hide moon */
.icon-sun  { display: block; }
.icon-moon { display: none; }

/* Light mode: hide sun, show moon */
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dim);
    border-radius: 2px;
    transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    z-index: 190;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.5rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}
.mobile-menu.open { display: flex; }
.mobile-link {
    font-family: var(--mono);
    font-size: 0.95rem;
    color: var(--text-dim);
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: color 0.15s;
}
.mobile-link:hover { color: var(--text); text-decoration: none; }
.mobile-cv-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   SECTION BACKGROUNDS
   ══════════════════════════════════════════════ */
.section-bg-light { background: var(--bg); }
.section-bg-dark  { background: var(--bg2); }

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 9rem 2.5rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    margin-bottom: 0;
}
.hero-content { display: flex; flex-direction: column; }

/* Photo */
.hero-photo {
    flex-shrink: 0;
}
.hero-photo img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
    display: block;
    transition: border-color 0.3s;
}
.hero-photo img:hover {
    border-color: var(--green-dim);
}

.hero-prompt {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hero-prompt .arrow  { color: var(--green); }
.hero-prompt .path   { color: var(--cyan-dim); }
.hero-prompt .branch { color: var(--purple); }

.hero-title {
    font-family: var(--mono);
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 1.8rem;
    color: var(--text);
}
.hero-title .role { color: var(--green); }
.hero-title .cursor {
    display: inline-block;
    width: 0.5em;
    height: 0.85em;
    background: var(--green);
    vertical-align: text-bottom;
    margin-left: 0.1em;
    animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-sub {
    font-family: var(--mono);
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 62ch;
    line-height: 1.9;
    margin-bottom: 1.4rem;
}
.hero-sub .hl { color: var(--cyan); font-weight: 700; }

.hero-location {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 2.2rem;
}
.loc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
    50%       { box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 10%, transparent); }
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}
.badge {
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    border: 1px solid;
    font-weight: 500;
    transition: background 0.15s;
}
.badge-green  { color: var(--green);  border-color: var(--green-dim);           background: color-mix(in srgb, var(--green) 10%, transparent); }
.badge-cyan   { color: var(--cyan);   border-color: var(--cyan-dim);            background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.badge-yellow { color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 60%, transparent); background: color-mix(in srgb, var(--yellow) 10%, transparent); }
.badge-purple { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 60%, transparent); background: color-mix(in srgb, var(--purple) 10%, transparent); }

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.hero-actions { margin-bottom: 4rem; }

/* Hero stats bar */
.hero-stats {
    display: flex;
    align-items: stretch;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 640px;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border-color 0.3s;
}
.stat-item {
    flex: 1;
    padding: 1.2rem 1.4rem;
    text-align: center;
}
.stat-num {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.stat-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.stat-div {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn {
    font-family: var(--mono);
    font-size: 0.84rem;
    padding: 0.7rem 1.5rem;
    border-radius: 7px;
    border: 1px solid;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    font-weight: 500;
}
.btn-green {
    background: var(--green-dim);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.btn-green:hover { filter: brightness(1.1); text-decoration: none; }
.btn-outline {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--border);
}
.btn-outline:hover { color: var(--text); background: var(--bg3); border-color: var(--text-muted); text-decoration: none; }
.btn-dl {
    background: var(--bg2);
    color: var(--cyan);
    border-color: var(--border);
}
.btn-dl:hover { background: var(--bg3); border-color: var(--cyan-dim); text-decoration: none; }
.btn-cv-hero {
    background: transparent;
    color: var(--yellow);
    border-color: var(--yellow);
    font-weight: 600;
}
.btn-cv-hero:hover { background: color-mix(in srgb, var(--yellow) 12%, transparent); text-decoration: none; }

/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2.5rem;
}

.section-title {
    font-family: var(--mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.section-title .hash { color: var(--green); }

.section-desc {
    font-family: var(--mono);
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 2.8rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border);
}

/* ══════════════════════════════════════════════
   CERTIFICATIONS
   ══════════════════════════════════════════════ */
.certifs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}
.certif-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.certif-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--green-dim);
}
.certif-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
    transition: transform 0.2s;
}
.certif-card:hover .certif-img { transform: scale(1.05); }
.certif-level {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 0.22rem 0.65rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--green) 12%, transparent);
    color: var(--green);
    border: 1px solid var(--green-dim);
    margin-top: auto;
}
.certif-level-orange {
    background: color-mix(in srgb, #e8724a 12%, transparent);
    color: #e8724a;
    border-color: #c45a35;
}
.certif-level-blue {
    background: color-mix(in srgb, #4285f4 12%, transparent);
    color: #4285f4;
    border-color: #2a6dd9;
}
.certif-name {
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}
.certif-org {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   EXPÉRIENCES
   ══════════════════════════════════════════════ */
.timeline {
    position: relative;
    padding-left: 1.8rem;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--green-dim), var(--border) 75%);
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -2.15rem;
    top: 0.5rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--green-dim);
    border: 2.5px solid var(--bg2);
    box-shadow: 0 0 0 2px var(--border);
}
.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}
.timeline-company {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--cyan);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.timeline-role {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}
.timeline-date {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
}
.timeline-desc {
    font-size: 0.93rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    max-width: 80ch;
}
.project-list { display: flex; flex-direction: column; gap: 0.7rem; }
.project-item {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 1rem 1.3rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: flex-start;
    transition: border-color 0.15s, background 0.15s;
}
.project-item:hover { border-color: var(--green-dim); background: var(--bg3); }
.project-item-icon {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--green);
    padding-top: 0.1rem;
    flex-shrink: 0;
}
.project-item-title {
    font-family: var(--mono);
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
}
.project-item-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.65;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}
.ptag {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 0.14rem 0.5rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--green) 8%, transparent);
    color: var(--green);
    border: 1px solid color-mix(in srgb, var(--green-dim) 40%, transparent);
}

/* ══════════════════════════════════════════════
   EXPERTISE
   ══════════════════════════════════════════════ */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}
.exp-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.7rem;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.exp-card:hover { border-color: var(--green-dim); transform: translateY(-3px); box-shadow: var(--shadow); }
.exp-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--green-dim), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}
.exp-card:hover::before { opacity: 1; }
.exp-card-header { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.exp-icon {
    font-family: var(--mono);
    font-size: 0.85rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--green);
    flex-shrink: 0;
    font-weight: 700;
}
.exp-card-title {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.exp-card-cat {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}
.exp-card-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1.1rem;
}
.exp-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.exp-tag {
    font-family: var(--mono);
    font-size: 0.66rem;
    padding: 0.18rem 0.6rem;
    border-radius: 4px;
    background: var(--bg3);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   HOMELAB
   ══════════════════════════════════════════════ */
.homelab-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ── Dark islands (code blocks & terminal always dark) ── */
.code-block,
.terminal-window {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.code-header,
.terminal-bar {
    background: #1c2330;
    border-bottom: 1px solid #30363d;
    padding: 0.75rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.code-filename {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: #484f58;
    margin-left: 0.4rem;
}
.terminal-title {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: #484f58;
    margin: 0 auto;
}
.code-body {
    padding: 1.4rem 1.6rem;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.9;
    overflow-x: auto;
    color: #8b949e;
}
.c-comment { color: #484f58; }
.c-key     { color: #79c0ff; }
.c-val     { color: #3fb950; }
.c-str     { color: #e3b341; }
.c-type    { color: #bc8cff; }
.c-op      { color: #8b949e; }
.terminal-body {
    padding: 1.6rem 2rem 2.2rem;
    font-family: var(--mono);
    font-size: 0.86rem;
    line-height: 2.1;
    color: #8b949e;
}
.t-line { display: flex; gap: 0.8rem; }
.t-prompt { color: #3fb950; flex-shrink: 0; }
.t-cmd { color: #79c0ff; }
.t-out { color: #8b949e; padding-left: 1.6rem; }
.t-blank { height: 0.5rem; }

.homelab-desc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
}
.homelab-desc p {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.85;
}
.homelab-desc strong { color: var(--cyan); font-weight: 600; }

.stat-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.stat-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 1rem 1.2rem;
    flex: 1;
    min-width: 80px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s;
}
.stat-box-num {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
}
.stat-box-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ══════════════════════════════════════════════
   GITHUB REPOS
   ══════════════════════════════════════════════ */
#github-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.1rem;
}
.gh-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.gh-card:hover { border-color: var(--cyan-dim); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.gh-card-header { display: flex; align-items: center; gap: 0.5rem; }
.gh-repo-icon { color: var(--text-muted); font-size: 0.95rem; }
.gh-repo-name { font-family: var(--mono); font-size: 0.9rem; font-weight: 700; color: var(--cyan); }
.gh-repo-desc { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; flex: 1; }
.gh-card-footer { display: flex; align-items: center; gap: 1rem; margin-top: 0.3rem; }
.gh-lang { display: flex; align-items: center; gap: 0.35rem; font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); }
.gh-lang-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.gh-stars { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; }
.gh-loading {
    grid-column: 1/-1;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 3rem;
}
.gh-loading .spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gh-error {
    grid-column: 1/-1;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 2.5rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ══════════════════════════════════════════════
   CV BANNER
   ══════════════════════════════════════════════ */
.cv-banner {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--green-dim) 12%, transparent) 0%,
        color-mix(in srgb, var(--cyan-dim) 8%, transparent) 100%);
    border-top: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
    padding: 2.5rem 2.5rem;
    transition: background 0.3s;
}
.cv-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.cv-banner-title {
    font-family: var(--mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}
.cv-banner-sub {
    font-family: var(--mono);
    font-size: 0.84rem;
    color: var(--text-dim);
}
.cv-banner-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════ */
.contact-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3.5rem;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow);
    transition: background 0.3s, border-color 0.3s;
}
.contact-title {
    font-family: var(--mono);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.9rem;
}
.contact-title span { color: var(--green); }
.contact-sub {
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
    line-height: 1.85;
}
.contact-links {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}
.contact-cv-row {
    display: flex;
    justify-content: center;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    transition: background 0.3s;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--cyan); text-decoration: none; }

/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */
.fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════
   RESPONSIVE — Tablet 1024px
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .exp-grid { grid-template-columns: repeat(2, 1fr); }
    .certifs-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-photo img { width: 200px; height: 200px; }
    .hero-inner { gap: 2.5rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Hide nav CV at 960px
   ══════════════════════════════════════════════ */
@media (max-width: 960px) {
    .nav-cv-group { display: none; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile 768px
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    nav {
        padding: 0 1.2rem;
        height: 56px;
        gap: 0.8rem;
    }
    .nav-links { display: none; }
    .hamburger { display: flex; }

    .container { padding: 4rem 1.2rem; }

    #hero { padding: 7rem 1.2rem 3rem; }
    .hero-title { font-size: clamp(1.9rem, 7vw, 2.8rem); }
    .hero-sub { font-size: 0.95rem; }

    .hero-stats {
        flex-wrap: wrap;
        max-width: 100%;
    }
    .stat-item { min-width: 48%; }

    .certifs-grid { grid-template-columns: repeat(2, 1fr); }
    .exp-grid { grid-template-columns: 1fr; }
    .homelab-layout { grid-template-columns: 1fr; }
    /* Hero photo stacks below on mobile */
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-photo { order: -1; display: flex; justify-content: center; }
    .hero-photo img { width: 160px; height: 160px; border-radius: 50%; }

    .stat-row { gap: 0.6rem; }

    .cv-banner { padding: 2rem 1.2rem; }
    .cv-banner-inner { flex-direction: column; text-align: center; }
    .cv-banner-actions { justify-content: center; width: 100%; }

    .contact-card { padding: 2.2rem 1.4rem; }
    .contact-links { flex-direction: column; align-items: stretch; }
    .contact-links .btn { justify-content: center; }

    footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1.2rem;
    }

    .timeline-header { flex-direction: column; gap: 0.4rem; }
    .timeline { padding-left: 1.4rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Small mobile 480px
   ══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .certifs-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { justify-content: center; }
    .hero-cv-row .btn { width: 100%; justify-content: center; }
    .hero-stats { flex-direction: column; }
    .stat-div { width: 100%; height: 1px; }
    .stat-item { min-width: 100%; padding: 0.9rem 1rem; }
    .mobile-cv-row { flex-direction: column; }
    .mobile-cv-row .btn { justify-content: center; }
}
