/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-section > .container, .hero-section > .row, .hero-section > .container > div {
    position: relative;
    z-index: 2;
}

.hero-section h1, .hero-section p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-section .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Section Styles */
.section-header {
    position: relative;
    margin-bottom: 3rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #4a90e2, #9013fe);
    margin: 1rem auto;
    border-radius: 2px;
}

/* About Section */
.about-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

.about-content {
    padding: 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.skill-tags .badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    margin: 0.25rem;
}

.skill-tags .badge:hover {
    transform: translateY(-2px);
}

/* Portfolio Section */
.portfolio-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 66.67%;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-img-overlay {
    background: rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-img-overlay {
    opacity: 1;
}

.portfolio-card:hover img {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: #333;
    margin-bottom: 1rem;
}

.card-text {
    color: #666;
    line-height: 1.6;
}

/* Article Cards */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

.btn-outline-primary {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    border-width: 1px;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

.card-footer {
    padding: 1rem;
}

.text-muted small {
    font-size: 0.8rem;
}

/* Featured Articles Grid */
.featured-articles-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 2rem;
    min-height: 400px;
}

.featured-main-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-main-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.featured-main-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.featured-main-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-main-card:hover .featured-main-thumbnail img {
    transform: scale(1.05);
}

.featured-main-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-main-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 12px;
    width: fit-content;
}

.featured-main-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #1e293b;
}

.featured-main-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.featured-main-card:hover .featured-main-title a {
    color: #1e40af;
}

.featured-main-excerpt {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.featured-main-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: #64748b;
}

.featured-main-time,
.featured-main-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Side Articles */
.featured-side-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.featured-side-card {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.featured-side-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.featured-side-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
}

.featured-side-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-side-card:hover .featured-side-thumbnail img {
    transform: scale(1.05);
}

.featured-side-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.featured-side-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #1e293b;
}

.featured-side-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-side-card:hover .featured-side-title a {
    color: #1e40af;
}

.featured-side-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: #64748b;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 2rem;
}

.portfolio-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.portfolio-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portfolio-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.portfolio-link:hover {
    background: #3b82f6;
    color: #ffffff;
    transform: scale(1.1);
}

.portfolio-info {
    padding: 20px;
}

.portfolio-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}

.portfolio-description {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.4em; /* 2 lines */
    border: 1px solid transparent; /* Debug border */
}

.portfolio-description.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    max-height: none !important;
    -webkit-box-orient: unset !important;
    border: 1px solid #3b82f6; /* Debug border to show expanded state */
    background: #f0f9ff; /* Light blue background to show expanded state */
    padding: 8px;
    border-radius: 4px;
}

.portfolio-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.portfolio-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.portfolio-toggle-btn:hover {
    background: #e2e8f0;
    color: #374151;
    border-color: #cbd5e1;
}

.portfolio-toggle-btn.expanded {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.portfolio-toggle-btn.expanded:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.portfolio-toggle-btn i {
    /* No transition for instant change */
    font-size: 0.8rem;
    width: 12px;
    text-align: center;
}

.portfolio-toggle-btn.expanded i {
    transform: rotate(180deg);
}

.portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    color: #3b82f6;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    min-width: 120px;
    justify-content: center;
}

.portfolio-btn:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 80px 0 60px;
}

.contact-card {
    background: #fff;
    border-radius: 22px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.contact-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.contact-card .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.contact-card .form-control {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.contact-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.contact-card .btn-primary {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
}

.contact-card .btn-primary:hover {
    background: linear-gradient(45deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .about-content {
        margin-top: 2rem;
    }
    
    .section-header {
        text-align: center;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .featured-articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-main-card {
        grid-column: 1;
    }
    
    .featured-main-thumbnail {
        aspect-ratio: 16/9;
    }
    
    .featured-main-content {
        padding: 1.5rem;
    }
    
    .featured-main-title {
        font-size: 1.3rem;
    }
    
    .featured-main-excerpt {
        font-size: 0.9rem;
    }
    
    .featured-side-articles {
        grid-template-columns: 1fr;
    }
    
    .featured-side-card {
        flex-direction: row;
    }
    
    .featured-side-thumbnail {
        width: 120px;
        height: 80px;
    }
    
    .featured-side-title {
        font-size: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .portfolio-image-wrapper {
        aspect-ratio: 16/10;
    }
    
    .portfolio-info {
        padding: 1.25rem;
    }
    
    .portfolio-title {
        font-size: 1.1rem;
    }
    
    .portfolio-description {
        font-size: 0.85rem;
    }
    
    .portfolio-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .portfolio-toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .contact-card { 
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .portfolio-card {
        margin-bottom: 1.5rem;
    }
    
    .about-image-wrapper {
        max-width: 300px;
        margin: 0 auto 1.5rem;
    }
    
    .featured-articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-main-thumbnail {
        height: 200px;
    }
    
    .featured-main-content {
        padding: 1rem;
    }
    
    .featured-main-title {
        font-size: 1.2rem;
    }
    
    .featured-main-excerpt {
        font-size: 0.85rem;
    }
    
    .featured-side-articles {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .featured-side-card {
        padding: 0.75rem;
    }
    
    .featured-side-thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .featured-side-title {
        font-size: 0.9rem;
    }
    
    .featured-side-meta {
        font-size: 0.75rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .portfolio-image-wrapper {
        height: 200px;
    }
    
    .portfolio-info {
        padding: 1rem;
    }
    
    .portfolio-title {
        font-size: 1rem;
    }
    
    .portfolio-description {
        font-size: 0.8rem;
    }
    
    .portfolio-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .portfolio-toggle-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .featured-articles-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .featured-main-thumbnail {
        height: 180px;
    }
    
    .featured-main-content {
        padding: 0.75rem;
    }
    
    .featured-main-title {
        font-size: 1.1rem;
    }
    
    .featured-main-excerpt {
        font-size: 0.8rem;
    }
    
    .featured-side-articles {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .featured-side-card {
        padding: 0.5rem;
    }
    
    .featured-side-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .featured-side-title {
        font-size: 0.85rem;
    }
    
    .featured-side-meta {
        font-size: 0.7rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .portfolio-image-wrapper {
        height: 180px;
    }
    
    .portfolio-info {
        padding: 0.75rem;
    }
    
    .portfolio-title {
        font-size: 0.95rem;
    }
    
    .portfolio-description {
        font-size: 0.75rem;
    }
    
    .portfolio-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .portfolio-toggle-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
} 

/* Portfolio Section - Enhanced for debugging */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.portfolio-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
}

.portfolio-image-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay-content {
    text-align: center;
}

.portfolio-link {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    padding: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.portfolio-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
    line-height: 1.3;
} 