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

:root {
    /* Brand Colors - Gold & Dark Palette */
    --color-primary: #ffd700;          /* Primary Gold */
    --color-primary-light: #ffe44d;    /* Lighter Gold */
    --color-primary-dark: #ccac00;     /* Darker Gold */

    --color-secondary: #333333;        /* Dark Gray */
    --color-secondary-light: #4d4d4d;  /* Medium Gray */
    --color-secondary-dark: #1a1a1a;   /* Darker Gray */

    /* Background Colors - 5-step scale */
    --bg-darkest: #0a0a0a;             /* Deepest background */
    --bg-darker: #0d0d0d;              /* Darker background */
    --bg-dark: #1a1a1a;                /* Dark background */
    --bg-card: #262626;                /* Card background */
    --bg-card-hover: #2d2d2d;          /* Card hover state */

    /* Text Colors */
    --text-primary: #ffffff;           /* Primary text */
    --text-secondary: #cccccc;         /* Secondary text */
    --text-tertiary: #999999;          /* Tertiary text */
    --text-muted: #666666;             /* Muted text */

    /* Accent Colors */
    --color-accent: #0ea5e9;           /* Blue accent for CTAs */
    --color-accent-hover: #0284c7;     /* Accent hover state */

    /* Utility Colors */
    --color-success: #10b981;          /* Success state */
    --color-error: #ef4444;            /* Error state */
    --color-warning: #f59e0b;          /* Warning state */

    /* Border & Divider Colors */
    --border-light: #404040;           /* Light border */
    --border-medium: #333333;          /* Medium border */
    --border-dark: #1a1a1a;            /* Dark border */

    /* Spacing Scale (4px base) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.5rem;    /* 24px */
    --space-6: 2rem;      /* 32px */
    --space-8: 3rem;      /* 48px */
    --space-10: 4rem;     /* 64px */
    --space-12: 6rem;     /* 96px */
    --space-16: 8rem;     /* 128px */

    /* Typography Scale */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    --font-size-6xl: 3.75rem;   /* 60px */
    --font-size-7xl: 4.5rem;    /* 72px */
    --font-size-8xl: 6rem;      /* 96px */

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;

    /* Letter Spacing */
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;

    /* Border Radius */
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;   /* Circular */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.3);
    --shadow-glow-lg: 0 0 40px rgba(255, 215, 0, 0.4);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Container */
    --container-max-width: 1280px;
    --container-padding: var(--space-6);
    --container-padding-mobile: var(--space-5);

    /* Legacy support - keeping old variable names for backwards compatibility */
    --primary-color: var(--color-primary);
    --secondary-color: var(--color-secondary);
    --dark-bg: var(--bg-dark);
    --darker-bg: var(--bg-darker);
    --card-bg: var(--bg-card);
    --accent-color: var(--color-accent);
    --border-color: var(--border-light);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Typography Styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-black);
}

h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-light);
}

strong {
    font-weight: var(--font-weight-bold);
}

em {
    font-style: italic;
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-primary);
    color: var(--bg-darkest);
    padding: var(--space-3) var(--space-5);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    z-index: 10000;
    border-radius: var(--radius-md);
    transition: left var(--transition-fast);
}

.skip-link:focus {
    left: var(--space-4);
    top: var(--space-4);
    outline: 3px solid var(--color-primary-light);
    outline-offset: 2px;
}

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

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Navigation */
.navbar {
    background-color: rgba(13, 13, 13, 0.8);
    padding: var(--space-5) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-dark);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    padding: var(--space-4) 0;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    transition: color var(--transition-base);
}

.nav-brand:hover {
    color: var(--color-primary-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-8);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--color-primary);
    transition: transform var(--transition-base);
}

.nav-link:hover::after,
.nav-link:focus::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-primary);
    background-color: rgba(255, 215, 0, 0.05);
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.nav-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: var(--bg-darkest);
    padding: calc(var(--space-10) + 80px) 0 var(--space-10);
    text-align: center;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* 3D Canvas Background */
