/* ================================================================== */
/* DESIGN TOKENS                                                       */
/* Palette: deep slate/charcoal base + electric indigo + teal + warm  */
/* sand accent. Inspired by minimalist premium tech portfolios.       */
/* ================================================================== */
:root {
    /* Charcoal base (dark, default) */
    --bg:            #0E1016;
    --bg-elevated:   #171A23;
    --bg-sunken:     #0A0C11;
    --bg-card:       #161923;
    --ink:           #F1EDE2;
    --ink-soft:      #9BA1B4;
    --ink-faint:     #6A7086;
    --line:          rgba(241, 237, 226, 0.09);
    --line-strong:   rgba(241, 237, 226, 0.16);
    --nav-bg:        rgba(14, 16, 22, 0.72);

    /* Accents */
    --indigo:        #6C6EF5;
    --indigo-soft:   rgba(108, 110, 245, 0.14);
    --indigo-line:   rgba(108, 110, 245, 0.35);
    --teal:          #33C9B0;
    --teal-soft:     rgba(51, 201, 176, 0.14);
    --teal-line:     rgba(51, 201, 176, 0.35);
    --sand:          #E4B876;
    --sand-soft:     rgba(228, 184, 118, 0.14);

    --font-heading: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius: 18px;
    --radius-sm: 12px;
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow-indigo: 0 8px 28px rgba(108, 110, 245, 0.28);
    --shadow-glow-teal: 0 8px 28px rgba(51, 201, 176, 0.24);
}

/* Optional light theme (toggle) — keeps the same bespoke hue family, just inverted */
[data-theme="light"] {
    --bg:            #F3EFE6;
    --bg-elevated:   #FFFFFF;
    --bg-sunken:     #EAE4D6;
    --bg-card:       #FFFFFF;
    --ink:           #191B22;
    --ink-soft:      #5C5F6E;
    --ink-faint:     #8A8D9B;
    --line:          rgba(25, 27, 34, 0.10);
    --line-strong:   rgba(25, 27, 34, 0.18);
    --nav-bg:        rgba(243, 239, 230, 0.78);

    --indigo:        #5254D6;
    --indigo-soft:   rgba(82, 84, 214, 0.10);
    --teal:          #1F9382;
    --teal-soft:     rgba(31, 147, 130, 0.10);
    --sand:          #B8863C;
    --sand-soft:     rgba(184, 134, 60, 0.12);

    --shadow-card: 0 1px 2px rgba(25, 20, 10, 0.05), 0 10px 28px rgba(25, 20, 10, 0.07);
    --shadow-glow-indigo: 0 8px 24px rgba(82, 84, 214, 0.18);
    --shadow-glow-teal: 0 8px 24px rgba(31, 147, 130, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
    background-color: var(--bg);
    color: var(--ink-soft);
    font-family: var(--font-body);
    line-height: 1.65;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* Subtle ambient grid backdrop across the whole page (signature texture) */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
    opacity: 0.6;
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; -webkit-appearance: none; appearance: none; }
button { touch-action: manipulation; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

/* ================================================================== */
/* FLOATING FROSTED NAVBAR                                             */
/* ================================================================== */
.nav-dock-outer {
    position: sticky; top: 0; z-index: 1000;
    padding: 14px 16px 0;
    display: flex; justify-content: center;
    pointer-events: none;
}
header.site-header {
    width: 100%; max-width: 1240px;
    background: var(--nav-bg);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    pointer-events: auto;
    transition: var(--transition);
    padding-top: env(safe-area-inset-top);
}
header.site-header.docked {
    border-radius: 0 0 20px 20px;
    box-shadow: 0 14px 36px rgba(0,0,0,0.4);
}

.nav-wrapper { display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 14px 0 10px; }

.brand-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand-avatar {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo), var(--teal));
    display: flex; align-items: center; justify-content: center;
    color: #0E1016; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
    box-shadow: var(--shadow-glow-indigo);
}

.brand-info h1 { font-family: var(--font-heading); font-weight: 600; font-size: 1.08rem; color: var(--ink); letter-spacing: -0.2px; }
.brand-info span { font-size: 0.7rem; color: var(--ink-soft); font-family: var(--font-mono); letter-spacing: 0.2px; }

