/* ==========================================================================
   Ben Gould — Personal Site v3
   Aesthetic: Trustworthy blue, warm neutral, editorial personality
   ========================================================================== */

:root {
    /* Color Foundation — Oxford Blue + Warm Neutral */
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --bg-warm: #faf9f7;
    --text: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);

    /* Accent — Oxford Blue (like the shirt) */
    --accent: #5b8ec9;
    --accent-hover: #4a7db8;
    --accent-subtle: rgba(91, 142, 201, 0.08);

    /* Navy — For dark elements */
    --navy: #1e3a5f;
    --navy-light: #2d4a6f;

    /* Typography */
    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Bricolage Grotesque', sans-serif;

    /* Spacing (4px grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Layout */
    --container-max: 900px;
    --container-wide: 1100px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--space-md);
    letter-spacing: -0.02em;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 1.875rem; margin-bottom: var(--space-lg); }
h3 { font-size: 1.125rem; font-weight: 600; }

p {
    margin: 0 0 var(--space-md);
}

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

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

ul {
    margin: 0;
    padding: 0 0 0 var(--space-lg);
}

li {
    margin-bottom: var(--space-sm);
}

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

strong {
    font-weight: 600;
}

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

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

.section {
    padding: var(--space-2xl) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   Hero — Simpler, bolder
   ========================================================================== */

.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    background: var(--bg);
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: var(--space-2xl);
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.tagline {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.01em;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    filter: grayscale(10%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 150ms ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--navy);
    color: white;
}

.btn-primary:hover {
    background: var(--navy-light);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--text);
    background: var(--bg-alt);
}

/* ==========================================================================
   Work Samples — Horizontal Scroll
   ========================================================================== */

#samples {
    position: relative;
}

#samples .container {
    max-width: var(--container-wide);
    position: relative;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-header h2 {
    margin-bottom: 0;
}

.scroll-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    animation: nudge 2s ease-in-out infinite;
}

@keyframes nudge {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(4px); opacity: 1; }
}

.samples-grid {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-md);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.samples-grid::-webkit-scrollbar {
    display: none;
}

.samples-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 1;
}

.samples-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.sample-card {
    display: block;
    flex: 0 0 240px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 200ms ease;
    scroll-snap-align: start;
}

.sample-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.sample-image {
    aspect-ratio: 8.5 / 11;
    overflow: hidden;
    background: white;
    border-bottom: 1px solid var(--border);
}

.sample-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.sample-info {
    padding: var(--space-md);
}

.sample-info h3 {
    margin-bottom: var(--space-xs);
    font-size: 1rem;
}

.sample-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Campaign Work Section */
.campaign-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.campaign-section h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.campaign-grid {
    display: flex;
    gap: var(--space-lg);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.campaign-grid::-webkit-scrollbar {
    display: none;
}

.campaign-card {
    flex: 0 0 180px;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 200ms ease;
}

.campaign-card:hover {
    transform: translateY(-2px);
}

.campaign-card:hover .campaign-image {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.campaign-image {
    aspect-ratio: 8.5 / 11;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    background: white;
    transition: all 200ms ease;
}

.campaign-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.campaign-info {
    margin-top: var(--space-sm);
}

.campaign-info h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
    color: var(--text);
}

.campaign-info p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   Background — Compressed credentials
   ========================================================================== */

.section-tight {
    padding-top: var(--space-lg);
}

.background-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2xl);
    align-items: start;
}

.background-text h2 {
    margin-bottom: var(--space-lg);
}

.background-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 600px;
}

.background-list li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
    position: relative;
}

.background-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

/* Resume card in background section */
.resume-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text);
    transition: all 200ms ease;
}

.resume-card:hover {
    color: var(--accent);
}

.resume-card:hover .resume-image {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.resume-image {
    width: 180px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 200ms ease;
}

.resume-image img {
    width: 100%;
    height: auto;
}

.resume-label {
    font-size: 0.875rem;
    font-weight: 500;
}

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

.footer {
    padding: var(--space-xl) 0 var(--space-lg);
    background: var(--navy);
    color: white;
}

.footer h2 {
    color: white;
}

.contact-info {
    margin-bottom: var(--space-2xl);
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    border-bottom: 3px solid var(--accent);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-lg);
    transition: border-color 150ms ease;
}

.contact-email:hover {
    color: white;
    border-color: white;
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    transition: all 150ms ease;
}

.social-links a:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.location {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

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

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-photo {
        order: -1;
        max-width: 200px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .background-layout {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .resume-card {
        flex-direction: row;
        justify-content: flex-start;
    }

    .resume-image {
        width: 140px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .section {
        padding: var(--space-2xl) 0;
    }

    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.125rem;
    }

    .sample-card {
        flex: 0 0 200px;
    }

    .samples-fade {
        width: 40px;
    }

    .contact-email {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Animation — Subtle entrance
   ========================================================================== */

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

.hero-text,
.hero-photo {
    animation: fadeUp 600ms cubic-bezier(0.25, 1, 0.5, 1) both;
}

.hero-photo {
    animation-delay: 100ms;
}
