/* =============================================================
   Bruno Silva — Site stylesheet
   ============================================================= */

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

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

::selection { background: var(--royal); color: var(--paper); }

/* Language visibility — driven by data-lang on <html> */
html[data-lang="en"] .pt { display: none !important; }
html[data-lang="pt"] .en { display: none !important; }

/* =============================================================
   Layout helpers
   ============================================================= */
.bs-container {
  max-width: var(--maxw-body);
  margin: 0 auto;
  padding: 0 var(--space-40);
  width: 100%;
}

/* =============================================================
   Nav
   ============================================================= */
.bs-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.bs-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: var(--space-24);
}
.bs-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.bs-nav__mono {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #0e2240 0%, #1a4590 100%);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  display: grid;
  place-items: center;
}
.bs-nav__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: var(--fg-1);
  white-space: nowrap;
}
.bs-nav__links {
  display: flex;
  gap: var(--space-32);
  flex: 1;
  justify-content: center;
}
.bs-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  padding: 6px 0;
  position: relative;
  transition: color var(--dur-base) var(--ease-out);
}
.bs-nav__link-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.bs-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--royal);
  transition: right var(--dur-base) var(--ease-out);
}
.bs-nav__link:hover,
.bs-nav__link.is-active { color: var(--royal); }
.bs-nav__link.is-active .bs-nav__link-idx { color: var(--royal); }
.bs-nav__link.is-active::after { right: 0; }

.bs-nav__right { display: flex; align-items: center; gap: 10px; }

/* Lang toggle */
.bs-lang {
  background: none; border: none; padding: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  cursor: pointer;
  transition: color var(--dur-base);
}
.bs-lang:hover { color: var(--fg-1); }
.bs-lang.is-active { color: var(--royal); }
.bs-lang__sep { color: var(--rule-strong); font-family: var(--font-mono); font-size: 11px; }

/* =============================================================
   Buttons
   ============================================================= */
.bs-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 18px;
  border: 1px solid;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}
.bs-btn:active { transform: translateY(1px); }

.bs-btn--primary { background: linear-gradient(135deg, #0e2240 0%, #1a4590 100%); border-color: #1a4590; color: #fff; }
.bs-btn--primary:hover { background: var(--electric-deep); border-color: var(--electric-deep); box-shadow: var(--shadow-cta); }

.bs-btn--ghost { background: transparent; border-color: var(--rule-strong); color: var(--fg-1); }
.bs-btn--ghost:hover { background: var(--mist); border-color: var(--fg-1); }

/* On dark surfaces */
.bs-btn--on-dark.bs-btn--primary { background: var(--electric); border-color: var(--electric); color: #fff; }
.bs-btn--on-dark.bs-btn--primary:hover { background: var(--electric-deep); border-color: var(--electric-deep); box-shadow: 0 24px 60px -24px rgba(45,107,255,0.55); }
.bs-btn--on-dark.bs-btn--ghost { border-color: rgba(255,255,255,0.18); color: #fff; }
.bs-btn--on-dark.bs-btn--ghost:hover { background: var(--navy-mid); border-color: var(--electric); }

/* =============================================================
   Eyebrow / section index
   ============================================================= */
.bs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--royal);
  font-weight: 500;
}
.bs-eyebrow__line { width: 18px; height: 1px; background: currentColor; display: inline-block; }
.bs-eyebrow--dark { color: var(--electric); }

.bs-section-index {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.bs-section-index--dark { color: var(--fg-on-dark-3); }
.bs-section-index__num { color: var(--royal); font-weight: 600; }
.bs-section-index--dark .bs-section-index__num { color: var(--electric); }

/* =============================================================
   Section wrapper
   ============================================================= */
.bs-section { padding: var(--space-120) 0; position: relative; }
.bs-section--md { padding: var(--space-96) 0; }
.bs-section--dark {
  background: linear-gradient(150deg, #0e2240 0%, #1c3a6a 100%);
  color: var(--fg-on-dark-1);
}
.bs-section--dark p { color: var(--fg-on-dark-2); }

.bs-section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  max-width: 820px;
  margin-bottom: var(--space-64);
}
.bs-section-header__top {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  flex-wrap: wrap;
}
.bs-section-header__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
}
.bs-section-header__title--dark { color: var(--fg-on-dark-1); }

.bs-lede {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg-2);
  font-weight: 400;
  margin: 0;
  max-width: 56ch;
  text-wrap: pretty;
}
.bs-lede--dark { color: var(--fg-on-dark-2); }

/* =============================================================
   Hero
   ============================================================= */
.bs-hero {
  position: relative;
  background: linear-gradient(145deg, #0e2240 0%, #1c3a5f 55%, #1a4590 100%);
  color: var(--fg-on-dark-1);
  overflow: hidden;
  padding: 140px 0 120px;
  isolation: isolate;
}
.bs-hero__dots {
  position: absolute; inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
}
.bs-hero__photo {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-height: 850px;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.bs-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  mask-image: linear-gradient(to left, rgba(0,0,0,0.8) 0%, transparent 85%),
              linear-gradient(to top, transparent 0%, #000 25%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.8) 0%, transparent 85%),
                      linear-gradient(to top, transparent 0%, #000 25%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}
.bs-hero__glow {
  position: absolute;
  right: -10%; top: 20%;
  width: 720px; height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,107,255,0.48) 0%, rgba(26,69,144,0.28) 35%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.bs-hero__inner { position: relative; z-index: 2; max-width: var(--maxw-hero); }
.bs-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  margin-bottom: var(--space-56);
  flex-wrap: wrap;
}
.bs-hero__avail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-on-dark-2);
  padding: 6px 12px;
  border: 1px solid var(--rule-dark);
  background: rgba(11, 15, 25, 0.6);
}
.bs-hero__avail-dot {
  width: 7px; height: 7px;
  background: #19D67A;
  box-shadow: 0 0 0 3px rgba(25, 214, 122, 0.18);
  border-radius: 50%;
}
.bs-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--paper);
  margin: 0;
}
.bs-hero__line { display: block; }
.bs-hero__line:nth-child(2) {
  background: linear-gradient(180deg, #FFFFFF 0%, #8FAEEB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bs-hero__role {
  margin-top: var(--space-32);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--electric);
  letter-spacing: -0.01em;
  max-width: 38ch;
}
.bs-hero__lede {
  margin-top: var(--space-20);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-on-dark-2);
  max-width: 56ch;
}
.bs-hero__actions {
  display: flex;
  gap: var(--space-16);
  margin-top: var(--space-40);
  flex-wrap: wrap;
}
.bs-hero__rail {
  margin-top: var(--space-96);
  padding-top: var(--space-32);
  border-top: 1px solid var(--rule-dark);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-40);
  max-width: 720px;
}
.bs-hero__rail-col { display: flex; flex-direction: column; gap: 6px; }
.bs-hero__rail-k {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--paper);
  letter-spacing: -0.02em;
}
.bs-hero__rail-v {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-on-dark-3);
}