.nav-menu { display: flex; gap: 4px; list-style: none; background: var(--bg-sunken); padding: 5px; border-radius: 13px; border: 1px solid var(--line); }

.nav-link {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 13px; border-radius: 9px;
    color: var(--ink-soft); font-size: 0.84rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: var(--transition);
}
.nav-link.active, .nav-link:hover { background: var(--indigo); color: #FFFFFF; }

.nav-controls { display: flex; gap: 10px; }
.theme-toggle-btn, .mobile-menu-btn {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--line); background: transparent;
    color: var(--ink); cursor: pointer; transition: var(--transition);
}
.theme-toggle-btn:hover, .mobile-menu-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.mobile-menu-btn { display: none; }

/* ================================================================== */
/* PAGE VIEWS + REVEAL                                                 */
/* ================================================================== */
.page-view { display: none; padding: 48px 0 84px; flex-grow: 1; }
.page-view.active { display: block; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ================================================================== */
/* HERO                                                                 */
/* ================================================================== */
.hero-section { position: relative; overflow: hidden; border-radius: 28px; padding: 8px 0 0; }

/* Floating abstract geometric shapes + mesh gradient behind hero content */
.hero-bg-fx { position: absolute; inset: -40px; z-index: -1; pointer-events: none; }
.hero-mesh {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(108,110,245,0.20), transparent 42%),
        radial-gradient(circle at 82% 12%, rgba(51,201,176,0.16), transparent 40%),
        radial-gradient(circle at 65% 78%, rgba(228,184,118,0.10), transparent 45%);
    filter: blur(10px);
}
.hero-shape { position: absolute; border: 1.5px solid var(--line-strong); opacity: 0.7; animation: float-shape 9s ease-in-out infinite; }
.hero-shape.s1 { width: 90px; height: 90px; top: 8%; left: 4%; border-radius: 22px; transform: rotate(18deg); animation-duration: 11s; }
.hero-shape.s2 { width: 46px; height: 46px; top: 62%; left: 10%; border-radius: 50%; border-color: var(--teal-line); animation-duration: 8s; animation-delay: -2s; }
.hero-shape.s3 { width: 64px; height: 64px; top: 18%; right: 8%; clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%); border-color: var(--indigo-line); animation-duration: 10s; animation-delay: -4s; }
.hero-shape.s4 { width: 34px; height: 34px; bottom: 10%; right: 14%; border-radius: 8px; transform: rotate(45deg); animation-duration: 7s; animation-delay: -1s; }
@keyframes float-shape { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .hero-shape { animation: none; } }

.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 52px; align-items: center; margin-bottom: 56px; padding-top: 28px; }

.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 15px; border-radius: 50px;
    font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
    border: 1px solid var(--indigo-line);
    background: var(--indigo-soft); color: var(--indigo);
}
.badge-teal { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal); }
.badge-sand { border-color: rgba(228,184,118,0.4); background: var(--sand-soft); color: var(--sand); }

.live-status-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--teal); }
.live-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); position: relative; flex-shrink: 0; }
.live-status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--teal); animation: status-pulse 2s ease-out infinite; }
@keyframes status-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-status-dot::after { animation: none; } }

.hero-title {
    font-family: var(--font-heading); font-weight: 600;
    font-size: 3rem; line-height: 1.16; color: var(--ink);
    margin: 20px 0; letter-spacing: -0.5px;
}
.hero-title span#heroRotatingWord {
    font-style: italic; color: var(--indigo); display: inline-block;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero-title span#heroRotatingWord.swap { opacity: 0; transform: translateY(6px); }

.hero-subtitle { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 26px; max-width: 54ch; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }

