* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0a0f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e8e8f0;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

/* Center content helper */
.hero, .skills-ribbon, .hero-video-section, .featured-three, .showcase-grid, .portfolio-footer {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Header / Hero */
.hero {
    text-align: center;
    padding: 2rem 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #b0b0d0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    font-weight: 400;
    color: #a0a0b8;
    margin-bottom: 1rem;
}

.hero-meta {
    font-size: 0.9rem;
    color: #7a7a95;
    margin-bottom: 1rem;
}

.hero-meta a {
    color: #8b8bf0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-meta a:hover {
    color: #b0b0ff;
}

.separator {
    margin: 0 0.75rem;
    color: #3a3a4a;
}

.hero-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.hero-links a {
    color: #c0c0e0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(139,139,240,0.3);
    border-radius: 40px;
    transition: all 0.2s ease;
}

.hero-links a:hover {
    border-color: #8b8bf0;
    background: rgba(139,139,240,0.1);
    color: #ffffff;
}

/* Skills Ribbon */
.skills-ribbon {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.skills-ribbon span {
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(139,139,240,0.12);
    padding: 0.35rem 1rem;
    border-radius: 30px;
    letter-spacing: 0.3px;
    color: #c8c8ff;
}

/* HERO VIDEO SECTION */
.hero-video-section {
    margin-bottom: 3rem;
}

.hero-video-container {
    background: #08080c;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(139,139,240,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.hero-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 for horizontal hero */
    height: 0;
    background: #000;
}

.hero-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.hero-video-caption {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #0d0d14 0%, #0a0a0f 100%);
}

.hero-video-caption h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.hero-video-caption p {
    font-size: 0.9rem;
    color: #8b8bf0;
    font-weight: 500;
}

/* Three Featured Videos Grid */
.featured-three {
    margin-bottom: 4rem;
}

.three-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

/* Video Cards - Base styles */
.video-card {
    background: #111118;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.video-card:hover {
    /*transform: translateY(-4px);*/
    box-shadow: 0 16px 30px rgba(0,0,0,0.5);
    border-color: rgba(139,139,240,0.2);
}

/* Default horizontal video wrapper (16:9) */
.video-wrapper {
    position: relative;
    /*padding-bottom: 56.25%;   16:9 */
    height: 0;
    background: #000;
    min-width: 280px;
    aspect-ratio: auto !important;
}

/* VERTICAL VIDEO STYLES - for YouTube Shorts and vertical content */
.video-card.vertical .video-wrapper,
.video-card:has(iframe[src*="/shorts/"]) .video-wrapper,
.video-card:has(.vertical-badge) .video-wrapper {
    display:block !important;
    aspect-ratio: 9 / 16 !important;
    width: 100% !important;
    padding-bottom: 177.77% !important;
}

/*.video-card.horizontal .video-wrapper {
    display:block !important;
    aspect-ratio: 16 / 9 !important;
    width: 100% !important;
    padding-bottom: 56.25%; 
  
}*/


.video-card.square .video-wrapper {
    aspect-ratio: 1 / 1 !important;
    padding-bottom: 100% !important;
    position: relative;
    width: 100%;
}

.video-card.horizontal .video-wrapper {
    aspect-ratio: 16 / 9 !important;
    padding-bottom: 56.25% !important;
    position: relative;
    width: 100%;
}

.video-card.square {
    height: fit-content !important;
    max-height: fit-content !important;
}

/* Make the video fill the square wrapper */
.video-card.square .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* or 'contain' if you don't want cropping */
}

/* Also target any iframe that contains shorts URLs directly */
.video-wrapper iframe[src*="/shorts/"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* For local vertical videos - add class manually in HTML */
/*.local-vertical .video-wrapper {
    padding-bottom: 177.77%;
}*/

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* Video info */
.video-info {
    padding: 0.9rem 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #0d0d14;
}

.video-info span:first-child,
.video-info .vid-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f0f0ff;
}

.video-info span:last-child,
.video-info .vid-type {
    font-size: 0.7rem;
    font-weight: 500;
    background: #1a1a24;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    color: #b0b0d0;
}

.vid-ext {
    font-size: 0.7rem;
    color: #8b8bf0;
    text-decoration: none;
    margin-left: 0.5rem;
}

.vid-ext:hover {
    text-decoration: underline;
}

/* Category headings */
.portfolio-category {
    margin-bottom: 3.5rem;
}

.portfolio-category h2 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(139,139,240,0.4);
    display: inline-block;
}

.portfolio-category h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #c0c0e8;
}

/* Video Grids */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

/* For vertical videos in grid, we may want slightly narrower cards */
 /*.video-card.vertical {
   max-width: 280px;
    justify-self: center;
}*/

/* Skills note */
.skills-note {
    margin-top: 1.2rem;
    font-size: 0.8rem;
    color: #8a8aa8;
    background: rgba(139,139,240,0.05);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: inline-block;
}

/* Split category (instructional / ad) */
.split-category {
    margin: 2rem 0;
}

.split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.split-half {
    background: #0d0d14;
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.split-half h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.split-half .video-card {
    margin-bottom: 0;
}

/* Local video cards adjustments */
.local-video-card .video-wrapper video {
    background: #050508;
}

/* Music Promo grid */
.music-promo-grid {
    gap: 1.2rem;
}

/* Footer */
.portfolio-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8rem;
    color: #6a6a85;
}

.portfolio-footer a {
    color: #8b8bf0;
    text-decoration: none;
}

.portfolio-footer a:hover {
    text-decoration: underline;
}

.code {
    font-family: monospace;
    background: #1a1a22;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-container {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .three-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .split-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skills-ribbon span {
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
    
    .hero-video-caption {
        padding: 1rem;
    }
    
    .hero-video-caption h2 {
        font-size: 1.2rem;
    }
    
    /* On mobile, vertical cards can be full width with max-width */
    .video-card.vertical {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-meta {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }
    .separator {
        display: none;
    }
    .video-info {
        flex-direction: column;
        align-items: flex-start;
    }
}