:root {
    --cosmic-bg: #0b0d17;
    --cosmic-accent: #d0d6f9;
    --industrial-bg: #2b2c34;
    --industrial-text: #fffffe;
    --background-white: #f4f4f5;
    --text-dark: #121619;
    --accent-blue: #3a86ff;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header / Hero */
.cosmic-header {
    height: 100vh;
    width: 100%;
    background: url('hero_bg.jpg') no-repeat center center/cover;
    position: relative;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    /* Aesthetic height */
    padding: 0 4rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
}


/* Wrapper holds logo + earth */
.logo{
  --logo-h: 60px;          /* change once */
  --earth-ratio: 0.55;    /* earth size vs logo */
  --earth-x: 0.15;        /* horizontal position */

  position: relative;
  display: inline-block;
  line-height: 0;
}

.logo-img{
  height: var(--logo-h);
  width: auto;
  display: block;
  position: relative;
  z-index: 2;
}

.earth-layer{
  position: absolute;
  top: 50%;
  left: calc(var(--earth-x) * 100%);
  transform: translate(-50%, -50%);

  width: calc(var(--earth-ratio) * var(--logo-h));
  height: calc(var(--earth-ratio) * var(--logo-h));

  background-image: url(earth-map.jpg);
  background-repeat: repeat-x;
  background-size:
    calc(1.9 * var(--logo-h))
    calc(0.95 * var(--logo-h));

  border-radius: 50%;
  border: calc(0.075 * var(--logo-h)) solid #fff;

  box-shadow:
    inset calc(0.06 * var(--logo-h)) 0 calc(0.21 * var(--logo-h)) rgb(5 5 5 / 100%),
    inset calc(-0.03 * var(--logo-h)) calc(0.01 * var(--logo-h)) calc(0.04 * var(--logo-h)) rgb(255 255 255 / 20%);

  animation: earth-rotate 5s linear infinite;
  z-index: 1;
}

@keyframes earth-rotate{
  from { background-position: 0 0; }
  to   { background-position: calc(-1.9 * var(--logo-h)) 0; }
}


.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links.nav-left {
    justify-self: start;
}

.nav-links.nav-right {
    justify-self: end;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 300;
    /* Less bold */
    font-size: 0.95rem;
}

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

.hero-text-strip {
    background-color: #000;
    color: #fff;
    padding: 6rem 0;
    text-align: center;
    border-top: 7px solid #808080;
    border-bottom: 7px solid #808080;
}

.hero-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.hero-text-strip h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

.subtitle {
    font-size: 1.25rem;
    color: #a0a0a0;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: transparent;
    border: 2px solid var(--cosmic-accent);
    color: var(--cosmic-accent);
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s;
}

.cta-button:hover {
    background-color: var(--cosmic-accent);
    color: var(--cosmic-bg);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--cosmic-accent);
    animation: bounce 2s infinite;
}

/* Problem-Based Organization Banner */
.problem-based-banner {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #ffffff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.problem-based-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(58, 134, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.problem-based-banner .container {
    position: relative;
    z-index: 1;
}

.banner-text {
    font-size: 1.35rem;
    line-height: 1.9;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    font-weight: 300;
    letter-spacing: 0.3px;
    color: #e8e8e8;
}

/* Philosophy Section */
.section-philosophy {
    padding: 6rem 0;
    background-color: #ffffff;
}

.philosophy-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.philosophy-text {
    flex: 1;
}

.philosophy-text .lead {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.philosophy-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Problem Stack (Vertical Journey) */
.problems-stack {
    background-color: #f0f0f2;
}

.problem-block {
    display: flex;
    min-height: 80vh;
    /* Each block takes up significant height */
}

.problem-block.left-align {
    flex-direction: row;
}

.problem-block.right-align {
    flex-direction: row-reverse;
}

.problem-block .block-visual,
.problem-block .block-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
}

.block-visual {
    background-color: rgb(225, 225, 225);
    position: relative;
    overflow: hidden;
}

.block-content {
    background-color: #ffffff;
}

/* Unique bg colors for visuals to differentiate temporarily */
/* Specific backgrounds removed in favor of uniform style */