.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 24px; border-radius: 12px;
    font-family: var(--font-body); font-weight: 600; font-size: 0.94rem;
    text-decoration: none; border: none; cursor: pointer; transition: var(--transition);
}
.btn-primary { background: var(--indigo); color: #FFFFFF; box-shadow: var(--shadow-glow-indigo); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(108,110,245,0.38); }
.btn-teal { background: var(--teal); color: #06231F; box-shadow: var(--shadow-glow-teal); }
.btn-teal:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }

/* Social badge row — Cyclo / GitHub / LinkedIn / Email (swap hrefs in HTML) */
.social-badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 11px;
    background: var(--bg-elevated); border: 1px solid var(--line);
    color: var(--ink-soft); text-decoration: none; font-size: 0.84rem; font-weight: 600;
    transition: var(--transition);
}
.social-badge i { font-size: 0.95rem; }
.social-badge:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.social-badge.social-github:hover { color: var(--ink); border-color: var(--line-strong); }
.social-badge.social-linkedin:hover { color: #4A90E2; border-color: rgba(74,144,226,0.4); }
.social-badge.social-email:hover { color: var(--sand); border-color: rgba(228,184,118,0.4); }
.social-badge.social-cyclo:hover { color: var(--teal); border-color: var(--teal-line); }

.hero-stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    background: var(--bg-elevated); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 24px; margin-top: 30px;
    box-shadow: var(--shadow-card);
}
.stat-box { text-align: center; }
.stat-number { font-family: var(--font-heading); font-size: 1.6rem; color: var(--indigo); font-weight: 600; }
.stat-label { font-size: 0.76rem; color: var(--ink-soft); font-family: var(--font-mono); }

/* ---- Geometric profile frame (signature element) -------------------- */
.profile-wrapper {
    position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 20px; max-width: 420px; margin: 0 auto;
    perspective: 900px;
}
.profile-geo-frame { flex-shrink: 0; transition: transform 0.2s ease-out; will-change: transform; }
.profile-geo-frame {
    position: relative;
    width: 320px; height: 320px;
    display: flex; align-items: center; justify-content: center;
}
/* soft ambient glow seated behind the rings so the geometry reads clearly on dark backgrounds */
.profile-geo-frame::before {
    content: "";
    position: absolute; inset: 6%;
    background: radial-gradient(circle, rgba(108,110,245,0.32), rgba(51,201,176,0.14) 55%, transparent 72%);
    filter: blur(18px);
    z-index: 0;
}
/* rotating glowing polygon border, layered for depth */
.profile-geo-frame svg.geo-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; }
.geo-ring polygon {
    fill: none; stroke: url(#geoGradient); stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(108,110,245,0.65));
}
.geo-ring.outer { animation: geo-spin 22s linear infinite; }
.geo-ring.inner polygon { stroke-width: 2; filter: drop-shadow(0 0 6px rgba(51,201,176,0.55)); }
.geo-ring.inner { animation: geo-spin-rev 30s linear infinite; opacity: 0.75; }
@keyframes geo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes geo-spin-rev { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .geo-ring.outer, .geo-ring.inner { animation: none; } }

.profile-img-card {
    width: 250px; height: 250px; overflow: hidden;
    position: relative; z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: var(--bg-elevated);
    /* octagonal glass-cut rim — the geometric counterpart to the rotating rings */
    clip-path: polygon(14% 0%, 86% 0%, 100% 14%, 100% 86%, 86% 100%, 14% 100%, 0% 86%, 0% 14%);
}
.profile-img-card::after {
    content: "";
    position: absolute; inset: 0;
    clip-path: polygon(14% 0%, 86% 0%, 100% 14%, 100% 86%, 86% 100%, 14% 100%, 0% 86%, 0% 14%);
    box-shadow: inset 0 0 0 2px rgba(241,237,226,0.28);
    pointer-events: none;
}
.profile-img-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-floating-badge {
    margin-top: 20px; width: 100%; max-width: 320px;
    background: rgba(23, 26, 35, 0.85); backdrop-filter: blur(12px);
    border: 1px solid var(--line-strong); border-radius: 14px;
    padding: 14px 16px; display: flex; gap: 14px; align-items: center;
    color: #fff; position: relative; z-index: 1;
}
[data-theme="light"] .profile-floating-badge { background: rgba(255,255,255,0.85); color: var(--ink); }
.profile-floating-badge i { color: var(--indigo); font-size: 1.2rem; }
.floating-title { font-weight: 700; font-size: 0.92rem; }
.floating-sub { font-size: 0.76rem; color: var(--ink-soft); font-family: var(--font-mono); }

.stitch-divider { height: 1px; margin: 56px 0; background-image: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 20px); }

