/* Basic Resets & Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
/* Attempt to use SF Pro Display, fallback to Inter */
@font-face {
    font-family: 'SF Pro Display';
    src: local('SF Pro Display Regular'),
         url('path/to/SFProDisplay-Regular.woff') format('woff'); /* Add if you have the font file */
    font-weight: 400;
}
@font-face {
    font-family: 'SF Pro Display';
    src: local('SF Pro Display Semibold'),
         url('path/to/SFProDisplay-Semibold.woff') format('woff'); /* Add if you have the font file */
    font-weight: 600;
}
@font-face {
    font-family: 'SF Pro Display';
    src: local('SF Pro Display Bold'),
         url('path/to/SFProDisplay-Bold.woff') format('woff'); /* Add if you have the font file */
    font-weight: 700;
}

* {
    box-sizing: border-box; 
}

:root {
    --black-color: #0d0d0d;
    --dark-grey-color: #1a1a1a;
    --red-color: #e50914; /* Netflix Red as a base */
    --light-red-color: #ff3842;
    --text-color: #f0f0f0;
    --gradient-bg: linear-gradient(135deg, var(--black-color) 0%, var(--dark-grey-color) 50%, var(--black-color) 100%);
    --hover-gradient: linear-gradient(135deg, var(--red-color) 0%, var(--light-red-color) 100%);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', 'Inter', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.8); /* Slightly transparent for depth */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-weight: 700;
    font-size: 1.8em;
    color: var(--light-red-color);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--red-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    margin-left: 35px;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: var(--red-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--light-red-color);
    transform: translateY(-2px);
}

/* Sections General Styling */
section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 50px; /* Add padding for content below navbar */
    position: relative;
    overflow: hidden;
}

h1, h2 {
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

h1 {
    font-size: 4.75em;
    color: var(--text-color);
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

h2 {
    font-size: 2.75em;
    color: var(--red-color);
}

p {
    font-size: 1.2em;
    line-height: 1.8;
    max-width: 800px;
    text-align: center;
    margin-bottom: 20px;
    color: #cccccc;
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at center, var(--dark-grey-color) 0%, var(--black-color) 70%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255, 255, 255, 0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)" /></svg>') repeat;
    opacity: 0.1;
    animation: backgroundPan 60s linear infinite;
}

@keyframes backgroundPan {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(-40px, -40px); /* Moves the grid slightly */
    }
}


.hero-content {
    text-align: center;
    max-width: 900px;
    position: relative; /* Above the pseudo-element */
    z-index: 1;
}

.hero-content h1 {
    font-size: 5.5em;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
    font-size: 2.5em;
    color: var(--light-red-color);
    margin-bottom: 40px;
    animation: fadeInUp 1.2s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-content p {
    font-size: 1.4em;
    max-width: 700px;
    margin: 0 auto 50px auto;
    color: #e0e0e0;
    animation: fadeInUp 1.4s ease-out 0.4s forwards;
    opacity: 0;
}

.cta-button {
    background: var(--red-color);
    color: var(--text-color);
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.4);
    animation: fadeInUp 1.6s ease-out 0.6s forwards;
    opacity: 0;
}

