/* =========================================
   ANDRES BARBOZA — SINGLE-CARD SITE
   Fixed underwater backdrop, one centered card per page.
   ========================================= */

:root {
  --baltic-blue: #2f6690;
  --cerulean: #3a7ca5;
  --alabaster-grey: #d9dcd6;
  --yale-blue: #16425b;
  --sky-blue-light: #81c3d7;

  --text-primary: var(--yale-blue);
  --text-secondary: var(--baltic-blue);
  --accent: var(--cerulean);
  --bg-secondary: rgba(217, 220, 214, 0.45);

  --radius-md: 16px;
  --shadow-sm: 0 2px 8px rgba(22, 66, 91, 0.10);
  --shadow-md: 0 8px 26px rgba(22, 66, 91, 0.18);
}

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

html {
  scroll-behavior: smooth;
  background-color: #0c2333;   /* dark fallback behind the fixed image */
}

body {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  min-height: 100vh;
}

/* Fixed full-page background (aquarium) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(22, 66, 91, 0.25), rgba(8, 28, 41, 0.55)),
    url('../img/background.jpg') center center / cover no-repeat;
}

h1, h2, h3, h4 {
  font-family: 'Crimson Pro', serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover { color: var(--baltic-blue); }

img { max-width: 100%; display: block; }

/* =========================================
   PAGE + CARD
   ========================================= */
.page {
  display: flex;
  min-height: 100vh;
  padding: 44px max(20px, env(safe-area-inset-right)) 44px max(20px, env(safe-area-inset-left));
}

.card {
  margin: auto;
  width: 100%;
  max-width: 720px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  padding: 44px 48px;
}

@media (max-width: 560px) {
  .page {
    align-items: flex-start;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  .card { margin: 0 auto; padding: 28px 22px; border-radius: 18px; }
}

/* =========================================
   TOP BAR (nav + socials)
   ========================================= */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(22, 66, 91, 0.10);
}

.card-nav {
  display: flex;
  gap: 22px;
}

.card-nav a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 3px;
}

.card-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.card-nav a:hover,
.card-nav a.active {
  color: var(--accent);
}

.card-nav a:hover::after,
.card-nav a.active::after { width: 100%; }

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: var(--bg-secondary);
  color: var(--cerulean);
}

.socials a:hover {
  background: var(--cerulean);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* =========================================
   HOME
   ========================================= */
.home { text-align: left; }

.home-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
}

.home-head.stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

/* Stacked: name/title first (full width), photo centered below. */
.home-head.stacked .home-titles { order: 1; }

.home .photo {
  flex: 0 0 auto;
  width: auto;
  height: 92px;          /* JS matches this to the name + title height */
  border-radius: 12px;
}

.home-head.stacked .photo {
  order: 2;
  align-self: center;
  height: 190px;
}

.home-titles {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.home-titles h1 {
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.home-titles .role {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 500;
}

/* JS adds .fit to keep the name and title on one line (shrinking the
   font, after moving the photo below, when they would not fit). */
.home-head.fit .home-titles h1,
.home-head.fit .home-titles .role {
  white-space: nowrap;
}

.home .bio {
  color: var(--text-secondary);
  font-size: 16.5px;
  margin: 0;
}

/* =========================================
   SIGNATURE
   ========================================= */
.signature {
  margin-top: 34px;
  text-align: center;
  font-family: 'Crimson Pro', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--baltic-blue);
}

/* =========================================
   RESEARCH
   ========================================= */
.kicker {
  display: block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.research h1 {
  font-size: clamp(30px, 5vw, 40px);
  margin-bottom: 8px;
}

.research .lead {
  color: var(--text-secondary);
  font-size: 16.5px;
  margin-bottom: 34px;
}

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

.pub { padding: 22px 0; }

.pub:first-child { padding-top: 0; }

.pub + .pub { border-top: 1px solid rgba(22, 66, 91, 0.12); }

.pub h3 {
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 7px;
}

.pub .authors {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pub .authors b { color: var(--text-primary); }

.pub .authors .eq {
  margin-left: 6px;
  font-style: italic;
  font-size: 13px;
  opacity: 0.8;
}

.pub .venue {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.pub .venue em { font-style: italic; }

.pub .desc {
  margin-top: 8px;
  font-size: 14.5px;
  font-style: italic;
  color: var(--text-secondary);
}

.status {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status.accepted { background: var(--sky-blue-light); color: var(--yale-blue); }
.status.prep { background: var(--bg-secondary); color: var(--text-secondary); }

.doi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.doi:hover { background: var(--baltic-blue); color: #fff; }

.scholar-line {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(22, 66, 91, 0.12);
  font-size: 14.5px;
}
