/* Portfolio Page Styles - Full Visual Parity with Homepage */

/* ================================
   SECTION ACCENT (Matching Homepage)
   ================================ */
.section-accent {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.section-accent span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.section-accent span:nth-child(1) { background: var(--primary-blue); }
.section-accent span:nth-child(2) { background: linear-gradient(135deg, var(--primary-blue), var(--gold-accent)); }
.section-accent span:nth-child(3) { background: var(--gold-accent); }

/* ================================
   SCROLL ANIMATIONS
   ================================ */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ================================
   ADMIN BANNER
   ================================ */
.admin-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(37, 99, 235, 0.08);
    backdrop-filter: blur(8px);
    color: var(--primary-blue);
    z-index: 1001;
    padding: 5px 0;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    height: 28px;
}

.admin-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.admin-banner-text {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.8;
}

.admin-banner-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.admin-banner-link:hover {
    opacity: 1;
}

body.admin-banner-visible .navbar {
    top: 28px;
}

/* ================================
   NAVBAR OVERRIDES FOR PORTFOLIO
   ================================ */
/* Glass bubble bar over light sections (portfolio grid) */
.navbar.scrolled.navbar-over-light:not(.navbar-standard) .nav-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Ensure hamburger is visible on light bubble */
.navbar.navbar-over-light .nav-toggle span {
    background: var(--dark-base);
}

/* ================================
   PORTFOLIO HERO (Dark with Image)
   ================================ */
.portfolio-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 140px 20px 100px;
    isolation: isolate; /* Creates stacking context to contain orbs */
}

.portfolio-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

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

.portfolio-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Blue orb top-right */
        radial-gradient(ellipse 400px 400px at 85% 15%, rgba(37, 99, 235, 0.2) 0%, transparent 60%),
        /* Gold orb bottom-left */
        radial-gradient(ellipse 350px 350px at 15% 85%, rgba(251, 191, 36, 0.15) 0%, transparent 60%),
        /* Base dark overlay */
        linear-gradient(180deg, 
            rgba(15, 23, 42, 0.85) 0%, 
            rgba(30, 41, 59, 0.88) 50%,
            rgba(15, 23, 42, 0.92) 100%);
}

/* Floating Orbs - hidden, using gradient overlay instead */
.portfolio-orb {
    display: none;
}

.portfolio-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-title {
    font-size: 64px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.3s;
}

.portfolio-subtitle {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Bar */
.portfolio-stats {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 16px 36px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.7s;
}

.portfolio-stat {
    text-align: center;
}

.portfolio-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2px;
}

.portfolio-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.portfolio-stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ================================
   FILTER BUTTONS (Glass/Frosted Style)
   ================================ */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--primary-blue);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.filter-btn.active {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--hover-blue) 100%);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* ================================
   PORTFOLIO SECTION (Light)
   ================================ */
.portfolio-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--light-bg) 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 30%;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.portfolio-section::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--dark-base);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 20px;
    color: var(--secondary-text);
}

/* ================================
   PORTFOLIO GRID & CARDS
   ================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.portfolio-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--borders);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.portfolio-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 48px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-blue);
}

.portfolio-image {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue), var(--hover-blue));
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: var(--white);
    opacity: 0.9;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-placeholder {
    transform: scale(1.15);
}

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

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

.portfolio-link {
    width: 72px;
    height: 72px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--hover-blue) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.7);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.portfolio-card:hover .portfolio-link {
    transform: scale(1);
}

.portfolio-link:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.5);
}

/* Industry Tag */
.portfolio-industry-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark-base);
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.portfolio-content {
    padding: 36px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.portfolio-tag {
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-card-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-base);
    margin-bottom: 16px;
    line-height: 1.3;
}

.portfolio-card-description {
    font-size: 16px;
    color: var(--secondary-text);
    line-height: 1.8;
    margin-bottom: 28px;
    flex: 1;
}

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--borders);
}