.cta-button:hover {
    background: var(--light-red-color);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 56, 66, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* About Section */
.about-section {
    background: var(--dark-grey-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 50px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    background-image: radial-gradient(circle at top left, rgba(229, 9, 20, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at bottom right, rgba(229, 9, 20, 0.1) 0%, transparent 50%);
}

.about-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
}

.profile-photo {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--red-color);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.6);
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 50px var(--light-red-color);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text {
    text-align: left;
    flex-grow: 1;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 25px;
    font-size: 2.8em;
    color: var(--light-red-color);
}

.about-text p {
    text-align: left;
    font-size: 1.15em;
    max-width: none;
    color: #c0c0c0;
    margin-bottom: 0;
}

/* Projects Section */

/* 1. Base Container Fix */
.project-item {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    /* This ensures the 3-dot menu can 'pop out' without being cut off */
    overflow: visible !important; 
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Base style for all iframes */
.project-item iframe {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* 2. SPECIFIC SHAPES (Targeting your layout) */

/* EVENT EDITS: Middle one (2nd) is Portrait, 1st and 3rd are Landscape */
.category-card:nth-child(1) .project-item:nth-child(1) iframe,
.category-card:nth-child(1) .project-item:nth-child(3) iframe {
    aspect-ratio: 16 / 9;
}
.category-card:nth-child(1) .project-item:nth-child(2) iframe {
    aspect-ratio: 9 / 16;
    max-width: 300px; /* Prevents portrait from being too tall on laptop */
}

/* SHORT FORM EDITS: All are Portrait */
.category-card:nth-child(2) .project-item iframe {
    aspect-ratio: 9 / 16;
    max-width: 300px;
}

/* 3. MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    .project-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    /* Force larger touch area on mobile so 3-dots are easy to hit */
    .project-item iframe {
        width: 90vw; /* Use most of the phone width */
        height: auto;
    }

    /* Ensure vertical videos don't become taller than the screen */
    .category-card:nth-child(1) .project-item:nth-child(2) iframe,
    .category-card:nth-child(2) .project-item iframe {
        max-height: 70vh; 
        width: auto; /* Maintains 9:16 shape */
    }
}

/* 1. Project Item Container */
.project-item {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: visible !important; /* Allows menus to pop out */
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

/* Container for each video */
.project-item {
    display: flex;
    justify-content: center; /* Centers horizontal videos */
    align-items: center;     /* Centers vertical videos vertically if needed */
    width: 100%;
    overflow: hidden;
}

/* Base video styling */
.portfolio-video {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16; /* Default for vertical reels */
    border-radius: 12px;
    background: #000;
    display: block;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Specific styling for Horizontal videos */
.portfolio-video.horizontal {
    aspect-ratio: 16 / 9; 
    max-width: 100%; /* Ensures it doesn't overflow the grid cell */
    object-fit: contain; 
}

/* Grid adjustment for better PC viewing */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center; /* This ensures horizontal and vertical items align along their centers */
}

/* 2. Responsive Aspect Ratios */
/* EVENT EDITS: 1st and 3rd are Landscape (16:9), 2nd is Portrait (9:16) */
.category-card:nth-child(1) .project-item:nth-child(1) iframe,
.category-card:nth-child(1) .project-item:nth-child(3) iframe {
    aspect-ratio: 16 / 9;
}

.category-card:nth-child(1) .project-item:nth-child(2) iframe {
    aspect-ratio: 9 / 16;
    max-width: 320px;
}

/* SHORT FORM EDITS: All Portrait (9:16) */
.category-card:nth-child(2) .project-item iframe {
    aspect-ratio: 9 / 16;
    max-width: 320px;
}

/* Base video styling */
.portfolio-video {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16; /* Default for vertical reels */
    border-radius: 12px;
    background: #000;
    display: block;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Specific styling for Horizontal videos */
.portfolio-video.horizontal {
    aspect-ratio: 16 / 9; /* Traditional cinematic wide look */
    object-fit: contain; /* Ensures the whole frame is visible */
}

/* Grid adjustment to keep things aligned */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: start; /* Keeps items aligned to the top */
}

/* 3. MOBILE SPECIFIC OVERLAP FIX */
@media (max-width: 768px) {
    /* Prevent horizontal videos from being too thin, which cuts off the 3-dot menu */
    .category-card:nth-child(1) .project-item:nth-child(1) iframe,
    .category-card:nth-child(1) .project-item:nth-child(3) iframe {
        min-height: 230px; /* Forces enough height for the menu to fit */
        width: 100%;
    }

    .project-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 45px; /* More space between videos */
    }

    .project-item iframe {
        height: 100%;
        min-height: 350px; /* For portrait videos */
    }
}

.projects-section {
    background: var(--black-color);
    padding: 100px 50px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
    background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="1.5" fill="rgba(255, 255, 255, 0.03)"/></pattern></defs><rect width="100%" height="100%" fill="url(#dots)"/></svg>');
}

.projects-section h2 {
    font-size: 3.5em;
    margin-bottom: 60px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.projects-section h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--red-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    border-radius: 2px;
}

.project-categories {
    display: flex;
    flex-direction: column;
    gap: 80px;
    max-width: 1400px;
    width: 100%;
    margin-top: 50px;
}

.category-card {
    background: var(--dark-grey-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.3);
}

.category-card h3 {
    font-size: 2.2em;
    color: var(--red-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.category-card h3::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--light-red-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    border-radius: 1.5px;
}


.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    justify-content: center;
}

.project-item {
    background: var(--black-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 0, 0, 0.2);
}

.project-item iframe {
    width: 100%;
    aspect-ratio: 16/9; /* Standard video aspect ratio */
    border: none;
    display: block;
}

.project-item p {
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    background: var(--dark-grey-color);
    margin-bottom: 0; /* Override default p margin */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Contact Section */
.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    width: 100%;
    gap: 50px;
    margin-top: 40px;
}

/* Left Side - Form Styling */
.contact-left {
    flex: 1;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: var(--red-color);
}

/* Middle Divider - Your Creative Idea */
.contact-divider {
    width: 2px;
    height: 300px;
    background: linear-gradient(to bottom, transparent, var(--red-color), var(--black-color), transparent);
}

/* Right Side - Socials */
.contact-right {
    flex: 1;
    text-align: left;
}

.contact-right h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--text-color);
}

