:root {
    --emerald-green: #2D5F3F;
    --traffic-red: #E63946;
    --urban-gray: #2B2D42;
    --pollution-orange: #F77F00;
    --sky-blue: #06A8E8;
    --concrete: #8D99AE;
    --clean-white: #EDF2F4;
    --warning-yellow: #FCBF49;
    --data-purple: #9D4EDD;
}

/* Base Styles */
html,
body,
#map {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
}

body {
    background: var(--urban-gray);
    color: var(--clean-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

/* Storyboard */
#storyboard {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

/* Legend Panel */

.legend {
  color: black;
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 999;
}

.legend h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.legend span {
  display: inline-block;
  width: 30px;
  height: 4px;
  border-radius: 2px;
}


#traffic-legend {
  position: absolute;
  top: 20px;
  right: 20px;
}
.legend-circle {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 8px;
  vertical-align: middle;
}

#aqi-legend {
  display: flex;
  position: absolute;
  top: 150px;
  right: 20px;
}

#aqi-legend div span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50% !important;
  flex-shrink: 0;
  margin-right: 8px;
  vertical-align: middle;
}




/* Cover Page */
#cover {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--urban-gray) 0%, var(--emerald-green) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animated traffic overlay */
.traffic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(230, 57, 70, 0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: trafficFlow 8s linear infinite;
    pointer-events: none;
}

@keyframes trafficFlow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

#intro {
    position: relative;
    max-width: 900px;
    padding: 3rem;
    border-radius: 12px;
    background: rgba(43, 45, 66, 0.85);
    backdrop-filter: blur(15px);
    border: 3px solid var(--emerald-green);
    box-shadow: 
        0 0 50px rgba(45, 95, 63, 0.4),
        inset 0 0 30px rgba(45, 95, 63, 0.1);
    animation: fadeSlideIn 1.5s ease-out;
    z-index: 2;
}

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

.subtitle-badge {
    display: inline-block;
    background: var(--emerald-green);
    color: var(--clean-white);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

#intro h1 {
    color: var(--clean-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#intro h1 i {
    color: var(--emerald-green);
    margin-right: 1rem;
    font-size: 3rem;
}

#intro h5 {
    color: var(--sky-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

#intro p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--clean-white);
}

/* Intro Stats */
.intro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 2px solid rgba(45, 95, 63, 0.5);
    border-bottom: 2px solid rgba(45, 95, 63, 0.5);
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--sky-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clean-white);
    font-family: 'Space Mono', monospace;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--concrete);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    margin-top: 2rem;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--emerald-green);
    display: block;
}

.scroll-indicator span {
    font-size: 0.9rem;
    color: var(--concrete);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

#intro .footnote {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(45, 95, 63, 0.5);
}

#intro .footnote span {
    color: var(--concrete);
    font-size: 0.85rem;
}
.footnote a {
    color: #1e90ff;
    text-decoration: none;
  }
  
  .footnote a:hover {
    color: #ff4500;
    text-decoration: none;
  }

/* GeoNarrative Section */
#geonarrative {
    position: relative;
}

/* Scene Styles */
.scene {
    position: relative;
    max-width: 550px;
    margin: 0 auto 0 4rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(43, 45, 66, 0.95) 0%, rgba(45, 95, 63, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-left: 5px solid var(--emerald-green);
    border-radius: 0 12px 12px 0;
    box-shadow: -8px 8px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    z-index: 5;
}

.scene:hover {
    box-shadow: -12px 12px 40px rgba(45, 95, 63, 0.4);
    border-left-width: 7px;
    transform: translateX(5px);
}

.scene:first-child {
    margin-top: -35%;
}

.scene:last-child {
    margin-bottom: 0vh;
}

/* For the image at the bottom fill */
.final-hero-break {
    width: 100%;
    height: 100vh; 
    overflow: hidden;
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
}

.final-hero-break img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center; 
    
    display: block;
    border: none;
}

.scene h2 {
    color: var(--clean-white);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--sky-blue);
}

.scene h2 i {
    margin-right: 0.75rem;
    color: var(--sky-blue);
}

