/* ============================================================
   MOBILE-FIRST STYLESHEET
   Base styles target small screens (≤ 639px).
   Progressive enhancements at:
     - min-width: 640px  → tablet (grids widen, nav still hamburger)
     - min-width: 1024px → desktop (hero 2 cols, inline nav, full sizes)
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --bg-card: #14141e;
    --bg-card-hover: #1c1c2a;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-2: #06b6d4;
    --accent-3: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(99, 102, 241, 0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 64px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-bracket { color: var(--accent); }
.logo-slash { color: var(--accent-2); }

/* Mobile base: menu is an off-canvas drawer toggled by the hamburger */
.nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    list-style: none;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.nav-cta {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 18px;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
}

.nav-link.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.lang-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 26px;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-option:hover {
    color: var(--text-primary);
}

.lang-option.is-active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* ===== i18n: hide inactive language =====
   Default (no data-lang, or data-lang="pt"): EN hidden, PT shown.
   data-lang="en": PT hidden, EN shown (naturally, via absence of the
   first rule). No display: revert needed, so this is safe across
   browsers and cache states. */
body:not([data-lang="en"]) .lang-en { display: none !important; }
body[data-lang="en"] .lang-pt { display: none !important; }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 18px;
    animation: fadeInUp 0.6s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    margin-bottom: 14px;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.hero-greeting {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.hero-name {
    display: block;
    font-size: clamp(2rem, 9vw, 3.8rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-roles {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.role-static { color: var(--text-secondary); }
.role-dynamic { color: var(--accent-light); font-family: var(--font-mono); }
.typed-cursor { color: var(--accent); animation: blink 1s infinite; font-weight: 300; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0 auto 24px;
    max-width: 540px;
    animation: fadeInUp 0.6s ease 0.3s backwards;
}

.hero-description strong { color: var(--text-primary); }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
    width: 100%;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto 48px;
    padding: 24px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.stat { text-align: center; }

.stat-number {
    display: inline-block;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-plus {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-top: 4px;
}

/* Hero Image + Expertise chips */
.hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    width: 100%;
    animation: fadeInRight 0.8s ease 0.3s backwards;
}

.image-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: visible;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 3px solid rgba(99, 102, 241, 0.3);
}

.image-glow {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 70%);
    z-index: 1;
    animation: pulse-glow 4s infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 1; }
}

.image-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px dashed rgba(99, 102, 241, 0.2);
    z-index: 1;
    animation: spin-slow 30s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.about-chips {
    margin: 24px 0 28px;
    justify-content: flex-start;
}

.expertise-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.expertise-chips .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(8px);
    animation: chipFadeIn 0.5s ease forwards;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.expertise-chips .chip i {
    color: var(--accent);
    font-size: 0.82rem;
}

.expertise-chips .chip:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--text-primary);
}

.expertise-chips .chip:nth-child(1) { animation-delay: 0.4s; }
.expertise-chips .chip:nth-child(2) { animation-delay: 0.5s; }
.expertise-chips .chip:nth-child(3) { animation-delay: 0.6s; }
.expertise-chips .chip:nth-child(4) { animation-delay: 0.7s; }
.expertise-chips .chip:nth-child(5) { animation-delay: 0.8s; }
.expertise-chips .chip:nth-child(6) { animation-delay: 0.9s; }
.expertise-chips .chip:nth-child(7) { animation-delay: 1.0s; }

@keyframes chipFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
    display: none; /* hidden on mobile to save vertical space */
}

@keyframes bounce-down {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECTIONS ===== */
.section { padding: 56px 0; }

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.6rem, 7vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT ===== */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.about-lead {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.92rem;
}

.about-text strong { color: var(--text-primary); }

.about-quote {
    margin-top: 18px;
    padding: 16px 18px;
    border-left: 3px solid var(--accent);
    background: rgba(99, 102, 241, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--accent-light);
    font-size: 0.92rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.highlight-card {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.highlight-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.highlight-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--accent);
}

.highlight-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.highlight-card p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ===== METRICS BANNER ===== */
.metrics-banner {
    padding: 36px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 6px;
}

.metric-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 22px;
    margin-bottom: 24px;
}

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

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    z-index: 1;
}

