@font-face {
  font-family: 'Bricolage Grotesque';
  src: url("bricolage-grotesque.woff2") format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url("inter.woff2") format('woff2');
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: #FFF; color: #1A1A1A; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #E8480A; text-decoration: none; transition: color 0.3s; }
a:hover { color: #1A1A1A; }

/* ---------- Scroll reveal ---------- */
/* CSS handles the animation itself; a ~10-line JS snippet (see bottom of
   the HTML) just adds .in when a .reveal element scrolls into view. */
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp 1.6s cubic-bezier(0.16,1,0.3,1) forwards; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; animation: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero-section { padding: 104px 24px 32px; }
.hero {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: min(74vh, 720px);
  display: flex;
  align-items: flex-end;
  background-color: #0f1720;
  background-size: cover;
  background-position: center;
}

/* Spline viewer sits behind hero content */
spline-viewer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,4,0.15) 0%, rgba(10,6,4,0.05) 45%, rgba(10,6,4,0.55) 100%); z-index: 1; }
.hero-title { position: relative; z-index: 2; }

/* Black rectangle to cover the Spline logo (responsive) */
.spline-logo-cover {
  position: absolute;
  bottom: clamp(10px, 2.4vw, 28px);
  right: clamp(10px, 2.4vw, 28px);
  width: 100%;
  height: 80px;
  background: rgba(0,0,0,0.92);
  z-index: 3;
  border-radius: 8px;
  pointer-events: none; /* don't block interactions */
  box-shadow: 0 8px 48px rgba(0,0,0,0.55);
  overflow: visible;
}

@media (max-width: 420px) {
  .spline-logo-cover { right: 12px; bottom: 10px; width: 72px; height: 36px; }
}

/* Soft blurred halo behind the cover to feather edges */
.spline-logo-cover::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: inherit;
  border-radius: inherit;
  filter: blur(10px);
  opacity: 0.85;
  z-index: 2; /* sit behind the solid cover but above the viewer */
  pointer-events: none;
}

/* Ensure the cover is visible on small screens where absolute positioning might clip inside the hero */
@media (max-width: 520px) {
  .spline-logo-cover {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    height: 80px;
    z-index: 3;
    box-shadow: none;
    border-radius: 0;
  }
  .spline-logo-cover::before { inset: 0; filter: blur(8px); opacity: 0.55; }
}

