body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00d4ff;
    border-radius: 50%;
    animation: float-particle 15s infinite linear;
    opacity: 0.7;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Geometric shapes */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.geo-shape {
    position: absolute;
    border: 2px solid rgba(0, 212, 255, 0.3);
    animation: rotate-shape 20s infinite linear;
}

.geo-shape.triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid rgba(255, 107, 107, 0.2);
    border-radius: 0;
    top: 20%;
    right: 10%;
    animation-delay: -5s;
}

.geo-shape.circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    top: 60%;
    left: 15%;
    animation-delay: -10s;
}

.geo-shape.square {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 80%;
    animation-delay: -15s;
}

@keyframes rotate-shape {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header with glassmorphism */
.header {
    text-align: center;
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: rotate-gradient 10s linear infinite;
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-container {
    position: relative;
    z-index: 2;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 30px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse-glow 3s ease-in-out infinite;
    border: 4px solid rgba(255, 255, 255, 0.2);
    overflow: hidden; /* ✅ Important to crop image into circle */
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ✅ Keeps proper scaling */
    border-radius: 50%;
}


@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 107, 107, 0.7);
        transform: scale(1.05);
    }
}

.profile-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.8);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.name {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b, #4ecdc4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-text 3s ease-in-out infinite;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

@keyframes gradient-text {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title {
    font-size: 1.8rem;
    color: #00d4ff;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
}

/* Navigation with hover effects */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.nav-item {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-item::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.5s;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    border-color: #00d4ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.nav-item.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

/* Sections with unique animations */
.section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    margin: 40px 0;
    padding: 50px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(50px);
    animation: slide-up 0.8s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.4s; }
.section:nth-child(4) { animation-delay: 0.6s; }
.section:nth-child(5) { animation-delay: 0.8s; }

@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #00d4ff);
    animation: section-line 2s ease-in-out infinite;
}

@keyframes section-line {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 40px;
    background: linear-gradient(45deg, #00d4ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Skills with 3D cards */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 107, 107, 0.1));
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: rotate-card-bg 8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover::before {
    opacity: 1;
}

@keyframes rotate-card-bg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skill-card:hover {
    transform: perspective(1000px) rotateX(10deg) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    position: relative;
    z-index: 2;
}

.skill-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

/* Experience timeline with enhanced design */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #00d4ff, #ff6b6b, #4ecdc4);
    border-radius: 2px;
    animation: timeline-glow 2s ease-in-out infinite alternate;
}

@keyframes timeline-glow {
    0% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.5); }
    100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    margin-left: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(50px);
    opacity: 0;
    animation: slide-in-timeline 1s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 1s; }
.timeline-item:nth-child(2) { animation-delay: 1.2s; }
.timeline-item:nth-child(3) { animation-delay: 1.4s; }
.timeline-item:nth-child(4) { animation-delay: 1.6s; }

@keyframes slide-in-timeline {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -60px;
    top: 30px;
    width: 20px;
    height: 20px;
    background: #00d4ff;
    border-radius: 50%;
    border: 4px solid #0a0a0a;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-date {
    color: #00d4ff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.timeline-company {
    color: #ff6b6b;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.timeline-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Contact section with animated cards */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-item {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 107, 107, 0.1));
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-item::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;
}

.contact-item:hover::before {
    left: 100%;
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
    color: #00d4ff;
}

.contact-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.contact-value {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .name { font-size: 2.5rem; }
    .title { font-size: 1.4rem; }
    .section { padding: 30px 20px; }
    .section-title { font-size: 2rem; }
    .skills-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .nav { gap: 10px; }
    .nav-item { padding: 12px 20px; font-size: 0.9rem; }
}

/* View Transition */
@view-transition {
    navigation: auto;
}