/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f8fafc;
    color: #0a0e27;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background: #0a0e27;
    color: #ffffff;
}

/* Animated Background */
.animated-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: backgroundShift 15s ease infinite;
}

body:not(.dark) .animated-bg {
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 110, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

/* Floating 3D Orb Field */
.orb-field {
    position: absolute;
    inset: 0;
    perspective: 1200px;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    transform-style: preserve-3d;
    will-change: transform;
}

body:not(.dark) .orb {
    opacity: 0.18;
}

.orb-1 {
    width: 340px;
    height: 340px;
    top: 8%;
    left: 6%;
    background: radial-gradient(circle at 30% 30%, #00f0ff, transparent 70%);
    animation: orbFloat1 18s ease-in-out infinite;
}

.orb-2 {
    width: 420px;
    height: 420px;
    bottom: 4%;
    right: 4%;
    background: radial-gradient(circle at 30% 30%, #ff006e, transparent 70%);
    animation: orbFloat2 22s ease-in-out infinite;
}

.orb-3 {
    width: 280px;
    height: 280px;
    top: 45%;
    left: 55%;
    background: radial-gradient(circle at 30% 30%, #8b5cf6, transparent 70%);
    animation: orbFloat3 16s ease-in-out infinite;
}

.orb-4 {
    width: 220px;
    height: 220px;
    top: 68%;
    left: 20%;
    background: radial-gradient(circle at 30% 30%, #00f0ff, transparent 70%);
    animation: orbFloat2 26s ease-in-out infinite reverse;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg); }
    50% { transform: translate3d(60px, 80px, 120px) rotateX(20deg) rotateY(30deg); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg); }
    50% { transform: translate3d(-70px, -60px, 100px) rotateX(-15deg) rotateY(-25deg); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-40px, 50px, 80px) scale(1.15); }
}

/* Perspective Grid Floor — tech/CRM "data grid" feel receding into depth */
.grid-floor {
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -8%;
    height: 55%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.14) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(600px) rotateX(62deg);
    transform-origin: bottom center;
    -webkit-mask-image: linear-gradient(to top, black 5%, transparent 80%);
    mask-image: linear-gradient(to top, black 5%, transparent 80%);
    animation: gridScroll 9s linear infinite;
    opacity: 0.55;
    pointer-events: none;
}

body:not(.dark) .grid-floor {
    opacity: 0.2;
}

@keyframes gridScroll {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 56px, 0 56px; }
}

/* Rotating 3D Wireframe Graphics — cubes + rings drifting behind content */
.wire-shapes {
    position: absolute;
    inset: 0;
    perspective: 1100px;
    overflow: hidden;
    pointer-events: none;
}

.wire-cube {
    --s: 100px;
    position: absolute;
    width: var(--s);
    height: var(--s);
    transform-style: preserve-3d;
    opacity: 0.45;
}

.wire-cube .face {
    position: absolute;
    width: var(--s);
    height: var(--s);
    border: 1px solid rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.02);
}

.wire-cube .face:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.wire-cube .face:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.wire-cube .face:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.wire-cube .face:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.wire-cube .face:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.wire-cube .face:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

.wire-cube-1 {
    --s: 120px;
    top: 12%;
    left: 6%;
    animation: cubeSpin 26s linear infinite;
}

.wire-cube-2 {
    --s: 76px;
    bottom: 16%;
    right: 8%;
    animation: cubeSpin 32s linear infinite reverse;
}

.wire-cube-2 .face {
    border-color: rgba(255, 0, 110, 0.35);
}

@keyframes cubeSpin {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

.wire-ring {
    position: absolute;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    opacity: 0.5;
}

.wire-ring::before {
    content: '';
    position: absolute;
    inset: 26px;
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 50%;
}

.wire-ring-1 {
    top: 42%;
    left: 62%;
    animation: ringSpin1 22s linear infinite;
}

.wire-ring-2 {
    width: 160px;
    height: 160px;
    top: 66%;
    left: 12%;
    border-color: rgba(0, 240, 255, 0.35);
    animation: ringSpin2 18s linear infinite;
}

@keyframes ringSpin1 {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes ringSpin2 {
    from { transform: rotateX(-65deg) rotateZ(0deg); }
    to { transform: rotateX(-65deg) rotateZ(-360deg); }
}

@media (max-width: 768px) {
    .wire-cube,
    .wire-ring {
        display: none;
    }

    .grid-floor {
        opacity: 0.3;
        background-size: 44px 44px;
    }
}

/* Particles Canvas */
#particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Navigation */
.nav-link {
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f0ff, #ff006e);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: #00f0ff;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #00f0ff, #8b5cf6);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 44px;
    color: white;
    transform-style: preserve-3d;
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.25), 0 2px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #ff006e);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: translateY(-4px) rotateX(6deg);
    box-shadow: 0 16px 36px rgba(0, 240, 255, 0.45);
}

.btn-primary:active {
    transform: translateY(-1px) rotateX(2deg) scale(0.98);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid #00f0ff;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.3s ease;
    min-height: 44px;
    color: #00f0ff;
    transform-style: preserve-3d;
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.1);
    transform: translateY(-4px) rotateX(6deg);
    box-shadow: 0 16px 36px rgba(0, 240, 255, 0.25);
}

