/* ==========================================================================
   Homepage Styles - craigvandergalien.com
   Aesthetic: Refined minimalism with confident typographic punch
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors - warm neutrals, not sterile */
    --color-bg: #fafaf9;
    --color-bg-alt: #f5f5f4;
    --color-text: #0a0a0a;
    --color-text-muted: #525252;
    --color-accent: #b45309;
    --color-accent-hover: #92400e;
    --color-border: #e7e5e4;

    /* Typography - distinctive, not generic */
    --font-display: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Generous spacing for breathing room */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 5rem;
    --spacing-xl: 8rem;

    --max-width: 1100px;
    --border-radius: 6px;

    /* Smooth, refined transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

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

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

a:hover {
    color: var(--color-accent-hover);
}

/* --------------------------------------------------------------------------
   Typography - Bold, distinctive, confident
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
}

h1 {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.section-title {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Scroll-triggered fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp var(--transition-slow) ease-out forwards;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
    max-width: var(--max-width);
}

.hero-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--color-bg-alt);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text h1 {
    margin-bottom: var(--spacing-xs);
}

.tagline {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--color-text-muted);
    font-weight: 500;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-md);
    color: var(--color-text-muted);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* --------------------------------------------------------------------------
   Featured Projects
   -------------------------------------------------------------------------- */
.featured-projects {
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.featured-project {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    align-items: center;
}

@media (min-width: 768px) {
    .featured-project {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .featured-project:nth-child(even) .project-image {
        order: 2;
    }
}

.project-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--color-bg-alt);
    aspect-ratio: 16 / 10;
}

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

.project-info h3 {
    margin-bottom: var(--spacing-sm);
}

.project-info p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.tech-tags span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background-color: var(--color-bg-alt);
    border-radius: 100px;
    color: var(--color-text-muted);
}

.project-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* --------------------------------------------------------------------------
   Project Grid
   -------------------------------------------------------------------------- */
.project-grid-section {
    padding: var(--spacing-xl) var(--spacing-md);
    background-color: var(--color-bg-alt);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

@media (min-width: 640px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-project {
    display: block;
    background-color: var(--color-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition), box-shadow var(--transition);
    color: var(--color-text);
}

.grid-project:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    color: var(--color-text);
}

.grid-project img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: var(--color-bg-alt);
}

.grid-project-info {
    padding: var(--spacing-sm);
}

.grid-project-info h4 {
    margin-bottom: 0.25rem;
}

.grid-project-info p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-section {
    padding: var(--spacing-xl) var(--spacing-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text h2 {
    margin-bottom: var(--spacing-sm);
}

.about-lead {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.about-text p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.skills h3 {
    margin-bottom: var(--spacing-md);
}

.skill-group {
    margin-bottom: var(--spacing-sm);
}

.skill-group h4 {
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.skill-group p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    background-color: var(--color-bg-alt);
}

.footer h2 {
    margin-bottom: var(--spacing-sm);
}

.email-link {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 600;
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.social-links a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.social-links a:hover {
    color: var(--color-text);
}

.copyright {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}
