/* ============================================
   PORTFOLIO - PREMIUM DESIGN SYSTEM
   AI Engineer & Data Scientist Theme
   ============================================ */

/* Modern Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Premium Color Palette */
    --bg-primary: #030306;
    --bg-secondary: #080810;
    --bg-tertiary: #0c0c18;
    --bg-card: rgba(15, 15, 25, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.02);

    /* Text Colors */
    --text-primary: #f5f5f7;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Accent Colors - Electric Cyan & Vivid Purple */
    --primary: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.4);
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.4);
    --accent: #ec4899;
    --accent-glow: rgba(236, 72, 153, 0.3);
    --gold: #fbbf24;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-text: linear-gradient(90deg, #00d4ff, #8b5cf6, #ec4899);
    --gradient-card: linear-gradient(145deg, rgba(0, 212, 255, 0.05), rgba(139, 92, 246, 0.05));

    /* Borders & Shadows */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 212, 255, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Fira Code', 'JetBrains Mono', monospace;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container: 1200px;
    --nav-height: 72px;
    --section-padding: clamp(40px, 6vw, 80px);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Animated Background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(0, 212, 255, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(236, 72, 153, 0.08), transparent);
    z-index: -1;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(3, 3, 6, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 99999;
    /* High Z-Index */
    transform: translateZ(0);
    /* Force hardware acceleration to fix backdrop-filter stacking issues */
    /* Very high to ensure nav-links inside appears above main content */
}

/* Main content - MUST have lower z-index than navbar */
main {
    padding-top: var(--nav-height);
    position: relative;
    z-index: 0;
    /* Lower than navbar so mobile menu appears on top */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 6px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    margin-top: calc(-1 * var(--nav-height));
    padding-top: calc(var(--nav-height) + 4rem);
    position: relative;
    overflow: hidden;
}

/* Animated Grid Background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent);
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Floating Orbs */
.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 60%);
    top: -200px;
    right: -200px;
    animation: floatOrb 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

.hero-greeting {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50px;
    animation: fadeDown 0.8s ease-out;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-title span {
    display: block;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 4s ease infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    animation: fadeUp 0.8s ease-out 0.4s both;
}

.hero-roles {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s ease-out 0.5s both;
}

.hero-roles span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-roles .role {
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-code);
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    animation: fadeUp 0.8s ease-out 0.6s both;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    display: inline-block;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* ============================================
   CARDS - GLASSMORPHISM
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all var(--transition);
}

/* Card glow effect on hover */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

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

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    left: 100%;
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}

.card:hover .card-icon {
    background: var(--primary);
    color: #000;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px var(--primary-glow);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.card-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Tech Tags */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.tag {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.card:hover .tag {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--primary);
}

/* Project Metrics */
.project-metrics {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gold);
}

.metric i {
    font-size: 0.9rem;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   FILTER BUTTONS
   ============================================ */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

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

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

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-glow);
}

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

.timeline-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-desc li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.timeline-desc li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* ============================================
   EDUCATION CARDS
   ============================================ */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.edu-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all var(--transition);
}

.edu-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.edu-degree {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.edu-school {
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.edu-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   CERTIFICATIONS
   ============================================ */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all var(--transition);
}

.cert-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.cert-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    color: var(--secondary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cert-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.cert-org {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.cert-link {
    font-size: 0.8rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cert-link:hover {
    text-decoration: underline;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    padding-right: 2rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    color: var(--primary);
    font-size: 1rem;
}

.contact-item-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.contact-item-text p {
    font-size: 0.9rem;
    margin: 0;
}

.contact-social {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-social a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.contact-social a:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 4rem 0 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-social a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

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

/* ============================================
   FILTER BUTTONS (Project Categories)
   ============================================ */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: #000;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --container: 95%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        padding-right: 0;
    }
}

@media (max-width: 768px) {

    /* Reduce navbar height on mobile FIRST */
    :root {
        --nav-height: 60px;
    }

    /* Make sure navbar stays on top */
    /* Navbar z-index handled globally */

    /* Mobile Navigation - Full Screen Overlay (Legacy Style) */
    .nav-links {
        position: fixed;
        top: 0;
        /* Cover entire screen including navbar */
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: rgba(3, 3, 6, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        /* Vertically center links */
        align-items: center;
        /* Horizontally center links */
        gap: 2rem;
        padding: 2rem;
        z-index: 2147483646;
        /* One less than toggle button */
        overflow-y: hidden;
        /* No scroll for full screen feel */

        /* Slide in from right (Legacy Style) */
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Show when active */
    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    /* Raise Toggle Button above overlay */
    .mobile-menu-btn {
        z-index: 2147483647;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 48px;
        height: 48px;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
    }

    .mobile-menu-btn span {
        display: block;
        width: 26px;
        height: 2.5px;
        background: var(--primary);
        margin: 5px 0;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border-radius: 3px;
        box-shadow: 0 0 8px var(--primary-glow);
    }

    /* X Animation when active */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
        background: #ff4757;
        box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
        background: #ff4757;
        box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
    }

    /* Style the li elements */
    .nav-links li {
        display: block;
        width: auto;
        opacity: 0;
        transform: translateY(20px);
        animation: slideInLink 0.4s ease forwards;
    }

    .nav-links.active li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        animation-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        animation-delay: 0.4s;
    }

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

    /* Professional Text Links (No Boxes) */
    .nav-link {
        display: inline-block;
        font-size: 1rem;
        font-weight: 550;
        letter-spacing: 0.02em;
        padding: 0.75rem 0;
        background: transparent;
        border: none;
        color: var(--text-secondary) !important;
        text-transform: uppercase;
        position: relative;
        transition: all 0.3s ease;
    }

    /* Gradient underline effect on hover */
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: var(--gradient-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
        transform: translateX(-50%);
        display: block !important;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--text-primary) !important;
        background: var(--gradient-text);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        transform: scale(1.05);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    /* Filter Tabs - Horizontal Scrollable */
    .filter-container {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: transparent;
        border: none;
    }

    .filter-container::after {
        display: none;
    }

    .filter-container::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    /* Hero Adjustments */
    .hero {
        padding-top: calc(var(--nav-height) + 2rem);
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    /* Cards Single Column */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Stats 2x2 Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem 1rem;
    }

    /* Timeline Adjustments */
    .timeline::before {
        left: 6px;
    }

    .timeline-item {
        padding-left: 35px;
    }

    .timeline-item::before {
        left: 0;
    }

    /* Section Spacing */
    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    /* Education & Cert Cards */
    .education-grid,
    .cert-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-greeting {
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .card {
        padding: 1.5rem;
    }

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

    .contact-form {
        padding: 1.5rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}