/* ===========================================
   PORTFOLIO THEME - PROFESSIONAL & PRECISE
   =========================================== */

/* ✅ CUSTOM LOCAL FONTS */
@font-face {
    font-family: 'Nevera';
    src: url('../assets/Fonts/nevera/Nevera-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ✅ THEME VARIABLES */
:root {
    /* Colors - Dark & Professional */
    --text-dark: #0a0a0a;
    /* Extra dark for headings */
    --text-primary: #1a1a1a;
    /* Dark for body */
    --text-secondary: #4a4a4a;
    /* Medium for labels */
    --text-muted: #6b7280;
    /* Light for descriptions */

    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;

    --border-light: #e5e7eb;
    --border-gray: #d1d5db;

    /* Accent Colors */
    --blue: #2563eb;
    --purple: #7c3aed;
    --green: #10b981;
    --orange: #f97316;

    /* Fonts */
    --font-special: 'Nevera', sans-serif;
    --font-body: 'Manrope', sans-serif;

    /* Spacing */
    --section-padding: 6rem;
}

/* ✅ GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ✅ TYPOGRAPHY - DARK & BOLD */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Hero Title - Nevera Font */
h1.display-text,
.display-text,
.brand-name {
    font-family: var(--font-special);
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-weight: normal;
}

/* ✅ SECTIONS */
section {
    position: relative;
}

.section-padding {
    padding: var(--section-padding) 0;
}

/* Section Headers - Extra Bold & Dark */
section h2 {
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

section p.lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ✅ NAVIGATION */
.nav-link {
    position: relative;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-dark);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ✅ CARDS & COMPONENTS */
.modern-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
    border-color: var(--border-gray);
}

/* ✅ BUTTONS & BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* Project Tags - Darker */
.project-tag {
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

/* ✅ 3D CANVAS */
#hero-canvas {
    width: 100%;
    height: 100%;
    outline: none;
    will-change: auto;
    /* Let browser decide */
    transform: translateZ(0);
    /* Force GPU acceleration */
    backface-visibility: hidden;
}

/* ✅ PERFORMANCE OPTIMIZATIONS */
/* Smooth scrolling optimization */
* {
    -webkit-tap-highlight-color: transparent;
}

/* GPU acceleration for cards */
.modern-card,
.group {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Video performance */
video {
    will-change: auto;
    transform: translateZ(0);
}

/* Reduce repaints on sections */
section {
    contain: layout style paint;
}

/* ✅ UTILITIES */
.text-dark {
    color: var(--text-dark) !important;
    font-weight: 700;
}

.text-bold {
    font-weight: 700;
}

.text-semibold {
    font-weight: 600;
}

/* ✅ SMOOTH SCROLL PERFORMANCE */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* iOS momentum scrolling */
}

body {
    overflow-x: hidden;
    overflow-y: scroll;
    /* Always show scrollbar to prevent layout shift */
}

/* ==========================================
   🎯 MOBILE RESPONSIVENESS (COMPREHENSIVE)
   ========================================== */

/* ✅ MOBILE: Extra Small Devices (< 375px) */
@media (max-width: 375px) {
    h1 {
        font-size: 2.25rem !important;
        /* 36px */
    }

    h2 {
        font-size: 1.75rem !important;
        /* 28px */
    }

    h3 {
        font-size: 1.25rem !important;
        /* 20px */
    }

    .badge {
        font-size: 0.75rem;
        /* 12px */
        padding: 0.25rem 0.625rem;
    }
}

/* ✅ MOBILE: Small Devices (< 640px) */
@media (max-width: 640px) {
    :root {
        --section-padding: 3rem;
        /* Reduce section spacing */
    }

    /* Typography Mobile Adjustments */
    h1 {
        font-size: 2.5rem;
        /* 40px */
        line-height: 1.1;
    }

    h2 {
        font-size: 1.875rem;
        /* 30px */
    }

    h3 {
        font-size: 1.5rem;
        /* 24px */
    }

    p {
        font-size: 1rem;
        /* 16px */
        line-height: 1.6;
    }

    /* Hero Section Mobile */
    .hero-content {
        max-width: 100% !important;
        padding: 0 0.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem !important;
        /* 40px */
        margin-bottom: 1.5rem !important;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* 3D Canvas Mobile Optimization */
    #canvas-container {
        height: 45vh !important;
        /* Slightly reduce height */
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    #hero-canvas {
        touch-action: pan-y;
        /* Allow vertical scroll */
    }

    /* Buttons - Touch Friendly */
    a[class*="px-8"] {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        padding-top: 0.875rem !important;
        padding-bottom: 0.875rem !important;
        font-size: 0.9375rem;
        /* 15px */
        min-height: 44px;
        /* Apple's recommended touch target */
    }

    /* Navigation Mobile */
    nav {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .brand-name {
        font-size: 1.125rem !important;
        /* 18px */
    }

    /* Cards Mobile */
    .modern-card {
        border-radius: 12px;
        padding: 1.5rem !important;
    }

    /* Skills Section Mobile */
    .group.bg-white {
        padding: 1.5rem !important;
    }

    /* Project Cards Mobile */
    .project-tag,
    .px-3.py-1 {
        font-size: 0.75rem !important;
        /* 12px */
        padding: 0.375rem 0.625rem !important;
    }

    /* Section Padding Mobile */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Footer Mobile */
    footer h2 {
        font-size: 2rem !important;
        /* 32px */
    }

    footer p {
        font-size: 0.9375rem !important;
    }
}

/* ✅ TABLET: Medium Devices (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    h1 {
        font-size: 3rem;
        /* 48px */
    }

    .hero-content h1 {
        font-size: 3rem !important;
    }

    #canvas-container {
        height: 55vh !important;
    }
}

/* ✅ LANDSCAPE MOBILE (< 768px height in landscape) */
@media (max-height: 600px) and (orientation: landscape) {
    #canvas-container {
        height: 70vh !important;
        /* Use more vertical space */
    }

    .hero-content h1 {
        font-size: 2rem !important;
        /* Smaller for landscape */
        margin-bottom: 1rem !important;
    }

    .hero-content p {
        font-size: 0.875rem !important;
        margin-bottom: 1rem !important;
    }

    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ✅ TOUCH DEVICE OPTIMIZATIONS */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .modern-card:hover {
        transform: none;
    }

    .nav-link:hover::after {
        width: 0;
    }

    /* Larger tap targets */
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ✅ MOBILE: Prevent text overflow */
@media (max-width: 640px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Prevent horizontal scroll */
    body,
    html {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Container margins */
    .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ✅ MOBILE: Video/Image Responsiveness */
@media (max-width: 768px) {

    video,
    img {
        max-width: 100%;
        height: auto;
    }

    .aspect-video {
        aspect-ratio: 16/9;
    }
}