/* ================================================================== */
/* SECTION HEADERS                                                      */
/* ================================================================== */
.section-title-wrap { text-align: center; margin: 0 auto 42px; }
.section-title-wrap h2 { font-family: var(--font-heading); font-weight: 600; font-size: 2.15rem; color: var(--ink); margin-top: 12px; }
.section-hint { font-size: 0.82rem; color: var(--ink-soft); font-family: var(--font-mono); margin-top: 8px; }

/* ================================================================== */
/* GRIDS & CARDS                                                        */
/* ================================================================== */
.strengths-grid, .projects-grid, .certs-grid, .gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }

.strength-card, .project-card, .cert-card, .gallery-card,
.about-card-large, .timeline-card, .contact-info-card, .contact-form-card, .education-card {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px;
    transition: var(--transition); box-shadow: var(--shadow-card);
}
.strength-card:hover, .project-card:hover, .cert-card:hover { border-color: var(--indigo); transform: translateY(-4px); }

.icon-box, .cert-badge-icon, .project-icon-box {
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--teal-soft); color: var(--teal);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 16px;
}
.strength-card h3 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); margin-bottom: 8px; font-size: 1.1rem; }
.strength-card p { font-size: 0.92rem; }

.clickable-card { cursor: pointer; position: relative; }
.clickable-card:focus-visible { border-color: var(--indigo); }
.card-tap-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 0.76rem; font-family: var(--font-mono); color: var(--indigo); opacity: 0.9; }
.card-tap-hint i { font-size: 0.7rem; }

/* Project cards */
.project-icon-box { width: 52px; height: 52px; font-size: 1.4rem; margin-bottom: 18px; }
.project-thumb { border-radius: 14px; overflow: hidden; margin-bottom: 16px; aspect-ratio: 16/10; background: var(--bg-sunken); border: 1px solid var(--line); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-content h3 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1.15rem; margin-bottom: 8px; }
.project-content p { font-size: 0.92rem; margin-bottom: 6px; }
.project-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.project-link-btn {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-family: var(--font-mono);
    padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--ink-soft);
    text-decoration: none; transition: var(--transition);
}
.project-link-btn:hover { border-color: var(--teal); color: var(--teal); }

/* About */
.about-split { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 36px; margin-bottom: 28px; }
.about-text-content h3 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1.3rem; margin-bottom: 14px; }
.about-text-content p { margin-bottom: 14px; font-size: 0.98rem; }
.about-portrait { border-radius: 18px; overflow: hidden; height: 100%; min-height: 260px; background: var(--bg-sunken); border: 1px solid var(--line); }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-portrait-mobile { display: none; }

.section-subheading { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.6px; color: var(--ink-soft); text-transform: uppercase; margin-bottom: 12px; }
.tech-stack-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tech-tag { background: var(--bg-sunken); border: 1px solid var(--line); padding: 6px 12px; border-radius: 7px; font-size: 0.8rem; font-family: var(--font-mono); color: var(--teal); }

/* ================================================================== */
/* EXPERIENCE COUNTER + TIMELINE                                       */
/* ================================================================== */
.exp-counter-card {
    display: flex; align-items: center; justify-content: center; gap: 18px;
    background: linear-gradient(135deg, var(--indigo-soft), var(--teal-soft));
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 26px; margin-bottom: 40px; text-align: center; flex-wrap: wrap;
}
.exp-counter-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; color: var(--indigo); font-size: 1.4rem; flex-shrink: 0; }
.exp-counter-value { font-family: var(--font-heading); font-size: 1.9rem; color: var(--ink); font-weight: 700; }
.exp-counter-label { font-size: 0.8rem; color: var(--ink-soft); font-family: var(--font-mono); margin-top: 2px; }

