/* ====================================================================
   portfolio.css — NIRVANA / ENGINEERING ATTENTION
   COMPLETE CSS · SYMMETRIC GRIDS · HOVER FIX · VIDEO SOUND
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');

/* ---------- DESIGN TOKENS — DARK LUXURY ---------- */
:root {
    --bg-deep: #0a0c12;
    --bg-void: #07090e;
    --bg-panel: #11141c;
    --bg-elevated: #1a1e28;
    --accent-primary: #3c78ff;
    --accent-soft: #6fa2ff;
    --accent-glow: rgba(60, 120, 255, 0.25);
    --text-luminous: #ffffff;
    --text-dim: #e0e4ff;
    --text-muted: #9aa1b5;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-visible: rgba(255, 255, 255, 0.1);
    --radius-card: 20px;
    --radius-btn: 40px;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-medium: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.25s ease;
    --shadow-lift: 0 25px 40px -12px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 35px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(60, 120, 255, 0.2);
    --font-display: 'Clash Display', sans-serif;
    --font-body: 'Inter', sans-serif;
}

.portfolio-archive {
    background: var(--bg-deep);
    color: var(--text-luminous);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ====================================================================
   §1  HERO
   ==================================================================== */
.portfolio-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 6vw;
    position: relative;
    background: radial-gradient(ellipse at 80% 30%, rgba(20, 34, 58, 0.6), transparent 70%),
                radial-gradient(ellipse at 20% 70%, rgba(15, 26, 46, 0.6), transparent 70%),
                var(--bg-deep);
    border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.headline-xl {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
}

.block-reveal {
    display: block;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    animation: blockReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.block-reveal:nth-child(1) { animation-delay: 0.1s; }
.block-reveal:nth-child(2) { animation-delay: 0.3s; }

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

.block-reveal.accent {
    color: var(--accent-soft);
    text-shadow: 0 0 20px rgba(111, 162, 255, 0.3);
}

.hero-description {
    margin-top: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.5s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.hero-description p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-dim);
    font-weight: 350;
    max-width: 550px;
}

.hero-atmosphere {
    position: relative;
    height: 100%;
    width: 100%;
    opacity: 0;
    animation: fadeIn 1.2s 0.6s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.atmosphere-core {
    width: 100%;
    aspect-ratio: 1 / 0.9;
    background: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 70%),
                conic-gradient(from 180deg at 50% 70%, #1e2b4a, #121a30, #1e2b4a);
    filter: blur(60px);
    opacity: 0.7;
    animation: atmospherePulse 12s infinite alternate ease-in-out;
}

@keyframes atmospherePulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 0.8; transform: scale(1.08); }
}

.atmosphere-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 40%, rgba(111, 162, 255, 0.15), transparent 70%);
    pointer-events: none;
}

.hero-architectural-line {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* ====================================================================
   §2  FILTER SECTION
   ==================================================================== */
.portfolio-filter-section {
    padding: 5rem 6vw 2rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: white;
    line-height: 1.1;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.8rem 2.2rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all var(--transition-medium);
    border: 1px solid transparent;
    letter-spacing: 0.5px;
    font-family: var(--font-body);
}

.filter-btn.is-active {
    background: rgba(60, 120, 255, 0.12);
    color: white;
    border-color: rgba(60, 120, 255, 0.4);
    backdrop-filter: blur(8px);
}

.filter-btn:hover {
    border-color: var(--border-visible);
    background: rgba(255, 255, 255, 0.02);
    color: white;
}

/* ====================================================================
   §3  VERTICAL VIDEO GRID — 4 COLUMNS
   ==================================================================== */
.portfolio-grid-section {
    padding: 2rem 6vw 5rem;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.grid-header {
    margin-bottom: 2.5rem;
}

.grid-category-title {
    font-size: 1.8rem;
    font-weight: 550;
    font-family: var(--font-display);
    color: white;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
}

.grid-category-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 3px;
}

.grid-vertical {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.card-vertical {
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    background: #0a0c15;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s ease;
    cursor: pointer;
}

.card-media {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-vertical:hover {
    transform: scale(1.04) translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(60, 120, 255, 0.3);
}

.card-vertical:hover video {
    transform: scale(1.08);
}

.card-vertical.is-active {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 35px 70px rgba(60, 120, 255, 0.4), 0 0 0 2px rgba(60, 120, 255, 0.6);
    z-index: 10;
}

.card-vertical.is-active video {
    transform: scale(1.08);
}

.card-hover-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 70%);
    display: flex;
    align-items: flex-end;
    padding: 1.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-vertical:hover .card-hover-info {
    opacity: 1;
}

.card-label {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.4rem;
}

/* ====================================================================
   §4  GRAPHICS GRID — 5 COLUMNS - ZOOM ON HOVER, NO OVERLAY
   ==================================================================== */
.grid-graphic {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.8rem;
    align-items: start;
}

.graphic-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #10131e;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.45s ease;
}

.graphic-card:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(60,120,255,0.25);
    z-index: 10;
}

.graphic-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.graphic-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16,1,0.3,1);
}

.graphic-card:hover .graphic-frame img {
    transform: scale(1.15);
}

