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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --text-primary: #d4d4d4;
  --text-secondary: #737373;
  --border: #1a1a1a;
  --link-primary: #f4a261;
}

/* Base Styles */
html {
  font-size: 16px;
}

body {
  font-family:
    'SF Mono', 'Fira Code', 'Monaco', 'Inconsolata', 'Fira Mono',
    'Droid Sans Mono', 'Source Code Pro', monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 0.9375rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2.5rem;
}

/* Typography */
h1 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--link-primary);
  text-transform: uppercase;
}

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Sections */
.section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--link-primary);
}

.section-icon {
  flex-shrink: 0;
}

.section-box {
  padding: 1.25rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
}

.section-box .section-title {
  margin-top: 0;
}

/* Figure & Images */
.figure {
  margin: 2rem 0;
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.figure-caption {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.figure-caption a {
  color: var(--link-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.figure-caption a.link-highlight {
  text-decoration: none;
  opacity: 0.8;
}

.figure-caption a:hover {
  color: var(--text-primary);
}

/* Team Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.team-member {
  text-align: center;
}

.team-avatar {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--bg-secondary);
  margin: 0 auto 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.team-name a {
  color: var(--link-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-highlight {
  color: var(--link-primary);
  text-decoration: none;
}

.link-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-no-underline {
  text-decoration: none;
}

.team-name a:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-highlight:hover {
  color: var(--text-primary);
}

.team-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Team Hiring Note */
.team-hiring-note {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.team-hiring-cta {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Partners & Affiliations Section */
.partners-intro {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: center;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s ease;
  min-height: 80px;
}

.partner-logo:hover {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(244, 162, 97, 0.5);
  transform: translateY(-2px);
}

.partner-logo img {
  max-width: 100%;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) invert(1) brightness(0.8);
  opacity: 0.7;
  transition: all 0.2s ease;
}

.partner-logo:hover img {
  filter: grayscale(0%) brightness(1) contrast(1);
  opacity: 1;
}

/* Intro Section */
.intro {
  margin-bottom: 2rem;
}

.intro p {
  font-size: 0.9375rem;
  line-height: 1.75;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* Hero Section */
.hero {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--link-primary);
}

.hero .section-title {
  margin-top: 0;
}

.vision {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.vision-tagline {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--link-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.hero .figure {
  margin: 0;
}

.figure img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.figure img:hover {
  opacity: 0.9;
}

/* Lists for New Sections */
.problem-list,
.principle-list,
.foundation-list,
.fro-list,
.impact-list {
  margin: 1rem 0;
  padding-left: 1.25rem;
  color: var(--text-primary);
}

.problem-list li {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  list-style: none;
}

.problem-list {
  padding-left: 0;
}

.problem-icon {
  color: var(--link-primary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.problem-list li strong,
.problem-list li strong .tooltip-trigger {
  color: var(--link-primary);
}

.problem-list li strong .tooltip-trigger:hover {
  color: var(--text-primary);
}

.foundation-list li,
.fro-list li,
.impact-list li {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.principle-list li {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  padding-left: 0.25rem;
}

.problem-list li strong,
.principle-list li strong,
.foundation-list li strong,
.fro-list li strong,
.impact-list li strong {
  color: var(--link-primary);
}

.foundation-list a {
  color: var(--link-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foundation-list a:hover {
  color: var(--text-primary);
}

/* Roadmap Table */
.roadmap-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.8125rem;
}

.roadmap-table th,
.roadmap-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.roadmap-table th {
  font-weight: 600;
  color: var(--link-primary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.roadmap-table td {
  color: var(--text-primary);
}

.roadmap-table td:first-child {
  font-weight: 600;
  color: var(--link-primary);
  width: 3rem;
}

.roadmap-table td:last-child {
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
}

.roadmap-table tbody tr:hover {
  background-color: rgba(244, 162, 97, 0.05);
}

/* Funding Highlight */
.funding-highlight {
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  background-color: rgba(244, 162, 97, 0.1);
  border-left: 3px solid var(--link-primary);
  font-size: 0.9rem;
}

.funding-highlight strong {
  color: var(--link-primary);
}

/* Call to Action */
.cta {
  margin-top: 2.5rem;
  padding: 1.75rem;
  background-color: rgba(244, 162, 97, 0.1);
  border: 2px solid var(--link-primary);
  border-radius: 4px;
}

.cta-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: var(--link-primary);
}

.cta p {
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: var(--link-primary);
  line-height: 1.7;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--link-primary);
  color: var(--bg-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #e09250;
  transform: translateY(-1px);
}

.cta-button svg {
  flex-shrink: 0;
}

.cta .impact-list {
  margin-bottom: 1.25rem;
}

.cta-funding {
  padding: 1rem;
  background-color: rgba(244, 162, 97, 0.08);
  border-left: 3px solid var(--link-primary);
  margin-bottom: 1rem;
}

.cta-funding strong {
  color: var(--link-primary);
}

.cta-action {
  margin-bottom: 0;
  font-weight: 500;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
  .container {
    padding: 2.5rem 1.5rem;
  }

  h1 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }

  .section {
    margin-bottom: 1.75rem;
  }

  .figure {
    margin: 1.5rem 0;
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .team-name {
    font-size: 0.75rem;
  }

  .team-role {
    font-size: 0.65rem;
  }

  /* Partners responsive - Tablet */
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .partner-logo {
    padding: 0.75rem;
    min-height: 70px;
  }

  .partner-logo img {
    max-height: 40px;
  }

  .partners-intro {
    font-size: 0.8125rem;
  }

  /* Hero responsive - Tablet */
  .hero {
    padding: 1.25rem;
    margin-bottom: 2rem;
  }

  .vision {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .vision-tagline {
    font-size: 0.85rem;
  }

  /* Roadmap responsive - Tablet */
  .roadmap-table {
    font-size: 0.75rem;
  }

  .roadmap-table th,
  .roadmap-table td {
    padding: 0.625rem;
  }

  /* Lists responsive - Tablet */
  .problem-list li,
  .principle-list li,
  .foundation-list li,
  .fro-list li,
  .impact-list li {
    font-size: 0.8125rem;
  }

  .problem-icon {
    width: 14px;
    height: 14px;
  }

  .section-icon {
    width: 18px;
    height: 18px;
  }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
  .container {
    padding: 2.5rem 1.25rem;
  }

  body {
    font-size: 0.875rem;
  }

  h1 {
    font-size: 1rem;
  }

  .figure-caption {
    font-size: 0.7rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team-member {
    text-align: center;
  }

  .team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 0.75rem;
  }

  .team-name {
    font-size: 0.9rem;
  }

  .team-role {
    font-size: 0.75rem;
  }

  /* Partners responsive - Mobile */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .partner-logo {
    padding: 0.625rem;
    min-height: 60px;
  }

  .partner-logo img {
    max-height: 35px;
  }

  .partners-intro {
    font-size: 0.75rem;
  }

  .cta {
    padding: 1.25rem;
  }

  .cta p {
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .cta-button {
    font-size: 0.8rem;
    padding: 0.625rem 1rem;
  }

  /* Hero responsive - Mobile */
  .hero {
    padding: 1rem;
    margin-bottom: 1.75rem;
  }

  .vision {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .vision-tagline {
    font-size: 0.75rem;
  }

  /* Roadmap responsive - Mobile */
  .roadmap-table {
    font-size: 0.7rem;
  }

  .roadmap-table th,
  .roadmap-table td {
    padding: 0.5rem;
  }

  .roadmap-table th {
    font-size: 0.65rem;
  }

  /* Lists responsive - Mobile */
  .problem-list li,
  .principle-list li,
  .foundation-list li,
  .fro-list li,
  .impact-list li {
    font-size: 0.75rem;
    margin-bottom: 0.625rem;
  }

  .problem-list li {
    gap: 0.5rem;
  }

  .problem-icon {
    width: 12px;
    height: 12px;
  }

  .funding-highlight {
    font-size: 0.8rem;
    padding: 0.625rem 0.875rem;
  }

  .cta-title {
    font-size: 0.9rem;
  }

  .cta-funding {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .section-icon {
    width: 16px;
    height: 16px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
  color: var(--link-primary);
}

/* Tooltips */
.tooltip-trigger {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted rgba(244, 162, 97, 0.5);
  color: var(--text-primary);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tooltip-trigger:hover {
  border-bottom-color: var(--link-primary);
  color: var(--link-primary);
}

/* Don't override link styling when tooltip trigger is inside a link */
a .tooltip-trigger,
a.tooltip-trigger {
  color: inherit;
  border-bottom: none;
}

a .tooltip-trigger:hover,
a.tooltip-trigger:hover {
  color: inherit;
  border-bottom: none;
}

/* Ensure links inside tooltip triggers keep their styling */
.tooltip-trigger a,
.tooltip-trigger .link-highlight {
  color: var(--link-primary);
  border-bottom: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tooltip-trigger a:hover,
.tooltip-trigger .link-highlight:hover {
  color: var(--text-primary);
}

.tooltip {
  position: fixed;
  padding: 0.75rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 320px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tooltip.active {
  opacity: 1;
  pointer-events: auto;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-secondary);
}

.tooltip.tooltip-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--bg-secondary);
}

.tooltip-text {
  margin-bottom: 0.5rem;
}

.tooltip-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--link-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tooltip-link:hover {
  color: var(--text-primary);
}

/* FAQ Section */
.faq-list {
  margin-top: 1rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  padding: 1rem 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--link-primary);
}

.faq-question:focus {
  outline: none;
}

.faq-icon {
  flex-shrink: 0;
  margin-left: 1rem;
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition:
    transform 0.3s ease,
    color 0.2s ease;
}

.faq-question[aria-expanded='true'] .faq-icon {
  transform: rotate(45deg);
  color: var(--link-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 0;
}

.faq-answer.active {
  max-height: 1000px;
  padding-bottom: 1rem;
}

.faq-answer p {
  margin-bottom: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Responsive tooltips */
@media (max-width: 768px) {
  .tooltip {
    max-width: 280px;
    font-size: 0.75rem;
    padding: 0.625rem 0.875rem;
  }

  .faq-question {
    font-size: 0.8125rem;
    padding: 0.875rem 0;
  }

  .faq-answer p {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tooltip {
    max-width: 240px;
    font-size: 0.7rem;
    padding: 0.5rem 0.75rem;
  }

  .tooltip-trigger {
    border-bottom-width: 1px;
  }

  .faq-question {
    font-size: 0.75rem;
    padding: 0.75rem 0;
  }

  .faq-icon {
    font-size: 1.125rem;
    margin-left: 0.75rem;
  }

  .faq-answer p {
    font-size: 0.7rem;
  }
}
