/* Portfolio Page Specific Styles */

/* Cursor Ball Animation */
.cursor-ball-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cursor-ball {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.main-ball {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #f4d03f 0%, #f39c12 100%);
    box-shadow: 
        0 0 8px rgba(244, 208, 63, 0.8),
        0 0 16px rgba(244, 208, 63, 0.4);
    transform: translate(-50%, -50%);
    opacity: 0.8;
}

.trail-ball {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(244, 208, 63, 0.6) 0%, rgba(243, 156, 18, 0.4) 100%);
    transform: translate(-50%, -50%);
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.trail-ball:nth-child(2) {
    width: 7px;
    height: 7px;
    opacity: 0.5;
    transition-delay: 0.05s;
}

.trail-ball:nth-child(3) {
    width: 6px;
    height: 6px;
    opacity: 0.4;
    transition-delay: 0.1s;
}

.trail-ball:nth-child(4) {
    width: 5px;
    height: 5px;
    opacity: 0.3;
    transition-delay: 0.15s;
}

.trail-ball:nth-child(5) {
    width: 4px;
    height: 4px;
    opacity: 0.2;
    transition-delay: 0.2s;
}

.trail-ball:nth-child(6) {
    width: 3px;
    height: 3px;
    opacity: 0.1;
    transition-delay: 0.25s;
}

/* Cursor ball hover effects */
.cursor-ball.hover {
    transform: translate(-50%, -50%) scale(2);
}

.cursor-ball.click {
    transform: translate(-50%, -50%) scale(0.5);
    background: radial-gradient(circle, #e74c3c 0%, #c0392b 100%);
}

/* Cursor ball on different elements */
.cursor-ball.on-button {
    background: radial-gradient(circle, #3498db 0%, #2980b9 100%);
    box-shadow: 
        0 0 6px rgba(52, 152, 219, 0.8),
        0 0 12px rgba(52, 152, 219, 0.4);
}

.cursor-ball.on-link {
    background: radial-gradient(circle, #9b59b6 0%, #8e44ad 100%);
    box-shadow: 
        0 0 6px rgba(155, 89, 182, 0.8),
        0 0 12px rgba(155, 89, 182, 0.4);
}

/* Keep default cursor visible */
.portfolio-page {
    cursor: default;
}

.portfolio-page * {
    cursor: inherit;
}

/* Fix navigation brand link styling */
.portfolio-page .nav-brand a,
.portfolio-page .nav-brand a:link,
.portfolio-page .nav-brand a:visited,
.portfolio-page .nav-brand a:hover,
.portfolio-page .nav-brand a:active,
.portfolio-page .nav-brand a:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
}

/* Remove any pseudo-element underlines */
.portfolio-page .nav-brand a::before,
.portfolio-page .nav-brand a::after {
    display: none !important;
}

/* Override any inherited link styles */
.portfolio-page .nav-brand {
    color: #ffffff !important;
    text-decoration: none !important;
}

.portfolio-page .nav-brand * {
    color: inherit !important;
    text-decoration: none !important;
}

/* Show cursor on specific elements for accessibility */
.portfolio-page input,
.portfolio-page textarea,
.portfolio-page [contenteditable] {
    cursor: text !important;
}

/* Cursor split animation */
@keyframes splitAnimation {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.cursor-ball.split {
    animation: splitAnimation 0.6s ease-out forwards;
}

/* Dynamic cursor particles */
.cursor-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 208, 63, 0.7) 0%, rgba(243, 156, 18, 0.3) 100%);
    pointer-events: none;
    animation: particleFloat 0.8s ease-out forwards;
    mix-blend-mode: screen;
    z-index: 0;
}

@keyframes particleFloat {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(var(--random-x), var(--random-y)) scale(0);
        opacity: 0;
    }
}