/* Overlay completely removed */
.graphic-overlay,
.view-label,
.graphic-card:hover .graphic-overlay,
.graphic-card:hover .view-label {
    display: none !important;
}

/* ====================================================================
   §5  LANDSCAPE VIDEO GRID — 2 COLUMNS - FIXED ZOOM (NO CUT)
   ==================================================================== */
.grid-landscape {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.landscape-card {
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #0c0f18;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s ease;
    cursor: pointer;
}

/* CARD ZOOM - pura card zoom hoga, video nahi */
.landscape-card:hover {
    transform: scale(1.02) translateY(-6px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(60, 120, 255, 0.3);
    z-index: 10;
}

.landscape-media {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.landscape-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none !important;
    transition: none !important;
}

/* Preview button completely removed */
.landscape-hover,
.landscape-hover span,
.landscape-card:hover .landscape-hover,
.landscape-card:hover .landscape-hover span {
    display: none !important;
}

/* ====================================================================
   §6  TRANSFORMATION — SIDE BY SIDE
   ==================================================================== */


.comparison-showcase {
    padding: 6rem 6vw 8rem;
    background: linear-gradient(to bottom, var(--bg-deep), var(--bg-void));
    margin-top: 2rem;
}

.comparison-header {
    margin-bottom: 4rem;
    text-align: center;
}

.comparison-header .section-title::after {
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
}

.section-sub {
    font-size: 1.2rem;
    color: var(--text-dim);
    font-weight: 350;
    letter-spacing: 0.5px;
}

.transformation-block {
    margin-bottom: 5rem;
}

.transformation-cat-title {
    font-size: 1.6rem;
    font-weight: 600;
    font-family: var(--font-display);
    color: white;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
    border-left: 5px solid var(--accent-primary);
    padding-left: 1.5rem;
}

/* ========== VIDEO TRANSFORMATIONS - 3 ITEMS ========== */
.transformation-block:first-of-type .transformation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    justify-content: center;
}

/* 3rd video unit center */
.transformation-block:first-of-type .transformation-unit:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 50%;
}

/* ========== DESIGN TRANSFORMATIONS - 5 ITEMS ========== */
.transformation-block:last-child .transformation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

/* 5th design unit center */
.transformation-block:last-child .transformation-unit:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 50%;
}

.transformation-unit {
    width: 100%;
}

.transformation-pair {
    display: flex;
    gap: 1rem;
    background: var(--bg-panel);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.transformation-pair:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.6);
}

.transformation-before,
.transformation-after {
    flex: 1;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: #000;
}

.transformation-before img,
.transformation-after img,
.transformation-before video,
.transformation-after video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.transformation-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.transformation-block:last-child .transformation-before,
.transformation-block:last-child .transformation-after {
    aspect-ratio: 4 / 5;
}

/* ====================================================================
   §7  PORTFOLIO TERMINUS
   ==================================================================== */
.portfolio-terminus {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0 5rem;
}

.terminus-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: relative;
}

.terminus-dot::before,
.terminus-dot::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    top: 50%;
    transform: translateY(-50%);
}

.terminus-dot::before {
    right: 20px;
}

.terminus-dot::after {
    left: 20px;
}

/* ====================================================================
   §8  RESPONSIVE
   ==================================================================== */
@media (max-width: 1400px) {
    .grid-graphic {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 1200px) {
    .grid-vertical {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-graphic {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-atmosphere {
        max-width: 500px;
        margin: 0 auto;
    }
    .transformation-block:first-of-type .transformation-unit:nth-child(3),
    .transformation-block:last-child .transformation-unit:nth-child(5) {
        width: 80%;
    }
}

@media (max-width: 900px) {
    .grid-vertical {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-graphic {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-landscape {
        grid-template-columns: 1fr;
    }
    .transformation-block:first-of-type .transformation-grid,
    .transformation-block:last-child .transformation-grid {
        grid-template-columns: 1fr;
    }
    .transformation-block:first-of-type .transformation-unit:nth-child(3),
    .transformation-block:last-child .transformation-unit:nth-child(5) {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
    }
    .filter-btn {
        width: 100%;
        text-align: center;
    }
    .transformation-pair {
        flex-direction: column;
    }
    .section-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 600px) {
    .grid-vertical {
        grid-template-columns: 1fr;
    }
    .grid-graphic {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .grid-landscape {
        grid-template-columns: 1fr;
    }
    .headline-xl {
        font-size: 2.4rem;
    }
}

/* ---------- LAZY LOAD ---------- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"] {
    opacity: 1;
}

/* ===== SCROLL REVEAL ===== */
.card-vertical,
.graphic-card,
.landscape-card,
.transformation-unit {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: transform 0.8s cubic-bezier(0.16,1,0.3,1),
                opacity 0.8s ease;
}

.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===== TRANSFORMATION GRID CENTERING FIX ===== */
.video-grid-3,
.design-grid-5 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.centered-unit {
    grid-column: 1 / -1;
    justify-self: center;
    width: 50%;
}

@media (max-width: 900px) {
    .video-grid-3,
    .design-grid-5 {
        grid-template-columns: 1fr;
    }
    .centered-unit {
        width: 100%;
    }
}