.scene p {
    color: var(--clean-white);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.scene ul {
    color: var(--clean-white);
    line-height: 1.8;
}

.scene ul li {
    margin-bottom: 0.5rem;
}

/* Special Components */
.mapboxgl-popup-content {
  color: black;
}

.data-callout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(6, 168, 232, 0.15);
    border-left: 4px solid var(--sky-blue);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.data-callout i {
    font-size: 2rem;
    color: var(--sky-blue);
    flex-shrink: 0;
}

.data-callout strong {
    color: var(--sky-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.data-callout p {
    margin: 0;
    font-size: 1rem;
}

/* Visualization Links */
.viz-link {
    background: linear-gradient(135deg, var(--data-purple) 0%, var(--sky-blue) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: center;
}

.viz-link a {
    color: var(--clean-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.viz-link a:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Key Findings Box */
.key-findings {
    background: rgba(247, 127, 0, 0.15);
    border: 2px solid var(--pollution-orange);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.key-findings h4 {
    color: var(--pollution-orange);
    margin-bottom: 1rem;
}

.key-findings ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* Impact Grid */
.impact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(230, 57, 70, 0.15);
    border-left: 3px solid var(--traffic-red);
    padding: 1rem;
    border-radius: 4px;
}

.impact-item i {
    font-size: 1.5rem;
    color: var(--traffic-red);
}

/* Neighborhood Stats */
.neighborhood-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: rgba(141, 153, 174, 0.2);
    border: 2px solid var(--concrete);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.stat-card h4 {
    color: var(--clean-white);
    margin-bottom: 1rem;
}

.stat-value {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.stat-value.high {
    background: var(--traffic-red);
    color: white;
}

.stat-value.medium {
    background: var(--pollution-orange);
    color: white;
}

.stat-value.low {
    background: var(--emerald-green);
    color: white;
}

.stat-card p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--concrete);
}

/* Insight Box */
.insight-box {
    background: linear-gradient(135deg, rgba(252, 191, 73, 0.2) 0%, rgba(247, 127, 0, 0.2) 100%);
    border: 2px solid var(--warning-yellow);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.insight-box h4 {
    color: var(--warning-yellow);
    margin-bottom: 1rem;
}

.insight-box h4 i {
    margin-right: 0.5rem;
}

/* Methodology Steps */
.methodology-steps {
    margin: 1.5rem 0;
}

.method-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(141, 153, 174, 0.3);
}

.method-step:last-child {
    border-bottom: none;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--emerald-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'Space Mono', monospace;
}

.step-content h4 {
    color: var(--sky-blue);
    margin-bottom: 0.5rem;
}

.step-content p {
    margin: 0;
    font-size: 1rem;
}

/* Policy Recommendations */
.policy-recommendations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.policy-item {
    background: rgba(157, 78, 221, 0.15);
    border-left: 4px solid var(--data-purple);
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.policy-item:hover {
    background: rgba(157, 78, 221, 0.25);
    transform: translateX(5px);
}

.policy-item i {
    font-size: 2rem;
    color: var(--data-purple);
    margin-bottom: 0.5rem;
}

.policy-item h4 {
    color: var(--clean-white);
    margin: 0.5rem 0;
}

.policy-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Future List */
.future-list {
    background: rgba(6, 168, 232, 0.1);
    border: 2px solid var(--sky-blue);
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    margin: 1.5rem 0;
}

.future-list li {
    margin-bottom: 0.75rem;
    color: var(--clean-white);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.3) 0%, rgba(6, 168, 232, 0.3) 100%);
    border: 3px solid var(--emerald-green);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.cta-box h4 {
    color: var(--emerald-green);
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary {
    background: var(--emerald-green);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
}

.btn-primary:hover {
    background: var(--sky-blue);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(6, 168, 232, 0.4);
}

/* Footer */

#footer {
    width: 100%;
    min-height: 40vh;
    background: linear-gradient(180deg, rgba(43, 45, 66, 0.98) 0%, rgba(45, 95, 63, 0.95) 100%);
    color: var(--clean-white);
    padding: 3rem 0 2rem;
    border-top: 4px solid var(--emerald-green);
    display: flex;
    justify-content: flex-start;
    padding-left: 55px;
}

#footer h5 {
    color: var(--emerald-green);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--sky-blue);
    padding-bottom: 0.5rem;
}

#footer h5 i {
    margin-right: 0.5rem;
    color: var(--sky-blue);
}

#footer p,
#footer li {
    color: var(--clean-white);
    line-height: 1.8;
}

#footer ul li {
    margin-bottom: 0.5rem;
}

#footer a {
    color: var(--sky-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

#footer a:hover {
    color: var(--emerald-green);
    text-decoration: underline;
}

#footer hr {
    border-color: rgba(45, 95, 63, 0.5);
    margin: 2rem 0;
}

/* about section */
.about-hero {
    max-width: 900px;     
    margin: 0 auto;        
    padding: 2rem 20px;    
    text-align: center;     
}

.team-card li {
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-align: left;
}
.team-card img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--clean-white);
    margin: 0 60px;
}
.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-items: center;
}


.team-card h3 {
    margin-top: 10px;
    margin-left: 35px;
}

.team-card ul {
    padding-left: 0;
    list-style: disc;
    margin-top: 10px;
}


.about-section {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 30px;
    margin-bottom: 40px;
}
.about-section:last-child {
    border-bottom: none;
}
.about-container {
    margin:0 50px;
}

.about-section .data-links a {
    color: #06A8E8;
    transition: color 0.3s ease;
}

.about-section .data-links a:hover {
    color: #F77F00;   
}

/* navbar */
.navbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.9);
    color: white;
    transform: translateX(-250px); /* hidden by default */
    transition: transform 0.3s ease; /* smooth slide */
    display: flex;
    flex-direction: column;
    padding: 10px;
    z-index: 1000;
  }
  
  .navbar:hover {
    transform: translateX(0);
  }
  
  /* Navbar toggle button */
  #nav-toggle {
    background: #222;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 20px;
    border-radius: 4px;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .nav-btn {
    background: #333;
    color: white;
    border-radius: 4px;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  .navbar .nav-links a.nav-btn.navheader {
    background: black;
    font-weight: bold;
}

  .nav-btn:hover {
    background: #555;
  }
  
  .nav-btn.active {
    background: #f77f00;
    color: #111;
  }
  .navbar .nav-links a.nav-btn {
    display: inline-block;
    border-radius: 4px;
    text-align: center;
    color: white;
    text-decoration: none; 
    font-family: inherit;     
    font-weight: 600;        
    cursor: pointer;
  }

/* Responsive Design */
@media (max-width: 768px) {
    #intro {
        padding: 2rem;
        margin: 1rem;
    }
    
    #intro h1 {
        font-size: 2.5rem;
    }
    
    .intro-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .scene {
        margin: 0 1rem !important;
        max-width: calc(100% - 2rem);
        padding: 2rem 1.5rem;
    }
    
    .scene h2 {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    #navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
}