.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.85;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-primary) 50%,
        transparent 100%);
    opacity: 0.5;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-7xl);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 50%,
        var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-tight);
    text-shadow: 0 0 80px rgba(255, 215, 0, 0.3);
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-light);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    line-height: var(--line-height-relaxed);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Removed old infinity loop SVG animation styles - replaced with Three.js canvas */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: var(--letter-spacing-wide);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg,
        var(--color-primary) 0%,
        var(--color-primary-dark) 100%);
    color: var(--bg-darkest);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow-lg);
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--bg-card-hover);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Disable infinity loop animations for reduced motion */
    .infinity-container {
        animation: none;
        opacity: 1;
    }

    .infinity-path {
        animation: none;
    }

    .particle {
        animation: none;
        opacity: 1;
    }

    /* Stop SVG animateMotion for reduced motion */
    animateMotion {
        display: none;
    }
}

/* Section Styles */
section {
    padding: var(--space-16) 0;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--border-light) 50%,
        transparent 100%);
    opacity: 0.5;
}

section:first-of-type::before {
    display: none;
}

.section-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-black);
    text-align: center;
    margin-bottom: var(--space-10);
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-tight);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg,
        var(--color-primary) 0%,
        var(--color-primary-dark) 100%);
    border-radius: var(--radius-full);
}

/* About Section */
.about {
    background-color: var(--darker-bg);
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image {
    display: none;
}

.about-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.about-text {
    text-align: center;
    max-width: 800px;
}

.about-text h3 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-5);
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-tight);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

.social-links {
    display: none;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover,
.social-link:focus {
    border-color: var(--primary-color);
    background-color: rgba(0, 212, 255, 0.1);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.social-icon {
    width: 24px;
    height: 24px;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.portfolio-item {
    background-color: var(--bg-card);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,
        var(--color-primary) 0%,
        var(--color-primary-dark) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.portfolio-item:hover::before {
    transform: scaleX(1);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
}

.portfolio-content h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    transition: color var(--transition-base);
}

.portfolio-item:hover .portfolio-content h3 {
    color: var(--color-primary-light);
}

.portfolio-content p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

/* Contact Section */
.contact {
    background-color: var(--darker-bg);
    scroll-margin-top: 0;
    scroll-snap-stop: normal;
}

/* Contact Options - Side by Side Layout */
.contact-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
}

.contact-option {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-option-header {
    margin-bottom: var(--space-5);
    text-align: center;
}

.contact-option-header h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-3);
    letter-spacing: var(--letter-spacing-tight);
}

.contact-option-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

/* Contact Form Styling */
.contact-form {
    background-color: var(--card-bg);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
    flex: 1;
    transition: all var(--transition-base);
}

.contact-form:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Chat Container Styling */
.chat-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
    height: 600px;
    min-height: 600px;
    overflow: hidden;
    flex: 1;
    transition: all var(--transition-base);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    scroll-margin-top: 0;
    scroll-margin-bottom: 0;
}

.chat-container:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Chat App Container */
.chat-container > div {
    background: linear-gradient(to bottom right, var(--bg-darkest), var(--bg-dark));
    color: var(--text-primary);
}

/* Chat Header */
.chat-container header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-medium);
    background-color: var(--bg-card);
}

.chat-container header h1 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: 0;
}

.chat-container header p {
    font-size: var(--font-size-sm);
    color: var(--color-success);
    margin-bottom: 0;
}

/* Chat Icon Badge */
.chat-container header > div:first-child > div:first-child {
    width: 40px;
    height: 40px;
    margin-right: var(--space-3);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Chat Messages Container */
.chat-container #messages {
    padding: var(--space-5);
    background-color: var(--bg-darker);
}

/* Chat Message */
.chat-container #messages > div {
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-3);
}

.chat-container #messages p {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
}

.chat-container #messages .prose {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
}

/* Typing Indicator */
.chat-container #messages span[class*="animate-bounce"] {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
}

/* Status Messages (Error/Success) */
.chat-container #messages > div[class*="border"] {
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    margin: var(--space-4);
}

/* Chat Input Container */
.chat-container > div > div:last-child {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-medium);
    background-color: var(--bg-dark);
}

