/* ============================================
   PORTFOLIO PAGE STYLES - PROFESSIONAL, CLEAN & SMOOTH
   ============================================ */

/* CSS Variables */
:root {
    --primary-bg: #f2f7fc;
    --primary-white: #fff;
    --primary-dark: #2c3e50;
    --primary-blue: #1760bb;
    --primary-light: #f8fbff;
    --primary-grey: #6c757d;
    --primary-shadow: 0 10px 40px rgba(23, 96, 187, 0.12);
    --primary-radius: 24px;
    --primary-gradient: linear-gradient(135deg, #f8fbff 0%, #e3edfa 100%);
    --primary-border: #e3edfa;
}

/* Body Styles */
body {
    background: var(--primary-bg);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--primary-dark);
    letter-spacing: 0.01em;
    font-size: 17px;
}

/* ============================================
   PORTFOLIO INDEX PAGE STYLES
   ============================================ */

/* Main Background */
.portfolio-main-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #f2f7fc 0%, #e3edfa 100%);
    padding-top: 120px !important; /* Account for fixed header (40px mini-header + 80px navbar) */
    padding-bottom: 3rem;
    position: relative;
    z-index: 1;
    margin-top: 0 !important; /* Ensure no negative margin */
}

/* Hero Section */
.portfolio-hero-section {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    box-shadow: 0 10px 40px rgba(23, 96, 187, 0.2);
    border-radius: 0 0 3rem 3rem;
    margin-top: -120px;
    padding-top: 120px;
    padding-bottom: 3rem;
    text-align: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.portfolio-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.portfolio-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
    padding: 0 2rem;
}

.portfolio-hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    font-weight: 400;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    padding: 0 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs - Professional, Clean & Smooth */
.portfolio-tabs-inside {
    grid-column: 1 / -1;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.portfolio-tabs-bg {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.12);
    padding: 8px;
    gap: 6px;
    align-items: center;
    position: relative;
    min-width: 0;
    overflow-x: auto;
}

.portfolio-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #5e7ba7;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.75rem 1.75rem;
    margin: 0;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    letter-spacing: -0.1px;
    min-width: 100px;
    white-space: nowrap;
}

.portfolio-tab-btn:not(.active):hover,
.portfolio-tab-btn:not(.active):focus {
    background: rgba(23, 96, 187, 0.08);
    color: #1760bb;
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}

.portfolio-tab-btn.active {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    box-shadow: 0 4px 20px rgba(23, 96, 187, 0.3);
    outline: none;
    border: none;
}

.portfolio-tab-btn:focus:not(:focus-visible) {
    outline: none !important;
    border: none !important;
}

.portfolio-tab-btn:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.portfolio-tab-btn.active::after {
    display: none;
}

/* Grid Section */
.portfolio-section-main {
    max-width: 1320px;
    margin: 0 auto;
    z-index: 5;
    position: relative;
    padding: 0 2rem;
    margin-top: -60px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(23, 96, 187, 0.12);
    padding: 3rem 3rem 2rem 3rem;
    margin-bottom: 3rem;
    position: relative;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
}

/* Portfolio Card */
.portfolio-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 380px;
    overflow: hidden;
    border: 1.5px solid #e3edfa;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.portfolio-card:hover::before {
    transform: scaleX(1);
}

.portfolio-card:hover {
    box-shadow: 0 15px 50px rgba(23, 96, 187, 0.2);
    transform: translateY(-8px);
    border-color: #1760bb;
}

/* Image Styles */
.portfolio-thumb-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e3edfa 0%, #f2f7fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #e3edfa;
    transition: all 0.3s ease;
}

.portfolio-thumb {
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: contain;
    object-position: center center;
    border-radius: 0;
    transition: transform 0.4s ease, filter 0.3s ease;
    filter: brightness(0.98);
    background: #e3edfa;
    display: block;
}

.portfolio-card:hover .portfolio-thumb {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.portfolio-card-body {
    padding: 1.75rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 140px;
    justify-content: flex-start;
    background: #ffffff;
}

/* Title and Category */
.portfolio-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 0;
    color: #2c3e50;
    letter-spacing: -0.3px;
    text-transform: capitalize;
    line-height: 1.3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    width: 100%;
    flex-wrap: wrap;
}

.portfolio-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.3rem;
    font-weight: 700;
    display: inline-block;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
    box-sizing: border-box;
}

.portfolio-title a:hover {
    color: #1760bb;
}

/* Category Label */
.portfolio-category-label {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    color: #1760bb;
    background: rgba(23, 96, 187, 0.1);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.1);
    letter-spacing: 0.05em;
    border: 1.5px solid rgba(23, 96, 187, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
    text-transform: uppercase;
}