/* Responsive cursor */
@media (max-width: 768px) {
    .cursor-ball-container {
        display: none;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .cursor-ball {
        transition: none !important;
        animation: none !important;
    }
    
    .cursor-ball-container {
        display: none;
    }
}

/* Page Layout */
.portfolio-page .main-content {
    padding: 8rem 0 4rem;
    min-height: auto;
    display: block;
}

.portfolio-page .hero-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Hero Section Enhancements */
.portfolio-page .hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin: 2rem 0;
}

.portfolio-page .hero-title .subtitle {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.hero-description {
    max-width: 800px;
    margin: 2rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image {
    margin: 3rem 0;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.developer-avatar {
    display: inline-block;
    position: relative;
}

.avatar-inner {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    animation: float 6s ease-in-out infinite;
}

.avatar-text {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

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

/* Portfolio Introduction */
.portfolio-intro {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.intro-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Section Headers */
.section-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

/* Technologies Section */
.technologies-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tech-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.tech-item:nth-child(1) { animation-delay: 0.1s; }
.tech-item:nth-child(2) { animation-delay: 0.2s; }
.tech-item:nth-child(3) { animation-delay: 0.3s; }
.tech-item:nth-child(4) { animation-delay: 0.4s; }
.tech-item:nth-child(5) { animation-delay: 0.5s; }
.tech-item:nth-child(6) { animation-delay: 0.6s; }
.tech-item:nth-child(7) { animation-delay: 0.7s; }
.tech-item:nth-child(8) { animation-delay: 0.8s; }

.tech-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.tech-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.tech-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
}

.tech-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Experience Section */
.experience-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.experience-timeline {
    position: relative;
    padding-left: 2rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.experience-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.experience-item:nth-child(1) { animation-delay: 0.2s; }
.experience-item:nth-child(2) { animation-delay: 0.4s; }
.experience-item:nth-child(3) { animation-delay: 0.6s; }

.experience-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid #0a0a0a;
}

.experience-date {
    min-width: 80px;
    text-align: center;
}

.experience-date span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.experience-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.experience-company h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.company-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.work-type {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.experience-content p {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.experience-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Projects Section */
.projects-section {
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.02);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.3s; }
.project-card:nth-child(3) { animation-delay: 0.5s; }
.project-card:nth-child(4) { animation-delay: 0.7s; }

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-card.featured .project-image {
    height: auto;
    min-height: 300px;
}

.project-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.project-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.project-content {
    padding: 2rem;
}

.project-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.project-content p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.project-link:hover::after {
    width: 100%;
}

.project-link.secondary {
    color: rgba(255, 255, 255, 0.7);
}

.project-link.secondary::after {
    background: rgba(255, 255, 255, 0.7);
}

.projects-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Contact Section */
.contact-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.contact-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.contact-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.contact-header p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-details {
    text-align: left;
}

.contact-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.3rem;
}

.contact-details a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #667eea;
}

.contact-actions {
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-page .hero-section {
        padding: 2rem 1rem;
    }
    
    .portfolio-intro {
        padding: 4rem 1rem;
    }
    
    .section-header {
        padding: 3rem 1rem 1rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .experience-section {
        padding: 4rem 1rem;
    }
    
    .experience-timeline {
        padding-left: 1.5rem;
    }
    
    .experience-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .experience-date {
        min-width: auto;
        text-align: left;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .project-card.featured {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 4rem 1rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-details {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .portfolio-page .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .portfolio-page .hero-title .subtitle {
        font-size: clamp(1.3rem, 6vw, 2rem);
    }
    
    .hero-description {
        font-size: 1rem;
        margin: 1.5rem auto;
    }
    
    .avatar-inner {
        width: 100px;
        height: 100px;
    }
    
    .avatar-text {
        font-size: 1.5rem;
    }
    
    .intro-content h2 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .tech-item {
        padding: 1.5rem;
    }
    
    .tech-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .experience-content {
        padding: 1.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .contact-header h2 {
        font-size: 2rem;
    }
    
    .contact-header h3 {
        font-size: 1.5rem;
    }
}

/* Additional Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Active State */
.portfolio-page .nav-link.active {
    color: #667eea;
}

.portfolio-page .nav-link.active::after {
    width: 100%;
}