:root {
    --bg-dark: #080d1a;
    --bg-surface: #0f172a;
    --bg-glass: rgba(15, 23, 42, 0.76);
    --border-glass: rgba(255, 255, 255, 0.09);
    --border-highlight: rgba(255, 255, 255, 0.16);
    --text-primary: #f8fafc;
    --text-secondary: #a3b3cc;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.45);
    --secondary-accent: #818cf8;
    --emerald: #10b981;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Physics & Spring Easing (Jakub Krehel Polish) */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Language Toggle Logic */
html[lang="es"] [data-lang="en"] { display: none !important; }
html[lang="en"] [data-lang="es"] { display: none !important; }

.lang-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.4rem 0.95rem;
    min-height: 38px;
    border-radius: 9999px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all 0.25s var(--ease-out-expo);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.06) inset;
}

.lang-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    transform: translateY(-1px);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* Optical Typography (Anthropic Frontend Design) */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    letter-spacing: -0.025em;
    text-wrap: balance;
}

p, li {
    text-wrap: pretty;
}

.highlight {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 65%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ambient Background Lighting */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.42;
    animation: float 14s infinite ease-in-out alternate;
}

.shape-1 {
    top: -12%;
    left: -8%;
    width: 540px;
    height: 540px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

.shape-2 {
    bottom: -12%;
    right: -8%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.35) 0%, transparent 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 38%;
    left: 42%;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.22) 0%, transparent 70%);
    animation-duration: 18s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(25px, 40px) scale(1.06); }
}

/* Layout */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 3.5rem 0;
}

.section-title {
    font-size: clamp(1.85rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 2.25rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.03em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 56%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--secondary-accent), transparent);
    border-radius: 2px;
}

/* Precision Glassmorphism & Hairline Borders (Jakub Krehel Polish) */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.glass-card {
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.07) inset,
        0 20px 40px -15px rgba(0, 0, 0, 0.45);
    transition:
        transform 0.35s var(--ease-out-expo),
        box-shadow 0.35s var(--ease-out-expo),
        border-color 0.35s var(--ease-out-expo);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.14) inset,
        0 24px 48px -12px rgba(0, 0, 0, 0.6),
        0 0 25px -5px rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.38);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 0.95rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.04em;
}

.logo span {
    color: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s ease;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s var(--ease-out-expo);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section (UI/UX Pro Max Executive Layout) */
.hero {
    display: flex;
    align-items: center;
    padding-top: 9.5rem;
    padding-bottom: 3.5rem;
}

.hero-content {
    width: 100%;
    max-width: 960px;
}

.executive-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.42rem 1rem;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.24);
    color: #e0f2fe;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1.4rem;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.08) inset;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
    animation: pulse-emerald 2.4s infinite ease-in-out;
}

@keyframes pulse-emerald {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}

.name {
    font-size: clamp(2.85rem, 7vw, 4.75rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin-bottom: 0.85rem;
}

.title {
    font-size: clamp(1.35rem, 3.2vw, 2.1rem);
    color: #e2e8f0;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.85rem;
}

.subtitle {
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    color: var(--text-secondary);
    max-width: 65ch;
    margin-bottom: 2.25rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Primary & Secondary CTAs */
.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.btn-primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 48px;
    padding: 0.8rem 1.65rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    color: #060b16;
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.35) inset,
        0 10px 25px -5px rgba(56, 189, 248, 0.4);
    transition: all 0.28s var(--ease-out-expo);
}

.btn-primary-cta svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.25;
}

.btn-primary-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.45) inset,
        0 16px 32px -6px rgba(56, 189, 248, 0.55);
    filter: brightness(1.06);
}

.btn-secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 48px;
    padding: 0.8rem 1.55rem;
    border-radius: 9999px;
    background: rgba(30, 41, 59, 0.72);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(129, 140, 248, 0.38);
    cursor: pointer;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.08) inset;
    transition: all 0.28s var(--ease-out-expo);
}

.btn-secondary-cta svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.btn-secondary-cta:hover {
    background: rgba(56, 189, 248, 0.14);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Contact Info Pills */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.75rem;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 42px;
    padding: 0.55rem 1.15rem;
    border-radius: 9999px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border-glass);
    transition: all 0.25s var(--ease-out-expo);
}

.contact-pill svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-pill:hover {
    color: var(--text-primary);
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

/* Executive KPI Strip */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
    margin-top: 0.5rem;
}

.kpi-card {
    padding: 1.35rem 1.4rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #f8fafc 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
}

/* Profile Section */
.profile-card p {
    margin-bottom: 1.35rem;
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 78ch;
    line-height: 1.72;
}

.profile-card p:last-child {
    margin-bottom: 0;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2.25rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(129, 140, 248, 0.35) 75%, transparent 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.75rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.68rem;
    top: 1.75rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2.5px solid var(--accent);
    z-index: 1;
    transition: all 0.3s var(--ease-out-expo);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
    transform: scale(1.15);
}

.timeline-content {
    padding: 2.25rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-header h3 {
    font-size: 1.32rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.timeline-header h4 {
    font-size: 0.98rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0;
}

.date-badge {
    background: rgba(56, 189, 248, 0.07);
    padding: 0.38rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #cbd5e1;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.task-list {
    list-style: none;
}

.task-list li {
    position: relative;
    padding-left: 1.45rem;
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.65;
    max-width: 80ch;
}

.task-list li strong {
    color: #f1f5f9;
    font-weight: 600;
}

.task-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--accent);
    font-size: 1.15rem;
    line-height: 1.4;
}

