/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --dark-bg: #0b0c10;
    --light-bg: #f8f9fa;
    --text-light: #f8f9fa;
    --text-dark: #212529;
    --accent-color: #ff6b6b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --shadow-sm: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.2);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
    opacity: 0;
    animation: pageFadeIn 1s ease forwards;
}

@keyframes pageFadeIn {
    to { opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

section {
    padding: 100px 0;
    position: relative;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.section-title {
    position: relative;
    display: table;
    margin: 0 auto 40px auto;
}

/* Glitch effect */
.glitch {
    position: relative;
    color: var(--text-dark);
    letter-spacing: 2px;
    animation: glitch-skew 4s infinite linear alternate;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    color: #ff00c1;
    z-index: -1;
    animation: glitch-anim-1 0.8s infinite linear alternate-reverse;
}

.glitch::after {
    color: #00fff9;
    z-index: -2;
    animation: glitch-anim-2 0.8s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 30% 0); transform: skew(0.2deg); }
    100% { clip-path: inset(10% 0 60% 0); transform: skew(-0.2deg); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(60% 0 10% 0); transform: skew(0.3deg); }
    100% { clip-path: inset(30% 0 40% 0); transform: skew(-0.3deg); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(0deg); }
    21% { transform: skew(2deg); }
    22% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.section-subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 60px;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HEADER & NAVIGATION ===== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.logo span {
    color: var(--primary-color);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: preloaderFade 1s ease forwards 2s;
    pointer-events: none;
}

@keyframes preloaderFade {
    to { opacity: 0; visibility: hidden; }
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--light-bg);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(74,108,247,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255,107,107,0.1) 0%, transparent 50%);
    animation: particleMove 20s infinite alternate;
}

@keyframes particleMove {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, -2%); }
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 2;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-img-wrapper {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.profile-img-wrapper:hover .profile-img {
    transform: scale(1.1);
}

.img-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.profile-img-wrapper:hover .img-glow {
    opacity: 0.3;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.accent {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.accent::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(74,108,247,0.2);
    z-index: -1;
    transform: skewX(-10deg);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 400;
}

.hook-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #3a5bd9;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(74, 108, 247, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.quick-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.about-intro p {
    margin-bottom: 15px;
}

.personal-touch {
    margin-top: 30px;
}

.interests {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.interest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(74, 108, 247, 0.1);
    border-radius: 30px;
    color: var(--primary-color);
    transition: var(--transition);
}

.interest-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.interest-item i {
    font-size: 1rem;
}

.education-item {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.year {
    color: var(--primary-color);
    font-weight: 500;
    display: block;
    margin: 5px 0;
}

.specialization {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 10px;
}

.certifications-section {
    margin-top: 30px;
}

.certification-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 15px;
    transition: var(--transition);
}

.certification-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.cert-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.certification-item:hover .cert-icon {
    transform: rotate(360deg);
}

.cert-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cert-details p {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cert-org {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.view-certificate {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    padding: 5px 12px;
    position: relative;
    z-index: 10;
    transform: translateZ(20px);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    background: var(--light-bg);
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.case-study-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-style: preserve-3d;
}

.case-study-card:hover {
    transform: translateY(-15px) rotateX(2deg) rotateY(2deg);
    box-shadow: var(--shadow-lg);
}

.case-study-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.case-study-img::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: left 0.7s;
}

.case-study-card:hover .case-study-img::before {
    left: 100%;
}

.case-study-img i {
    position: relative;
    z-index: 2;
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.case-study-content {
    padding: 25px;
}

.case-study-tagline {
    color: var(--secondary-color);
    margin: 10px 0;
}

.case-study-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(74, 108, 247, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.btn-live-demo {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-live-demo:hover {
    background: #3a5bd9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74,108,247,0.3);
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-category {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    margin-bottom: 25px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    font-size: 1.5rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    margin-top: 5px;
    overflow: hidden;
    position: relative;
    display: none;
}

.skill-level {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.2, 1);
    position: relative;
}

.skill-level::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: white;
    animation: scan 2s infinite;
}

@keyframes scan {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 25px;
    background: var(--light-bg);
    border-radius: 15px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.contact-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.contact-item:hover i {
    transform: scale(1.2) rotate(5deg);
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-text p {
    font-size: 0.95rem;
}

.contact-note {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-top: 5px;
}

.resume-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 5px;
    transition: var(--transition);
}

.resume-link:hover {
    transform: translateX(5px);
}

.collaboration {
    background: var(--gradient-1);
    color: white;
    padding: 50px;
    border-radius: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.collaboration::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.collaboration h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.collaboration p {
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.email-btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    border: 2px solid transparent;
}

.email-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background: transparent;
    color: white;
    border-color: white;
}

.contact-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255,255,255,0.2);
    border-color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-message {
    margin-top: 15px;
    font-weight: 500;
    min-height: 24px;
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.form-message.success {
    color: #4cd137;
}

.submit-btn {
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark-bg);
    color: white;
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col .logo {
    color: white;
    font-size: 1.8rem;
}

.footer-tagline {
    margin-top: 20px;
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-col h4 {
    margin-bottom: 25px;
    color: white;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ===== TILT CARD FALLBACK ===== */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.js-tilt-glare {
    pointer-events: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .profile-img-wrapper {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        gap: 15px;
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .quick-stats {
        justify-content: center;
    }
    
    .about-content,
    .contact-content,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .interests {
        justify-content: center;
    }
    
    .profile-img-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .collaboration {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .quick-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat {
        align-items: center;
    }
    
    .case-studies-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .certification-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .collaboration h3 {
        font-size: 1.5rem;
    }
}