.portfolio-category-label:hover,
.portfolio-category-label:focus:not(:focus-visible) {
    outline: none !important;
    border: none !important;
}

.portfolio-category-label:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.portfolio-category-label:focus {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    border-color: #1760bb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 96, 187, 0.3);
}

.portfolio-title-underline {
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #e3edfa 0%, #d5e8fa 100%);
    border: none;
    margin: 0.5rem 0 1rem 0;
    opacity: 0.6;
    border-radius: 1px;
}

.portfolio-desc {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 1rem;
    margin-top: 0;
    font-weight: 400;
    line-height: 1.7;
    min-height: 50px;
}

/* Tags */
.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    margin-top: 0;
}

.portfolio-tag {
    background: rgba(23, 96, 187, 0.08);
    color: #1760bb;
    border-radius: 8px;
    padding: 0.35rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05px;
    border: 1px solid rgba(23, 96, 187, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-tag:hover {
    background: rgba(23, 96, 187, 0.15);
    border-color: rgba(23, 96, 187, 0.3);
    transform: translateY(-2px);
}

/* Buttons */
.btn-launch {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: 12px;
    font-size: 1rem;
    border: none;
    box-shadow: 0 4px 20px rgba(23, 96, 187, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
    margin-bottom: 0;
    gap: 0.5rem;
    width: 100%;
}

.btn-launch i {
    font-size: 1.1rem;
}

.btn-launch:hover {
    background: linear-gradient(135deg, #10509e 0%, #1760bb 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.4);
    text-decoration: none;
}

.btn-launch:active {
    transform: translateY(-1px);
}

.portfolio-cta-btn {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    font-weight: 700;
    border-radius: 12px;
    font-size: 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(23, 96, 187, 0.3);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.portfolio-cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.portfolio-cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

.portfolio-cta-btn:hover {
    background: linear-gradient(135deg, #10509e 0%, #1760bb 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(23, 96, 187, 0.4);
    text-decoration: none;
}

.portfolio-cta-btn i {
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

/* ============================================
   PORTFOLIO DETAIL PAGE STYLES
   ============================================ */

/* Container */
.clean-portfolio-main {
    background: transparent;
    min-height: 100vh;
    padding-bottom: 3rem;
}

.clean-portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--primary-white);
    border-radius: var(--primary-radius);
    box-shadow: 0 10px 40px rgba(23, 96, 187, 0.12);
    padding: 3.5rem 3.5rem 2.5rem 3.5rem;
    margin-top: -60px;
    transition: box-shadow 0.3s ease;
    position: relative;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
}

/* Section Headings */
.section {
    margin-bottom: 0;
    margin-top: 3rem;
    animation: fadeInUp 0.6s ease-out both;
}

.section:nth-child(1) {
    animation-delay: 0.1s;
}

.section:nth-child(2) {
    animation-delay: 0.2s;
}

.section:nth-child(3) {
    animation-delay: 0.3s;
}

.section:first-child {
    margin-top: 0;
}

.section-head {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.section-head::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    border-radius: 2px;
}

/* Titles */
.project-title {
    font-size: 2.75rem;
    line-height: 1.2;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subheading {
    color: var(--primary-grey);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    font-weight: 400;
    line-height: 1.6;
}

.overview-desc {
    color: #495057;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    padding: 1.75rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(23, 96, 187, 0.08);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
}

/* Goals Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
    margin-top: 0.5rem;
}

.card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1.5px solid #e3edfa;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    padding: 2rem 1.75rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(23, 96, 187, 0.2);
    border-color: #1760bb;
}

.card i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    background: rgba(23, 96, 187, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(23, 96, 187, 0.15);
    transition: all 0.3s ease;
}

.card:hover i {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    transform: scale(1.1);
}

.card span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

/* Key Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(23, 96, 187, 0.08);
    border: 1.5px solid #e3edfa;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 140px;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
    border-radius: 0 4px 4px 0;
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card:hover {
    box-shadow: 0 12px 40px rgba(23, 96, 187, 0.15);
    border-color: #1760bb;
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 1.75rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    background: rgba(23, 96, 187, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover i {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.feature-desc {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.6;
}

/* Challenges & Solutions */
.challenge-solution-wrap {
    display: flex;
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    border-radius: 20px;
    gap: 0;
    overflow: hidden;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
}

.challenge, .solution {
    flex: 1 1 0;
    padding: 2.5rem 2rem;
    font-size: 1.05rem;
    background: none;
}

.challenge {
    border-right: 1.5px solid rgba(23, 96, 187, 0.15);
}

.ch-title, .sol-title {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    gap: 0.75rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.ch-title i {
    color: #ef5669;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 8px rgba(239, 86, 105, 0.3));
}

.sol-title i {
    color: #18b18a;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 8px rgba(24, 177, 138, 0.3));
}

.ch-desc, .sol-desc {
    color: #495057;
    font-size: 1.05rem;
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

/* Tech Stack */
.tech-stack-block {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.08);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    padding: 2rem 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-logos {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.tech-logos img {
    height: 50px;
    width: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.1);
    padding: 0.75rem 1rem;
    border: 1.5px solid #e3edfa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-logos img:hover {
    box-shadow: 0 8px 25px rgba(23, 96, 187, 0.2);
    border-color: #1760bb;
    transform: translateY(-5px) scale(1.05);
}

/* Role / Timeline */
.role-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
    list-style: none;
}

.role-list li {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 0.75rem;
    line-height: 1.8;
    font-weight: 400;
    position: relative;
    padding-left: 1.5rem;
}

.role-list li::before {
    content: '\f00c';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    color: #1760bb;
    font-weight: 700;
    font-size: 1rem;
}

.timeline-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.timeline-step {
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary-blue);
    color: #2c3e50;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.1);
    min-width: 150px;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.timeline-step:hover {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.1) 0%, rgba(16, 80, 158, 0.08) 100%);
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(23, 96, 187, 0.15);
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, #e3edfa 0%, #1760bb 50%, #e3edfa 100%);
    border: none;
    margin: 2.5rem 0;
    border-radius: 2px;
    width: 100%;
    opacity: 0.6;
}

/* Mockups */
.mockups-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.mockup-frame {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    padding: 0.75rem;
    overflow: hidden;
    position: relative;
    border: 1.5px solid #e3edfa;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mockup-frame:hover {
    border-color: #1760bb;
    box-shadow: 0 15px 50px rgba(23, 96, 187, 0.2);
    transform: translateY(-5px);
}

.mockup-frame.desktop img {
    width: 300px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    background: #fff;
    border: 1.5px solid #e3edfa;
    transition: transform 0.4s ease;
}

.mockup-frame.desktop:hover img {
    transform: scale(1.05);
}

.mockup-frame.mobile img {
    width: 80px;
    height: 160px;
    border-radius: 16px;
    object-fit: cover;
    background: #fff;
    border: 1.5px solid #e3edfa;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.15);
    transition: transform 0.4s ease;
}

.mockup-frame.mobile:hover img {
    transform: scale(1.08);
}

.demo-links {
    margin-top: 2.5rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.demo-btn {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(23, 96, 187, 0.3);
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.demo-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.demo-btn:hover::before {
    width: 300px;
    height: 300px;
}

.demo-btn:hover,
.demo-btn:focus:not(:focus-visible) {
    outline: none !important;
    border: none !important;
}

.demo-btn:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.demo-btn:hover, .demo-btn:focus {
    background: linear-gradient(135deg, #10509e 0%, #1760bb 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(23, 96, 187, 0.4);
    text-decoration: none;
}

.demo-btn i {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.demo-btn:last-child {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff !important;
    box-shadow: 0 6px 25px rgba(23, 96, 187, 0.3);
    font-weight: 700;
}

/* Similar Projects */
.similar-section-bg {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    margin-top: 3rem;
    padding: 2.5rem 2rem;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
}

.similar-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.similar-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    border-radius: 2px;
}

.similar-carousel {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
}

.similar-card {
    min-width: 200px;
    max-width: 250px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(23, 96, 187, 0.1);
    border: 1.5px solid #e3edfa;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.similar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.similar-card:hover::before {
    transform: scaleX(1);
}

.similar-card:hover {
    border-color: #1760bb;
    box-shadow: 0 12px 40px rgba(23, 96, 187, 0.2);
    transform: translateY(-8px);
    text-decoration: none;
}

.similar-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.1);
    margin-bottom: 1rem;
    transition: transform 0.4s ease;
}

.similar-card:hover .similar-thumb {
    transform: scale(1.05);
}

.similar-card .similar-label {
    display: inline-block;
    background: rgba(23, 96, 187, 0.1);
    color: #1760bb;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(23, 96, 187, 0.2);
    transition: all 0.3s ease;
}

.similar-card:hover .similar-label {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    border-color: #1760bb;
}

.similar-card .similar-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
}

/* Scrollbar */
::-webkit-scrollbar {
    height: 8px;
    width: 10px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(23, 96, 187, 0.3);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(23, 96, 187, 0.5);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet */
@media (max-width: 1060px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 991.98px) {
    .portfolio-main-bg {
        padding-top: 110px !important; /* Slightly less on tablets */
    }
    
    .portfolio-hero-section {
        margin-top: -110px; /* Offset the wrapper padding */
        padding-top: 110px; /* Account for fixed header on tablets */
    }
    
    .portfolio-hero-title {
        font-size: 2.5rem;
    }
    .portfolio-hero-desc {
        font-size: 1.1rem;
    }
    .portfolio-tabs-bg {
        flex-wrap: wrap;
        padding: 6px;
    }
    .portfolio-tab-btn {
        min-width: 90px;
        padding: 0.625rem 1.25rem;
        font-size: 0.95rem;
    }
    .portfolio-thumb-wrap {
        aspect-ratio: 16/10;
    }
    .portfolio-card {
        min-height: 350px;
    }
    .clean-portfolio-container {
        padding: 2.5rem 2rem;
        margin-top: -50px;
    }
    .project-title {
        font-size: 2.25rem;
    }
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .portfolio-main-bg {
        padding-top: 120px !important; /* Account for mobile header (auto mini-header ~50px + 80px navbar) */
        margin-top: 0 !important; /* Ensure no negative margin */
    }
    
    .portfolio-hero-section {
        margin-top: -120px !important; /* Offset the wrapper padding */
        padding-top: 120px !important; /* Account for fixed header on mobile */
        padding-bottom: 2.5rem;
        border-radius: 0 0 2rem 2rem;
        position: relative;
        z-index: 2;
    }
    .portfolio-hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
        padding: 0 1.5rem;
    }
    .portfolio-hero-desc {
        font-size: 1rem;
        line-height: 1.6;
        padding: 0 1.5rem;
    }
    .portfolio-section-main {
        padding: 0 1rem;
        margin-top: -50px;
        position: relative;
        z-index: 3;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }
    .portfolio-tabs-bg {
        flex-wrap: wrap;
        gap: 4px;
    }
    .portfolio-tab-btn {
        min-width: 80px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .portfolio-thumb-wrap {
        aspect-ratio: 16/11;
    }
    .portfolio-card {
        min-height: 320px;
    }
    .portfolio-title-underline {
        height: 1px;
        margin: 0.4rem 0 0.75rem 0;
    }
    .clean-portfolio-container {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin-top: -40px;
        position: relative;
        z-index: 3;
    }
    .project-title {
        font-size: 1.75rem;
    }
    .subheading {
        font-size: 1.1rem;
    }
    .overview-desc {
        font-size: 1rem;
        padding: 1.5rem 1.5rem;
    }
    .section-head {
        font-size: 1.1rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .challenge-solution-wrap {
        flex-direction: column;
    }
    .challenge {
        border-right: none;
        border-bottom: 1.5px solid rgba(23, 96, 187, 0.15);
    }
    .challenge, .solution {
        padding: 2rem 1.5rem;
    }
    .tech-logos {
        gap: 1rem;
        justify-content: center;
    }
    .mockup-frame.desktop img {
        width: 100%;
        max-width: 200px;
        height: 120px;
    }
    .mockup-frame.mobile img {
        width: 50px;
        height: 100px;
    }
    .demo-btn {
        width: 100%;
        justify-content: center;
    }
    .similar-section-bg {
        padding: 2rem 1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .portfolio-hero-section {
        margin-top: -120px !important;
        padding-top: 120px !important;
        padding-bottom: 2rem;
    }
    .portfolio-hero-title {
        font-size: 1.75rem;
        padding: 0 1rem;
    }
    .portfolio-hero-desc {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
    .portfolio-grid {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
    }
    .portfolio-card {
        min-height: 300px;
        border-radius: 16px;
    }
    .portfolio-title {
        font-size: 1.15rem;
    }
    .portfolio-title a {
        font-size: 1.15rem;
    }
    .portfolio-category-label {
        font-size: 0.7rem;
        padding: 0.3rem 0.75rem;
        min-width: 60px;
    }
    .portfolio-desc {
        font-size: 0.95rem;
    }
    .portfolio-cta-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    .clean-portfolio-container {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }
    .project-title {
        font-size: 1.5rem;
    }
    .card {
        padding: 1.5rem 1.25rem;
    }
    .feature-card {
        padding: 1.5rem 1.25rem;
    }
    .timeline-step {
        min-width: 100%;
    }
}

/* Responsive font for category */
@media (max-width: 700px) {
    .portfolio-category-label {
        font-size: 0.85em;
        padding: 2px 7px;
        min-width: 50px;
    }
    .portfolio-title a {
        font-size: 1.05rem;
    }
}

@media (max-width: 500px) {
    .portfolio-category-label {
        font-size: 0.79em;
        padding: 1.7px 4.5px;
    }
    .portfolio-title a {
        font-size: 1em;
    }
}


/* ============================================
   CSS OPTIMIZATION COMPLETE
   - Fixed focus outline issues (removed unwanted borders on click)
   - Added focus-visible for keyboard navigation accessibility
   - Optimized animations and transitions
   - Professional, clean & smooth design maintained
   ============================================ */
