/* Production utility CSS replacing Tailwind CDN for this site */

*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: currentColor;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    margin: 0;
}

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

button {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

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

.absolute { position: absolute; }
.fixed { position: fixed; }
.relative { position: relative; }

.inset-0 { inset: 0; }
.left-4 { left: 1rem; }
.right-4 { right: 1rem; }
.top-1\/2 { top: 50%; }
.-top-\[10px\] { top: -10px; }

.z-10 { z-index: 10; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.-mt-\[10px\] { margin-top: -10px; }
.mt-12 { margin-top: 3rem; }
.mt-24 { margin-top: 6rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mr-\[-0\.06em\] { margin-right: -0.06em; }
.mr-\[-0\.11em\] { margin-right: -0.11em; }
.mr-\[-0\.23em\] { margin-right: -0.23em; }

.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

.h-full { height: 100%; }
.w-auto { width: auto; }
.w-full { width: 100%; }

.max-w-full { max-width: 100%; }
.max-w-\[420px\] { max-width: 420px; }
.max-w-\[760px\] { max-width: 760px; }
.max-w-\[780px\] { max-width: 780px; }
.max-w-\[1400px\] { max-width: 1400px; }
.max-w-\[1600px\] { max-width: 1600px; }

.max-h-\[70vh\] { max-height: 70vh; }
.max-h-\[90vh\] { max-height: 90vh; }

.min-h-\[50vh\] { min-height: 50vh; }
.min-h-\[72svh\] { min-height: 72svh; }

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-16 { gap: 4rem; }

.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }
.space-y-\[2px\] > :not([hidden]) ~ :not([hidden]) { margin-top: 2px; }

.overflow-y-auto { overflow-y: auto; }
.object-contain { object-fit: contain; }

.rounded { border-radius: 0.25rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }

.border-white\/10 { border-color: rgba(255,255,255,0.1); }
.border-white\/5 { border-color: rgba(255,255,255,0.05); }

.bg-black\/45 { background-color: rgba(0,0,0,0.45); }
.bg-black\/95 { background-color: rgba(0,0,0,0.95); }
.bg-white\/5 { background-color: rgba(255,255,255,0.05); }

.bg-gradient-to-t {
    background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

.from-black\/70 {
    --tw-gradient-from: rgba(0,0,0,0.7);
    --tw-gradient-to: rgba(0,0,0,0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-black\/10 {
    --tw-gradient-to: rgba(0,0,0,0);
    --tw-gradient-stops: var(--tw-gradient-from), rgba(0,0,0,0.1), var(--tw-gradient-to);
}

.to-black\/0 {
    --tw-gradient-to: rgba(0,0,0,0);
}

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-20 { padding-top: 5rem; }
.pt-24 { padding-top: 6rem; }

.pb-12 { padding-bottom: 3rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-24 { padding-bottom: 6rem; }

.text-left { text-align: left; }

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.font-light { font-weight: 300; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.uppercase { text-transform: uppercase; }
.normal-case { text-transform: none; }
.italic { font-style: italic; }

.leading-relaxed { line-height: 1.625; }
.leading-\[0\.85\] { line-height: 0.85; }

.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-\[clamp\(2\.5rem\,6\.8vw\,6\.8rem\)\] {
    font-size: clamp(2.5rem,6.8vw,6.8rem);
}

.tracking-\[-0\.02em\] { letter-spacing: -0.02em; }
.tracking-\[0\.06em\] { letter-spacing: 0.06em; }
.tracking-\[0\.1em\] { letter-spacing: 0.1em; }
.tracking-\[0\.11em\] { letter-spacing: 0.11em; }
.tracking-\[0\.15em\] { letter-spacing: 0.15em; }
.tracking-\[0\.18em\] { letter-spacing: 0.18em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.22em\] { letter-spacing: 0.22em; }
.tracking-\[0\.23em\] { letter-spacing: 0.23em; }
.tracking-\[0\.4em\] { letter-spacing: 0.4em; }
.tracking-widest { letter-spacing: 0.1em; }

.text-white { color: rgb(255,255,255); }
.text-white\/35 { color: rgba(255,255,255,0.35); }
.text-white\/55 { color: rgba(255,255,255,0.55); }
.text-white\/60 { color: rgba(255,255,255,0.60); }
.text-white\/70 { color: rgba(255,255,255,0.70); }
.text-white\/80 { color: rgba(255,255,255,0.80); }

.text-gray-200 { color: rgb(229,231,235); }
.text-gray-400 { color: rgb(156,163,175); }
.text-gray-500 { color: rgb(107,114,128); }
.text-gray-600 { color: rgb(75,85,99); }

.text-sky-300 { color: rgb(125,211,252); }
.text-sky-400 { color: rgb(210, 160, 74); }
.text-slate-400 { color: rgb(148,163,184); }
.text-emerald-500\/80 { color: rgba(16,185,129,0.8); }
.text-amber-200\/70 { color: rgba(253,230,138,0.7); }
.text-rose-400\/80 { color: rgba(251,113,133,0.8); }
.text-indigo-400\/80 { color: rgba(129,140,248,0.8); }
.text-cyan-500\/80 { color: rgba(6,182,212,0.8); }

.opacity-80 { opacity: 0.8; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.select-none { user-select: none; }
.cursor-pointer { cursor: pointer; }
.self-start { align-self: flex-start; }

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.mix-blend-difference {
    mix-blend-mode: difference;
}

.transform {
    transform:
        translate(var(--tw-translate-x,0), var(--tw-translate-y,0))
        rotate(var(--tw-rotate,0))
        skewX(var(--tw-skew-x,0))
        skewY(var(--tw-skew-y,0))
        scaleX(var(--tw-scale-x,1))
        scaleY(var(--tw-scale-y,1));
}

.translate-y-1 { --tw-translate-y: 0.25rem; }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4,0,0.2,1);
}

.transition-all { transition-property: all; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; }

.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

.ease-\[cubic-bezier\(0\.16\,1\,0\.3\,1\)\] {
    transition-timing-function: cubic-bezier(0.16,1,0.3,1);
}

.hover\:text-white:hover { color: rgb(255,255,255); }
.hover\:text-sky-400:hover { color: rgb(210, 160, 74); }
.hover\:bg-sky-500:hover { background-color: rgb(14,165,233); }
.hover\:border-sky-400:hover { border-color: rgb(210, 160, 74); }

.group:hover .group-hover\:text-sky-300 {
    color: rgb(125,211,252);
}

.group:hover .group-hover\:text-white\/55 {
    color: rgba(255,255,255,0.55);
}

@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:flex { display: flex; }

    .md\:min-h-\[75vh\] {
        min-height: 75vh;
    }

    .md\:p-8 {
        padding: 2rem;
    }

    .md\:px-12 {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .md\:space-y-6 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 1.5rem;
    }

    .md\:text-sm {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .md\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .md\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .md\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .lg\:col-span-5 {
        grid-column: span 5 / span 5;
    }

    .lg\:col-span-7 {
        grid-column: span 7 / span 7;
    }

    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:gap-12 {
        gap: 3rem;
    }

    .lg\:max-h-\[85vh\] {
        max-height: 85vh;
    }

    .lg\:max-w-\[65\%\] {
        max-width: 65%;
    }

    .lg\:pl-24 {
        padding-left: 6rem;
    }

    .lg\:pt-20 {
        padding-top: 5rem;
    }

    .lg\:px-24 {
        padding-left: 6rem;
        padding-right: 6rem;
    }

    .lg\:w-\[900px\] {
        width: 900px;
    }

    .lg\:w-1\/3 {
        width: 33.333333%;
    }
}

/* =====================================================
   PERFORMANCE & VISUAL ENHANCEMENTS (Added 2024)
   ===================================================== */

/* CSS CONTAINMENT - Massive Performance Boost (20-30%) */
#site-header {
    contain: layout style;
}

#work {
    contain: layout style paint;
}

#stats {
    contain: layout style;
}

.tile-wrapper {
    contain: layout style;
}

.section {
    contain: layout style paint;
}

/* PREVENT CUMULATIVE LAYOUT SHIFT - Aspect Ratios */
img, video {
    aspect-ratio: auto;
    width: 100%;
    height: auto;
}

/* RESPONSIVE TYPOGRAPHY - Fluid Scaling */
.heading-responsive {
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.heading-lg-responsive {
    font-size: clamp(1.25rem, 4vw, 2.25rem);
    line-height: 1.3;
}

.text-responsive {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    line-height: 1.65;
}

/* PREMIUM CARD STYLING - Desktop */
.card-elevated {
    box-shadow: 
        0 0 1px rgba(210, 160, 74, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 60px rgba(210, 160, 74, 0.08);
    border: 1px solid rgba(210, 160, 74, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-elevated:hover {
    box-shadow: 
        0 0 1px rgba(210, 160, 74, 0.6),
        0 16px 48px rgba(0, 0, 0, 0.3),
        0 0 100px rgba(210, 160, 74, 0.15);
    border-color: rgba(210, 160, 74, 0.3);
    transform: translateY(-4px);
}

/* GRADIENT TEXT - Hero Titles */
.gradient-text-accent {
    background: linear-gradient(135deg, #d2a04a 0%, #e1e0cc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
}

@media (min-width: 1024px) {
    .gradient-text-accent {
        animation: gradientDrift 8s ease-in-out infinite;
    }

    @keyframes gradientDrift {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }
}

/* MICRO ELEVATION - Buttons & Interactive */
.micro-elevation {
    position: relative;
    transition: all 0.25s var(--ease-out-expo);
}

.micro-elevation:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(210, 160, 74, 0.12);
}

.micro-elevation:active {
    transform: translateY(-1px);
}

/* INSET BORDER GLOW */
.border-inset-glow {
    border: 1px solid rgba(210, 160, 74, 0.2);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 40px rgba(210, 160, 74, 0.06);
    transition: all 0.3s var(--ease-out-expo);
}

.border-inset-glow:hover {
    border-color: rgba(210, 160, 74, 0.35);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 60px rgba(210, 160, 74, 0.12);
}

/* GLOW AURA - Pseudo Element */
.glow-aura {
    position: relative;
}

.glow-aura::before {
    content: '';
    position: absolute;
    inset: -16px;
    background: radial-gradient(circle, rgba(210, 160, 74, 0.25), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
    z-index: -1;
    pointer-events: none;
}

.glow-aura:hover::before {
    opacity: 1;
}

/* HARDWARE ACCELERATION (Smart) */
.will-animate {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* REFINED TYPOGRAPHY */
.typography-refined {
    font-kerning: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* =====================================================
   MOBILE & TABLET OPTIMIZATIONS (≤ 768px)
   ===================================================== */

@media (max-width: 768px) {
    /* REMOVE HEAVY TEXTURE ON MOBILE */
    body::before {
        opacity: 0 !important;
    }

    /* LIGHTWEIGHT BACKDROP BLUR */
    .backdrop-element {
        backdrop-filter: blur(4px);
    }

    .card-elevated {
        backdrop-filter: blur(4px);
    }

    /* OPTIMIZED BACKGROUND */
    body {
        background:
            radial-gradient(circle at 25% 0%, rgba(210, 160, 74, 0.04), transparent 25rem),
            linear-gradient(180deg, #050505 0%, #070707 100%);
    }

    /* TOUCH-FRIENDLY TARGETS */
    button, a.button, .touch-target {
        min-height: 48px;
        min-width: 48px;
        padding: 0.875rem 1.25rem;
    }

    /* SIMPLIFIED ANIMATIONS */
    .fade-in-mobile {
        animation: fadeInMobile 0.5s ease-out forwards;
        opacity: 0;
    }

    @keyframes fadeInMobile {
        from {
            opacity: 0;
            transform: translateY(6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .slide-up-mobile {
        animation: slideUpMobile 0.6s ease-out forwards;
        opacity: 0;
    }

    @keyframes slideUpMobile {
        from {
            opacity: 0;
            transform: translateY(12px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* BETTER TEXT SHADOWS ON MOBILE */
    .text-shadow-mobile {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    /* IMPROVED SPACING */
    .section-mobile {
        padding: 1.75rem 1.25rem;
    }

    .container-mobile {
        gap: 1rem;
    }

    .card-mobile {
        padding: 1.5rem;
        gap: 0.875rem;
    }
}

/* =====================================================
   TABLET OPTIMIZATIONS (640px - 1024px)
   ===================================================== */

@media (min-width: 640px) and (max-width: 1024px) {
    .grid-tablet {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .grid-tablet-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    /* LIGHTER BACKDROP ON TABLETS */
    .backdrop-element {
        backdrop-filter: blur(6px);
    }
}

/* =====================================================
   DESKTOP POLISH (≥ 1024px)
   ===================================================== */

@media (min-width: 1024px) {
    /* PREMIUM BACKDROP BLUR */
    .backdrop-element {
        backdrop-filter: blur(10px);
    }

    .card-elevated {
        backdrop-filter: blur(10px);
    }

    /* ENHANCED TEXT SHADOWS */
    .text-shadow-premium {
        text-shadow:
            0 2px 8px rgba(0, 0, 0, 0.3),
            0 4px 16px rgba(0, 0, 0, 0.2);
    }

    /* SMOOTH SCROLL */
    html {
        scroll-behavior: smooth;
        overscroll-behavior-y: contain;
    }

    .scroll-smooth {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

/* =====================================================
   ACCESSIBILITY & MOTION PREFERENCES
   ===================================================== */

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

/* IMPROVED FOCUS VISIBILITY */
a:focus-visible,
button:focus-visible,
.interactive:focus-visible {
    outline: 2px solid rgba(210, 160, 74, 0.7);
    outline-offset: 4px;
    border-radius: 4px;
}

/* PREVENT TEXT SELECTION ON UI */
.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* SMOOTH COLOR TRANSITIONS */
.color-transition {
    transition:
        color 0.35s var(--ease-out-expo),
        border-color 0.35s var(--ease-out-expo),
        background-color 0.35s var(--ease-out-expo),
        box-shadow 0.35s var(--ease-out-expo);
}