/*
Theme Name: Ubaid Ur Rehman - The Invisible Architect
Theme URI: https://ubaidurrehman.com
Author: Ubaid Ur Rehman (This Tartan)
Author URI: https://ubaidurrehman.com
Description: A high-performance, 3D-animated, SEO-perfected portfolio theme designed for conversion-focused digital architects. Features dark mode aesthetics, Three.js-powered immersive experiences, and Elementor Pro compatibility.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ubaid-pro
Domain Path: /languages
Tags: portfolio, dark-mode, three-js, elementor, seo-optimized, performance, creative, custom-post-types
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0

Design System:
- Primary Background: #050505 (Deep Void)
- Accent Color: #00FF41 (Matrix Green)
- Typography: Inter (Body), Montserrat (Headings)
- 3D Engine: Three.js + GSAP ScrollTrigger
- Performance Target: 99+ PageSpeed Insights
*/

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #050505;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   TYPOGRAPHY HIERARCHY (SEO-OPTIMIZED)
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
}

h5 {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 600;
}

h6 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00FF41;
}

p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

a {
    color: #00FF41;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* ============================================
   3D CANVAS CONTAINER
   ============================================ */

#growth-mesh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

#growth-mesh-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 3rem;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(5, 5, 5, 0.98);
    padding: 1rem 3rem;
    box-shadow: 0 4px 30px rgba(0, 255, 65, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.site-logo span {
    color: #00FF41;
}

.tagline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
    border-left: 1px solid rgba(0, 255, 65, 0.3);
    padding-left: 1rem;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00FF41;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.nav-menu a:hover {
    color: #ffffff;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #00FF41;
    margin-bottom: 2rem;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00FF41;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
}

.hero-title .accent {
    color: #00FF41;
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: #00FF41;
    color: #050505;
}

.btn-primary:hover {
    background: #ffffff;
    color: #050505;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: #00FF41;
    color: #00FF41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 8rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #00FF41;
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 1.5rem;
}

.section-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
}

/* ============================================
   SKILLS GRID
   ============================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00FF41, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.skill-card:hover::before {
    transform: translateX(100%);
}

.skill-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 65, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #00FF41;
}

.skill-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.skill-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.skill-link {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   PROJECTS GRID
   ============================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 255, 65, 0.3);
}

.project-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
}

.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #00FF41;
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-excerpt {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.project-stats {
    display: flex;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #00FF41;
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   CASE STUDY TEMPLATE
   ============================================ */

.case-study-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 10rem 2rem 4rem;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.05) 0%, transparent 50%);
}

.case-study-header {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.case-study-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.case-study-meta span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.case-study-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.case-study-section.alt {
    background: rgba(255, 255, 255, 0.02);
    max-width: 100%;
}

.case-study-section.alt .section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.metric-card {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.metric-card.negative {
    background: rgba(255, 50, 50, 0.05);
    border-color: rgba(255, 50, 50, 0.2);
}

.metric-card.negative .metric-value {
    color: #ff4444;
}

.metric-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #00FF41;
    display: block;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   SKILL DETAIL TEMPLATE
   ============================================ */

.skill-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 10rem 2rem 4rem;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.03) 0%, transparent 60%);
}

.skill-header {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.skill-icon-large {
    width: 100px;
    height: 100px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: #00FF41;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.expertise-list {
    list-style: none;
    margin: 2rem 0;
}

.expertise-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.expertise-list li::before {
    content: '→';
    color: #00FF41;
    font-weight: bold;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    padding: 4rem 2rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-branding {
    max-width: 300px;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: #00FF41;
}

.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: #00FF41;
}

.footer-bottom {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #00FF41;
    color: #050505;
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .site-header {
        padding: 1rem 1.5rem;
    }
    
    .main-navigation {
        display: none;
    }
    
    .hero-section {
        padding: 6rem 1.5rem 3rem;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-branding {
        max-width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 65, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 65, 0.5);
}

/* ============================================
   SELECTION
   ============================================ */

::selection {
    background: rgba(0, 255, 65, 0.3);
    color: #ffffff;
}

/* ============================================
   ELEMENTOR COMPATIBILITY
   ============================================ */

.elementor-page .site-header {
    position: relative;
}

.elementor-page #growth-mesh-container {
    display: none;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    #growth-mesh-container,
    .hero-cta,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
    }
}