.timeline-content {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

.timeline-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.timeline-company {
    display: block;
    font-size: 0.82rem;
    color: var(--accent-light);
    font-weight: 500;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: normal;
    word-break: normal;
}

.timeline-industry {
    display: inline-block;
    font-size: 0.68rem;
    padding: 3px 9px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-2);
    border-radius: 100px;
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-content strong { color: var(--text-primary); }

.timeline-bullets {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-bullets li {
    position: relative;
    padding: 8px 10px 8px 22px;
    background: rgba(99, 102, 241, 0.05);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.timeline-bullets li::before {
    content: "\f0a9";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 7px;
    top: 9px;
    font-size: 0.65rem;
    color: var(--accent);
}

.timeline-bullets li strong { color: var(--text-primary); }

.timeline-item.is-hidden { display: none; }

.timeline-footer {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* ===== PROJECTS ===== */
.projects { background: var(--bg-secondary); }

/* Featured (flagship) cases */
.featured-projects {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 64px;
}

.featured-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.featured-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.featured-card:hover::before { opacity: 0.85; }

.featured-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.featured-metric-value {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.featured-metric-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.featured-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-light);
}

.featured-tag i { font-size: 0.85rem; }

.featured-card h3 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.featured-body p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.featured-body p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.featured-body .project-tech {
    margin-top: 8px;
}

.more-projects-header {
    text-align: center;
    margin: 0 0 24px;
}

.more-projects-title {
    font-size: 1.5rem;
    margin: 0 0 6px;
    color: var(--text-primary);
}

.more-projects-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.filter-btn i { font-size: 0.76rem; }

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.project-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card.hidden { display: none; }

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.project-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.95rem;
}

.project-tag {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-2);
    padding: 3px 8px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 100px;
    text-align: right;
}

.project-card h3 {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.project-tech span {
    font-size: 0.66rem;
    font-weight: 500;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.project-impact {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #22c55e;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.project-impact i { font-size: 0.82rem; }

.projects-footer {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.btn-show-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-light);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-show-all:hover {
    color: white;
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3);
}

.btn-show-all i {
    font-size: 0.72rem;
    transition: transform 0.3s ease;
}

.btn-show-all[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.btn-show-all[hidden] { display: none; }

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.skill-category {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.skill-category-header i {
    font-size: 1rem;
    color: var(--accent);
}

.skill-category-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tags span {
    font-size: 0.74rem;
    font-weight: 500;
    padding: 5px 11px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    color: var(--accent-light);
    transition: var(--transition);
}

.skill-tags span:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* ===== EDUCATION ===== */
.education { background: var(--bg-secondary); }

.education-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.education-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.education-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    font-size: 1.1rem;
    color: var(--accent);
}

.education-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.education-school {
    display: block;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.86rem;
}

.education-year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.education-card p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 6px;
}

.education-card p strong { color: var(--text-primary); }

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    font-size: 1.1rem;
    color: white;
}

.contact-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.contact-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    word-break: break-word;
}

/* ===== FOOTER ===== */
.footer {
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-content p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================================
   TABLET (min-width: 640px)
   Grids start widening; hero image larger; nav still hamburger.
   ============================================================ */
@media (min-width: 640px) {
    .container { padding: 0 24px; }
    .nav-container { padding: 0 24px; }

    .hero-content { padding: 40px 24px 56px; gap: 40px; }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        max-width: 820px;
        gap: 24px;
        padding: 28px 32px;
    }

    .stat-number { font-size: 2rem; }

    .image-wrapper { width: 300px; height: 300px; }

    .hero-actions { flex-wrap: nowrap; width: auto; }

    .metrics-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; }
    .metric-value { font-size: 2rem; }

    .about-highlights { gap: 16px; }

    .featured-projects { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .featured-card {
        grid-template-columns: 180px 1fr;
        gap: 28px;
        padding: 32px;
        align-items: start;
    }
    .featured-metric {
        padding-bottom: 0;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        padding-right: 24px;
        height: 100%;
        justify-content: center;
    }
    .featured-metric-value { font-size: 2.8rem; }

    .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .education-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .contact-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .section { padding: 72px 0; }
    .section-header { margin-bottom: 48px; }
}


/* ============================================================
   DESKTOP (min-width: 1024px)
   Hero becomes 2 columns; nav inline; final sizes applied.
   ============================================================ */
@media (min-width: 1024px) {
    :root { --nav-height: 72px; }

    .container { padding: 0 32px; }
    .nav-container { padding: 0 32px; }

    .nav-logo { font-size: 1.4rem; }

    /* Inline nav, no drawer */
    .nav-toggle { display: none; }
    .nav-menu {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        flex-direction: row;
        align-items: center;
        padding: 0;
        gap: 8px;
        border: none;
        transform: none;
        opacity: 1;
        pointer-events: all;
    }
    .nav-link { padding: 8px 16px; font-size: 0.9rem; }
    .nav-link.nav-cta { padding: 8px 20px; margin-top: 0; }

    /* Hero: two columns side by side */
    .hero-content {
        padding: 60px 32px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        text-align: left;
        align-items: center;
    }

    .hero-text { align-items: flex-start; }

    .hero-badge { margin-bottom: 24px; font-size: 0.85rem; padding: 6px 16px; }
    .hero-greeting { font-size: 1.2rem; }
    .hero-name { letter-spacing: -1.5px; }
    .hero-roles {
        font-size: 1.3rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
        margin-bottom: 24px;
    }
    .hero-description { font-size: 1.05rem; margin: 0 0 32px; }
    .hero-actions { justify-content: flex-start; margin-bottom: 48px; }
    .btn { padding: 14px 28px; font-size: 0.95rem; }
    .about-stats { max-width: 880px; gap: 28px; padding: 32px 40px; }
    .stat-number { font-size: 2.2rem; }
    .stat-plus { font-size: 1.5rem; }
    .stat-label { font-size: 0.75rem; }

    .hero-image { gap: 40px; }
    .image-wrapper { width: 420px; height: 420px; }
    .image-glow { inset: -24px; }
    .image-ring { inset: -16px; }

    .expertise-chips .chip {
        padding: 9px 16px;
        font-size: 0.83rem;
        gap: 8px;
    }
    .expertise-chips .chip i { font-size: 0.9rem; }

    .scroll-indicator {
        display: flex;
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column;
        align-items: center;
        gap: 6px;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 2px;
        animation: bounce-down 2s infinite;
        z-index: 2;
    }

    .section { padding: 100px 0; }
    .section-header { margin-bottom: 60px; }
    .section-tag { font-size: 0.85rem; }
    .section-subtitle { font-size: 1.05rem; }

    /* About: two columns */
    .about-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: start;
    }
    .about-lead { font-size: 1.15rem; margin-bottom: 16px; }
    .about-text p { font-size: 1rem; margin-bottom: 16px; }
    .about-quote { padding: 20px 24px; font-size: 1rem; margin-top: 24px; }
    .about-highlights { gap: 20px; }
    .highlight-card { padding: 24px; }
    .highlight-icon { width: 44px; height: 44px; margin-bottom: 16px; font-size: 1.1rem; }
    .highlight-card h3 { font-size: 1rem; margin-bottom: 8px; }
    .highlight-card p { font-size: 0.85rem; line-height: 1.6; }

    .metrics-banner { padding: 60px 0; }
    .metrics-grid { gap: 40px; }
    .metric-value { font-size: 2.5rem; margin-bottom: 8px; }
    .metric-label { font-size: 0.85rem; }

    .timeline-item { padding-left: 40px; margin-bottom: 40px; }
    .timeline-marker { width: 14px; height: 14px; }
    .timeline-content { padding: 24px; }
    .timeline-header h3 { font-size: 1.15rem; }
    .timeline-company { font-size: 0.95rem; }
    .timeline-date { font-size: 0.8rem; white-space: nowrap; }
    .timeline-industry { font-size: 0.75rem; padding: 3px 10px; margin-bottom: 12px; }
    .timeline-content p { font-size: 0.9rem; line-height: 1.7; }
    .timeline-bullets { margin: 12px 0 0 0; gap: 8px; }
    .timeline-bullets li { padding: 8px 12px 8px 26px; font-size: 0.87rem; line-height: 1.6; }
    .timeline-bullets li::before { left: 9px; top: 9px; font-size: 0.72rem; }

    .project-filters { gap: 8px; margin-bottom: 40px; }
    .filter-btn { padding: 8px 18px; font-size: 0.85rem; gap: 6px; }
    .filter-btn i { font-size: 0.8rem; }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 24px;
    }
    .project-card { padding: 28px; }
    .project-card-header { margin-bottom: 16px; }
    .project-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .project-tag { font-size: 0.7rem; padding: 4px 10px; }
    .project-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
    .project-card p { font-size: 0.88rem; line-height: 1.7; margin-bottom: 16px; }
    .project-tech { gap: 6px; margin-bottom: 16px; }
    .project-tech span { font-size: 0.72rem; padding: 4px 10px; }
    .project-impact { font-size: 0.85rem; padding-top: 16px; }
    .project-impact i { font-size: 0.9rem; }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
    .skill-category { padding: 28px; }
    .skill-category-header { gap: 12px; margin-bottom: 18px; }
    .skill-category-header i { font-size: 1.2rem; }
    .skill-category-header h3 { font-size: 1.05rem; }
    .skill-tags { gap: 8px; }
    .skill-tags span { font-size: 0.8rem; padding: 6px 14px; }

    .education-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 24px;
    }
    .education-card { padding: 32px; }
    .education-icon { width: 52px; height: 52px; margin-bottom: 20px; font-size: 1.3rem; }
    .education-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
    .education-school { font-size: 1rem; }
    .education-year { font-size: 0.8rem; margin-bottom: 16px; }
    .education-card p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 8px; }

    .contact-grid { gap: 24px; }
    .contact-card { padding: 36px 24px; }
    .contact-icon { width: 56px; height: 56px; font-size: 1.3rem; margin-bottom: 20px; }
    .contact-card h3 { font-size: 1.05rem; }
    .contact-card p { font-size: 0.9rem; }

    .footer { padding: 40px 0; }
    .footer-logo { font-size: 1.2rem; }
    .footer-content p { font-size: 0.85rem; }
    .footer-links a { font-size: 1.1rem; }
}