/* =============================================================
   About + Experience combined
   ============================================================= */
.bs-about-combined {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-96);
  align-items: start;
}
.bs-about__body { display: flex; flex-direction: column; gap: var(--space-20); margin-top: var(--space-32); max-width: 56ch; }
.bs-about__body--wide { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-40) var(--space-64); }
.bs-about__body p { font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.bs-about__signature { margin-top: var(--space-40); border-top: 1px solid var(--rule); padding-top: var(--space-20); }
.bs-about__sig-name { font-family: var(--font-body); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.bs-about__sig-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin-top: 4px; }
.bs-section-header--wide { max-width: none; }

.bs-about__experience { display: flex; flex-direction: column; }
.bs-about__exp-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-bottom: var(--space-40);
}
.bs-about__exp-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
}

.bs-about__portrait { position: relative; display: flex; flex-direction: column; gap: var(--space-16); }
.bs-about__portrait-frame {
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--rule);
}
.bs-about__portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.85) contrast(1.02);
}
.bs-about__portrait-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(5,7,13,0.18) 100%);
  pointer-events: none;
}
.bs-about__portrait-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* =============================================================
   What I do — cards
   ============================================================= */
.bs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.bs-card {
  padding: var(--space-40) var(--space-32);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  background: var(--paper);
  transition: background var(--dur-base) var(--ease-out);
  position: relative;
}
.bs-card:hover { background: var(--mist); }
.bs-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: transparent;
  transition: background var(--dur-base) var(--ease-out);
}
.bs-card:hover::before { background: var(--royal); }
.bs-card__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--royal);
  font-weight: 500;
}
.bs-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--fg-1);
  margin: 0;
}
.bs-card__body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}

/* =============================================================
   Approach
   ============================================================= */
.bs-approach {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-96);
  align-items: start;
}
.bs-approach__diagram {
  background: var(--ink-2);
  padding: var(--space-32);
  border: 1px solid var(--rule-dark);
}
.bs-diagram { display: block; max-width: 100%; }

.bs-approach__steps { display: flex; flex-direction: column; gap: var(--space-32); }
.bs-approach__step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-24);
  align-items: start;
  padding-bottom: var(--space-24);
  border-bottom: 1px solid var(--rule-dark);
}
.bs-approach__step:last-child { border-bottom: none; }
.bs-approach__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--electric);
}
.bs-approach__k {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--paper);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.bs-approach__v {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-on-dark-2);
}