.award {
    margin-top: 1.6rem;
    padding: 1.1rem 1.25rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.09) 0%, rgba(167, 139, 250, 0.08) 100%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-left: 3px solid #fbbf24;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.92rem;
    color: var(--text-primary);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05) inset;
}

.award svg {
    width: 24px;
    height: 24px;
    color: #fbbf24;
    flex-shrink: 0;
}

/* Grid & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.edu-card {
    margin-bottom: 1.5rem;
}

.edu-card h3 {
    font-size: 1.12rem;
    margin-bottom: 0.45rem;
}

.edu-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cert-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.cert-icon svg {
    width: 24px;
    height: 24px;
}

/* Skills & Competencies */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.75rem;
}

.skill-category h3 {
    font-size: 1.15rem;
    margin-bottom: 1.15rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 0.42rem 0.85rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s var(--ease-out-expo);
}

.tag:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.45);
    color: #f8fafc;
    transform: translateY(-1px);
}

.languages {
    max-width: 640px;
}

.languages h3 {
    margin-bottom: 1.5rem;
}

.lang-item {
    margin-bottom: 1.4rem;
}

.lang-item:last-child {
    margin-bottom: 0;
}

.lang-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lang-name {
    font-weight: 600;
}

.lang-level {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.progress-bar {
    height: 7px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    margin-top: 0.55rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--secondary-accent));
    border-radius: 9999px;
    transform-origin: left;
    transition: width 1.1s var(--ease-spring), transform 1.4s var(--ease-spring);
}

/* Footer */
footer {
    padding: 2.5rem 0;
    margin-top: 4rem;
}

.text-center {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations (100% Visible by default to eliminate blank voids) */
.reveal,
.reveal-slide {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

/* Mobile Menu Toggle & Backdrop */
body.nav-menu-open {
    overflow: hidden;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 18, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
}

.menu-toggle .bar {
    width: 24px;
    height: 2.5px;
    background-color: var(--text-primary);
    transition: all 0.3s var(--ease-out-expo);
    border-radius: 3px;
}

/* Focus Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ========================================================
   RESPONSIVE ARCHITECTURE (320px -> 2560px)
   ======================================================== */

/* Large & Ultra-wide Screens (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1180px;
    }
}

/* Tablet Landscape & Compact Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.75rem;
    }

    .nav-right {
        gap: 1.35rem;
    }

    .nav-links {
        gap: 1.35rem;
    }

    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait & Mobile Landscape (<= 820px) */
@media (max-width: 820px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Mobile & Phablets (<= 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    section {
        padding: 1.75rem 0;
    }

    .section-title {
        font-size: clamp(1.6rem, 5vw, 1.95rem);
        margin-bottom: 1.35rem;
    }

    .nav-actions {
        gap: 0.65rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 102;
    }

    .hero {
        padding-top: 6.5rem;
        padding-bottom: 2.5rem;
    }

    .glass-card {
        padding: 1.45rem;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        height: 100dvh;
        width: min(80vw, 320px);
        background: rgba(8, 13, 26, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.38s var(--ease-out-expo);
        z-index: 101;
        border-left: 1px solid var(--border-glass);
        box-shadow: -12px 0 36px rgba(0, 0, 0, 0.65);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links a {
        font-size: 1.15rem;
        padding: 0.5rem 1rem;
        display: inline-block;
    }

    .executive-badge {
        font-size: 0.76rem;
        padding: 0.38rem 0.85rem;
        line-height: 1.35;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary-cta,
    .btn-secondary-cta {
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Pixel-perfect mobile timeline alignment:
       padding-left = 1.5rem (24px), line at left = 0.25rem (4px, center 5px),
       dot width = 12px (radius 6px), left = calc(-1.25rem - 5px) (-25px -> 24 - 25 = -1px, center 5px) */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline::before {
        left: 0.25rem;
    }

    .timeline-dot {
        left: calc(-1.25rem - 5px);
        width: 12px;
        height: 12px;
        top: 1.6rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .date-badge {
        max-width: 100%;
        line-height: 1.4;
        border-radius: 12px;
    }

    .timeline-content {
        padding: 1.35rem;
    }

    .award {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.6rem;
    }

    .contact-pill {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        padding: 0.7rem 1.1rem;
        font-size: 0.86rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Extra bottom spacing so Chatbot FAB never covers footer text */
    footer {
        padding-bottom: 5.75rem;
    }
}

/* Standard Mobile Portrait (<= 480px) */
@media (max-width: 480px) {
    .name {
        font-size: clamp(2.05rem, 9vw, 2.45rem);
    }

    .title {
        font-size: 1.15rem;
    }

    .subtitle {
        font-size: 0.98rem;
    }

    .kpi-strip {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .kpi-card {
        padding: 1rem;
    }

    .kpi-value {
        font-size: 1.4rem;
    }

    .kpi-label {
        font-size: 0.78rem;
    }

    section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: 1.65rem;
        margin-bottom: 1.85rem;
    }

    .cert-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Compact Mobile Screens (<= 360px, e.g., iPhone SE 320px) */
@media (max-width: 360px) {
    .container {
        padding: 0 1rem;
    }

    .name {
        font-size: 1.85rem;
    }

    .kpi-strip {
        grid-template-columns: 1fr;
    }

    .contact-pill {
        font-size: 0.8rem;
        padding: 0.65rem 0.9rem;
    }
}