.btn-secondary:active {
    transform: translateY(-1px) rotateX(2deg) scale(0.98);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Photo Container with 3D Coverflow */
.photo-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 0 auto;
    perspective: 1400px;
}

@media (min-width: 480px) {
    .photo-container {
        max-width: 350px;
        height: 350px;
    }
}

@media (min-width: 640px) {
    .photo-container {
        max-width: 450px;
        height: 450px;
    }
}

@media (min-width: 1024px) {
    .photo-container {
        max-width: 500px;
        height: 500px;
    }
}

.photo-glow {
    position: absolute;
    inset: -20px;
    background: linear-gradient(45deg, #00f0ff, #ff006e, #8b5cf6, #00f0ff);
    background-size: 400% 400%;
    animation: gradient 3s ease infinite;
    border-radius: 30px;
    filter: blur(40px);
    opacity: 0.6;
}

.coverflow {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.coverflow-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.coverflow-slide.is-active {
    animation: coverflowFloat 6s ease-in-out infinite;
}

@keyframes coverflowFloat {
    0%, 100% { }
    50% { transform: translateY(-14px) var(--active-rot, rotateY(0deg)); }
}

.coverflow-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.coverflow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.coverflow-dot.active {
    width: 28px;
    border-radius: 6px;
    background: linear-gradient(90deg, #00f0ff, #8b5cf6);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #00f0ff, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

@media (min-width: 640px) {
    .section-title {
        font-size: 3rem;
        margin-bottom: 4rem;
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #00f0ff, #ff006e);
    border-radius: 2px;
}

/* Spotlight (cursor-follow) glow used by all 3D tilt cards */
.tilt-3d {
    position: relative;
}

.tilt-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(320px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(0, 240, 255, 0.18), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tilt-3d:hover::after {
    opacity: 1;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

body.dark .glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .glass-card {
        padding: 2rem;
    }
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    box-shadow: 0 25px 70px rgba(0, 240, 255, 0.25);
    border-color: rgba(0, 240, 255, 0.3);
}

/* Service Card */
.service-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    transform-style: preserve-3d;
}

body.dark .service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .service-card {
        padding: 2.5rem;
    }
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(0, 240, 255, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    box-shadow: 0 30px 80px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.4);
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: 15px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease;
}

@media (min-width: 640px) {
    .service-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1.5rem;
        border-radius: 20px;
    }
}

.service-card:hover .service-icon {
    transform: rotateY(180deg) scale(1.1);
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.3), rgba(0, 240, 255, 0.3));
}

/* Skill Card */
.skill-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    height: 100%;
    transform-style: preserve-3d;
}

body.dark .skill-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .skill-card {
        padding: 2rem;
    }
}

.skill-card:hover {
    box-shadow: 0 25px 60px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}

.skill-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(255, 0, 110, 0.2));
    border-radius: 12px;
    font-size: 1.5rem;
}

@media (min-width: 640px) {
    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        border-radius: 15px;
    }
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
}

body.dark .skill-item {
    color: #d1d5db;
}

.skill-item::before {
    content: '▹';
    color: #00f0ff;
    font-size: 1rem;
}

@media (min-width: 640px) {
    .skill-item::before {
        font-size: 1.2rem;
    }
}

.skill-item:hover {
    transform: translateX(5px);
    color: #0a0e27;
}

body.dark .skill-item:hover {
    color: #ffffff;
}

/* Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    transform-style: preserve-3d;
}

body.dark .project-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .project-card {
        padding: 2rem;
    }
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #00f0ff, #ff006e);
    transition: left 0.3s;
}

.project-card:hover::before {
    left: 0;
}

.project-card:hover {
    box-shadow: 0 30px 70px rgba(255, 0, 110, 0.3);
    border-color: rgba(255, 0, 110, 0.4);
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #00f0ff;
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .tag {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}

.tag:hover {
    background: rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

/* Experience Card */
.experience-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    transform-style: preserve-3d;
}

body.dark .experience-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .experience-card {
        padding: 3rem;
    }
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #00f0ff, #8b5cf6, #ff006e);
    transition: height 0.5s ease;
}

.experience-card:hover::before {
    height: 100%;
}

.experience-card:hover {
    box-shadow: 0 25px 70px rgba(0, 240, 255, 0.2);
}