/* =============================================================
   Timeline
   ============================================================= */
.bs-timeline { display: flex; flex-direction: column; }
.bs-timeline__row {
  display: grid;
  grid-template-columns: 120px 24px 1fr;
  gap: var(--space-24);
  padding-bottom: var(--space-40);
}
.bs-timeline__years {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--royal);
  padding-top: 4px;
  font-weight: 500;
}
.bs-timeline__rail { display: flex; flex-direction: column; align-items: center; }
.bs-timeline__dot { width: 9px; height: 9px; background: var(--royal); flex-shrink: 0; margin-top: 6px; }
.bs-timeline__line { width: 1px; flex: 1; background: var(--rule); margin-top: 6px; }
.bs-timeline__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--fg-1);
  margin: 0;
}
.bs-timeline__org {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 6px;
}
.bs-timeline__body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-2);
  margin-top: var(--space-12);
  max-width: 60ch;
}

/* =============================================================
   Certifications
   ============================================================= */
.bs-certs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-64); }
.bs-certs__group { display: flex; flex-direction: column; }
.bs-certs__group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.bs-cert {
  display: grid;
  grid-template-columns: 80px 1fr auto 16px;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--rule);
  transition: background var(--dur-base), padding-left var(--dur-base);
}
.bs-cert--link { cursor: pointer; }
.bs-cert--link:hover { background: var(--mist); padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
.bs-cert__year   { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--royal); font-weight: 500; }
.bs-cert__title  { font-family: var(--font-body); font-weight: 600; font-size: 16px; color: var(--fg-1); letter-spacing: -0.005em; }
.bs-cert__issuer { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.bs-cert__ext    { color: var(--fg-3); display: inline-flex; }

/* =============================================================
   Contact
   ============================================================= */
.bs-contact__channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 0;
  max-width: 840px;
}

.bs-contact__side { display: flex; flex-direction: column; }
.bs-contact__channel {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px var(--space-16);
  padding: var(--space-20) 0;
  border-bottom: 1px solid var(--rule-dark);
  transition: padding-left var(--dur-base), background var(--dur-base);
  text-decoration: none;
}
.bs-contact__channel:hover { background: var(--ink-3); padding-left: 12px; }
.bs-contact__channel-icon {
  grid-row: 1 / 3;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--rule-dark);
  color: var(--electric);
}
.bs-contact__channel-l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-on-dark-3);
}
.bs-contact__channel-v {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--paper);
  letter-spacing: -0.005em;
}

/* =============================================================
   Footer
   ============================================================= */
.bs-footer {
  background: var(--ink);
  color: var(--fg-on-dark-2);
  padding: var(--space-40) 0;
  border-top: 1px solid var(--rule-dark);
}
.bs-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-32);
  flex-wrap: wrap;
}
.bs-footer__col { display: flex; flex-direction: column; gap: 6px; }
.bs-footer__brand { display: flex; align-items: center; gap: 10px; }
.bs-footer__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--paper); }
.bs-footer__sub  { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--fg-on-dark-3); margin: 0; }
.bs-footer__col--meta { text-align: right; }
.bs-footer__k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-on-dark-3); }
.bs-footer__v { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--paper); }

/* =============================================================
   Scroll-reveal animation
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--dur-slow) var(--ease-inout),
    transform var(--dur-slow) var(--ease-inout);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 980px) {
  .bs-container { padding: 0 var(--space-24); }
  .bs-nav__links { display: none; }
  .bs-section { padding: var(--space-96) 0; }
  .bs-section-header { margin-bottom: var(--space-40); }
  .bs-hero { padding: 100px 0 80px; }
  .bs-hero__rail { grid-template-columns: 1fr 1fr; gap: var(--space-24); margin-top: var(--space-64); }
  .bs-hero__photo { width: 55%; }
  .bs-about__body--wide { grid-template-columns: 1fr; }
  .bs-certs  { grid-template-columns: 1fr; gap: var(--space-40); }
  .bs-contact__channels { grid-template-columns: 1fr; }
  .bs-timeline__row { grid-template-columns: 96px 20px 1fr; gap: var(--space-16); }
  .bs-cert { grid-template-columns: 64px 1fr 16px; }
  .bs-cert__issuer { grid-column: 2; font-size: 10px; }
}
@media (max-width: 640px) {
  .bs-hero__title { font-size: 64px; }
  .bs-hero__rail { grid-template-columns: 1fr; }
  .bs-hero__photo { display: none; }
}
