/* ============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Black & Beige Professional Theme
   ============================================ */
:root {
    /* Refined Background Colors - Deep Black & Charcoal */
    --color-bg: #0a0a0a;
    --color-bg-elevated: #121212;
    --color-bg-card: rgba(28, 28, 28, 0.7);
    --color-bg-hover: rgba(40, 40, 40, 0.9);

    /* Text Colors - Beige & Off-White */
    --color-text-primary: #fcfaf2;
    /* Creamy Off-white */
    --color-text-secondary: #dcd7c9;
    /* Soft Beige */
    --color-text-muted: #a39f92;
    /* Muted Tan */

    /* Accent Colors - Primary White / Secondary Gold for Buttons Only */
    --color-accent: #ffffff;
    /* Pure White as main accent now */
    --color-accent-hover: #f0f0f0;
    --color-accent-subtle: rgba(255, 255, 255, 0.1);

    --color-gold: #FFD700;
    --color-gold-hover: #FFC400;
    --color-gold-subtle: rgba(255, 215, 0, 0.15);

    --color-gradient-start: #ffffff;
    --color-gradient-end: #dcd7c9;

    /* Elegant transition gradient */
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
    --gradient-white: linear-gradient(135deg, #ffffff 0%, #a39f92 100%);
    --gradient-warm-radial: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 70%);

    /* Border Colors */
    --color-border: rgba(255, 215, 0, 0.15);
    --color-border-hover: rgba(255, 215, 0, 0.4);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-6xl: 4.5rem;

    /* Spacing System */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    --spacing-5xl: 8rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows - Elegant White Glow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 25px rgba(255, 255, 255, 0.15);
    --shadow-glow-lg: 0 0 50px rgba(255, 255, 255, 0.25);
    --shadow-glow-subtle: 0 0 15px rgba(255, 255, 255, 0.1);
    --shadow-gold-glow: 0 0 25px rgba(255, 215, 0, 0.4);
    --text-glow: 0 0 10px rgba(255, 255, 255, 0.2);
    --text-glow-lg: 0 0 20px rgba(255, 255, 255, 0.4);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    font-size: 16px;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    background-image: var(--gradient-warm-radial);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    /* Removed opacity: 0 to prevent blank page if JS fails */
}

body.loaded {
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(212, 195, 145, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Liquid Cursor Styles */
.liquid-cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    filter: url(#gooey);
    contain: strict;
    /* Optimization */
}

.cursor-main,
.cursor-blob {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    border-radius: 50%;
    opacity: 0.8;
    will-change: transform;
    backface-visibility: hidden;
    /* Performance optimization */
    transform: translateZ(0);
    /* Hardware acceleration trigger */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.cursor-main {
    width: 32px;
    height: 32px;
    margin-top: -16px;
    margin-left: -16px;
    z-index: 2;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.cursor-blob {
    width: 24px;
    height: 24px;
    margin-top: -12px;
    margin-left: -12px;
    z-index: 1;
}

.liquid-cursor-container.hover .cursor-main {
    width: 64px;
    height: 64px;
    margin-top: -32px;
    margin-left: -32px;
    background: var(--color-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.liquid-cursor-container.hover .cursor-blob {
    background: var(--color-gold);
}

/* Glow Utility Classes */
/* Performance Optimization: Remove global will-change to save memory */

section {
    opacity: 0;
    transform: translateY(20px);
    /* Reduced distance */
    transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform, opacity;
    contain: content;
    /* Optimization */
}

section.reveal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.glow-text {
    text-shadow: var(--text-glow);
}

.glow-on-hover {
    transition: all var(--transition-base);
}

.glow-on-hover:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.project-card {
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover {
    transform: translateY(-10px);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-lg) 0;
    transition: all var(--transition-base);
}

.header.scrolled {
    padding: var(--spacing-md) 0;
}

.nav {
    max-width: fit-content;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2xl);
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    transition: transform 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .nav {
        max-width: 90%;
        gap: var(--spacing-md);
        padding: var(--spacing-sm);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    list-style: none;
    margin: 0;
    padding: 0;
}

.header.scrolled .nav {
    background: rgba(15, 15, 15, 0.85);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg), var(--shadow-glow-subtle);
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: invert(1);
    /* Make black logo white for dark mode */
}

.logo-text {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    font-weight: 700;
    background: var(--gradient-white);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-base);
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
    position: relative;
    padding: var(--spacing-xs) var(--spacing-sm);
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.6rem 1.2rem;
    background: var(--color-gold);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.nav-cta:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-subtle);
}