/* Disable hero reveal animation — show hero and overlay immediately */
.hero, .hero .hero-shade, .hero .hero-title, .spline-logo-cover {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,4,0.15) 0%, rgba(10,6,4,0.05) 45%, rgba(10,6,4,0.55) 100%); }
.hero-title {
  position: relative;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: #F5F3EF;
  max-width: 820px;
  margin: 0 44px 44px;
  z-index: 20;
}
.hero-emphasis { color: #E8480A; }

/* ---------- Shared ---------- */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #E8480A; }
.section { max-width: 1180px; margin: 0 auto; padding: 120px 48px; }
.section-light { color: #1A1A1A; background-color: #FFFFFF; }

/* ---------- Problem ---------- */
.problem-grid { display: grid; grid-template-columns: 0.85fr 1.4fr; gap: 80px; align-items: start; }
.problem-heading { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.18; letter-spacing: -0.015em; color: #1A1A1A; text-wrap: balance; }
.problem-copy { font-size: 19px; line-height: 1.6; color: #3a3a3a; margin-top: 28px; max-width: 640px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 56px; border-top: 1px solid rgba(26,26,26,0.12); }
.stat { padding: 32px 32px 32px 0; }
.stat + .stat { border-left: 1px solid rgba(26,26,26,0.12); padding: 32px 0 32px 32px; }
.stat-number { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: clamp(48px, 6vw, 76px); line-height: 1; letter-spacing: -0.03em; color: #1A1A1A; }
.stat-number--accent { color: #E8480A; }
.stat-label { font-size: 15px; color: #6a6560; margin-top: 12px; line-height: 1.5; }

/* ---------- Solution ---------- */
.solution-intro { max-width: 820px; }
.solution-heading { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin-top: 24px; color: #1A1A1A; text-wrap: balance; }
.solution-copy { font-size: 19px; line-height: 1.6; color: #6a6560; margin-top: 28px; max-width: 640px; }
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 72px; background: rgba(245,243,239,0.14); border: 1px solid rgba(245,243,239,0.14); }
.solution-card { background: #1A1A1A; padding: 44px 40px 52px; }
.solution-index { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 20px; color: #E8480A; }
.solution-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 28px; letter-spacing: -0.01em; margin-top: 20px; color: #F5F3EF; }
.solution-desc { font-size: 16px; line-height: 1.6; color: #a8a39c; margin-top: 14px; }

/* ---------- News ---------- */
.science-grid { display: grid; grid-template-columns: 0.85fr 1.4fr; gap: 80px; align-items: start; }
.science-note { font-size: 17px; line-height: 1.6; color: #6a6560; margin-top: 20px; }
.papers { border-top: 1px solid rgba(26,26,26,0.16); }
.paper-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 28px; align-items: baseline; padding: 28px 4px; border-bottom: 1px solid rgba(26,26,26,0.16); color: #1A1A1A; }
.paper-row:hover { background: rgba(232,72,10,0.04); }
.paper-year { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 15px; color: #E8480A; letter-spacing: 0.02em; }
.paper-title { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: clamp(19px, 2vw, 24px); line-height: 1.25; letter-spacing: -0.01em; color: #1A1A1A; }
.paper-source { display: block; font-size: 15px; color: #6a6560; margin-top: 6px; }
.paper-arrow { font-size: 0; color: #1A1A1A; align-self: center; }
.paper-arrow i { display: inline-flex; width: 18px; height: 18px; }
.paper-arrow i svg { width: 100%; height: 100%; display: block; }

.divider-wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }
.divider { height: 1px; background: rgba(26,26,26,0.12); }

/* ---------- Team ---------- */
.team-intro { max-width: 820px; margin-bottom: 72px; }
.team-heading { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -0.02em; margin-top: 24px; color: #1A1A1A; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 48px; }

@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Make the solution cards wrap on smaller screens */
@media (max-width: 900px) {
  .solution-grid { grid-template-columns: repeat(2, 1fr); }
  .solution-card { padding: 36px 28px 40px; }
}

@media (max-width: 520px) {
  .solution-grid { grid-template-columns: 1fr; }
  .solution-card { padding: 28px 20px 32px; }
}

@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr; }
}
.team-avatar { width: 96px; height: 96px; border-radius: 50%; background: #E7E3DC; border: 1px solid rgba(26,26,26,0.1); display: flex; align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 24px; color: #b3ada4; }
.team-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 22px; letter-spacing: -0.01em; margin-top: 24px; color: #1A1A1A; }
.team-role { font-size: 15px; font-weight: 600; color: #E8480A; margin-top: 6px; }
.team-note { font-size: 15px; line-height: 1.55; color: #6a6560; margin-top: 10px; }

/* Team card: make the whole profile clickable with a subtle outline on hover */
.team-card { position: relative; display: block; padding: 18px; border-radius: 10px; transition: transform 220ms cubic-bezier(0.16,1,0.3,1); cursor: default; text-decoration: none; color: inherit; }
.team-card:active { transform: translateY(-2px) scale(1.01); }

/* outline intentionally removed — cards remain non-clickable visually */

/* card actions (linkedin + read more) */
.card-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.card-actions a, .card-actions button { background: transparent; border: none; padding: 6px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.card-actions a:hover, .card-actions button:hover { background: rgba(26,26,26,0.04); }
.card-actions svg { display: block; }
.card-actions i { display: inline-flex; width: 12px; height: 12px; }
.card-actions i svg,
.card-linkedin i svg { width: 100%; height: 100%; display: block; }
.card-actions i + .team-more-label { margin-left: 8px; font-size: 14px; color: #1A1A1A; }
.card-linkedin i { width: 10px; height: 10px; }
.team-more { font-size: 14px; font-weight: 300; display: inline-flex; align-items: center; gap: 8px; }

/* Pill style for Read more + icon */
.card-actions .team-more {
  background: transparent;
  border: 1px solid rgba(26,26,26,0.08);
  padding: 6px 10px;
  border-radius: 4px;
  color: #1A1A1A;
  gap: 8px;
  transition: opacity 180ms ease, transform 120ms ease, border-color 180ms ease;
}
.card-actions .team-more:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  border-color: rgba(26,26,26,0.16);
}
.card-actions .team-more i { width: 12px; height: 12px; display: inline-flex; color: #1A1A1A; }
.card-actions .team-more .team-more-label { color: #1A1A1A; font-weight: 300; }

/* Modal */
.team-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 99999; }
.team-modal.open { display: flex; }
.team-modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,10,0.45); }
.team-modal-panel { position: relative; z-index: 2; background: #fff; width: min(720px, 94%); max-height: 86vh; overflow: auto; border-radius: 10px; padding: 28px; box-shadow: 0 20px 60px rgba(10,10,10,0.18); }
.team-modal-close { position: absolute; right: 12px; top: 12px; background: transparent; border: none; font-size: 20px; cursor: pointer; }
.team-modal-top { display: flex; gap: 18px; align-items: center; }
.team-modal-photo { width: 120px; height: 120px; border-radius: 999px; object-fit: cover; border: 1px solid rgba(26,26,26,0.06); }
.team-modal-meta { flex: 1; }
.team-modal-name { margin: 0; font-size: 20px; }
.team-modal-role { margin: 6px 0 0 0; color: #E8480A; font-weight: 600; }
.team-modal-linkedin { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-top: 12px; border-radius: 12px; background: rgba(26,26,26,0.04); color: #1A1A1A; text-decoration: none; }
.team-modal-linkedin:hover { background: rgba(26,26,26,0.08); }
.team-modal-linkedin svg { width: 18px; height: 18px; display: block; }
.team-modal-bio { margin-top: 16px; color: #6a6560; line-height: 1.75; }

@media (max-width: 520px) {
  .team-modal-top { flex-direction: column; align-items: flex-start; }
  .team-modal-photo { width: 100px; height: 100px; }
}

/* Avatar when using an img element */
.team-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(26,26,26,0.10); display: block; }

/* Ensure keyboard focus is visible when tabbing (kept accessible) */
.team-card:focus { outline: none; }
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 8px 12px; background: #1A1A1A; color: #fff; border-radius: 6px; z-index: 9999; text-decoration: none; }

/* Careers callout under team */
.team-callout { margin-top: 28px; padding: 16px 20px; border-left: 4px solid rgba(232,72,10,0.16); background: rgba(232,72,10,0.02); border-radius: 6px; color: #6a6560; font-size: 15px; }
.team-callout p { margin: 0; }
.team-callout a { color: #E8480A; font-weight: 600; }
.team-callout a:hover { color: #1A1A1A; }

/* subtle fade for the pseudo-element outline to match reveal timing */
.team-callout { opacity: 0; transform: translateY(8px); transition: opacity 420ms ease, transform 420ms cubic-bezier(0.16,1,0.3,1); }
.team-callout.in { opacity: 1; transform: translateY(0); }

/* ---------- Nav ---------- */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10010; display: flex; align-items: center; justify-content: space-between; padding: 22px 48px; backdrop-filter: blur(12px); background-color: #FFFFFF; }
.nav-logo { display: flex; align-items: center; position: relative; z-index: 10011; }
.nav-toggle { display: none; background: transparent; border: none; padding: 12px; margin-left: 12px; cursor: pointer; position: relative; width: 44px; height: 44px; z-index: 10012; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.navlink { position: relative; color: #1A1A1A; font-size: 15px; font-weight: 500; letter-spacing: 0.01em; transition: color 0.3s; }
.navlink::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: #E8480A; transform: scaleX(0); transform-origin: left; transition: transform 0.35s; }
.navlink:hover { color: #E8480A; }
.navlink:hover::after { transform: scaleX(1); }

/* Logo spin on hover/focus: fast spin then ease back to rest */
.nav-logo .logomark { display: block; transform-box: fill-box; transform-origin: center center; }
@keyframes logo-spin {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(720deg); }
  100% { transform: rotate(0deg); }
}
.nav-logo:hover .logomark,
.nav-logo:focus .logomark,
.nav-logo:focus-within .logomark { animation: logo-spin 900ms cubic-bezier(0.16,1,0.3,1) both; }

/* Mobile nav: hide links and show hamburger */
.nav-toggle { display: none; background: transparent; border: none; padding: 12px; margin-left: 12px; cursor: pointer; position: relative; width: 44px; height: 44px; }
.nav-toggle:focus-visible { outline: 2px solid #E8480A; outline-offset: 3px; }
.nav-toggle-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 24px;
  height: 2px;
  background: #1A1A1A;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  transition: background-color 0.3s ease;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: #1A1A1A;
  border-radius: 999px;
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}
.nav-toggle-icon::before { top: -8px; }
.nav-toggle-icon::after { top: 8px; }
.nav-toggle.open .nav-toggle-icon { background-color: transparent; }
.nav-toggle.open .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .site-nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; z-index: 10002; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100vw;
    min-height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 24px 24px;
    background: #FFFFFF;
    backdrop-filter: blur(20px);
    z-index: 10000;
    gap: 14px;
    overflow-y: auto;
  }
  body.nav-open .nav-links .navlink {
    width: 100%;
    padding: 18px 0;
    font-size: 18px;
    text-align: left;
    white-space: normal;
  }
}

/* Reduce site-nav horizontal padding on smaller screens to align with hero content */
@media (max-width: 520px) {
  .site-nav { padding: 18px 16px; }
  .nav-logo svg { width: 132px; height: auto; }
}

/* ---------- Contact ---------- */
.contact-row { display: flex; justify-content: space-between; }
.contact-heading { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 500; font-size: clamp(32px, 4vw, 64px); line-height: 1; letter-spacing: -0.03em; color: #1A1A1A; }
.contact-email { display: inline-block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 500; font-size: clamp(18px, 2.2vw, 28px); letter-spacing: -0.01em; color: #E8480A; margin-top: 32px; }
.contact-email:hover { color: #F5F3EF; }
.contact-footer { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-top: 120px; padding-top: 32px; border-top: 1px solid rgba(245,243,239,0.16); }
.copyright { font-size: 14px; color: #8a857e; }

/* Responsive adjustments for problem and news sections */
@media (max-width: 900px) {
  .problem-grid, .science-grid { grid-template-columns: 1fr; gap: 32px; }
  .problem-copy, .science-note { max-width: 100%; }
  .papers { padding-top: 12px; }
  .paper-row { grid-template-columns: 1fr; gap: 12px; align-items: start; grid-auto-rows: auto; }
  .paper-year { font-size: 14px; display: block; margin-bottom: 6px; }
  .paper-arrow { justify-self: end; }
}

@media (max-width: 520px) {
  .hero-section { padding: 84px 16px 24px; }
  .hero-title { margin: 0 20px 28px; font-size: clamp(20px, 6vw, 34px); }
  .team-grid { gap: 28px 20px; }
  .paper-row { align-items: start; }
}

/* Contact section tweaks for mobile */
#contact .section { padding: 72px 16px; }
#contact .contact-row { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
#contact .contact-block { max-width: 60%; }
#contact .contact-heading { margin: 0 0 8px 0; }
#contact .contact-copy { margin: 6px 0; color: #6a6560; }
#contact .contact-contacts { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; text-align: right; }
#contact .contact-divider { width: 100%; border: none; border-top: 1px solid rgba(26,26,26,0.08); margin: 12px 0; }

@media (max-width: 520px) {
  #contact .section { padding: 40px 16px; }
  #contact .contact-row { flex-direction: column; gap: 12px; align-items: stretch; }
  #contact .contact-block { max-width: 100%; }
  #contact .contact-contacts { align-items: flex-start; text-align: left; }
  .contact-heading { font-size: clamp(20px, 6vw, 28px); }
  .contact-email { font-size: 16px; }
}
