/* Core Variables & Design Tokens */
:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-border-hover: rgba(255, 255, 255, 0.12);
    
    /* Neon Glow Palette */
    --accent-orange: #ff5f1f;
    --accent-orange-rgb: 255, 95, 31;
    --accent-red: #ff3333;
    --accent-red-rgb: 255, 51, 51;
    --accent-yellow: #ffd700;
    --accent-yellow-rgb: 255, 215, 0;
    --accent-blue: #00e5ff;
    --accent-blue-rgb: 0, 229, 255;
    
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-muted: #48484a;
    
    --header-height: 80px;
    --font-title: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Particle Canvas Overlays */
#trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* Sticky Header */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.sticky-header.scrolled {
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 70px;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-orange);
    position: relative;
    animation: pulseGlow 2s infinite ease-in-out;
}

.logo .highlight {
    color: var(--accent-orange);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: var(--transition-smooth);
    box-shadow: 0 0 8px var(--accent-orange);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-cta {
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}

.header-cta:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 95, 31, 0.1);
    box-shadow: 0 0 15px rgba(255, 95, 31, 0.2);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px 20px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(15, 10, 25, 0.6) 0%, rgba(5, 5, 5, 1) 70%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background: rgba(255, 95, 31, 0.08);
    border: 1px solid rgba(255, 95, 31, 0.2);
    color: var(--accent-orange);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 25px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(255, 95, 31, 0.05);
}

.hero-title {
    font-family: var(--font-title);
    font-size: 4.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff8c00 50%, var(--accent-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 680px;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Global Buttons */
.btn {
    text-decoration: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff4500 100%);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff8c00 0%, var(--accent-orange) 100%);
    opacity: 0;
    z-index: -1;
    transition: var(--transition-smooth);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-glow:hover {
    box-shadow: 0 0 25px rgba(255, 95, 31, 0.4), 0 0 50px rgba(255, 95, 31, 0.15);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Background Glowing Orbs */
.hero-glow-orb {
    position: absolute;
    bottom: -150px;
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(255, 95, 31, 0.06) 0%, rgba(255, 95, 31, 0) 70%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: 1;
}

/* Section Containers */
.section-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative;
    z-index: 2;
}

.section-header {
    max-width: 700px;
    margin-bottom: 60px;
}

.section-tag {
    color: var(--accent-orange);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Glassmorphism Cards System */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat-card {
    padding: 40px;
    text-align: center;
}

.stat-card:hover {
    border-color: rgba(255, 95, 31, 0.25);
    background: rgba(255, 95, 31, 0.01);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 95, 31, 0.02);
}

.stat-number {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: #fff;
    position: relative;
}

.service-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0.12;
}

.service-icon svg {
    width: 26px;
    height: 26px;
    z-index: 2;
}

.service-icon.orange-glow {
    color: var(--accent-orange);
}
.service-icon.orange-glow::before {
    background-color: var(--accent-orange);
    box-shadow: 0 0 20px var(--accent-orange);
}

.service-icon.red-glow {
    color: var(--accent-red);
}
.service-icon.red-glow::before {
    background-color: var(--accent-red);
    box-shadow: 0 0 20px var(--accent-red);
}

.service-icon.blue-glow {
    color: var(--accent-blue);
}
.service-icon.blue-glow::before {
    background-color: var(--accent-blue);
    box-shadow: 0 0 20px var(--accent-blue);
}

.service-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 300;
}

/* Portfolio Section: Responsive Image Cards */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 40px;
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    /* Floating Subtle Animation */
    animation: subtleFloat 8s infinite ease-in-out;
}

.portfolio-card:nth-child(even) {
    animation-delay: 2s;
}
.portfolio-card:nth-child(3n) {
    animation-delay: 4s;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-bottom: 1px solid var(--card-border);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.tag-orange {
    background: rgba(255, 95, 31, 0.08);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 95, 31, 0.15);
}

.tag-blue {
    background: rgba(0, 229, 255, 0.08);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.tag-yellow {
    background: rgba(255, 215, 0, 0.08);
    color: var(--accent-yellow);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.tag-red {
    background: rgba(255, 51, 51, 0.08);
    color: var(--accent-red);
    border: 1px solid rgba(255, 51, 51, 0.15);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #00e676;
    border-radius: 50%;
    box-shadow: 0 0 8px #00e676;
}

.card-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 25px;
    flex-grow: 1;
}

.card-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.card-link .arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* Card Hover Interactions */
.portfolio-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-8px) scale(1.01);
}

/* Specific glows based on tag */
.portfolio-card:hover:has(.tag-orange) {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-orange-rgb), 0.12);
}
.portfolio-card:hover:has(.tag-blue) {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-blue-rgb), 0.12);
}
.portfolio-card:hover:has(.tag-yellow) {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-yellow-rgb), 0.12);
}
.portfolio-card:hover:has(.tag-red) {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-red-rgb), 0.12);
}

.portfolio-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.portfolio-card:hover .card-title {
    color: #fff;
}

.portfolio-card:hover .card-link {
    color: var(--accent-orange);
}

.portfolio-card:hover .card-link .arrow {
    transform: translateX(5px);
}

/* Contact Section & Form */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
}

.contact-form-container:hover {
    border-color: rgba(255, 95, 31, 0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255, 95, 31, 0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.form-group label {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px 20px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-orange);
    background: rgba(255, 95, 31, 0.02);
    box-shadow: 0 0 15px rgba(255, 95, 31, 0.15);
}

.form-group select option {
    background-color: #0f0f12;
    color: var(--text-primary);
}

.full-width {
    width: 100%;
}

/* Footer Section */
.footer-container {
    background: rgba(5, 5, 5, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 80px 40px 40px 40px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 150px;
    background: radial-gradient(ellipse at center, rgba(255, 95, 31, 0.04) 0%, rgba(255, 95, 31, 0) 70%);
    filter: blur(40px);
    z-index: 1;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    position: relative;
    z-index: 2;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 20px;
    margin-bottom: 25px;
    max-width: 360px;
    font-weight: 300;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    text-decoration: none;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.social-icon:hover {
    color: #fff;
    background: rgba(255, 95, 31, 0.1);
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 95, 31, 0.3);
    transform: translateY(-2px);
}

.footer-links h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 25px;
}

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

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--accent-orange);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

/* Animations Framework */
.fade-up-init {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px var(--accent-orange);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 20px var(--accent-orange), 0 0 30px var(--accent-orange);
    }
}

@keyframes subtleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(0.4deg);
    }
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero-title {
        font-size: 3.8rem;
    }
}

@media (max-width: 768px) {
    .header-cta {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: var(--transition-smooth);
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* Toggle burger transformation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
