/* ============================================
   Novatix Solution Portfolio — Design System
   Premium Dark Theme with Glassmorphism
   ============================================ */

/* ─── Google Fonts ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── CSS Custom Properties ────────────────── */
:root {
    /* Colors — Deep Navy & Electric Blue Theme */
    --bg-primary: #050816;
    --bg-secondary: #0a0e27;
    --bg-tertiary: #111436;
    --bg-card: rgba(17, 20, 54, 0.7);
    --bg-card-hover: rgba(25, 30, 75, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gold: #fbbf24;
    --accent-green: #10b981;
    --accent-pink: #ec4899;

    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-bg: linear-gradient(180deg, #050816 0%, #0a0e27 50%, #111436 100%);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #00d4ff;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 212, 255, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: 100px 0;
    --container-max: 1200px;
    --container-padding: 0 24px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
    --shadow-glow-strong: 0 0 60px rgba(0, 212, 255, 0.25);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: #33ddff;
}

ul, ol {
    list-style: none;
}

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

/* ─── Utility Classes ──────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

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

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
    position: relative;
    padding: 6px 20px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-full);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Glassmorphism Card ───────────────────── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 212, 255, 0.15);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
    color: #fff;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

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

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

/* ─── Particle Canvas ──────────────────────── */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── Navigation ───────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(5, 8, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.nav-logo-img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.nav-cta {
    margin-left: 16px;
}

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

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

.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);
}

/* ─── Hero Section ─────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-primary);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-greeting {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-name .gradient-text {
    display: block;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-stats {
    display: flex;
    gap: 48px;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Image */
.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeIn 1s ease 0.4s both;
}

.hero-image-container {
    position: relative;
    width: 380px;
    height: 380px;
}

.hero-image-ring {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-secondary);
    animation: spin 8s linear infinite;
}

.hero-image-ring:nth-child(2) {
    inset: -30px;
    border-top-color: var(--accent-secondary);
    border-right-color: var(--accent-pink);
    animation: spin 12s linear infinite reverse;
    opacity: 0.5;
}

.hero-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-glow-strong);
    position: relative;
    z-index: 1;
    background: var(--bg-tertiary);
}

.hero-image-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: glow-pulse 4s ease-in-out infinite;
}

.hero-floating-badge {
    position: absolute;
    padding: 10px 18px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-md);
}

.hero-floating-badge.top-right {
    top: 20px;
    right: -20px;
    animation-delay: 0s;
}

.hero-floating-badge.bottom-left {
    bottom: 30px;
    left: -30px;
    animation-delay: 3s;
}

.hero-floating-badge .badge-icon {
    font-size: 1.2rem;
}

/* ─── About Section ────────────────────────── */
.about {
    background: var(--bg-secondary);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-image-section {
    position: relative;
}

.about-image-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.about-image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.about-image-card img {
    width: 100%;
    border-radius: var(--radius-lg);
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.about-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.about-info-card {
    padding: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-base);
}

.about-info-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    background: var(--bg-glass-hover);
}

.about-info-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-content h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 0.98rem;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 32px;
}

.about-detail {
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.about-detail-info {
    display: flex;
    flex-direction: column;
}

.about-detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-detail-value {
    font-weight: 600;
    font-size: 0.92rem;
}

/* ─── Services Section ─────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    group: true;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--accent-primary);
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    background: rgba(0, 212, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.service-card:hover h3 {
    color: var(--accent-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ─── Projects Section ─────────────────────── */
.projects {
    background: var(--bg-secondary);
}

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

.filter-btn {
    padding: 10px 24px;
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(0, 212, 255, 0.3);
    background: var(--bg-glass-hover);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    overflow: hidden;
    position: relative;
}

.project-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 22, 0.95) 100%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay-actions {
    display: flex;
    gap: 12px;
}

.project-overlay-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-overlay-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
}

.project-info {
    padding: 24px;
}

