/* ========================================
   Pablo Cordova Portfolio - Premium Design
   "THAT Guy" Level Visual Impact
   ======================================== */

/* CSS Custom Properties */
:root {
    /* Premium Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);

    /* Accent Colors */
    --accent: #00d4ff;
    --accent-secondary: #7b2fff;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
    --accent-glow: rgba(0, 212, 255, 0.3);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    /* Netflix Red */
    --netflix-red: #E50914;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(0, 212, 255, 0.3);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    /* Shadows */
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 60px var(--accent-glow);

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Font */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 10000;
    transform-origin: left;
    transform: scaleX(0);
}

/* 3D Canvas */
canvas#webgl-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    pointer-events: none;
    /* Let clicks pass through */
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-2xl);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 300ms var(--ease-out);
}

.nav-brand {
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 250ms ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    background: var(--accent-gradient);
    color: var(--bg-primary) !important;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.nav-cta:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.nav-mobile {
    display: none;
}

/* HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-4xl) var(--space-2xl);
    position: relative;
    overflow: hidden;
    /* Removed static bg to show 3D */
}

.hero-bg,
.hero-gradient {
    display: none;
    /* Hide old static backgrounds */
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 20%, rgba(0, 212, 255, 0.2), transparent),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(123, 47, 255, 0.15), transparent),
        linear-gradient(to bottom, transparent 60%, var(--bg-primary));
}

.hero-float-element {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.hero-float-element:nth-child(2) {
    top: 15%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08), transparent);
    animation-delay: 0s;
}

.hero-float-element:nth-child(3) {
    top: 50%;
    right: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(123, 47, 255, 0.08), transparent);
    animation-delay: 2s;
}

.hero-float-element:nth-child(4) {
    bottom: 20%;
    left: 15%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05), transparent);
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(3deg);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeIn 800ms var(--ease-out) 200ms forwards;
}

.eyebrow-badge {
    background: rgba(229, 9, 20, 0.2);
    color: var(--netflix-red);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(229, 9, 20, 0.3);
}

.eyebrow-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 800ms var(--ease-out) forwards;
}

.title-line[data-delay="0"] {
    animation-delay: 400ms;
}

.title-line[data-delay="1"] {
    animation-delay: 600ms;
}

.title-line.accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-xl);
    opacity: 0;
    animation: fadeIn 800ms var(--ease-out) 800ms forwards;
}

.hero-subtitle strong {
    color: var(--accent);
}

.hero-ctas {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-3xl);
    opacity: 0;
    animation: fadeIn 800ms var(--ease-out) 1000ms forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 300ms var(--ease-out);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-glass);
    border-color: var(--accent);
}

.btn-large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

.hero-stats-mini {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    opacity: 0;
    animation: fadeIn 800ms var(--ease-out) 1200ms forwards;
}

.mini-stat {
    text-align: center;
}

.mini-stat span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mini-stat {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-tertiary);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: fadeIn 800ms var(--ease-out) 1400ms forwards;
    z-index: 5;
    pointer-events: none;
}

