/* Reset & Global Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font-sans: 'General Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bg-main: #ffffff;
    --text-primary: #0a0a0c;
    --text-muted: #64748b;
    --border-subtle: #e2e8f0;
    --badge-bg: #f3f4f6;
    --badge-text: #475569;

    /* Per-project accent color themes */
    --accent-coral: #ff6b4a;
    --accent-coral-glow: rgba(255, 107, 74, 0.25);
    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.25);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.25);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 50px; /* Global offset for fixed header */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Redline Spec: Header Pill Wrapper (Top 40px margin) */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1120px;
    padding: 40px 24px 0; /* 40px top spacing per spec */
    z-index: 100;
    pointer-events: none;
}

.unified-nav-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    pointer-events: auto;
}

.logo a {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Redline Spec: Hero Section (64px top gap, 82px side padding, 44px badge gap, 64px bottom gap) */
.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding-top: 104px;   /* Account for fixed header */
    padding-left: 82px;   /* 82px left side padding per spec */
    padding-right: 82px;  /* 82px right side padding per spec */
    padding-bottom: 64px; /* 64px bottom spacing per spec */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-weight: 800;
    font-size: 4.25rem;
    line-height: 1.12;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 450;
    color: var(--text-muted);
    max-width: 760px;
    line-height: 1.5;
    margin-bottom: 44px; /* 44px gap to badges per spec */
}

.hero-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    padding: 8px 24px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Selected Work Section */
.work-section {
    padding: 64px 24px 120px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    scroll-margin-top: 50px; /* Prevents header overlap when scrolled via anchor */
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 450;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Base Project Card Structure */
.project-card {
    position: relative;
    background-color: #2b2c2e;
    color: #ffffff;
    border-radius: 28px;
    padding: 56px 64px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    border: 2px solid transparent;
}

.project-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}

.project-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.project-chip {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
    transition: background 0.25s ease, color 0.25s ease;
}

