/* ============================================================
   BARJ CAPITAL — Public site
   Galaxy navy background + cream text. Single dark theme.
   ============================================================ */

:root {
  /* Palette — navy galaxy + cream */
  --cream:        #F4EFE6;
  --cream-soft:   #EBE5D8;
  --cream-deep:   #DDD4C2;

  --ink:          #0A0F1C;
  --ink-2:        #111827;
  --ink-3:        #1A2238;
  --navy:         #131A2E;
  --navy-soft:    #1E2742;
  --navy-line:    #2A3454;

  --star:         #6E7895;
  --star-bright:  #B7BDD0;
  --star-soft:    #4A5371;

  --rule:         rgba(244,239,230,0.08);
  --rule-strong:  rgba(244,239,230,0.18);

  --accent:       #C9A87A;

  /* Typography */
  --serif:        "Newsreader", "Tiempos Headline", "GT Sectra", Georgia, serif;
  --sans:         "Geist", "Inter", "Söhne", "ABC Diatype", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:         "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --gutter:       clamp(1.25rem, 3vw, 2.5rem);
  --col-narrow:   720px;
  --col-text:     880px;
  --col-wide:     1180px;

  /* Motion */
  --ease:         cubic-bezier(.2, .7, .2, 1);
  --dur-1:        .35s;
  --dur-2:        .8s;
  --dur-3:        1.4s;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(ellipse at 78% -10%, rgba(50,70,140,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 90%, rgba(30,40,90,0.14) 0%, transparent 55%),
    var(--ink);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--cream); color: var(--ink); }

/* ============================================================
   LAYOUT
   ============================================================ */

.container        { max-width: var(--col-wide);   margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container-narrow { max-width: var(--col-narrow); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container-text   { max-width: var(--col-text);   margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.page-pad-top    { padding-top: clamp(7rem, 14vh, 11rem); }
.page-pad-bottom { padding-bottom: clamp(6rem, 12vh, 10rem); }

.hairline { height: 1px; background: var(--rule); border: 0; margin: 3rem 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--star-bright);
  opacity: 0.85;
  font-weight: 500;
}

/* ============================================================
   NAV
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.5rem, 4vw, 3rem);
  background: rgba(10,15,28,0);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), backdrop-filter var(--dur-1) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: rgba(10, 15, 28, 0.84);
  border-bottom-color: var(--rule);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.005em;
  text-transform: lowercase;
}
.nav-brand img { height: 26px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
.nav-links a {
  position: relative;
  color: inherit;
  opacity: 0.7;
  transition: opacity .2s var(--ease);
  padding: 4px 0;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.is-active { opacity: 1; }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
}
.nav-links a.is-secondary {
  opacity: 0.4;
  font-size: 11px;
  letter-spacing: 0.07em;
}
.nav-links a.is-secondary:hover { opacity: 0.85; }

.nav-burger {
  display: none;
  background: none; border: 0; padding: 0;
  width: 28px; height: 18px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  color: inherit;
}
.nav-burger span {
  display: block;
  height: 1px;
  background: currentColor;
  width: 100%;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile-open .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.4rem;
    padding: 4rem 2rem;
    font-size: 1.4rem;
    z-index: 99;
  }
  .nav-mobile-open .nav-links a { opacity: 0.9; font-size: 1.5rem; font-family: var(--serif); }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(7rem, 14vh, 10rem) 0 clamp(4rem, 8vh, 6rem);
  overflow: hidden;
}

.hero-mark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  text-transform: lowercase;
  color: var(--cream);
}
.hero-mark em {
  font-style: italic;
  font-weight: 300;
  color: var(--cream-soft);
  opacity: 0.85;
}
.hero-sub {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--star-bright);
  margin-top: 2.2rem;
  opacity: 0.7;
}
.hero-meta {
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-soft);
  opacity: 0.78;
  text-shadow: 0 1px 6px rgba(5, 9, 21, 0.7);
  display: flex;
  gap: 2rem;
}

.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.starfield canvas { width: 100%; height: 100%; display: block; }

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ============================================================
   Hero cosmic — animated NASA Antennae Galaxies background
   ============================================================ */
.hero-cosmic {
  background: var(--night-deep, #050915);
}
.hero-cosmic-bg {
  position: absolute;
  inset: -8% -6%;            /* slight overscan so the Ken Burns zoom never reveals edges */
  z-index: 0;
  background-image: url("assets/photos/hero-cosmic.jpg");
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  transform-origin: 55% 45%;
  animation: cosmicDrift 50s ease-in-out infinite alternate;
  opacity: 0.55;             /* dim the raw image so it sits behind the content */
  pointer-events: none;
}
.hero-cosmic-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 65% at 25% 50%, rgba(5, 9, 21, 0.78) 0%, rgba(5, 9, 21, 0.10) 65%),
    linear-gradient(180deg, rgba(5, 9, 21, 0.75) 0%, rgba(5, 9, 21, 0.30) 30%, rgba(5, 9, 21, 0.30) 70%, rgba(5, 9, 21, 0.92) 100%),
    linear-gradient(90deg, rgba(5, 9, 21, 0.62) 0%, rgba(5, 9, 21, 0.10) 60%);
}

@keyframes cosmicDrift {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  50%  { transform: scale(1.06) translate3d(-1.2%, 0.8%, 0); }
  100% { transform: scale(1.10) translate3d(1.5%, -0.6%, 0); }
}

.hero-cosmic .starfield {
  z-index: 1;                /* on top of the bg, below the veil's far gradients */
  mix-blend-mode: screen;
  opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
  .hero-cosmic-bg { animation: none; transform: scale(1.02); }
  .hero-cosmic .starfield { opacity: 0.5; }
}

@media (max-width: 720px) {
  .hero-cosmic-bg { background-position: center 40%; }
}

/* ============================================================
   PROSE
   ============================================================ */

.prose {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
  line-height: 1.65;
  font-weight: 300;
  text-wrap: pretty;
  color: var(--cream);
}
.prose p { margin: 0 0 1.2rem; }
.prose strong { font-weight: 500; }
.prose em { font-style: italic; }
.prose blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.4;
  font-weight: 300;
  border-left: 1px solid var(--rule-strong);
  padding-left: 1.4rem;
  margin: 2rem 0;
}