.problem-header {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.block-content h3 {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin-bottom: 2rem;
}

.challenge,
.solution {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    border-bottom: 2px solid currentColor;
}

/* Timeline */
.section-timeline {
    padding: 6rem 0;
    background-color: var(--cosmic-bg);
    /* Return to dark for timeline? Or stay light? */
    background: linear-gradient(180deg, #f0f0f2 0%, #dbeafe 100%);
}

.section-timeline h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid #ccc;
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 5px;
    width: 1rem;
    height: 1rem;
    background-color: var(--accent-blue);
    border-radius: 50%;
}

.timeline-item .year {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

/* Supporters */
.section-supporters {
    padding: 6rem 0;
    background-color: #fff;
    border-top: 7px solid #808080;
}

.section-supporters h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
}

.supporters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.supporter-card {
    padding: 2rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s;
}

.supporter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.supporter-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.logo-container {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.supporter-logo {
    width: auto;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
}

.supporter-card .role {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.supporter-card .date {
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

/* Specific adjustments for logo visual balance */
img[src*="collab_hsph.png"],
img[src*="collab_cmc.png"],
img[src*="collab_yale.jpg"] {
    transform: scale(1.3);
}

img[src*="collab_hms.png"] {
    transform: scale(1.8);
}

/* Founder */
.section-founder {
    padding: 6rem 0;
    background-color: var(--cosmic-bg);
    color: #fff;
}

.founder-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.founder-visual {
    flex: 1;
}

.founder-bio {
    flex: 1;
}

.founder-bio h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--cosmic-accent);
}

.founder-bio p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.visual-placeholder {
    width: 100%;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Footer */
.cosmic-footer {
    padding: 4rem 2rem;
    background-color: #05060a;
    color: #8d90a1;
    text-align: center;
    border-top: 7px solid #808080;
}

.cosmic-footer h2 {
    color: #fff;
    margin-bottom: 2rem;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

.cosmos-banner {
    width: 100%;
    height: 100vh;
    background: url('cosmos_banner.jpg') no-repeat center center/cover;
    border-top: 7px solid #808080;
}

.email-signup {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.email-signup input {
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid #333;
    background: #111;
    color: #fff;
}

.email-signup button {
    padding: 0.8rem 2rem;
    background-color: var(--cosmic-accent);
    color: var(--cosmic-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cosmic-header h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* simple hide for mobile for now, ideally hamburger */
    }

    .philosophy-content,
    .problem-block,
    .problem-block.left-align,
    .problem-block.right-align,
    .founder-content {
        flex-direction: column;
    }

    .problem-block .block-visual,
    .problem-block .block-content {
        padding: 2rem;
        min-height: auto;
    }

    .visual-placeholder {
        height: 250px;
    }
}

/* Feature Images */
.visual-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.problem-block:hover .feature-image {
    transform: scale(1.05);
}

/* Slideshow Styles */
.slideshow-container {
    position: relative;
}

.slideshow-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-img.active {
    opacity: 1;
}

/* Vitraux Logo-Video Sequence */
.vitraux-sequence {
    position: relative;
}

.sequence-logo,
.sequence-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.sequence-logo {
    object-fit: contain;
    width: 85%;
    height: 85%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sequence-logo.active,
.sequence-video.active {
    opacity: 1;
}

.sequence-video {
    object-fit: cover;
}

/* Glass Sequence */
.glass-sequence,
.chicago-sequence {
    position: relative;
    width: 100%;
    height: 100%;
}

.sequence-image {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    object-fit: contain;
    width: 95%;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sequence-image.active {
    opacity: 1;
}

.chicago-sequence .sequence-image,
.glass-sequence .sequence-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1024px) {

    .chicago-sequence .sequence-image,
    .glass-sequence .sequence-image {
        object-fit: contain;
    }
}

/* Hamburger Menu Code */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 2rem;
    transform: translateY(-150%);
    transition: transform 0.4s ease-in-out;
    z-index: 999;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Tablet and Mobile adjustments */
@media (max-width: 1024px) {

    /* Vertical stacking for tablet/iPad */
    .problem-block,
    .problem-block.left-align,
    .problem-block.right-align {
        flex-direction: column !important;
        height: auto;
    }

    .problem-block .block-visual {
        min-height: auto;
        height: auto;
        aspect-ratio: 16 / 9;
        /* Maintain standard video ratio */
        display: flex;
        width: 100%;
        background-color: #000;
        /* Dark background for letterboxing if needed */
    }

    .problem-block .block-content {
        padding: 3rem 2rem;
    }

    /* Reveal Hamburger, hide Nav Links */
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
        /* Position explicitly if needed, but flex grid helps */
        position: absolute;
        left: 2rem;
    }

    .logo {
        margin: 0;
        /* Center logo when nav links are gone */
    }

    nav {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Adjust specific text sizes for tablet */
    .hero-text-strip h1 {
        font-size: 2rem;
    }

    /* Force sequence images AND videos to cover on mobile too */
    .chicago-sequence .sequence-image,
    .glass-sequence .sequence-image,
    .vitraux-sequence .sequence-logo,
    .sequence-video,
    .visual-container video {
        object-fit: cover !important;
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 768px) {

    /* Mobile specific tweaks */
    .cosmic-header h1 {
        font-size: 2rem;
    }

    .problem-block .block-visual {
        /* Aspect ratio inherits from above, no fixed height needed */
        width: 100%;
    }

    nav {
        padding: 0 1.5rem;
        /* Ensure flex centering on mobile */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hamburger {
        left: 1.5rem;
    }

    .active-projects-intro {
        display: block;
        /* Show on mobile/tablet */
    }
}

/* New Section Styles */
.active-projects-intro {
    display: none;
    /* Hidden by default on desktop if preferred, or use media query above to toggle */
    padding: 4rem 2rem;
    background-color: #f4f4f5;
    /* Light spacing background */
    text-align: center;
}

.active-projects-intro h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 300;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .active-projects-intro {
        display: block;
    }
}

/* Footer Redesign */
.cosmic-footer {
    padding: 0;
    background-color: #000;
}

.footer-image-area {
    width: 100%;
    /* Container preserved but image removed as requested */
    height: 100px;
    /* Reduced height since empty */
    background-color: #f4f4f5;
}

.footer-copyright {
    padding: 3rem 2rem;
    background-color: #ffffff;
    /* White background */
    color: var(--text-dark);
    /* Dark text */
    text-align: center;
    border-top: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 0.5rem;
}

.footer-copyright a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.footer-copyright a:hover {
    color: var(--accent-blue);
}

.footer-dynamic-logo {
    height: 80px;
    width: 80px;
    margin-bottom: 0.5rem;
    animation: spin-slow 20s linear infinite;
}