/* =========================================================================
   CSS variables and Design System
   ========================================================================= */
:root {
    /* Color Palette */
    --bg-color: #050505;
    --bg-surface: #111111;
    --bg-surface-hover: #1a1a1a;

    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --accent-primary: #ff5e3a;
    /* Pixeleye inspired vibrant orange/red */
    --accent-secondary: #0000FF;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container-max-width: 1300px;
    --container-padding: 2rem;
    --section-padding: 8rem 0;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-medium: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);

    /* Header */
    --header-height: 90px;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --bg-surface: #f8f9fa;
    --bg-surface-hover: #e9ecef;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;

    /* We can keep the same vibrant accent colors for the light theme! */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
}

/* Remove default cursor on larger screens */
@media (min-width: 1024px) {
    body {
        cursor: none;
    }

    a,
    button {
        cursor: none;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.1;
    font-weight: 700;
}

/* =========================================================================
   Layout & Utilities
   ========================================================================= */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 50px;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

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

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

.btn-primary .btn-icon {
    margin-left: 0.5rem;
    transition: transform var(--transition-medium);
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================================================
   Header & Navigation
   ========================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: transparent;
    z-index: 1000;
    transition: background-color var(--transition-medium), backdrop-filter var(--transition-medium);
}

.header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 1001;
    /* Keeps it clickable above the mobile menu */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    position: relative;
    z-index: 1001;
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-medium);
}

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

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

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

[data-theme="light"] .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.mobile-theme-btn {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-top: 1rem;
    background: transparent;
    border: none;
    cursor: none;
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-btn-line {
    display: block;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-medium);
}

.menu-btn-line:nth-child(1) {
    width: 100%;
}

.menu-btn-line:nth-child(2) {
    width: 75%;
}

.menu-btn.active .menu-btn-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
    width: 100%;
}

.menu-btn.active .menu-btn-line:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
    width: 100%;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 1000;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
    color: var(--accent-primary);
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.75);
    /* Dark overlay */
    z-index: 0;
    transition: background var(--transition-medium);
}

[data-theme="light"] .hero::before {
    background: rgba(255, 255, 255, 0.85);
    /* Light overlay */
}

.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.orb-1 {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    animation: float 20s ease-in-out infinite;
}

.orb-2 {
    bottom: -20%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: var(--accent-secondary);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -50px);
    }

    66% {
        transform: translate(-20px, 20px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
}

.hero-subtitle {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 6rem);
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.hero-title span {
    display: block;
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* =========================================================================
   Animations & Reveals
   ========================================================================= */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-fade.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay staggered reveals */
.hero-title span:nth-child(1) {
    transition-delay: 0.1s;
}

.hero-title span:nth-child(2) {
    transition-delay: 0.2s;
}

.hero-description {
    transition-delay: 0.4s;
}

.hero-cta {
    transition-delay: 0.6s;
}

/* =========================================================================
   Responsive Adjustments
   ========================================================================= */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

/* =========================================================================
   General Section Layouts
   ========================================================================= */
.section {
    padding: var(--section-padding);
    position: relative;
}

.bg-surface {
    background-color: var(--bg-surface);
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-subtitle {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
}

/* =========================================================================
   About Section
   ========================================================================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 992px) {
    .about-container {
        grid-template-columns: 1fr 1.2fr;
        text-align: left;
    }

    .about-section .section-header {
        text-align: left;
        margin-bottom: 0;
    }
}

.about-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.stat-item {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* =========================================================================
   Services Section
   ========================================================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    border-radius: 16px;
    transition: transform var(--transition-medium), background var(--transition-medium), border-color var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 94, 58, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.service-card:hover::before {
    opacity: 1;
}

.service-image-wrapper {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    /* Placeholder background */
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

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

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* =========================================================================
   Projects Section
   ========================================================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.project-card {
    display: block;
}

.project-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    margin-bottom: 1.5rem;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    transition: transform var(--transition-medium);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.bg-gradient-1 {
    background: linear-gradient(135deg, #1c1c1c, #2a2a2a);
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #3a3a3a, #1c1c1c);
}

.bg-gradient-4 {
    background: linear-gradient(135deg, #1f1f1f, #2e2e2e);
}

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

.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.project-card:hover .project-title {
    color: var(--accent-primary);
}

.project-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* =========================================================================
   Contact Section
   ========================================================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-control {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--accent-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    align-self: flex-start;
    margin-top: 1rem;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    background-color: #000;
    padding: 6rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.love-text {
    color: var(--accent-primary);
}