/* Experience sub-cards (per-project breakdown) */
.exp-subcard {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-left: 3px solid #00f0ff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.dark .exp-subcard {
    background: rgba(255, 255, 255, 0.02);
}

.exp-subcard:nth-of-type(2) {
    border-left-color: #ff006e;
}

.exp-subcard:nth-of-type(3) {
    border-left-color: #8b5cf6;
}

.exp-subcard:hover {
    transform: translateX(8px);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.35);
}

.exp-subcard-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.exp-subcard-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 92, 246, 0.2));
    color: #00f0ff;
    font-size: 1rem;
}

.exp-subcard ul {
    margin-left: 0;
}

/* Certification Card */
.cert-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    transform-style: preserve-3d;
}

body.dark .cert-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .cert-card {
        padding: 2rem;
    }
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 0, 110, 0.2), transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    border-radius: 50%;
}

.cert-card:hover::before {
    width: 300px;
    height: 300px;
}

.cert-card:hover {
    box-shadow: 0 25px 60px rgba(255, 0, 110, 0.3);
    border-color: rgba(255, 0, 110, 0.4);
}

/* Certification Icons with specific colors */
.cert-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.cert-icon.salesforce {
    background: linear-gradient(135deg, #00A1E0, #1798c1);
}

.cert-icon.agentforce {
    background: linear-gradient(135deg, #ff006e, #ff4d94);
}

.cert-icon.java {
    background: linear-gradient(135deg, #007396, #ed8b00);
}

.cert-icon.database {
    background: linear-gradient(135deg, #4479A1, #00758F);
}

.cert-icon.cloud {
    background: linear-gradient(135deg, #4285F4, #34A853);
}

.cert-icon.security {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
}

.cert-icon.iot {
    background: linear-gradient(135deg, #4ECDC4, #556270);
}

.cert-icon.webdev {
    background: linear-gradient(135deg, #8b5cf6, #00f0ff);
}

.cert-icon.responsive {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

@media (min-width: 640px) {
    .cert-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .cert-icon img {
        width: 40px;
        height: 40px;
    }
}

.cert-card:hover .cert-icon {
    transform: rotateY(360deg) scale(1.1);
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
}

body.dark .contact-form {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .contact-form {
        padding: 2rem;
    }
}

.form-group {
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .form-group {
        margin-bottom: 1.5rem;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00f0ff;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    color: #0a0e27;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

body.dark .form-group input,
body.dark .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

@media (min-width: 640px) {
    .form-group input,
    .form-group textarea {
        padding: 1rem;
        font-size: 1rem;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    transition: all 0.3s ease;
}

body.dark .contact-item {
    background: rgba(255, 255, 255, 0.04);
}

@media (min-width: 640px) {
    .contact-item {
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

.contact-item:hover {
    background: rgba(0, 240, 255, 0.1);
    transform: translateX(10px);
}

.contact-item i {
    font-size: 1.2rem;
    color: #00f0ff;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .contact-item i {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
}

/* Social Buttons */
.social-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #0a0e27;
}

body.dark .social-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

@media (min-width: 640px) {
    .social-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

.social-btn:hover {
    background: linear-gradient(135deg, #00f0ff, #8b5cf6);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.4);
    color: white;
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px) rotateX(-6deg);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* Hover Lift Effect */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 640px) {
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .section-title::after {
        width: 80px;
    }

    .photo-container {
        height: 280px;
        max-width: 280px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .service-card,
    .skill-card,
    .project-card {
        padding: 1.25rem;
    }

    .experience-card {
        padding: 1.25rem;
    }

    .exp-subcard {
        padding: 1rem;
    }

    .cert-card {
        padding: 1.25rem;
    }

    .contact-form {
        padding: 1.25rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .skill-card:hover,
    .project-card:hover,
    .cert-card:hover,
    .glass-card:hover,
    .experience-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .nav-link:hover,
    .tag:hover,
    .contact-item:hover,
    .social-btn:hover,
    .skill-item:hover,
    .hover-lift:hover,
    .exp-subcard:hover {
        transform: none;
    }

    .service-card:active,
    .skill-card:active,
    .project-card:active,
    .cert-card:active {
        transform: scale(0.98);
    }

    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

body.dark ::-webkit-scrollbar-track {
    background: #0a0e27;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00f0ff, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #ff006e);
}

/* Ensure proper spacing on mobile */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Prevent horizontal overflow */
img, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Improve touch targets for mobile */
button,
a,
input,
textarea,
select {
    min-height: 44px;
    min-width: 44px;
}

/* Font size adjustments for better readability on mobile */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }
}

/* Dark/Light Mode Toggle */
#theme-toggle {
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(30deg);
}

/* Salesforce Certified Badge */
#salesforce-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Certification Counter */
.cert-counter {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(139, 92, 246, 0.1));
}

body.dark .cert-counter {
    background: rgba(255, 255, 255, 0.05);
}