.timeline-container { position: relative; max-width: 880px; margin: 0 auto; }
.timeline-container::before {
    content: ""; position: absolute; left: 18px; top: 6px; bottom: 6px; width: 2px;
    background-image: repeating-linear-gradient(0deg, var(--indigo) 0 6px, transparent 6px 13px);
    opacity: 0.55;
}
.timeline-item { position: relative; padding-left: 62px; margin-bottom: 30px; }
.timeline-icon-dot {
    position: absolute; left: 0; top: 0; width: 38px; height: 38px;
    border-radius: 50%; border: 2px solid var(--indigo);
    background: var(--bg); display: flex; align-items: center; justify-content: center;
    color: var(--indigo); z-index: 1;
}
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.job-title { font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1.1rem; margin-bottom: 6px; }
.company-badge { color: var(--indigo); font-weight: 600; font-family: var(--font-mono); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 8px; }
.company-badge-link { text-decoration: none; }
.company-badge-link:hover { text-decoration: underline; }
.company-logo { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; background: #fff; padding: 2px; border: 1px solid var(--line); }

.time-badge-group { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.time-badge { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
.duration-badge {
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
    background: var(--teal-soft); color: var(--teal); border: 1px solid var(--teal-line);
    padding: 3px 10px; border-radius: 50px; white-space: nowrap;
}
.duration-badge.current { background: var(--indigo-soft); color: var(--indigo); border-color: var(--indigo-line); }

.exp-list { list-style: none; margin-bottom: 12px; }
.exp-list li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 0.92rem; }
.exp-list li::before { content: "\2027"; position: absolute; left: 0; top: -0.15em; color: var(--indigo); font-size: 1.4em; }
.company-blurb { font-size: 0.86rem; color: var(--ink-soft); font-style: italic; margin-bottom: 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

/* ================================================================== */
/* EDUCATION                                                            */
/* ================================================================== */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.education-card { display: flex; flex-direction: column; gap: 14px; }
.education-card-top { display: flex; gap: 16px; align-items: flex-start; }
.education-card h4 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1.08rem; margin-bottom: 4px; }
.education-card .issuer { font-size: 0.85rem; color: var(--teal); font-family: var(--font-mono); }
.education-card .edu-meta { font-size: 0.76rem; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 4px; }
.education-card p.edu-desc { font-size: 0.9rem; color: var(--ink-soft); }
.edu-badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.edu-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-family: var(--font-mono); color: var(--indigo); text-decoration: none; margin-top: 4px; }
.edu-link:hover { text-decoration: underline; }

/* ================================================================== */
/* FILTER BUTTONS                                                       */
/* ================================================================== */
.filter-buttons-bar { display: flex; justify-content: center; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-btn {
    background: var(--bg-card); border: 1px solid var(--line); color: var(--ink-soft);
    padding: 9px 20px; border-radius: 10px; font-family: var(--font-body); font-weight: 600;
    font-size: 0.88rem; cursor: pointer; transition: var(--transition);
}
.filter-btn.active { background: var(--teal); color: #06231F; border-color: var(--teal); }
.filter-btn:not(.active):hover { border-color: var(--teal); color: var(--teal); }

/* ================================================================== */
/* CERTIFICATIONS                                                       */
/* ================================================================== */
.cert-card { display: flex; gap: 16px; align-items: flex-start; }
.cert-card h4 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1rem; margin-bottom: 6px; }
.cert-card .issuer { font-size: 0.85rem; color: var(--teal); font-family: var(--font-mono); margin-bottom: 3px; }
.cert-card .meta { font-size: 0.76rem; color: var(--ink-faint); font-family: var(--font-mono); }
.cert-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8rem; font-family: var(--font-mono); color: var(--indigo); text-decoration: none; }
.cert-link:hover { text-decoration: underline; }
.cert-link i { font-size: 0.68rem; }

/* ================================================================== */
/* GALLERY + LIGHTBOX                                                   */
/* ================================================================== */
.gallery-card { position: relative; height: 280px; overflow: hidden; padding: 0; border-radius: 18px; cursor: pointer; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-overlay {
    position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 12, 17, 0.9), transparent 65%);
    padding: 20px; display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0; transition: var(--transition);
}
.gallery-card:hover .gallery-overlay, .gallery-card:focus-visible .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { font-family: var(--font-heading); color: #fff; font-weight: 600; }
.gallery-overlay span { color: var(--sand); font-family: var(--font-mono); font-size: 0.8rem; }
.gallery-zoom-hint { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(10,12,17,0.6); backdrop-filter: blur(6px); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.gallery-card:hover .gallery-zoom-hint { opacity: 1; }

/* Lightbox modal */
.lightbox-overlay {
    display: none; position: fixed; inset: 0; z-index: 3200;
    background: rgba(6, 7, 10, 0.82); backdrop-filter: blur(6px);
    align-items: center; justify-content: center; padding: 20px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-modal {
    position: relative; width: 100%; max-width: 880px; max-height: 88vh;
    overflow-y: auto; background: var(--bg-card); border: 1px solid var(--line-strong);
    border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: modal-pop 0.25s ease;
    display: grid; grid-template-columns: 1.1fr 0.9fr;
}
.lightbox-img-wrap { background: var(--bg-sunken); min-height: 320px; }
.lightbox-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.lightbox-info { padding: 32px 30px; display: flex; flex-direction: column; }
.lightbox-info .lightbox-date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--teal); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.lightbox-info h3 { font-family: var(--font-heading); font-weight: 600; font-size: 1.45rem; color: var(--ink); margin-bottom: 14px; padding-right: 20px; }
.lightbox-info p { font-size: 0.94rem; color: var(--ink-soft); }
.lightbox-close {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong);
    background: rgba(10,12,17,0.65); backdrop-filter: blur(6px); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.lightbox-close:hover { border-color: var(--indigo); color: var(--indigo); }
@media (max-width: 720px) { .lightbox-modal { grid-template-columns: 1fr; } .lightbox-img-wrap { min-height: 220px; } }

/* ================================================================== */
/* CONTACT                                                              */
/* ================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info-card h3, .contact-form-card h3 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); font-size: 1.25rem; margin-bottom: 20px; }
.info-item { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.info-item .icon { width: 42px; height: 42px; border-radius: 11px; background: var(--indigo-soft); color: var(--indigo); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-item h4 { font-size: 0.85rem; color: var(--ink-soft); font-family: var(--font-mono); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.info-item p { color: var(--ink); font-size: 0.96rem; }
.info-item a:hover { color: var(--indigo); }

.form-group { margin-bottom: 16px; position: relative; }
.form-group label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; font-family: var(--font-mono); }
.form-control {
    width: 100%; padding: 12px 14px; border-radius: 10px;
    background: var(--bg-sunken); border: 1px solid var(--line-strong);
    color: var(--ink); font-family: var(--font-body); font-size: 16px; transition: var(--transition);
}
.form-control:focus { border-color: var(--indigo); }
.form-control.field-error { border-color: #E5636B; }
.form-control.field-valid { border-color: var(--teal); }
.field-msg { font-size: 0.74rem; font-family: var(--font-mono); margin-top: 5px; min-height: 14px; }
.field-msg.error { color: #E5636B; }
.field-msg.ok { color: var(--teal); }

.form-status {
    display: none; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 10px; font-size: 0.86rem; margin-bottom: 14px;
    animation: status-pop 0.3s ease;
}
.form-status.show { display: flex; }
.form-status.sending { background: var(--indigo-soft); color: var(--indigo); }
.form-status.success { background: var(--teal-soft); color: var(--teal); }
.form-status.error { background: rgba(229, 99, 107, 0.14); color: #E5636B; }
@keyframes status-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.btn-submit-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================== */
/* FOOTER                                                               */
/* ================================================================== */
footer.site-footer {
    border-top: 1px solid var(--line); padding: 26px 0; text-align: center;
    color: var(--ink-soft); font-size: 0.85rem; margin-top: auto; font-family: var(--font-mono);
    padding-bottom: calc(26px + env(safe-area-inset-bottom));
}

/* ================================================================== */
/* DETAIL MODAL                                                         */
/* ================================================================== */
.detail-modal-overlay { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(6, 7, 10, 0.72); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; }
.detail-modal-overlay.open { display: flex; }
.detail-modal {
    position: relative; width: 100%; max-width: 560px; max-height: 80vh;
    overflow-y: auto; background: var(--bg-card); border: 1px solid var(--line-strong);
    border-radius: 20px; padding: 34px 30px 28px; box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    animation: modal-pop 0.25s ease;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.detail-modal h3 { font-family: var(--font-heading); font-weight: 600; font-size: 1.4rem; color: var(--ink); margin-bottom: 16px; padding-right: 30px; }
.detail-modal p { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 14px; }
.detail-modal p:last-child { margin-bottom: 0; }
.detail-modal-close {
    position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
    background: var(--bg-sunken); color: var(--ink-soft); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.detail-modal-close:hover { border-color: var(--indigo); color: var(--indigo); }

/* ================================================================== */
/* CHATBOT WIDGET                                                       */
/* ================================================================== */
.chatbot-widget { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); right: calc(24px + env(safe-area-inset-right)); z-index: 2000; }
.chatbot-toggle {
    width: 58px; height: 58px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--indigo), var(--teal)); color: #fff; font-size: 1.4rem;
    cursor: pointer; box-shadow: var(--shadow-glow-indigo);
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.chatbot-toggle:hover { transform: scale(1.06); }
.chatbot-panel {
    position: absolute; bottom: 74px; right: 0; width: 344px; max-width: calc(100vw - 32px);
    height: 470px; max-height: 70vh;
    background: var(--bg-card); border: 1px solid var(--line-strong);
    border-radius: 18px; box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5);
    display: none; flex-direction: column; overflow: hidden;
}
.chatbot-panel.open { display: flex; }
.chatbot-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--bg-sunken); }
.chatbot-header-info { display: flex; align-items: center; gap: 12px; }
.chatbot-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--teal)); color: #fff; display: flex; align-items: center; justify-content: center; }
.chatbot-header-info h4 { font-family: var(--font-heading); font-size: 0.95rem; color: var(--ink); font-weight: 600; }
.chatbot-status { font-size: 0.72rem; color: var(--teal); font-family: var(--font-mono); display: flex; align-items: center; gap: 5px; }
.chatbot-status i { font-size: 0.5rem; }
.chatbot-status.status-thinking { color: var(--sand); }
.chatbot-close { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 1rem; }
.chatbot-close:hover { color: var(--indigo); }
.chatbot-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; }
.chat-msg-bot { background: var(--bg-sunken); color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-msg-user { background: var(--indigo); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-msg-bot.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.chat-msg-bot.typing-indicator span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); animation: typing-bounce 1.2s infinite ease-in-out; }
.chat-msg-bot.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg-bot.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: transparent; border: 1px solid var(--line-strong); color: var(--teal); padding: 6px 12px; border-radius: 50px; font-size: 0.76rem; font-family: var(--font-mono); cursor: pointer; transition: var(--transition); }
.chip:hover { border-color: var(--teal); background: var(--teal-soft); }
.chatbot-input-bar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chatbot-input-bar input { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-sunken); color: var(--ink); font-family: var(--font-body); font-size: 16px; }
.chatbot-input-bar input:focus { border-color: var(--indigo); }
.chatbot-input-bar button { width: 40px; height: 40px; border-radius: 10px; border: none; background: var(--indigo); color: #fff; cursor: pointer; flex-shrink: 0; }
.chatbot-input-bar button:hover { background: var(--teal); }

/* ================================================================== */
/* RESPONSIVE                                                           */
/* ================================================================== */
@media (min-width: 769px) { .form-control, .chatbot-input-bar input { font-size: 0.92rem; } }

@media (max-width: 992px) {
    .hero-grid, .about-split, .contact-grid { grid-template-columns: 1fr; }
    .about-portrait { display: none; }
    .about-portrait-mobile { display: block; margin-top: 18px; border-radius: 16px; overflow: hidden; max-width: 280px; border: 1px solid var(--line); }
    .about-portrait-mobile img { width: 100%; display: block; }
    .profile-wrapper { max-width: 340px; }
}

@media (max-width: 1180px) {
    .nav-menu { display: none; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; background: var(--bg-elevated); border-radius: 14px; box-shadow: var(--shadow-card); padding: 8px; border: 1px solid var(--line); }
    .nav-menu.open { display: flex; }
    .mobile-menu-btn { display: block; }
    .brand-info span { display: none; }
}

@media (max-width: 768px) {
    .nav-dock-outer { padding: 10px 10px 0; }
    .chatbot-panel { width: calc(100vw - 32px); right: -8px; }
    .profile-geo-frame, .profile-img-card { width: 260px; height: 260px; }
    .exp-counter-card { flex-direction: column; text-align: center; }
    .hero-title { font-size: 2.2rem; }
    .hero-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
    .hero-title { font-size: 1.85rem; }
    .hero-stats-row { grid-template-columns: repeat(2, 1fr); padding: 16px; gap: 12px; }
    .container { padding: 0 16px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .detail-modal { padding: 26px 20px 22px; }
    .profile-geo-frame, .profile-img-card { width: 230px; height: 230px; }
}
