/* ================================================================
   Portfolio Redesign - Circuit Noir Theme
   Dark tech aesthetic matching the site design system
================================================================ */

/* ----------------------------------------------------------------
   Google Fonts Import
---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ----------------------------------------------------------------
   CSS Variables - Circuit Noir Theme
---------------------------------------------------------------- */
:root {
    /* Primary Colors */
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: #151d2e;
    --bg-card-hover: #1a2540;

    /* Accent Colors */
    --accent-cyan: #00d4ff;
    --accent-cyan-bright: #00e5ff;
    --accent-cyan-dim: rgba(0, 212, 255, 0.15);
    --accent-amber: #f59e0b;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Effects */
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.4);
    --glow-cyan-subtle: 0 0 10px rgba(0, 212, 255, 0.2);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 212, 255, 0.5);

    /* Shadows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 212, 255, 0.2);

    /* Typography */
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'DM Sans', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    /* Spacing */
    --section-padding: clamp(60px, 10vw, 120px);
    --container-padding: clamp(16px, 4vw, 40px);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ----------------------------------------------------------------
   Page Wrapper
---------------------------------------------------------------- */
.portfolio-redesign {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
}

/* Override body-inner background */
.body-inner:has(.portfolio-redesign) {
    background: var(--bg-primary);
}

/* ----------------------------------------------------------------
   Hero Section
---------------------------------------------------------------- */
.portfolio-redesign .portfolio-hero {
    position: relative;
    background:
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: clamp(100px, 15vw, 160px) 0 clamp(60px, 10vw, 100px);
    text-align: center;
    overflow: hidden;
}

/* PCB Pattern Background */
.portfolio-redesign .portfolio-hero .pcb-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.portfolio-redesign .portfolio-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.portfolio-redesign .portfolio-hero .hero-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent-cyan);
    margin-bottom: 24px;
}

.portfolio-redesign .portfolio-hero .hero-label::before,
.portfolio-redesign .portfolio-hero .hero-label::after {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--accent-cyan);
}

.portfolio-redesign .portfolio-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.portfolio-redesign .portfolio-hero h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
    margin: 20px auto 0;
    border-radius: 2px;
}

.portfolio-redesign .portfolio-hero .hero-description {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ----------------------------------------------------------------
   Portfolio Grid Section
---------------------------------------------------------------- */
.portfolio-redesign .portfolio-section {
    position: relative;
    background: var(--bg-primary);
    padding: var(--section-padding) 0;
}

.portfolio-redesign .portfolio-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Section Header */
.portfolio-redesign .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.portfolio-redesign .section-header .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.portfolio-redesign .section-header .label::before,
.portfolio-redesign .section-header .label::after {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--accent-cyan);
}

.portfolio-redesign .section-header h2 {
    font-family: var(--font-mono);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.portfolio-redesign .section-header p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ----------------------------------------------------------------
   Portfolio Grid
---------------------------------------------------------------- */
.portfolio-redesign .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* ----------------------------------------------------------------
   Product Card
---------------------------------------------------------------- */
.portfolio-redesign .product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.portfolio-redesign .product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-card-hover), var(--glow-cyan-subtle);
    background: var(--bg-card-hover);
}

.portfolio-redesign .product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Product Card Image */
.portfolio-redesign .product-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.portfolio-redesign .product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.portfolio-redesign .product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.portfolio-redesign .product-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.portfolio-redesign .product-card-image-placeholder i {
    font-size: 3rem;
    color: var(--accent-cyan);
    opacity: 0.5;
}

/* Product Card Content */
.portfolio-redesign .product-card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-redesign .product-card-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.portfolio-redesign .product-card-excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 20px;
}

/* Product Card Button */
.portfolio-redesign .product-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

.portfolio-redesign .product-card-btn i {
    transition: transform var(--transition-fast);
}

.portfolio-redesign .product-card:hover .product-card-btn {
    color: var(--text-primary);
}

.portfolio-redesign .product-card:hover .product-card-btn i {
    transform: translateX(4px);
}

/* ----------------------------------------------------------------
   Product Detail Page
---------------------------------------------------------------- */
.portfolio-redesign .product-detail-hero {
    position: relative;
    background:
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: clamp(120px, 20vw, 200px) 0 clamp(80px, 12vw, 120px);
    overflow: hidden;
}

.portfolio-redesign .product-detail-hero .pcb-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.portfolio-redesign .product-detail-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    text-align: center;
}

.portfolio-redesign .product-detail-hero .hero-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-cyan);
    margin-bottom: 24px;
}

.portfolio-redesign .product-detail-hero .hero-label::before,
.portfolio-redesign .product-detail-hero .hero-label::after {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--accent-cyan);
}

.portfolio-redesign .product-detail-hero .product-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: 0.03em;
    line-height: 1.15;
}

/* ----------------------------------------------------------------
   Product Content Section
---------------------------------------------------------------- */
.portfolio-redesign .product-content {
    position: relative;
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
}

.portfolio-redesign .product-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Back Navigation */
.portfolio-redesign .product-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    margin-bottom: 40px;
}

.portfolio-redesign .product-nav-back:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Product Layout */
.portfolio-redesign .product-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 992px) {
    .portfolio-redesign .product-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Product Info Sidebar */
.portfolio-redesign .product-info {
    position: sticky;
    top: 100px;
}

.portfolio-redesign .product-info h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.portfolio-redesign .product-description {
    font-family: var(--font-body);
    color: #f1f5f9;
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    line-height: 1.9;
    margin-bottom: 32px;
}

.portfolio-redesign .product-description p,
.portfolio-redesign .product-description h3,
.portfolio-redesign .product-description h4,
.portfolio-redesign .product-description li {
    margin-bottom: 1rem;
    color: #f1f5f9 !important;
    font-size: inherit;
    font-weight: normal;
}

/* Product Features */
.portfolio-redesign .product-features {
    margin-bottom: 32px;
}

.portfolio-redesign .product-feature {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.portfolio-redesign .product-feature:first-child {
    border-top: 1px solid var(--border-subtle);
}

.portfolio-redesign .product-feature-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-redesign .product-feature-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* Download Buttons */
.portfolio-redesign .product-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portfolio-redesign .product-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all var(--transition-base);
}

.portfolio-redesign .product-download-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

/* Product Gallery */
.portfolio-redesign .product-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portfolio-redesign .product-gallery a {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.portfolio-redesign .product-gallery a:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan-subtle);
}

.portfolio-redesign .product-gallery img {
    width: 100%;
    display: block;
    transition: transform var(--transition-base);
}

.portfolio-redesign .product-gallery a:hover img {
    transform: scale(1.02);
}

/* ----------------------------------------------------------------
   Responsive Styles
---------------------------------------------------------------- */
@media (max-width: 768px) {
    .portfolio-redesign .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portfolio-redesign .product-card-content {
        padding: 20px;
    }

    .portfolio-redesign .portfolio-hero .hero-label::before,
    .portfolio-redesign .portfolio-hero .hero-label::after {
        width: 20px;
    }

    .portfolio-redesign .product-info {
        position: static;
    }
}

/* ----------------------------------------------------------------
   Card Animations
---------------------------------------------------------------- */
.portfolio-redesign .portfolio-grid .product-card {
    opacity: 0;
    transform: translateY(40px);
    animation: card-reveal 0.6s ease forwards;
}

.portfolio-redesign .portfolio-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.portfolio-redesign .portfolio-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.portfolio-redesign .portfolio-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.portfolio-redesign .portfolio-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.portfolio-redesign .portfolio-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.portfolio-redesign .portfolio-grid .product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes card-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .portfolio-redesign .portfolio-grid .product-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