@media (max-height: 700px) {
    .scroll-indicator {
        display: none;
    }
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scaleY(1);
    }

    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* Section Styling */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.section-title-large {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Problem Section */
.problem-section {
    /* Reduced top padding as requested */
    padding: var(--space-xl) 0 var(--space-4xl) 0;
    position: relative;
    background: rgba(10, 10, 15, 0.7);
    /* Glass effect */
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.problem-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* Give more space to the image column */
    gap: var(--space-xl);
    align-items: center;
}

.problem-content {
    text-align: left;
}

.problem-visual {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.problem-visual .hero-image-container {
    max-width: 550px;
    /* Increased from 380px */
    width: 100%;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.problem-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

/* Authority Section */
.authority-section {
    padding: var(--space-3xl) 0;
    position: relative;
    background: transparent;
    /* Let 3D show through */
}

.authority-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.authority-badge {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.netflix-badge {
    border-color: rgba(229, 9, 20, 0.3);
    animation: netflixGlow 3s ease-in-out infinite;
}

@keyframes netflixGlow {

    0%,
    100% {
        box-shadow: 0 0 0 transparent;
    }

    50% {
        box-shadow: 0 0 30px rgba(229, 9, 20, 0.2);
    }
}

.netflix-logo {
    width: 80px;
    height: auto;
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.netflix-badge .badge-text {
    color: var(--netflix-red);
}

.network-badge .badge-icon {
    font-size: 1.5rem;
}

.network-badge .badge-text {
    color: var(--accent);
    font-size: 0.75rem;
}

/* Work Section */
.work-section {
    padding: var(--space-4xl) 0;
    background: transparent;
    /* Changed from --bg-secondary */
}

.work-showcase {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
}

/* Featured Work */
.work-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-2xl);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.work-featured-media {
    position: relative;
    min-height: 500px;
}

.work-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
    display: flex;
    align-items: flex-start;
    padding: var(--space-xl);
}

.work-badge-large {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}

.work-featured-info {
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.work-category {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.work-featured-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.work-featured-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.work-featured-stats {
    list-style: none;
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.work-featured-stats li {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.work-featured-stats strong {
    display: block;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

/* Work Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.work-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 400ms var(--ease-out);
}

.work-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.work-media {
    height: 200px;
    position: relative;
}

.doc-media {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-locations {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-lg);
}

.doc-locations span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    text-align: center;
}

.coachable-media {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.billboard-media {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.billboard-glow {
    width: 100px;
    height: 60px;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb);
    background-size: 200% 200%;
    animation: billboardAnim 4s ease infinite;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.4);
}

@keyframes billboardAnim {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.billboard-text {
    position: absolute;
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
}

.eod-media {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.work-info {
    padding: var(--space-lg);
}

.work-info h4 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.work-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.work-link {
    display: inline-block;
    margin-top: var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: transform 200ms ease;
}

.work-link:hover {
    transform: translateX(4px);
}

/* Innovation Section */
.innovation-section {
    padding: var(--space-4xl) 0;
    position: relative;
    background: rgba(10, 10, 15, 0.6);
    /* Glass effect */
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.innovation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.innovation-badge-wrap {
    margin-bottom: var(--space-lg);
}

.innovation-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}

.innovation-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.innovation-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.innovation-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 1.25rem;
}

/* Code Window */
.code-window {
    background: #1e1e2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.code-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: #2d2d3a;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
}

.code-dot:nth-child(2) {
    background: #ffbd2e;
}

.code-dot:nth-child(3) {
    background: #27c93f;
}

.code-filename {
    margin-left: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.code-content {
    padding: var(--space-lg);
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    overflow-x: auto;
}

.c-comment {
    color: #6272a4;
}

.c-keyword {
    color: #ff79c6;
}

.c-class {
    color: #8be9fd;
}

.c-string {
    color: #f1fa8c;
}

.c-number {
    color: #bd93f9;
}

.c-bool {
    color: #ff79c6;
}

.c-func {
    color: #50fa7b;
}

/* Gallery Section */
.gallery-section {
    padding: var(--space-4xl) 0;
    background: transparent;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 400ms var(--ease-out);
}

.gallery-item.large {
    grid-row: span 2;
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 300ms ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-label {
    position: absolute;
    bottom: var(--space-lg);
    left: var(--space-lg);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: all 300ms ease;
}

.gallery-item:hover .gallery-label {
    opacity: 1;
    transform: translateY(0);
}

.gallery-link {
    text-align: center;
    margin-top: var(--space-2xl);
}

/* Brands Section */
.brands-section {
    padding: var(--space-4xl) 0;
    position: relative;
    background: rgba(18, 18, 26, 0.8);
    /* Glass effect */
    backdrop-filter: blur(5px);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.brand-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    text-decoration: none;
    transition: all 400ms var(--ease-out);
}

.brand-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.brand-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--bg-primary);
}

.brand-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.brand-card p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.innovation-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 400px;
}

canvas#code-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.code-window.small-widget {
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #a9b7c6;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
    /* Smaller */
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.code-window.small-widget:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.05);
    border-color: var(--accent);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 8px;
}

/* Skills Section */
.skills-section {
    padding: var(--space-4xl) 0;
    position: relative;
    background: transparent;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.skill-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 400ms var(--ease-out);
}

.skill-card:hover {
    border-color: var(--border-glow);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.skill-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    font-size: 0.813rem;
    color: var(--text-secondary);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.skill-card li:last-child {
    border-bottom: none;
}

/* BIO SECTION */
.bio-section {
    padding: var(--space-4xl) 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
    position: relative;
    z-index: 5;
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.bio-subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bio-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.bio-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.bio-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.bio-badges .badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    transition: all 0.3s ease;
}

.bio-badges .badge:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.bio-badges .badge strong {
    color: #fff;
}

/* Bio Hero Image */
.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Ensure glow extends outside */
    overflow: visible;
}

/* The Glow - Now entirely separate from the image to prevent edge artifacts */
.hero-image-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

.hero-image-container:hover::before {
    background: radial-gradient(circle, rgba(0, 212, 255, 0.6) 0%, transparent 70%);
    width: 90%;
    height: 90%;
    filter: blur(50px);
}

.bio-hero-img {
    width: 100%;
    height: auto;
    /* Use 'cover' or 'contain' depending on needs, contain is safe for cuts */
    object-fit: contain;

    /* THE LIQUID FILTER */
    filter: url('#liquid-distortion');

    /* Keep the bottom fade */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);

    transform: scale(1.05);
    /* We handle scale animation in CSS for hover, but filter handled by JS */
    transition: transform 0.5s ease;
    z-index: 2;
    /* Hardware acceleration */
    will-change: filter, transform;
}

.hero-image-container:hover .bio-hero-img {
    transform: scale(1.08) translateY(-5px);
}

@media (max-width: 900px) {
    .bio-grid {
        grid-template-columns: 1fr;
    }

    .hero-image-container {
        margin-top: var(--space-xl);
        max-width: 350px;
    }
}

/* CTA Section */
.cta-section {
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
    background: rgba(18, 18, 26, 0.9);
    /* Opaque enough for text readability */
    backdrop-filter: blur(10px);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.cta-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--bg-primary);
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.footer-brand {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-sm);
}

.footer-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Photo Collage */
.collage-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.collage-card {
    position: absolute;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.collage-card img {
    width: 100%;
    height: 100%;
    /* Ensure aspect ratio is preserved as much as possible, but cover the area */
    object-fit: cover;
    /* STRICTLY align to the top to avoid cutting off heads */
    object-position: top center;
    display: block;
    transition: transform 0.8s ease;
}


/* Card Positioning & Animation - Expanded to 5 items */
.c-1 {
    /* Portrait - Main */
    width: 320px;
    height: 420px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    z-index: 5;
    animation: float1 6s ease-in-out infinite;
}

.c-2 {
    /* Landscape (Bio 5) - WIDENED to prevent vertical cropping */
    width: 260px;
    height: 180px;
    top: 10%;
    right: 0%;
    transform: rotate(8deg);
    z-index: 2;
    animation: float2 7s ease-in-out infinite 1s;
    filter: brightness(0.7);
}

/* Specific nudge for Bio 5 to bring crop down per user request */
.c-2 img {
    object-position: center 20% !important;
}

.c-3 {
    /* Portrait - Bottom Left */
    width: 180px;
    height: 240px;
    bottom: 5%;
    left: 5%;
    transform: rotate(12deg);
    z-index: 4;
    animation: float3 8s ease-in-out infinite 2s;
}

.c-4 {
    /* Landscape (Bio 1) - WIDENED to prevent vertical cropping */
    width: 220px;
    height: 150px;
    top: 15%;
    left: 0%;
    transform: rotate(-15deg);
    z-index: 1;
    animation: float2 9s ease-in-out infinite 0.5s;
    filter: brightness(0.6);
}

.c-5 {
    /* Portrait - Bottom Right */
    width: 190px;
    height: 280px;
    bottom: 10%;
    right: 5%;
    transform: rotate(-8deg);
    z-index: 3;
    animation: float3 7.5s ease-in-out infinite 1.5s;
    filter: brightness(0.8);
}

/* Hover Intearction */
.collage-container:hover .collage-card {
    filter: brightness(0.4) blur(3px);
    transition: all 0.4s ease;
}

.collage-container .collage-card:hover {
    filter: brightness(1) blur(0);
    z-index: 20;
    transform: scale(1.15) rotate(0deg) translate(0, 0);
    box-shadow: 0 30px 60px rgba(0, 212, 255, 0.4);
    border-color: var(--accent);
}

.collage-card:hover img {
    transform: scale(1.1);
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(-5deg) translateY(0);
    }

    50% {
        transform: translate(-50%, -50%) rotate(-5deg) translateY(-20px);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: rotate(8deg) translateY(0) translateX(0);
    }

    50% {
        transform: rotate(8deg) translateY(-15px) translateX(10px);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: rotate(12deg) translateY(0);
    }

    50% {
        transform: rotate(12deg) translateY(-25px);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 800ms var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .work-featured {
        grid-template-columns: 1fr;
    }

    .innovation-grid {
        grid-template-columns: 1fr;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .collage-container {
        height: 400px;
        margin-top: var(--space-xl);
    }

    .c-1 {
        width: 220px;
        height: 300px;
    }

    .c-2 {
        width: 160px;
        height: 120px;
        right: 0;
    }

    .c-3 {
        width: 150px;
        height: 200px;
        left: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-mobile {
        display: block;
    }

    .hero-stats-mini {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .brands-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}