/* ==========================================
   Mason Chapple - Personal Website v2
   With parallax grid background
   ========================================== */

:root {
    --black: #1a1a1a;
    --dark: #2d2d2d;
    --gray: #6b6b6b;
    --light-gray: #a0a0a0;
    --border: #e5e5e5;
    --background: #ffffff;
    --background-alt: #fafafa;
    --accent: #1a1a1a;
    --grid-color: #e8e8e8;

    --font-serif: 'Newsreader', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 10rem;
}

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

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--black);
    background: var(--background);
    overflow-x: hidden;
}

/* ==========================================
   Parallax Grid Background
   ========================================== */

.parallax-wrapper {
    position: relative;
    min-height: 100vh;
}

.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-color: var(--background);
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
}

.content-layer {
    position: relative;
    z-index: 1;
}

/* ==========================================
   Headshot
   ========================================== */

.headshot-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.headshot {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.headshot:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.headshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.headshot-name {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.1rem;
    font-family: var(--font-sans);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
}

p {
    color: var(--dark);
}

a {
    color: var(--black);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    padding: var(--space-2xl) 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
}

.hero h1 {
    max-width: 800px;
    margin-bottom: var(--space-md);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.hero .proof {
    font-size: 0.9rem;
    color: var(--light-gray);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ==========================================
   Services Section
   ========================================== */

.services {
    padding: var(--space-xl) 0;
    background: rgba(250, 250, 250, 0.92);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.service-block h3 {
    margin-bottom: var(--space-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
}

.service-block ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.service-block li {
    font-size: 0.95rem;
    color: var(--gray);
}

/* ==========================================
   Case Studies Section
   ========================================== */

.case-studies {
    padding: var(--space-xl) 0;
    background: rgba(255, 255, 255, 0.9);
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.tile {
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-md);
    transition: background 0.2s ease;
}

.tile:hover {
    background: rgba(250, 250, 250, 0.98);
}

.tile-metric {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.tile-context {
    font-size: 0.85rem;
    color: var(--light-gray);
    margin-bottom: var(--space-sm);
}

.tile-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tile-details li {
    font-size: 0.9rem;
    color: var(--gray);
    position: relative;
    padding-left: 1rem;
}

.tile-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 4px;
    height: 1px;
    background: var(--light-gray);
}

/* ==========================================
   Process Section
   ========================================== */

.process {
    padding: var(--space-xl) 0;
    background: rgba(250, 250, 250, 0.92);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 600px;
}

.step {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.step-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--light-gray);
    line-height: 1;
    min-width: 2rem;
}

.step-content h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--gray);
}

/* ==========================================
   Credentials Section
   ========================================== */

.credentials {
    padding: var(--space-xl) 0;
    background: rgba(255, 255, 255, 0.9);
}

.credentials-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.credentials-list li {
    font-size: 1rem;
    color: var(--dark);
}

/* ==========================================
   Contact Section
   ========================================== */

.contact {
    padding: var(--space-2xl) 0;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
}

.contact h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--black);
    margin-bottom: var(--space-md);
}

.contact-email {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    letter-spacing: 0.02em;
}

/* ==========================================
   Footer
   ========================================== */

footer {
    padding: var(--space-md) 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}

footer p {
    font-size: 0.85rem;
    color: var(--light-gray);
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 900px) {
    html {
        font-size: 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

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

    .tiles-grid {
        grid-template-columns: 1fr;
    }

    .headshot-container {
        top: 1rem;
        right: 1rem;
    }

    .headshot {
        width: 104px;
        height: 104px;
    }

    .headshot-name {
        font-size: 0.75rem;
    }
}

@media (max-width: 600px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
        --space-2xl: 6rem;
    }

    h1 {
        font-size: 2rem;
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .tile-metric {
        font-size: 1.5rem;
    }

    .headshot-container {
        top: 0.75rem;
        right: 0.75rem;
    }

    .headshot {
        width: 78px;
        height: 78px;
    }

    .headshot-name {
        font-size: 0.7rem;
    }

    .grid-background {
        background-size: 30px 30px;
    }
}