.project-category {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.project-card:hover .project-info h3 {
    color: var(--accent-primary);
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.project-tag {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

/* ─── Skills Section ───────────────────────── */
.skills-categories {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.skill-card {
    padding: 28px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-card:hover::after {
    transform: scaleX(1);
}

.skill-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    position: relative;
}

.skill-progress-ring {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.skill-progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 3;
}

.skill-progress-fill {
    fill: none;
    stroke: url(#skillGradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 163;
    stroke-dashoffset: 163;
    transition: stroke-dashoffset 1.5s ease;
}

.skill-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.skill-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.skill-proficiency {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* ─── Experience Timeline ──────────────────── */
.experience {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    padding: 0 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

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

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--bg-primary);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transition: var(--transition-base);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
    transform: translateX(-50%) scale(1.3);
}

.timeline-content {
    padding: 24px;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-spacer {
    grid-column: 2;
}

.timeline-item:nth-child(even) .timeline-spacer {
    grid-column: 1;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
}

.timeline-date {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-company {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

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

/* ─── Testimonials Section ─────────────────── */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.testimonial-card {
    padding: 32px;
    position: relative;
}

.testimonial-quote {
    font-size: 2.5rem;
    color: var(--accent-primary);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
    margin-bottom: 12px;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.testimonial-author-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.testimonial-author-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.testimonial-stars svg {
    width: 16px;
    height: 16px;
    fill: var(--accent-gold);
}

/* ─── Contact Section ──────────────────────── */
.contact {
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-info {
    padding: 40px;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-detail-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-detail-text h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-detail-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.contact-form-card {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

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

.form-submit {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    margin-top: 8px;
}

.form-message {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ─── Footer ───────────────────────────────── */
.footer {
    padding: 64px 0 24px;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 16px 0 24px;
    line-height: 1.7;
    max-width: 300px;
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-primary);
    padding-left: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

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

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

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

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

/* ─── Scroll Reveal Animations ─────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

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

@keyframes typing-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-primary);
    margin-left: 4px;
    animation: typing-cursor 0.8s infinite;
    vertical-align: text-bottom;
}

/* ─── Scroll to Top Button ─────────────────── */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

/* ─── Loading Skeleton ─────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-glass) 25%, var(--bg-glass-hover) 50%, var(--bg-glass) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Floating WhatsApp Button ─────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 52px;
    height: 52px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: var(--transition-base);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
}

.whatsapp-tooltip {
    position: absolute;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(5, 8, 22, 0.9);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(6px);
}

/* Touch manipulation optimization */
button, a, input, select, textarea {
    touch-action: manipulation;
}

/* Lock body scroll when mobile nav is open */
body.menu-open {
    overflow: hidden !important;
}

/* ─── Mobile-Friendly Responsive Design ────────────────────── */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

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

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image-container {
        width: 300px;
        height: 300px;
    }

    .hero-image-wrapper {
        order: -1;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 60px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 1;
        text-align: left;
    }

    .timeline-spacer {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 18px;
    }

    /* Prevent auto-zoom on iOS Safari when tapping inputs */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 285px;
        height: 100vh;
        flex-direction: column;
        background: rgba(5, 8, 22, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        padding: 90px 24px 40px;
        gap: 8px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border-color);
        z-index: 1000;
        overflow-y: auto;
    }

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

    .nav-link {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 16px;
        width: 100%;
    }

    .nav-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-name {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        background: var(--bg-card);
        padding: 18px 12px;
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-color);
    }

    .hero-stat-value {
        font-size: 1.6rem;
    }

    .hero-stat-label {
        font-size: 0.7rem;
    }

    /* Horizontal smooth swipeable project filters */
    .project-filters {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 32px;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .project-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 8px 18px;
        font-size: 0.82rem;
    }

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

    .project-overlay {
        opacity: 1;
        background: linear-gradient(180deg, transparent 40%, rgba(5, 8, 22, 0.95) 100%);
    }

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

    .service-card {
        padding: 24px 20px;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .skill-card {
        padding: 18px 10px;
    }

    .skill-card h4 {
        font-size: 0.8rem;
    }

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

    .testimonial-card {
        padding: 24px 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-info, .contact-form-card {
        padding: 24px 20px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .about-info-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .about-info-card {
        padding: 14px 10px;
    }

    .about-info-value {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .scroll-top {
        bottom: 24px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .whatsapp-float {
        bottom: 24px;
        left: 20px;
        width: 46px;
        height: 46px;
    }

    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-image-container {
        width: 220px;
        height: 220px;
    }

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

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 14px 8px;
    }

    .hero-stat-value {
        font-size: 1.35rem;
    }

    .hero-stat-label {
        font-size: 0.65rem;
        letter-spacing: 0;
    }

    .about-info-cards {
        grid-template-columns: 1fr 1fr;
    }

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

/* ─── Overlay for mobile nav ───────────────── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.3);
}

/* ─── Project placeholder images ───────────── */
.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--accent-primary);
    opacity: 0.4;
}


/* ============================================
   Motion Graphics & Interactive Layer
   ============================================ */

/* Let the animated background show through the alternating sections */
.about,
.projects,
.experience,
.contact {
    background: rgba(10, 14, 39, 0.55);
}

/* ─── Motion Background ────────────────────── */
.motion-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora {
    position: absolute;
    inset: -20%;
    filter: blur(80px) saturate(140%);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.bg-aurora .aurora {
    opacity: 0.5;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform;
}

.aurora-blob.b1 {
    width: 55vw;
    height: 55vw;
    top: 0;
    left: 5%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.55), transparent 65%);
    animation: aurora-drift-1 22s ease-in-out infinite alternate;
}

.aurora-blob.b2 {
    width: 50vw;
    height: 50vw;
    top: 30%;
    right: 0;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.6), transparent 65%);
    animation: aurora-drift-2 26s ease-in-out infinite alternate;
}

.aurora-blob.b3 {
    width: 40vw;
    height: 40vw;
    bottom: 0;
    left: 30%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.35), transparent 65%);
    animation: aurora-drift-3 30s ease-in-out infinite alternate;
}

.aurora-blob.b4 {
    width: 35vw;
    height: 35vw;
    top: 50%;
    left: -5%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 65%);
    animation: aurora-drift-1 34s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(15vw, 10vh) scale(1.2); }
    100% { transform: translate(-5vw, 20vh) scale(0.9); }
}

@keyframes aurora-drift-2 {
    0%   { transform: translate(0, 0) scale(1.1); }
    50%  { transform: translate(-20vw, -10vh) scale(0.85); }
    100% { transform: translate(-5vw, 15vh) scale(1.15); }
}

@keyframes aurora-drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(10vw, -25vh) scale(1.25); }
    100% { transform: translate(-15vw, -5vh) scale(1); }
}

/* Retro-futuristic grid floor scrolling toward the viewer */
.grid-floor {
    position: absolute;
    left: -50%;
    right: -50%;
    bottom: 0;
    height: 55vh;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.14) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(420px) rotateX(62deg);
    transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 80%);
    mask-image: linear-gradient(to top, #000 0%, transparent 80%);
    animation: grid-scroll 3s linear infinite;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.bg-aurora .grid-floor {
    opacity: 0.45;
}

@keyframes grid-scroll {
    from { background-position: 0 0; }
    to   { background-position: 0 64px; }
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(5, 8, 22, 0.85) 100%);
}

/* ─── Cursor Glow ──────────────────────────── */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 560px;
    height: 560px;
    margin: -280px 0 0 -280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.06) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: transform;
}

.cursor-glow.active {
    opacity: 1;
}

/* ─── Scroll Progress ──────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed, #ec4899);
    transform-origin: left center;
    transform: scaleX(0);
    z-index: 1001;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

/* ─── Preloader ────────────────────────────── */
body.is-loading {
    overflow: hidden;
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.preloader.done {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    text-align: center;
}

.preloader-logo {
    font-family: var(--font-mono);
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    animation: preloader-pulse 1.4s ease-in-out infinite;
}

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

.preloader-bar {
    width: 200px;
    height: 2px;
    margin: 20px auto 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar span {
    display: block;
    height: 100%;
    background: var(--gradient-primary);
    animation: preloader-fill 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.preloader-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.preloader-dots::after {
    content: '';
    animation: preloader-dots 1.2s steps(4) infinite;
}

@keyframes preloader-fill {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes preloader-pulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(0, 212, 255, 0.4); }
    50%      { opacity: 0.7; text-shadow: 0 0 40px rgba(124, 58, 237, 0.6); }
}

@keyframes preloader-dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

/* Hero entrance after the preloader lifts */
.hero-content > * {
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-content > :nth-child(2) { transition-delay: 0.08s; }
.hero-content > :nth-child(3) { transition-delay: 0.16s; }
.hero-content > :nth-child(4) { transition-delay: 0.24s; }
.hero-content > :nth-child(5) { transition-delay: 0.32s; }
.hero-content > :nth-child(6) { transition-delay: 0.40s; }
.hero-content > :nth-child(7) { transition-delay: 0.48s; }

.is-loading .hero-content > * {
    opacity: 0;
    transform: translateY(30px);
}

.scramble-char {
    -webkit-text-fill-color: var(--accent-primary);
    opacity: 0.75;
}

/* ─── Scroll Indicator ─────────────────────── */
.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.7;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator-mouse {
    display: block;
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    position: relative;
}

.scroll-indicator-mouse span {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--accent-primary);
    animation: scroll-wheel 1.8s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0%   { opacity: 0; transform: translateY(0); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(12px); }
}

/* ─── Buttons ──────────────────────────────── */
.btn-primary {
    background: linear-gradient(110deg, #00d4ff, #7c3aed, #ec4899, #00d4ff);
    background-size: 300% 100%;
    animation: gradient-flow 6s linear infinite;
}

@keyframes gradient-flow {
    from { background-position: 0% 50%; }
    to   { background-position: 300% 50%; }
}

.btn-outline {
    background:
        linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
        linear-gradient(110deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)) border-box;
    border: 2px solid transparent;
}

.btn-outline:hover {
    background:
        linear-gradient(rgba(5, 8, 22, 0.9), rgba(5, 8, 22, 0.9)) padding-box,
        linear-gradient(110deg, #00d4ff, #7c3aed, #ec4899) border-box;
}

.btn > *,
.filter-btn > * {
    position: relative;
    z-index: 1;
}

.filter-btn,
.project-overlay-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 0;
}

@keyframes ripple {
    to { transform: scale(1); opacity: 0; }
}

.magnetic {
    will-change: transform;
}

.filter-count {
    display: inline-block;
    margin-left: 8px;
    padding: 0 7px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.22);
}

/* ─── Card Spotlight & Tilt ────────────────── */
.glass-card:hover {
    background:
        radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 212, 255, 0.09), transparent 45%),
        var(--bg-card-hover);
}

