/* ===========================
   CSS Reset & Base Styles
   =========================== */

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

:root {
    /* Color Palette */
    --bg-cream: #F5F3F0;
    --accent-blue: #4A6E8F;
    --text-charcoal: #2D2D2D;
    --text-muted: #5A5A5A;
    --card-bg: #FFFFFF;
    --border-subtle: #E5E3E0;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-xxl: 8rem;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-cream);
    color: var(--text-charcoal);
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 90px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   Navigation Header — Floating Pill
   =========================== */

.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 48px);
    max-width: 900px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem 0.625rem 0.75rem;
    background-color: rgba(245, 243, 240, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--text-charcoal);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.logo:hover {
    opacity: 0.7;
}

.logo-placeholder {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent-blue), #8BA5C1);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.main-nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    color: var(--text-charcoal);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-blue);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-contact-btn {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.5rem 1.125rem;
    background-color: var(--text-charcoal);
    color: white;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 100px;
    transition: background-color 0.25s ease, transform 0.2s ease;
}

.nav-contact-btn:hover {
    background-color: var(--accent-blue);
    transform: translateY(-1px);
}

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

h1,
h2,
h3 {
    font-weight: 500;
    line-height: 1.2;
}

/* Hero typography */
.hero-label {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.hero-headline {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    max-width: 900px;
    margin-bottom: var(--spacing-md);
}

.hero-body {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 700px;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.accent {
    color: var(--accent-blue);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.01em;
}

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

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) 0;
}

/* ===========================
   Buttons
   =========================== */

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 2px solid var(--accent-blue);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 140, 174, 0.25);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--accent-blue);
}

.cta-button.secondary:hover {
    background-color: var(--accent-blue);
    color: white;
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================
   Selected Work Section
   =========================== */

.selected-work {
    padding: var(--spacing-xxl) 0;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.7;
    margin-top: calc(-1 * var(--spacing-md));
    margin-bottom: var(--spacing-xl);
}

/* Work list — stacked full-width overlay cards */
.work-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.work-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

.work-item:hover .work-image {
    transform: scale(1.03);
}

.work-image-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    border-radius: 12px;
    background-color: #111;
    border: 1px solid var(--border-subtle);
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text overlay */
.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 3rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.45) 55%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.work-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.25rem 0.625rem;
    width: fit-content;
}

.work-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #ffffff;
}

.work-description {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    max-width: 600px;
}

/* Responsive */
@media (max-width: 768px) {
    .work-image-placeholder {
        aspect-ratio: 16 / 9;
    }

    .work-overlay {
        padding: 1.5rem;
    }

    .work-description {
        font-size: 0.9375rem;
    }
}

/* ===========================
   Pillars Section
   =========================== */

.pillars {
    padding: var(--spacing-xxl) 0;
    background-color: white;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl) var(--spacing-xxl);
}

.pillar {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.pillar-number {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
    display: block;
    margin-bottom: 0.25rem;
}

.pillar-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-charcoal);
    line-height: 1.3;
}

.pillar-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===========================
   About Section
   =========================== */

.about {
    padding: var(--spacing-xxl) 0;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.about-text .cta-button {
    margin-top: var(--spacing-sm);
}

.about-photo-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: #E8E6E3;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .about-photo-placeholder {
        aspect-ratio: 4 / 3;
    }
}

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

.footer {
    background-color: #1C1C1C;
    padding: var(--spacing-xl) 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-lg);
}

/* Left: email copy button */
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.25rem;
}

.footer-email-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: color 0.25s ease;
}

.footer-email-btn:hover {
    color: #ffffff;
}

.footer-copy-icon {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.25s ease;
}

.footer-email-btn:hover .footer-copy-icon {
    opacity: 1;
}

.footer-copy-confirm {
    font-size: 0.8125rem;
    color: var(--accent-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.footer-copy-confirm.visible {
    opacity: 1;
}

/* Right: external links */
.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-sm);
}

.footer-ext-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.25s ease;
}

.footer-ext-link:hover {
    color: #ffffff;
}

.ext-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    flex-shrink: 0;
}

.footer-ext-link:hover .ext-icon {
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-lg);
    }

    .footer-right {
        align-items: flex-start;
    }
}

/* ===========================
   Animations
   =========================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===========================
   Mobile Menu — Hidden on Desktop
   =========================== */

.mobile-lets-connect {
    display: none;
}

.mobile-menu-btn {
    display: none;
}

.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .main-header {
        top: 12px;
        width: calc(100% - 24px);
    }

    /* Hide desktop nav on mobile */
    .main-nav {
        display: none;
    }

    .header-inner > .nav-contact-btn {
        display: none;
    }

    .logo-text {
        display: none;
    }

    /* Show mobile Let's Connect */
    .mobile-lets-connect {
        display: block;
        color: var(--text-charcoal);
        text-decoration: none;
        font-size: 0.9375rem;
        font-weight: 500;
        flex: 1;
        text-align: center;
        transition: color 0.25s ease;
    }

    .mobile-lets-connect:hover {
        color: var(--accent-blue);
    }

    /* Show mobile hamburger button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background-color: var(--text-charcoal);
        color: white;
        border: none;
        border-radius: 100px;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
        transition: background-color 0.25s ease;
    }

    .mobile-menu-btn:hover {
        background-color: var(--accent-blue);
    }

    .mobile-menu-btn .icon-close {
        display: none;
    }

    .mobile-menu-btn.open .icon-hamburger {
        display: none;
    }

    .mobile-menu-btn.open .icon-close {
        display: block;
    }

    /* Mobile nav dropdown */
    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.625rem;
        margin-top: 0.5rem;
        background-color: rgba(245, 243, 240, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 20px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
        /* Closed state */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .mobile-nav.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .mobile-nav-link {
        display: block;
        padding: 0.75rem 1rem;
        color: var(--text-charcoal);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 400;
        border-radius: 12px;
        text-align: center;
        transition: background-color 0.2s ease;
    }

    .mobile-nav-link:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .mobile-nav .nav-contact-btn {
        align-self: center;
        margin: 0.25rem 0;
    }

    .hero {
        min-height: 80vh;
        padding: var(--spacing-lg) 0;
    }

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

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

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .section-title {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
        --spacing-xxl: 5rem;
    }

    .main-nav {
        gap: var(--spacing-sm);
    }

    .nav-link {
        font-size: 0.9375rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }
}