/* ========================================
   THIAGO TELES PORTFOLIO - CUSTOM STYLES
   Awwwards-Style Premium Portfolio
   ======================================== */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #050505;
    color: #ffffff;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

/* Massive headline styling for maximum impact */
.hero-headline {
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* ==================== SMOOTH SCROLLING ==================== */
section {
    position: relative;
}

/* ==================== NAVIGATION ==================== */
nav {
    transition: all 0.3s ease;
    position: fixed;
    z-index: 100 !important;
    pointer-events: auto;
}

nav * {
    pointer-events: auto;
}

/* Global hover color - Bluish Purple */
nav a,
.clickable,
button,
.work-item h3,
.carousel-item h3 {
    transition: color 0.3s ease, border-color 0.3s ease;
}

nav a:hover,
.clickable:hover,
button:hover {
    color: #5D55FA !important;
}

nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #5D55FA;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ==================== HERO SECTION ==================== */
#home {
    background: linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
}

.hero-image {
    filter: grayscale(10%) contrast(1.15) brightness(0.9);
    animation: slowZoom 20s ease-in-out infinite alternate;
    object-position: center center;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* ==================== CAROUSEL ==================== */
.carousel-item {
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: #4A5568 !important;
}

.carousel-indicator:hover {
    background-color: #5A6678;
}

/* ==================== WORK GRID ==================== */
.work-item {
    position: relative;
    overflow: hidden;
}

.work-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.work-item:hover::before {
    opacity: 1;
}

/* ==================== UTILITIES ==================== */
.container {
    max-width: 1400px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==================== MODAL ==================== */
#case-study-modal {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

#case-study-modal.hidden {
    display: none;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .hero-headline {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }
    
    section {
        padding: 4rem 0;
    }
    
    h2 {
        font-size: clamp(2rem, 8vw, 4rem) !important;
    }
}

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

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

/* ==================== LOADING STATES ==================== */
.opacity-0 {
    opacity: 0;
}

/* ==================== HOVER EFFECTS ==================== */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== GRID ENHANCEMENTS ==================== */
.grid {
    display: grid;
}

/* ==================== TEXT SELECTION ==================== */
::selection {
    background-color: #ffffff;
    color: #050505;
}

::-moz-selection {
    background-color: #ffffff;
    color: #050505;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    nav,
    #case-study-modal {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
    body {
        background-color: #000000;
    }
    
    .text-gray-300,
    .text-gray-400,
    .text-gray-500 {
        color: #ffffff !important;
    }
}

/* ==================== CUSTOM CURSOR (Optional Enhancement) ==================== */
@media (pointer: fine) {
    .cursor-pointer:hover {
        cursor: pointer;
    }
}

/* ==================== GRADIENT OVERLAYS ==================== */
.gradient-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(5,5,5,0.8) 100%);
}

/* ==================== BORDER ANIMATIONS ==================== */
.border-animate {
    position: relative;
    overflow: hidden;
}

.border-animate::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #ffffff 0%, transparent 100%);
    border-image-slice: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.border-animate:hover::before {
    opacity: 1;
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Force GPU acceleration */
.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ==================== PREMIUM EFFECTS ==================== */
.text-shadow-luxury {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.box-shadow-luxury {
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ==================== SMOOTH IMAGE LOADING ==================== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

img[src*="unsplash"] {
    background-color: #1a1a1a;
}

/* ==================== MOBILE MENU ==================== */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    max-height: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 300px;
}

/* ==================== VIMEO RESPONSIVE CONTAINER ==================== */
.vimeo-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 0.5rem;
}

.vimeo-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.vimeo-placeholder {
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== CASE STUDY PAGE ==================== */
.case-study-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

#project-content {
    position: relative;
    z-index: 1;
}

#case-study-container {
    position: relative;
    z-index: 1;
}

.case-study-intro {
    background: linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
}

.media-item {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.media-item:nth-child(1) { animation-delay: 0.1s; }
.media-item:nth-child(2) { animation-delay: 0.2s; }
.media-item:nth-child(3) { animation-delay: 0.3s; }
.media-item:nth-child(4) { animation-delay: 0.4s; }
.media-item:nth-child(5) { animation-delay: 0.5s; }

.next-project-nav a:hover h3 {
    color: #5D55FA;
}

/* ==================== PAGE TRANSITIONS ==================== */
#home-content,
#project-content {
    transition: opacity 0.3s ease;
}

/* ==================== CLICKABLE PROJECT ITEMS ==================== */
.work-item,
.carousel-item {
    cursor: pointer;
    position: relative;
}

.work-item:hover h3,
.carousel-item:hover h3 {
    color: #5D55FA;
}

.work-item::before,
.carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    transition: border-color 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.work-item:hover::before {
    border-color: #5D55FA;
}