.glass-card.tilt {
    transform-style: preserve-3d;
}

/* Fast follow while hovering; the slower base transition eases it back on leave */
.glass-card.tilt.visible:hover {
    transition: transform 0.12s linear, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-number {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.skill-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

img.testimonial-avatar {
    object-fit: cover;
}

/* ─── Project Cards ────────────────────────── */
.project-card {
    cursor: pointer;
}

.project-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1a1300;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
}

.project-category[style*="--cat"] {
    color: var(--cat);
    background: color-mix(in srgb, var(--cat) 12%, transparent);
    border-color: color-mix(in srgb, var(--cat) 30%, transparent);
}

/* ─── Project Details Modal ────────────────── */
body.modal-open {
    overflow: hidden;
}

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.project-modal[hidden] {
    display: none;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-modal-panel,
.project-modal-panel:hover {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: rgba(12, 15, 40, 0.96);
    border-color: rgba(0, 212, 255, 0.18);
    transform: translateY(30px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.project-modal.open .project-modal-backdrop {
    opacity: 1;
}

.project-modal.open .project-modal-panel {
    transform: none;
    opacity: 1;
}

.project-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    cursor: pointer;
    transition: var(--transition-base);
}

.project-modal-close:hover {
    background: var(--accent-primary);
    color: #000;
    transform: rotate(90deg);
}

.project-modal-body {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.pm-media {
    padding: 28px;
}

.pm-main-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.pm-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pm-thumb {
    flex: 0 0 76px;
    height: 50px;
    padding: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    opacity: 0.55;
    transition: var(--transition-fast);
}

.pm-thumb:hover,
.pm-thumb.active {
    opacity: 1;
    border-color: var(--accent-primary);
}

.pm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-placeholder {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    color: var(--cat);
    background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 20%, transparent), transparent);
    border: 1px solid var(--border-color);
}

.pm-content {
    padding: 32px 32px 32px 8px;
}

.pm-content h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 12px 0 16px;
}

.pm-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.pm-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
}

