/* ====================================
   Modern Portfolio 2025 - CSS
   Featuring: Glassmorphism, Bento Grids, 
   Smooth Animations & Performance Optimization
   ==================================== */

/* CSS Variables - Easy Customization */
:root {
    /* Primary Colors */
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --card-bg: #1e1e1e;
    
    /* Accent Colors - Modern Gradient */
    --accent-primary: #10b981;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    
    /* Text Colors */
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #6b7280;
    
    /* Glass Effect Colors */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Spacing & Layout */
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --section-padding: 55px;
    
    /* Z-index layers */
    --z-modal: 1000;
    --z-nav: 100;
    --z-overlay: 10;
}

/* ====================================
   Reset & Base Styles
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* ====================================
   Utility Classes
   ==================================== */
.section {
    padding: var(--section-padding) 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-dark {
    background: var(--secondary-bg);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin-bottom: 0.4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Glassmorphism Effect - Industry Standard */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Glass Button */
.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

/* ====================================
   Inline SVG Icons (replaces Font Awesome)
   ==================================== */
.icon {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.bento-icon .icon {
    width: 2rem;
    height: 2rem;
    color: var(--accent-primary);
}

.play-btn .icon,
.overlay-icon .icon,
.contact-icon .icon,
.about-icon .icon {
    width: 1.4em;
    height: 1.4em;
}

/* ====================================
   YouTube Facade (click-to-load embeds)
   ==================================== */
.yt-facade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: #000;
    cursor: pointer;
    display: block;
}

.yt-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-facade-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 46px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: background 0.2s ease;
    pointer-events: none;
}

.yt-facade:hover .yt-facade-play,
.yt-facade:focus-visible .yt-facade-play {
    background: var(--accent-primary);
}

/* ====================================
   Navigation Bar
   ==================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    padding: 0.75rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    padding: 0.5rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.625rem 1.5rem;
    background: var(--accent-gradient);
    border-radius: 50px;
    color: white !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.nav-cta::after {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 2rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ====================================
   Hero Section
   ==================================== */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 5.5rem 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.hero-badge i {
    color: #10b981;
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-primary) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.6rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 1.25rem;
    line-height: 1.7;
    animation: fadeInUp 1s ease 0.6s both;
}

/* Social Links */
.social-links-hero {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 1s both;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.cta-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.cta-secondary:hover {
    background: var(--accent-primary);
    transform: translateY(-3px);
}

/* ====================================
   Bento Grid Skills - 2025 Trend
   ==================================== */
.bento-skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
    animation: fadeInUp 1s ease 1.2s both;
}

.bento-item {
    padding: 1.25rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: default;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-item:hover::before {
    opacity: 0.1;
}

.bento-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
    transition: var(--transition);
}

.bento-item:hover .bento-icon {
    transform: scale(1.1) rotate(5deg);
}

.bento-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.bento-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Bento Size Variants */
.bento-large {
    grid-column: span 2;
}

.bento-medium {
    grid-column: span 1;
}

.bento-small {
    grid-column: span 1;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.75rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ====================================
   Portfolio Grid - Pure CSS (no Isotope)
   ==================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 1rem;
}

.portfolio-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card.featured {
    grid-column: span 2; /* Featured = 2 columns wide */
}

.portfolio-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(16, 185, 129, 0.2);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: var(--z-overlay);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-video {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
    cursor: pointer;
}

/* Loading Spinner for Videos */
.card-image::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image.loading::before {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Hide overlay and play button for portfolio video cards */
.portfolio-card .card-video ~ .card-overlay {
    display: none !important;
}

.portfolio-card .play-btn {
    display: none !important;
}

/* Keep overlay for image cards (non-video) */
.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.play-btn,
.overlay-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.play-btn:hover,
.overlay-icon:hover {
    transform: scale(1.1);
}

.card-content {
    padding: 1.1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.tag {
    padding: 0.25rem 0.65rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50px;
    font-size: 0.72rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 1rem;
}

.demo-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.demo-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

/* ====================================
   Generative AI Grid
   ==================================== */
.generative-ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gen-ai-card {
    overflow: hidden;
    transition: var(--transition);
    aspect-ratio: 1;
}

.gen-ai-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(16, 185, 129, 0.2);
}

.gen-ai-media {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-ai-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gen-ai-card:hover .gen-ai-media img {
    transform: scale(1.1);
}

.gen-ai-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.gen-ai-card:hover .gen-ai-video {
    transform: scale(1.05);
}

/* Show overlay and play button for generative AI videos */
.gen-ai-card .card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.gen-ai-card:hover .card-overlay {
    opacity: 1;
}

.gen-ai-card .play-btn {
    display: flex !important;
    pointer-events: all;
}

/* Loading Spinner for Generative AI Videos */
.gen-ai-media::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gen-ai-media.loading::before {
    opacity: 1;
}

/* ====================================
   Video Grid - Motion Graphics
   ==================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.video-card {
    overflow: hidden;
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 0.75rem 0 0.5rem;
}

.video-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--accent-primary);
}

.video-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ====================================
   About Section - Bento Layout
   ==================================== */
.about-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.about-main {
    grid-column: span 2;
    padding: 1.75rem;
}

.about-main h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}

.about-main p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.about-main p:last-child {
    margin-bottom: 0;
}

.about-mission,
.about-vision,
.about-stats {
    padding: 1.5rem;
}

.about-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    color: white;
}