.portfolio-date {
    font-size: 14px;
    color: var(--muted-text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-date i {
    color: var(--primary-blue);
}

.portfolio-view-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.portfolio-view-link:hover {
    color: var(--hover-blue);
    gap: 12px;
}

.portfolio-view-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.portfolio-view-link:hover i {
    transform: translateX(4px);
}

/* Empty State */
.portfolio-empty {
    text-align: center;
    padding: 100px 20px;
    color: var(--secondary-text);
}

.portfolio-empty i {
    font-size: 72px;
    color: var(--borders);
    margin-bottom: 24px;
}

.portfolio-empty h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark-base);
    margin-bottom: 12px;
}

.portfolio-empty p {
    font-size: 18px;
    color: var(--muted-text);
}

/* ================================
   CTA SECTION (Light - Matching Homepage)
   ================================ */
.cta-section {
    padding: 100px 20px;
    background: var(--light-bg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark-base);
}

.cta-description {
    font-size: 18px;
    color: var(--secondary-text);
    margin-bottom: 32px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--hover-blue) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.btn-gold-outline {
    background: linear-gradient(90deg, var(--gold-accent) 0%, #F59E0B 100%);
    color: var(--dark-base);
    border: none;
}

.btn-gold-outline:hover {
    background: linear-gradient(90deg, #F59E0B 0%, var(--gold-accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* CTA Section Button Overrides */
.cta-section .btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
}

.cta-section .btn-primary:hover {
    background: var(--hover-blue);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-large {
    padding: 18px 48px;
    font-size: 18px;
}

/* ================================
   FOOTER (Matching Homepage)
   ================================ */
.footer {
    background: var(--dark-base);
    color: var(--white);
    padding: 60px 0 30px;
    padding-bottom: max(30px, env(safe-area-inset-bottom, 0px));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--gold-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}

.footer-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 15px;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 992px) {
    .portfolio-title {
        font-size: 52px;
    }
    
    .portfolio-stats {
        gap: 24px;
        padding: 24px 32px;
    }
    
    .portfolio-stat-value {
        font-size: 28px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        min-height: 60vh;
        padding: 120px 20px 80px;
    }
    
    .portfolio-title {
        font-size: 42px;
    }
    
    .portfolio-subtitle {
        font-size: 18px;
        margin-bottom: 32px;
    }
    
    .portfolio-stats {
        display: flex;
        flex-direction: row;
        gap: 16px;
        padding: 14px 20px;
        width: 100%;
        border-radius: 50px;
    }
    
    .portfolio-stat-divider {
        width: 1px;
        height: 36px;
    }
    
    .portfolio-stat-value {
        font-size: 20px;
    }

    .portfolio-stat-label {
        font-size: 10px;
    }
    
    .filter-container {
        gap: 10px;
        margin-top: 24px;
    }

    .filter-btn {
        padding: 12px 22px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .portfolio-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .portfolio-image {
        height: 220px;
    }
    
    .portfolio-placeholder {
        font-size: 56px;
    }
    
    .cta-section {
        padding: 60px 20px;
    }

    .cta-title {
        font-size: 32px;
    }

    .cta-description {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px 24px;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        min-height: 55vh;
        padding: 100px 16px 60px;
    }
    
    .portfolio-title {
        font-size: 32px;
    }
    
    .portfolio-subtitle {
        font-size: 16px;
    }
    
    .portfolio-stats {
        padding: 12px 14px;
        gap: 10px;
    }
    
    .portfolio-stat-value {
        font-size: 18px;
    }
    
    .portfolio-stat-label {
        font-size: 12px;
    }
    
    .filter-container {
        margin-top: 20px;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .portfolio-content {
        padding: 24px;
    }
    
    .portfolio-card-title {
        font-size: 20px;
    }
    
    .portfolio-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .portfolio-image {
        height: 180px;
    }
    
    .portfolio-placeholder {
        font-size: 48px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Disable hover lift effects on touch-only devices */
@media (hover: none) {
    .filter-btn:hover,
    .portfolio-card:hover,
    .btn-primary:hover,
    .btn-gold-outline:hover,
    .btn-outline:hover {
        transform: none;
    }
}

/* Accessible focus outlines for keyboard/assistive navigation */
.btn:focus-visible,
.filter-btn:focus-visible,
.portfolio-card a:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    border-radius: 8px;
}