.pm-meta dt {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.pm-meta dd {
    font-weight: 600;
    color: var(--text-primary);
}

.pm-subheading {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin: 22px 0 10px;
}

.pm-features li {
    display: flex;
    gap: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pm-features svg {
    flex-shrink: 0;
    margin-top: 5px;
    color: var(--accent-green);
}

.pm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

/* ─── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .aurora {
        filter: blur(60px);
    }

    .aurora-blob.b4 {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }

    .project-modal {
        padding: 0;
        align-items: flex-end;
    }

    .project-modal-panel,
    .project-modal-panel:hover {
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
    }

    .project-modal-body {
        grid-template-columns: 1fr;
    }

    .pm-media {
        padding: 56px 16px 0;
    }

    .pm-content {
        padding: 16px 16px 28px;
    }

    .pm-content h2 {
        font-size: 1.5rem;
    }
}

/* ─── Reduced Motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .aurora-blob,
    .grid-floor,
    .btn-primary,
    .preloader-logo,
    .scroll-indicator-mouse span {
        animation: none !important;
    }

    .preloader {
        display: none;
    }

    body.is-loading {
        overflow: auto;
    }

    .is-loading .hero-content > * {
        opacity: 1;
        transform: none;
    }
}

/* Portrait photo: keep the face in frame inside round/cropped containers */
.hero-image,
.about-image-card img {
    object-position: center 22%;
}


/* ============================================
   Mobile Polish
   ============================================ */

/* Nothing may push the page sideways (slide-in animations, glows) */
html,
body {
    overflow-x: hidden;
    overflow-x: clip;
}

.social-link svg,
.project-overlay-btn svg,
.btn svg {
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    /* Side slide-ins become upward fades so nothing starts off-screen */
    .reveal-left,
    .reveal-right {
        transform: translateY(40px);
    }

    .reveal-left.visible,
    .reveal-right.visible {
        transform: none;
    }
}

@media (max-width: 768px) {
    /* Comfortable 44px touch targets */
    .nav-toggle {
        width: 44px;
        height: 44px;
        padding: 10px;
        justify-content: center;
        align-items: center;
        margin-right: -10px;
    }

    .filter-btn {
        min-height: 42px;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    /* Filters: one swipeable row instead of three wrapped rows */
    .project-filters {
        flex-wrap: nowrap;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        scroll-snap-type: x proximity;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
    }

    .filter-btn {
        scroll-snap-align: start;
    }

    /* Hero photo badges: smaller and pushed to the edges, off the face */
    .hero-floating-badge {
        padding: 6px 12px;
        font-size: 0.72rem;
        gap: 6px;
    }

    .hero-floating-badge.top-right {
        top: -4px;
        right: -24px;
    }

    .hero-floating-badge.bottom-left {
        bottom: 6px;
        left: -24px;
    }

    .hero-title {
        min-height: 1.7em; /* stop the layout jumping while the typing effect runs */
    }

    /* About photo: a framed portrait, not a full-screen image */
    .about-image-card {
        max-width: 320px;
        margin: 0 auto;
    }

    /* Project cards: show the image, keep the action bar slim at the bottom */
    .project-overlay {
        padding: 14px;
        background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 22, 0.9) 100%);
    }

    .project-overlay-actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .project-overlay-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .project-featured {
        top: 10px;
        left: 10px;
    }

    .project-info {
        padding: 18px;
    }

    /* Modal actions stack full-width for easy tapping */
    .pm-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .pm-meta {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
    }

    /* Floating buttons respect the iPhone home bar */
    .whatsapp-float {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .scroll-top {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 380px) {
    .hero-floating-badge.top-right {
        right: -12px;
    }

    .hero-floating-badge.bottom-left {
        left: -12px;
    }

    .hero-cta .btn {
        padding: 12px 22px;
    }
}
