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

:root {
    --color-primary: #1f1410;
    --color-secondary: #2d1f18;
    --color-accent: #fb923c;
    --color-accent-blue: #fbbf24;
    --color-text: #fef3c7;
    --color-text-muted: #b89a7a;
    --color-white: #ffffff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Palette: Sunset (warm oranges and purples) */
[data-theme="sunset"] {
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #ff6b6b;
    --color-accent-blue: #feca57;
    --color-text: #f8f9fa;
    --color-text-muted: #a29bba;
}

/* Palette: Forest (deep greens with gold) */
[data-theme="forest"] {
    --color-primary: #1a2f1a;
    --color-secondary: #0d1f0d;
    --color-accent: #98d8aa;
    --color-accent-blue: #f7d060;
    --color-text: #e8f5e9;
    --color-text-muted: #81a881;
}

/* Palette: Ocean (blues with coral) */
[data-theme="ocean"] {
    --color-primary: #0d1b2a;
    --color-secondary: #1b263b;
    --color-accent: #ff7b54;
    --color-accent-blue: #00d9ff;
    --color-text: #e0fbfc;
    --color-text-muted: #7b9eb8;
}

/* Palette: Midnight (deep purples with pink) */
[data-theme="midnight"] {
    --color-primary: #1e1e2f;
    --color-secondary: #2d2d44;
    --color-accent: #f472b6;
    --color-accent-blue: #a78bfa;
    --color-text: #f5f3ff;
    --color-text-muted: #9ca3af;
}

/* Palette: Arctic (cool grays with ice blue) */
[data-theme="arctic"] {
    --color-primary: #1c1c27;
    --color-secondary: #252532;
    --color-accent: #7dd3fc;
    --color-accent-blue: #c4b5fd;
    --color-text: #f0f9ff;
    --color-text-muted: #94a3b8;
}

/* Palette: Ember (warm dark with fiery orange) */
[data-theme="ember"] {
    --color-primary: #1f1410;
    --color-secondary: #2d1f18;
    --color-accent: #fb923c;
    --color-accent-blue: #fbbf24;
    --color-text: #fef3c7;
    --color-text-muted: #b89a7a;
}

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

body {
    font-family: var(--font-family);
    background: var(--color-primary);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Image */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* Dark overlay for text readability */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 25, 47, 0.3) 0%,
        rgba(10, 25, 47, 0.5) 40%,
        rgba(10, 25, 47, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Main Container */
.container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* Header & Logo */
.header {
    animation: fadeInDown 1s ease-out;
}

.logo {
    width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(100, 255, 218, 0.3));
}

/* Content Section */
.content {
    animation: fadeInUp 1s ease-out 0.2s both;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent-blue) 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.contact h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.email-link {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-accent);
    text-decoration: none;
    padding: 0.75rem 2rem;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.email-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    transform: translateX(-101%);
    transition: var(--transition);
    z-index: -1;
}

.email-link:hover {
    color: var(--color-primary);
}

.email-link:hover::before {
    transform: translateX(0);
}

.email-link:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Footer */
.footer {
    margin-top: 1rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.location {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.location::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.legal {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        gap: 2rem;
    }

    .logo {
        width: 140px;
    }

    .description {
        font-size: 1rem;
    }

    .email-link {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .logo {
        width: 120px;
    }

    .tagline {
        letter-spacing: 0.03em;
    }

    .contact h2 {
        font-size: 0.85rem;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .background-image,
    .background-overlay {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .logo {
        filter: none;
    }

    h1 {
        background: none;
        -webkit-text-fill-color: black;
        color: black;
    }

    .tagline,
    .email-link,
    .location::before {
        color: black;
    }

    .theme-switcher {
        display: none;
    }
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    background: rgba(10, 25, 47, 0.9);
    color: var(--color-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.theme-options {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(10, 25, 47, 0.95);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--color-accent);
    backdrop-filter: blur(10px);
}

.theme-options.active {
    display: flex;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.theme-btn:hover {
    background: rgba(100, 255, 218, 0.1);
}

.theme-btn.active {
    background: rgba(100, 255, 218, 0.2);
    color: var(--color-accent);
}

.theme-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.theme-swatch[data-swatch="default"] {
    background: linear-gradient(135deg, #0a192f 50%, #64ffda 50%);
}

.theme-swatch[data-swatch="sunset"] {
    background: linear-gradient(135deg, #1a1a2e 50%, #ff6b6b 50%);
}

.theme-swatch[data-swatch="forest"] {
    background: linear-gradient(135deg, #1a2f1a 50%, #98d8aa 50%);
}

.theme-swatch[data-swatch="ocean"] {
    background: linear-gradient(135deg, #0d1b2a 50%, #ff7b54 50%);
}

.theme-swatch[data-swatch="midnight"] {
    background: linear-gradient(135deg, #1e1e2f 50%, #f472b6 50%);
}

.theme-swatch[data-swatch="arctic"] {
    background: linear-gradient(135deg, #1c1c27 50%, #7dd3fc 50%);
}

.theme-swatch[data-swatch="ember"] {
    background: linear-gradient(135deg, #1f1410 50%, #fb923c 50%);
}

@media (max-width: 480px) {
    .theme-switcher {
        bottom: 1rem;
        right: 1rem;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
    }

    .theme-options {
        max-height: 60vh;
        overflow-y: auto;
    }
}
