/* Base Styles & Variables */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #6c63ff;
    --text-color: #333333;
    --text-light: #f8f9fa;
    --gradient-1: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    --gradient-2: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --transition: all 0.3s ease;
    --border-radius: 16px;
    --spacing: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--gradient-1);
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-light);
}

h1 { font-size: 3.5rem; }
h2 { 
    font-size: 2.5rem; 
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

a {
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Make all images black and white by default with smooth transition */
img:not(.profile-photo) {
    filter: grayscale(100%);
    transition: filter 0.5s ease-in-out, transform 0.3s ease-in-out;
}

/* Add color on hover and scale effect */
img:not(.profile-photo):hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Profile photo with black and white effect */
.profile-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    filter: grayscale(100%);
    transition: all 0.5s ease-in-out;
}

/* Profile photo hover effect */
.profile-photo:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.3);
}

/* Ensure smooth hover transitions for sample items */
.sample-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video specific optimizations */
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transition: transform 0.3s ease-out;
    outline: none;
}

/* Disable video controls */
.media-container video::-webkit-media-controls {
    display: none !important;
}

/* Optimize image rendering */
.media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transition: transform 0.3s ease-out;
}

/* Hover effects */
.sample-item:hover .media-container img,
.sample-item:hover .media-container video {
    transform: scale(1.02);
}

/* Optimize grid layout */
.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
    will-change: transform;
}

/* Optimize overlay */
.sample-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    will-change: opacity;
}

/* Buttons */
.cta-button {
    display: none;
}

/* Navigation */
.navbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    padding: 0.5rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-decoration: none;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-3px);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-item a.active,
.nav-item a[href="#contact"].active,
.nav-item a[href="#contact"]:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #1a1a1a; /* Dark gray background */
    color: white;
    padding: 2rem 1rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom right,
        rgba(0, 0, 0, 0.8),
        rgba(26, 26, 26, 0.95)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Text */
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

.hero .highlight {
    color: white;
    position: relative;
    display: inline-block;
}

/* Remove any existing glow animations */
@keyframes none {
    to { text-shadow: none; }
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Scroll Down Arrow */
.scroll-down {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    margin: 2rem auto 0;
    color: white;
    font-size: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    text-decoration: none;
}

.scroll-down:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(5px);
    border-color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Services Section */
.services {
    padding: 6rem 0;
    position: relative;
    background: var(--gradient-2);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: white;
    transform: scale(1.1);
}

.service-icon i {
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
    color: var(--text-dark);
}

.service-card h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Samples Section */
.samples {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.samples h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.sample-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
}

.sample-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.media-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sample-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sample-item:hover .sample-overlay {
    opacity: 1;
}

/* Video play button overlay */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.2s;
    pointer-events: auto;
}

.play-button:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Hide native controls */
.media-container video::-webkit-media-controls {
    display: none !important;
}

.media-container video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Portfolio Section */
.portfolio {
    padding: 6rem 0;
    position: relative;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1;
    background: var(--gradient-2);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    padding: 2rem;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* About Section */
.about {
    padding: 6rem 0;
    position: relative;
    background: var(--gradient-1);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 500px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
}

.about-text {
    padding: 2rem 0;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: #1a1a1a;
    color: white;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.contact p {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.contact-info {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.contact-email {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-email .or-text {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
    padding: 0 1.5rem;
    order: 1;
}

.contact-email .email-link {
    order: 2;
    margin-top: 0.5rem;
    display: inline-block;
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.contact-email .or-text::before,
.contact-email .or-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.contact-email .or-text::before {
    right: 100%;
}

.contact-email .or-text::after {
    left: 100%;
}

.contact-email p {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.email-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.social-links a:hover {
    background: white;
    color: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.contact-form,
.form-group,
.form-group input,
.form-group textarea,
.form-group label {
    display: none;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem 0 8rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .samples-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .samples {
        padding: 4rem 0;
    }
    
    .samples-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 1.5rem;
    }
    
    .sample-item {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        height: 400px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    
    .navbar {
        width: 90%;
    }
    
    .nav-item span {
        display: none;
    }
    
    .hero {
        padding-top: 6rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .navbar {
        padding: 0.5rem;
    }
    
    .nav-item {
        padding: 0.5rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
}

/* Section Headers */
section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    position: relative;
    opacity: 1 !important; /* Ensure full opacity */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Add subtle text shadow */
}

/* Specific style for Samples section header */
#samples h2 {
    color: white !important;
    opacity: 1 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Remove the purple underline from section headers */
section h2::after {
    content: none;
}

/* Remove underlines from all section headers */
section#samples h2::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.welcome-content {
    text-align: center;
    color: white;
    transform: translateY(-20px);
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards 0.5s;
}

.welcome-content h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0;
    background: white;
    animation: loading 2s ease-in-out forwards;
    border-radius: 2px;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Hide welcome screen when loading is complete */
.welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Main content initially hidden */
.main-content {
    opacity: 0;
    transition: opacity 0.8s ease-in;
}

.main-content.visible {
    opacity: 1;
}

/* Email Modal Styles */
.email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.email-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.main-content.fade-out {
    position: relative;
}

.main-content.fade-out::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.email-modal-content {
    background: rgba(25, 25, 25, 0.98);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1001;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.email-modal.active .email-modal-content {
    transform: translateY(0);
}

.email-modal p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.email-client-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.email-client-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.email-client-btn i {
    font-size: 1.3rem;
    filter: grayscale(100%) brightness(1.5);
    transition: all 0.3s ease;
}

.email-client-btn:hover i {
    filter: grayscale(0%) brightness(1);
}

.email-client-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Specific button styles */
.gmail:hover {
    background: #DB4437;
}

.apple-mail:hover {
    background: #000000;
}

.yahoo:hover {
    background: #6001D2;
}

/* Update email link styles */
.email-link {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.email-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Ensure contact section is properly targeted */
section#contact {
    scroll-margin-top: 80px; /* Adjust based on your header height */
}