/* ==========================================================================
   MAIN.CSS — Core Styles, Typography, Colors, Reset
   ========================================================================== */

/* CSS Custom Properties — Color Palette */
:root {
    /* Primary Background — Pale Sky Blue */
    --color-bg-primary: #bdf6fe;

    /* Sunset Palette — Warm Accents */
    --color-sunset-cream: #fef7e8;
    --color-sunset-peach: #ffdab9;
    --color-sunset-coral: #ff7f5e;
    --color-sunset-vermilion: #e34234;
    --color-sunset-orange: #ff8c42;
    --color-sunset-pink: #ff9aa2;
    --color-sunset-gold: #e8b94a;
    --color-sunset-rose: #d67b7b;

    /* Dark/Ink Tones — High Contrast */
    --color-ink-900: #0d1321;
    --color-ink-800: #1a1f2e;
    --color-ink-700: #242f3e;
    --color-ink-600: #2e3d4f;
    --color-ink-500: #3a4d63;
    --color-ink-400: #5c7089;
    --color-ink-300: #8a9db3;
    --color-ink-200: #b8c8db;
    --color-ink-100: #e2ecf5;

    /* Semantic Colors */
    --color-text-primary: var(--color-ink-900);
    --color-text-secondary: var(--color-ink-600);
    --color-text-muted: var(--color-ink-400);
    --color-text-inverse: var(--color-sunset-cream);

    --color-border-subtle: rgba(13, 19, 33, 0.08);
    --color-border-medium: rgba(13, 19, 33, 0.15);
    --color-border-strong: rgba(13, 19, 33, 0.3);

    --color-focus: var(--color-sunset-vermilion);

    /* Grid Lines */
    --color-grid-line: rgba(13, 19, 33, 0.04);
    --color-grid-accent: rgba(13, 19, 33, 0.07);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    --space-5xl: 128px;

    /* Typography Scale */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
    --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.4rem, 1.2rem + 1vw, 1.75rem);
    --text-2xl: clamp(1.8rem, 1.5rem + 1.5vw, 2.5rem);
    --text-3xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    --text-4xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);
    --text-5xl: clamp(5rem, 3.5rem + 7.5vw, 10rem);

    /* Font Weights */
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Z-Indices */
    --z-grid: 0;
    --z-balloons: 10;
    --z-content: 20;
    --z-nav: 100;
    --z-cursor: 200;
    --z-overlay: 300;
}
/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@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;
    }
}

body {
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: var(--color-sunset-coral);
    color: var(--color-text-inverse);
}

::-moz-selection {
    background-color: var(--color-sunset-coral);
    color: var(--color-text-inverse);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

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

/* Form Elements */
input, textarea, button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
}

button {
    cursor: pointer;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Display / Hero / Section Titles — Cormorant Garamond Italic */
.display-1, .display-2, .display-3, .hero__name,
.works__title, .studio__title, .contact__title,
.project-overlay__title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: var(--weight-regular);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

.display-1 { font-size: var(--text-5xl); }
.display-2 { font-size: var(--text-4xl); }
.display-3 { font-size: var(--text-3xl); }

/* Body / UI — Inter */
body, p, .nav__link, .work-card__description,
.studio__paragraph, .contact__label, .contact__input,
.project-overlay__description {
    font-family: var(--font-ui);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
}

.text-light { font-weight: var(--weight-light); }
.text-medium { font-weight: var(--weight-medium); }

/* Technical / Metadata — JetBrains Mono */
.mono, .work-card__tag, .studio__meta dt, .studio__meta dd,
.project-overlay__tag, .project-overlay__meta dt, .project-overlay__meta dd,
.hero__scroll-text, .nav__seal-mark {
    font-family: var(--font-mono);
    font-weight: var(--weight-regular);
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    position: relative;
    z-index: var(--z-content);
    padding: var(--space-4xl) 0;
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-ink-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-ink-400);
}