.social-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-item {
    text-decoration: none;
    color: #808080;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.social-item i {
    font-size: 1.5rem;
    color: var(--red-color);
}

.social-item:hover {
    color: white;
    transform: translateX(10px);
}



/* 2. Updated Contact Container */
.contact-container {
    display: flex;
    align-items: flex-start; /* Align to top */
    justify-content: center;
    max-width: 1000px;
    width: 100%; /* Use percentage */
    gap: 40px;
    margin-top: 40px;
    padding: 0 20px; /* Prevents touching screen edges on mobile */
}

/* 3. Form Scaling */
.contact-left {
    flex: 1;
    width: 100%; /* Important for mobile */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.contact-form input, 
.contact-form textarea {
    width: 100%; /* This will now respect the parent width */
    max-width: 100%; /* Force it to stay inside */
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s ease;
}

/* 4. Mobile Responsiveness (The Magic Fix) */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column; /* Stack Form on top of Socials */
        gap: 30px;
        align-items: center;
    }

    .contact-left, .contact-right {
        width: 100%; /* Full width on mobile */
    }

    .contact-divider {
        width: 80%; /* Horizontal line instead of vertical */
        height: 1px;
        margin: 10px 0;
        background: linear-gradient(to right, transparent, var(--red-color), transparent);
    }
    
    .contact-right {
        text-align: center;
    }
    
    .social-links-vertical {
        align-items: center; /* Center icons on mobile */
    }
}

/* Responsive */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
    .contact-divider {
        width: 100px;
        height: 2px;
        background: linear-gradient(to right, transparent, var(--red-color), transparent);
    }
    .contact-right {
        text-align: center;
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .profile-photo {
        width: 250px;
        height: 250px;
    }
    .about-text {
        text-align: center;
    }
    .about-text h2 {
        text-align: center;
    }
}

@media (max-width: 900px) {
    .navbar {
        padding: 15px 25px;
    }
    .logo {
        font-size: 1.5em;
    }
    .nav-links a {
        font-size: 1em;
        margin-left: 20px;
    }
    h1 {
        font-size: 3.5em;
    }
    h2 {
        font-size: 2.5em;
    }
    .hero-content h1 {
        font-size: 4em;
    }
    .hero-content h2 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 1.2em;
    }
    .cta-button {
        padding: 15px 30px;
        font-size: 1.2em;
    }
    .projects-section h2, .contact-section h2 {
        font-size: 3em;
    }
    .category-card h3 {
        font-size: 1.8em;
    }
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    .contact-icon i {
        font-size: 3.5em;
    }
    .contact-icon span {
        font-size: 1em;
    }
    .contact-motto {
        font-size: 1.3em;
    }
}

.portfolio-video {
    width: 100%;
    border-radius: 8px;
    background-color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    outline: none;
}

.project-item {
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        padding: 15px 20px;
    }
    .nav-links {
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-links a {
        margin: 5px 10px;
    }
    section {
        padding: 80px 20px;
    }
    h1 {
        font-size: 2.8em;
    }
    h2 {
        font-size: 2em;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content h2 {
        font-size: 1.8em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 1.1em;
    }
    .profile-photo {
        width: 200px;
        height: 200px;
    }
    .about-text p {
        font-size: 1em;
    }
    .projects-section h2, .contact-section h2 {
        font-size: 2.5em;
    }
    .category-card {
        padding: 30px;
    }
    .category-card h3 {
        font-size: 1.6em;
    }
    .project-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 25px;
    }
    .contact-links {
        flex-direction: column;
        gap: 25px;
    }
    .contact-icon i {
        font-size: 3em;
    }
}
/* Footer */
.site-footer {
    background: var(--black-color);
    color: #808080; /* Slightly lighter grey for subtle text */
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.8;
}

.site-footer p {
    margin: 5px 0;
    color: inherit; /* Ensure text color is from parent */
    max-width: none; /* Override section p styling */
}

.site-footer p:first-child {
    font-weight: 600;
    color: var(--text-color); /* Make the copyright line slightly bolder and brighter */
}

/* Responsive adjustments for footer */
@media (max-width: 600px) {
    .site-footer {
        padding: 20px 15px;
        font-size: 0.8em;
    }
}