/* Chat Textarea - Match contact form styling exactly */
.chat-container textarea {
    width: 100% !important;
    padding: 12px !important;
    background-color: var(--dark-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 5px !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: border-color 0.3s ease !important;
    resize: vertical !important;
}

.chat-container textarea::placeholder {
    color: var(--text-muted) !important;
}

.chat-container textarea:hover {
    border-color: var(--color-primary) !important;
}

.chat-container textarea:focus {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 2px !important;
    border-color: var(--primary-color) !important;
}

.chat-container textarea:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Chat Send Button */
.chat-container button[type="submit"] {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.chat-container button[type="submit"]:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    box-shadow: var(--shadow-xl), var(--shadow-glow-lg);
    transform: translateY(-2px);
}

.chat-container button[type="submit"]:disabled {
    background: var(--color-secondary-light);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group .required {
    color: var(--primary-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Checkbox styling */
.form-checkbox {
    margin-bottom: var(--space-5);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.checkbox-text {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.checkbox-label:hover .checkbox-text {
    color: var(--text-primary);
}

/* Honeypot field - hidden from users, visible to bots */
.form-group.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Form message feedback */
.form-message {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.form-message.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

/* Button loading state */
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-loader::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background-color: var(--darker-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --container-padding: var(--space-5);
    }

    section {
        padding: var(--space-12) 0;
    }

    .hero {
        padding: calc(var(--space-12) + 80px) 0 var(--space-12);
        min-height: 80vh;
    }

    .hero-title {
        font-size: var(--font-size-6xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-xl);
    }

    .section-title {
        font-size: var(--font-size-4xl);
        margin-bottom: var(--space-8);
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: var(--container-padding-mobile);
    }

    .navbar {
        padding: var(--space-4) 0;
    }

    /* Show mobile menu toggle */
    .nav-toggle {
        display: flex;
    }

    /* Hide menu by default on mobile */
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background-color: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        flex-direction: column;
        gap: var(--space-2);
        padding: var(--space-6) var(--space-5);
        box-shadow: var(--shadow-2xl);
        border-left: 1px solid var(--border-dark);
        transition: right var(--transition-slow);
        overflow-y: auto;
    }

    /* Show menu when active */
    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: var(--space-4) var(--space-3);
        border-radius: var(--radius-md);
        font-size: var(--font-size-lg);
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover,
    .nav-link:focus {
        background-color: rgba(255, 215, 0, 0.1);
        transform: translateX(8px);
    }

    .hero {
        padding: calc(var(--space-10) + 60px) 0 var(--space-10);
        min-height: 70vh;
    }

    .hero-title {
        font-size: var(--font-size-5xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
        max-width: 100%;
    }

    .infinity-container {
        max-width: 350px;
        margin-bottom: var(--space-6);
    }

    .section-title {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--space-6);
    }

    section {
        padding: var(--space-10) 0;
    }

    .contact-options {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .chat-container {
        height: 500px;
        min-height: 500px;
    }

    .about-text {
        padding: 0 var(--space-4);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .btn {
        padding: var(--space-3) var(--space-6);
        font-size: var(--font-size-base);
    }

    h1 {
        font-size: var(--font-size-5xl);
    }

    h2 {
        font-size: var(--font-size-3xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }
}

@media (max-width: 480px) {
    .nav-menu {
        width: 100%;
        top: 60px;
        height: calc(100vh - 60px);
    }

    .nav-brand {
        font-size: var(--font-size-xl);
    }

    .navbar {
        padding: var(--space-3) 0;
    }

    .hero {
        padding: calc(var(--space-8) + 60px) 0 var(--space-8);
        min-height: auto;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .section-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-5);
    }

    .infinity-container {
        max-width: 280px;
        margin-bottom: var(--space-5);
    }

    section {
        padding: var(--space-8) 0;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .btn {
        padding: var(--space-3) var(--space-5);
        font-size: var(--font-size-sm);
        width: 100%;
        justify-content: center;
    }

    h1 {
        font-size: var(--font-size-4xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-lg);
    }

    .portfolio-item {
        padding: var(--space-6);
    }

    .contact-form {
        padding: var(--space-5);
    }
}