.about-mission h3,
.about-vision h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.about-mission p,
.about-vision p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ====================================
   Contact Section
   ==================================== */
.contact-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.contact-method:hover {
    transform: translateY(-5px) scale(1.02);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
    text-align: left;
}

.contact-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-method .icon-arrow {
    color: var(--accent-primary);
    transition: var(--transition);
}

.contact-method:hover .icon-arrow {
    transform: translateX(5px);
}

/* ====================================
   Footer
   ==================================== */
.footer {
    background: var(--secondary-bg);
    padding: 2.5rem 2rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* ====================================
   Video Modal
   ==================================== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.video-modal.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: calc(var(--z-modal) + 1);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-primary);
    transform: rotate(90deg);
}

.video-modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

#modal-video {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

/* ====================================
   Animations
   ==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 1200px) {
    .bento-large {
        grid-column: span 1;
    }
    
    .portfolio-card.featured {
        grid-column: span 1;
    }
    
    .about-main {
        grid-column: span 1;
    }
}

/* Tablet: 2-column portfolio layout */
@media (max-width: 1100px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .portfolio-card.featured {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 45px;
    }
    
    .section {
        padding: var(--section-padding) 1.5rem;
    }
    
    .navbar {
        padding: 0.75rem 1.5rem;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        width: 100%;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 5rem 1.5rem 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bento-skills {
        grid-template-columns: 1fr;
    }
    
    /* Single column on mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-card.featured {
        grid-column: span 1;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .about-bento {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .social-links-hero {
        flex-direction: column;
        width: 100%;
    }
    
    .social-btn {
        width: 100%;
        justify-content: center;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .about-main,
    .about-mission,
    .about-vision,
    .about-stats {
        padding: 1.25rem;
    }
}

/* ====================================
   Performance Optimizations
   ==================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Reduce GPU load on low-end devices: backdrop-filter blur is the most
   expensive CSS effect on weak GPUs — swap it for solid translucent
   backgrounds on small screens. Visual difference is minimal. */
@media (max-width: 768px) {
    .glass-card,
    .glass-btn,
    .hero-badge,
    .video-modal {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .glass-card {
        background: rgba(35, 35, 35, 0.9);
    }

    .navbar,
    .nav-links {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10, 10, 10, 0.96);
    }
}

/* Improve text rendering */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================================
   Content Visibility - Performance Boost
   ==================================== */
.portfolio-card,
.gen-ai-card,
.video-card {
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

.card-video,
.gen-ai-video {
    background: #2a2a2a;  /* Softer gray instead of pure black */
}


/* ====================================
   2026 update: posters, availability, tech stack
   ==================================== */
.card-video { height: 100%; object-fit: cover; }
.gen-ai-video { object-fit: cover; }
.hero-availability {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 1rem;
    margin: 0 auto 1.25rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    animation: fadeInUp 1s ease 0.8s both;
}
.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: availabilityPulse 2s infinite;
}
@keyframes availabilityPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.tag-tech {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}
.about-stack {
    grid-column: 1 / -1;
    padding: 1.5rem;
}
.about-stack h3 {
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
    color: var(--text-primary);
}
.stack-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.stack-chips .tag { font-size: 0.85rem; padding: 0.35rem 0.85rem; }
@media (prefers-reduced-motion: reduce) {
    .availability-dot { animation: none; }
}

/* About: background card spans full width (mission/vision removed) */
.about-bento .about-main { grid-column: 1 / -1; }