.project-title {
    font-weight: 700;
    font-size: 3rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
    color: #ffffff;
    transition: color 0.3s ease;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.55;
    color: #94a3b8;
    margin-bottom: 32px;
    font-weight: 400;
    max-width: 440px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.project-link .arrow {
    transition: transform 0.2s ease;
}

.project-card:hover .project-link .arrow {
    transform: translateX(4px);
}

/* Hover Accent Themes */
.coral-theme:hover {
    transform: translateY(-6px);
    border-color: var(--accent-coral);
    box-shadow: 0 20px 40px var(--accent-coral-glow), 0 0 0 6px rgba(255, 107, 74, 0.15);
}
.coral-theme:hover .project-title { color: var(--accent-coral); }
.coral-theme:hover .project-chip { background: rgba(255, 107, 74, 0.2); color: #ffaa99; }
.coral-theme:hover .project-link { color: var(--accent-coral); }

.indigo-theme:hover {
    transform: translateY(-6px);
    border-color: var(--accent-indigo);
    box-shadow: 0 20px 40px var(--accent-indigo-glow), 0 0 0 6px rgba(99, 102, 241, 0.15);
}
.indigo-theme:hover .project-title { color: #818cf8; }
.indigo-theme:hover .project-chip { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
.indigo-theme:hover .project-link { color: #818cf8; }

.emerald-theme:hover {
    transform: translateY(-6px);
    border-color: var(--accent-emerald);
    box-shadow: 0 20px 40px var(--accent-emerald-glow), 0 0 0 6px rgba(16, 185, 129, 0.15);
}
.emerald-theme:hover .project-title { color: #34d399; }
.emerald-theme:hover .project-chip { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; }
.emerald-theme:hover .project-link { color: #34d399; }

/* Visual Mockup Styling */
.project-visual {
    position: relative;
    width: 100%;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-mockup {
    background: #ffffff;
    color: #0f172a;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s ease;
}

.main-phone {
    width: 200px;
    height: 310px;
    padding: 16px;
    border: 6px solid #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.screen-notch {
    width: 60px;
    height: 12px;
    background: #1e293b;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-bottom: 14px;
}

.app-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-bottom: 10px;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.user-desc {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 8px;
}

.user-tag {
    font-size: 0.68rem;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 16px;
    color: #475569;
}

.cta-pill {
    background: #0f172a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 9999px;
    width: 100%;
}

.side-phone {
    position: absolute;
    width: 160px;
    padding: 14px;
    background: #ffffff;
    border: 4px solid #334155;
    z-index: 1;
}

.top-side {
    top: 20px;
    right: 20px;
}

.bottom-side {
    bottom: 20px;
    right: 30px;
}

.mini-app-card {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-icon {
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
}

.mini-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1e293b;
}

.mini-stats {
    display: flex;
    justify-content: space-around;
    font-size: 0.68rem;
    color: #475569;
}

.main-dash {
    width: 320px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.dash-title {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
}

.dash-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    display: block;
    margin-bottom: 16px;
}

.chart-graphic {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 80px;
    margin-bottom: 16px;
}

.bar {
    flex: 1;
    background: #6366f1;
    border-radius: 6px;
    opacity: 0.85;
}
.bar-1 { height: 40%; }
.bar-2 { height: 65%; }
.bar-3 { height: 50%; }
.bar-4 { height: 85%; }
.bar-5 { height: 100%; background: #4f46e5; }

.dash-badge {
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    display: inline-block;
}

.transit-card {
    width: 280px;
    padding: 24px;
}

.transit-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 16px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.route-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.route-line {
    width: 4px;
    height: 36px;
    background: #10b981;
    border-radius: 2px;
}

.station {
    font-size: 0.9rem;
    font-weight: 700;
    display: block;
    color: #0f172a;
}

.time {
    font-size: 0.75rem;
    color: #64748b;
}

.ticket-btn {
    background: #10b981;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
}

/* Responsive Overrides */
@media (max-width: 960px) {
    .hero-container {
        padding-left: 32px;
        padding-right: 32px;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .project-card {
        grid-template-columns: 1fr;
        padding: 40px 32px;
        gap: 32px;
    }

    .project-title {
        font-size: 2.25rem;
    }

    .project-visual {
        height: 260px;
    }
}

@media (max-width: 640px) {
    .header-wrapper {
        padding: 20px 16px 0;
    }

    .unified-nav-pill {
        padding: 12px 20px;
    }

    .nav-links {
        gap: 16px;
    }

    .hero-container {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 40px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }
}

/* --- NEW HOMEPAGE HERO (Sept Redesign) --- */

.first-scroll-wrapper {
    width: 100%;
    min-height: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding-top: 279px;
    box-sizing: border-box;
}

.new-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 48px;
    padding-bottom: 60px;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
    z-index: 1000;
    pointer-events: none;
}

.new-unified-nav-pill {
    pointer-events: auto;
    padding: 18px 44px;
    background: rgba(255, 255, 255, 0.60);
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.03), 0px 2px 30px rgba(0, 0, 0, 0.08), 0px 0px 1px rgba(0, 0, 0, 0.30);
    border-radius: 90px;
    backdrop-filter: blur(7.50px);
    -webkit-backdrop-filter: blur(7.50px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1152px;
}

.new-unified-nav-pill .logo a {
    color: black;
    font-size: 24px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
}

.new-unified-nav-pill .nav-links {
    display: flex;
    gap: 46px;
    align-items: center;
}

.new-unified-nav-pill .nav-link {
    color: #475467;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.new-unified-nav-pill .nav-link:hover {
    color: #111111;
}

.new-hero-content {
    width: 100%;
    max-width: 1152px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.hero-greeting {
    color: black;
    font-size: 60px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 200;
    line-height: 76px;
    margin: 0;
}

.hero-main-title {
    color: black;
    font-size: 80px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    line-height: 76px;
    margin: 0;
}

.highlight-yellow {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.highlight-yellow::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -10px;
    bottom: 8px;
    height: 34px; 
    background-color: #FFDD03;
    z-index: -1;
}