.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  text-wrap: balance;
  color: var(--cream);
  text-transform: lowercase;
}

/* ============================================================
   RESEARCH ROWS
   ============================================================ */

.research-list { display: flex; flex-direction: column; }

.research-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 2.5rem;
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: padding-left .25s var(--ease), background .25s var(--ease);
}
.research-row:last-child { border-bottom: 1px solid var(--rule); }
.research-row:hover { padding-left: 0.5rem; }

.research-year {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--star);
  padding-top: 0.45rem;
}
.research-title {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  color: var(--cream);
}
.research-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--star-bright);
  opacity: 0.75;
  margin-bottom: 0.8rem;
}
.research-abstract {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 300;
  color: var(--cream-soft);
  opacity: 0.85;
  max-width: 64ch;
}
.research-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.research-links a {
  color: var(--cream);
  opacity: 0.75;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity .2s var(--ease);
}
.research-links a:hover { opacity: 1; }
.research-links .is-pending-link {
  color: var(--star);
  opacity: 0.55;
  font-style: italic;
  letter-spacing: 0.14em;
}
.research-arrow {
  align-self: center;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--star-bright);
  opacity: 0.4;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.research-row:hover .research-arrow { opacity: 0.85; transform: translateX(4px); }

.research-row.is-pending {
  cursor: default;
  opacity: 0.5;
}
.research-row.is-pending:hover { padding-left: 0; }
.research-row.is-pending .research-arrow { display: none; }

@media (max-width: 720px) {
  .research-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .research-arrow { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  margin-top: clamp(6rem, 14vh, 10rem);
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  line-height: 1.7;
  color: var(--cream);
  opacity: 0.62;
}
.site-footer .footer-disclaimer {
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 1.65;
  max-width: 78ch;
}
.site-footer .footer-disclaimer p { margin: 0 0 0.9rem; }
.site-footer .footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
}
.site-footer .footer-meta a { opacity: 0.75; }
.site-footer .footer-meta a:hover { opacity: 1; }
.site-footer .footer-credit {
  margin: 1.4rem 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  opacity: 0.55;
}

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  transition-delay: var(--delay, 0s);
}
.fade-up.is-in { opacity: 1; transform: none; }

.fade-in {
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
  transition-delay: var(--delay, 0s);
}
.fade-in.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   CONTACT — minimal centered
   ============================================================ */

.center-stack {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.email-hero {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.8rem;
  display: inline-block;
  color: var(--cream);
  text-transform: lowercase;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.5rem;
  color: var(--cream);
  text-transform: lowercase;
}
.about-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--star-bright);
  opacity: 0.7;
  margin-bottom: 2.5rem;
}
.about-portrait {
  width: 100%;
  aspect-ratio: 5/4;
  background:
    repeating-linear-gradient(45deg, rgba(244,239,230,0.04) 0 1px, transparent 1px 12px),
    var(--navy-soft);
  border: 1px solid var(--rule);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--star-bright);
  opacity: 0.55;
  margin-bottom: 2.5rem;
}

.about-credit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--star-bright);
  opacity: 0.78;
  line-height: 1.7;
}
.about-credit-list li::before {
  content: "—  ";
  color: var(--accent);
  opacity: 0.7;
}

/* ============================================================
   APPROACH
   ============================================================ */

.approach-prose {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  line-height: 1.55;
  text-wrap: pretty;
  color: var(--cream);
}
.approach-prose p { margin: 0 0 1.6rem; }
.approach-prose p:last-child { font-style: italic; opacity: 0.88; }

/* ============================================================
   LEGAL / PRIVACY
   ============================================================ */

.legal-prose {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--cream);
  opacity: 0.85;
}
.legal-prose h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.8rem;
  text-transform: lowercase;
  color: var(--cream);
  opacity: 1;
}
.legal-prose h2:first-of-type { margin-top: 0; }
.legal-prose p { margin: 0 0 1rem; max-width: 72ch; }
.legal-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  max-width: 72ch;
}
.legal-prose li { margin-bottom: 0.4rem; }
.legal-prose a { border-bottom: 1px solid var(--rule-strong); }
.legal-prose a:hover { opacity: 1; border-bottom-color: var(--cream); }
