/* Portfolio Site Common Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none;
}

/* ======================
   MAIN PORTFOLIO PAGE 
   ====================== */
   
/* Main page specific body styling */
body.main-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header for main page */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.main-header-content {
    position: relative;
    z-index: 2;
}

.main-header h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-header .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.main-header .description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

.main-content {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-link::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 ease;
}

.project-link:hover::before {
    left: 100%;
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Additional Projects Section */
.additional-projects {
    margin-top: 4rem;
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

.additional-projects h3 {
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.additional-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.additional-link {
    display: inline-block;
    background: #f8f9fa;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.additional-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    opacity: 0.8;
}

/* ======================
   PORTFOLIO DETAIL PAGES 
   ====================== */

/* Detail pages specific body styling */
body.detail-page {
    background-color: #f8f9fa;
}

/* Header for detail pages */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.nav-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.section {
    background: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 2rem 0;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    height: 400px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    display: block;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-indicators {
    text-align: center;
    margin-top: 1rem;
}

.indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: #667eea;
}

/* Grid Layouts */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tech-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Challenge Boxes */
.challenges {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.challenges h3 {
    color: #856404;
    margin-bottom: 0.5rem;
}

/* Buttons and Links */
.links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a67d8;
}

.btn.secondary {
    background: #6c757d;
}

.btn.secondary:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-header h1 {
        font-size: 2.5rem;
    }
    
    .main-header .subtitle {
        font-size: 1.1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .additional-links {
        flex-direction: column;
        align-items: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .carousel-slide img {
        height: 250px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .links {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 2rem 0;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-image {
        height: 200px;
    }
}