/* ==========================================================================
   rodolfoluiz.dev
   ========================================================================== */

@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #08090b;
  --bg-2: #0c0d10;
  --panel: #0f1013;
  --panel-2: #14161a;
  --fg: #ededed;
  --fg-2: #a3a7ae;
  --fg-3: #6c717a;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --accent: #8b7bff;
  --accent-2: #5b8cff;
  --accent-soft: rgba(139, 123, 255, 0.14);
  --live: #3ddc84;

  --f-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --rail: 1320px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --nav-h: 68px;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-2);
  font: 400 16px/1.6 var(--f-body);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main, .footer { overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--fg); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }
strong { color: var(--fg); font-weight: 500; }
::selection { background: var(--accent); color: #0b0b12; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: 8px; font-weight: 500; }
.skip:focus { top: 12px; }

/* ---------- Rails & marcas de grade ---------- */
.rail { position: relative; max-width: var(--rail); margin: 0 auto; padding-inline: var(--gutter); }
.rail::before { content: ""; position: absolute; inset: 0; border-inline: 1px solid var(--line); pointer-events: none; }
.section > .rail::after {
  --c: var(--line-2);
  content: ""; position: absolute; top: -7px; left: -6px; right: -6px; height: 13px; pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) left 6px top 0 / 1px 13px no-repeat,
    linear-gradient(var(--c), var(--c)) left 0 top 6px / 13px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right 6px top 0 / 1px 13px no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 top 6px / 13px 1px no-repeat;
}
.cross { position: absolute; width: 11px; height: 11px; pointer-events: none; z-index: 2; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--line-2); }
.cross::before { left: 5px; top: 0; width: 1px; height: 11px; }
.cross::after { top: 5px; left: 0; height: 1px; width: 11px; }
.cross--tl { top: -6px; left: -6px; } .cross--tr { top: -6px; right: -6px; }
.cross--bl { bottom: -6px; left: -6px; } .cross--br { bottom: -6px; right: -6px; }

/* ---------- Tipos utilitários ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 11.5px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3);
}
.eyebrow__tick { width: 18px; height: 1px; background: var(--accent); }
.idx { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px;
  font: 400 11.5px/1 var(--f-mono); letter-spacing: 0.02em; color: var(--fg-2); background: rgba(255, 255, 255, 0.015);
}

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 6px;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); vertical-align: middle;
}
.badge--live { color: var(--live); border-color: rgba(61, 220, 132, 0.35); }
.badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--fg); font-size: 14.5px; font-weight: 500;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), color 0.25s;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }
.btn span { transition: transform 0.3s var(--ease); }
.btn:hover span { transform: translate(2px, 1px); }
.btn--primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--primary:hover { background: #fff; color: var(--bg); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }

/* ---------- Loader ---------- */
.loader { display: none; }
.has-loader .loader {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader__frame { position: relative; display: grid; place-items: center; width: 132px; height: 132px; border: 1px solid var(--line); }
.loader__count { font: 400 13px/1 var(--f-mono); letter-spacing: 0.2em; color: var(--fg); }
.loader__label { position: absolute; bottom: 32px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-3); }
.loader.is-done { opacity: 0; visibility: hidden; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  border-bottom: 1px solid transparent; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.is-scrolled { background: rgba(8, 9, 11, 0.72); border-color: var(--line); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.nav__inner { max-width: var(--rail); height: 100%; margin: 0 auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); }
.brand__mark {
  display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px;
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.06em; background: linear-gradient(135deg, rgba(139, 123, 255, 0.18), transparent 60%);
}
.brand__name { font-weight: 500; font-size: 15px; letter-spacing: -0.02em; }
.brand__name span { color: var(--fg-3); }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { position: relative; font-size: 14px; color: var(--fg-2); transition: color 0.2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); }
.nav__meta { display: flex; align-items: center; gap: 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.nav__toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; position: relative; }
.nav__toggle span[aria-hidden]::before, .nav__toggle span[aria-hidden]::after {
  content: ""; position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--fg); transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav__toggle span[aria-hidden]::before { top: 15px; }
.nav__toggle span[aria-hidden]::after { top: 23px; }
.nav__toggle[aria-expanded="true"] span[aria-hidden]::before { top: 19px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span[aria-hidden]::after { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; overflow: hidden; isolation: isolate; }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__vignette {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 72% 42%, rgba(139, 123, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 40%, transparent 40%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero__inner {
  width: 100%; padding-top: calc(var(--nav-h) + clamp(40px, 8vh, 96px));
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.8fr); grid-template-rows: 1fr auto;
  column-gap: clamp(32px, 5vw, 88px); align-items: center;
}
.hero__copy { max-width: 820px; }
.hero__title {
  margin: 26px 0 28px; font: 400 clamp(3.1rem, 7.4vw, 7.6rem)/0.94 var(--f-display); letter-spacing: -0.035em; color: var(--fg);
}
.hero__title em, .section__title em, .contact__title em {
  background: linear-gradient(100deg, #cfc8ff 0%, var(--accent) 45%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em;
}
.hero__lead { max-width: 560px; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.65; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.portrait { position: relative; margin: 0; justify-self: end; width: min(100%, 400px); transform-style: preserve-3d; transition: transform 0.6s var(--ease); }
.portrait__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); }
.portrait__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.18) brightness(0.92); }
.portrait__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 9, 11, 0.85), transparent 45%), linear-gradient(135deg, rgba(139, 123, 255, 0.28), rgba(91, 140, 255, 0.08) 60%, transparent);
  mix-blend-mode: normal;
}
.portrait__scan {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background: radial-gradient(circle, transparent 0 0.9px, rgba(8, 9, 11, 0.9) 1.5px) 0 0 / 5px 5px;
}
.portrait__scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22%; top: -22%;
  background: linear-gradient(to bottom, transparent, rgba(139, 123, 255, 0.25), transparent);
  animation: scan 5.5s var(--ease) infinite;
}
@keyframes scan { 0% { top: -22%; } 60%, 100% { top: 100%; } }
.portrait__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s var(--ease); }
.portrait.has-art .portrait__art { opacity: 1; }
.portrait.has-art .portrait__photo, .portrait.has-art .portrait__scan { opacity: 0; }
.portrait.has-art .portrait__media::after { opacity: 0.35; }
.portrait__cap {
  display: flex; justify-content: space-between; gap: 12px; padding-top: 12px;
  font: 500 10.5px/1.3 var(--f-mono); letter-spacing: 0.16em; color: var(--fg-3);
}

.hero__bar {
  grid-column: 1 / -1; align-self: end; margin: clamp(48px, 9vh, 96px) 0 0; padding: 18px 0 26px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 24px; border-top: 1px solid var(--line);
}
.hero__bar dt { font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 8px; }
.hero__bar dd { margin: 0; font: 400 13px/1.3 var(--f-mono); color: var(--fg-2); }
.hero__bar small { color: var(--fg-3); font-size: 11px; }
[data-clock] { color: var(--fg); font-variant-numeric: tabular-nums; }
.hero__scroll { text-align: right; }
.hero__scroll-line { display: inline-block; position: relative; width: 1px; height: 26px; background: var(--line-2); overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--fg); animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 48s linear infinite; }
.marquee span { font: 400 clamp(1.6rem, 3vw, 2.6rem)/1 var(--f-display); color: var(--fg-3); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--accent); font-size: 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Seções ---------- */
.section { position: relative; border-top: 1px solid var(--line); }
.section > .rail { padding-block: clamp(80px, 12vw, 160px); }
.marquee + .section { border-top: 0; }
.section__head { margin-bottom: clamp(44px, 6vw, 80px); }
.section--principles .section__head { margin-bottom: 28px; }
.section__head--split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px 64px; align-items: end; }
.section__title { margin-top: 22px; max-width: 18ch; font: 400 clamp(2.5rem, 5.4vw, 5.2rem)/1 var(--f-display); letter-spacing: -0.03em; }
#sobre .section__title { max-width: 22ch; }
.section__intro { max-width: 440px; font-size: 15.5px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); margin-bottom: clamp(40px, 5vw, 64px); }
.stat { padding: 28px 24px 28px 0; display: flex; flex-direction: column; gap: 10px; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat__n { font: 400 clamp(3rem, 5vw, 4.6rem)/0.9 var(--f-display); color: var(--fg); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat__l { font: 400 12px/1.4 var(--f-mono); letter-spacing: 0.04em; color: var(--fg-3); max-width: 24ch; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 24px; min-height: 360px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%), var(--bg-2);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(139, 123, 255, 0.13), transparent 60%);
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card__icon { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.card h3 { font-size: 19px; }
.card p { font-size: 14.5px; line-height: 1.6; flex: 1; }

/* ---------- Trajetória ---------- */
.story-art { position: relative; margin: 0 0 clamp(48px, 6vw, 88px); aspect-ratio: 8 / 3; border: 1px solid var(--line); overflow: hidden; background: var(--bg-2); }
.story-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s var(--ease); z-index: 1; }
.story-art.has-art img { opacity: 1; }
.story-art__fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2vw, 28px); padding: 0 6%;
  font: 400 clamp(1.4rem, 4.2vw, 4rem)/1 var(--f-display); color: var(--fg-3); letter-spacing: -0.02em;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 1.5px) 0 0 / 16px 16px,
    radial-gradient(ellipse 50% 70% at 50% 50%, rgba(139, 123, 255, 0.12), transparent 70%);
}
.story-art__fallback span:last-child { color: var(--fg); font-style: italic; }
.story-art__beam { position: relative; flex: 1; max-width: 220px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); overflow: hidden; }
.story-art__beam::after { content: ""; position: absolute; top: -1px; left: -30%; width: 30%; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); filter: blur(0.5px); animation: beam 2.8s linear infinite; }
.story-art__beam + span + .story-art__beam::after { animation-delay: 1.4s; }
@keyframes beam { to { left: 100%; } }

.story { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.story__aside { position: sticky; top: calc(var(--nav-h) + 40px); display: flex; flex-direction: column; gap: 12px; }
.story__year { font: 400 clamp(4.5rem, 9vw, 8.5rem)/0.85 var(--f-display); color: var(--fg); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.story__label { font: 500 11.5px/1.4 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); min-height: 2.8em; }
.story__progress { position: relative; height: 1px; max-width: 280px; background: var(--line-2); margin-top: 8px; }
.story__progress i { position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); transition: width 0.5s var(--ease); }
.story__ticks { display: flex; justify-content: space-between; max-width: 280px; font: 400 10.5px/1 var(--f-mono); color: var(--fg-3); letter-spacing: 0.06em; }

.timeline { display: flex; flex-direction: column; gap: 14px; }
.org { padding: 26px 26px 14px; border: 1px solid var(--line); background: var(--bg-2); transition: border-color 0.3s; }
.org.is-current { border-color: var(--line-2); }
.org__head { display: flex; align-items: center; gap: 16px; }
.org__logo { flex: none; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line-2); background: var(--panel-2); }
.org__logo--mono { display: grid; place-items: center; font: 500 13px/1 var(--f-mono); color: var(--fg); background: linear-gradient(135deg, rgba(139, 123, 255, 0.35), rgba(91, 140, 255, 0.1)); }
.org__name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.org__meta { font-size: 13px; color: var(--fg-3); margin-top: 3px; }
.roles { margin: 6px 0 0 23px; }
.role { position: relative; padding: 16px 0 12px 34px; }
.role::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 29px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-bottom-left-radius: 10px; }
.role:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 28px; bottom: 0; border-left: 1px solid var(--line-2); }
.role h4 { font-size: 15.5px; font-weight: 500; }
.role__meta { font: 400 12px/1.5 var(--f-mono); color: var(--fg-3); margin-top: 4px; letter-spacing: 0.02em; }
.role__desc { font-size: 14.5px; margin-top: 8px; max-width: 58ch; }

/* ---------- Projetos ---------- */
.cover {
  position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background-color: #0b0c0f; isolation: isolate;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.085) 1px, transparent 1.5px);
  background-size: 18px 18px;
}
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s var(--ease), transform 1.2s var(--ease); z-index: 1; }
.cover.has-art > img { opacity: 1; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: 0; transition: transform 1.2s var(--ease); }
.cover__label {
  position: absolute; left: 16px; bottom: 14px; z-index: 2; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 6px;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); background: rgba(8, 9, 11, 0.6); backdrop-filter: blur(6px);
}
.cover--city::before {
  background:
    radial-gradient(ellipse 45% 55% at 68% 38%, rgba(139, 123, 255, 0.35), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 72px 54px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 54px 72px,
    linear-gradient(28deg, transparent 49.6%, rgba(139, 123, 255, 0.55) 50%, transparent 50.4%);
}
.cover--nodes::before {
  background:
    radial-gradient(circle at 30% 40%, var(--accent) 0 4px, rgba(139, 123, 255, 0.25) 5px, transparent 40px),
    radial-gradient(circle at 68% 30%, #fff 0 3px, transparent 26px),
    radial-gradient(circle at 60% 70%, var(--accent-2) 0 3px, rgba(91, 140, 255, 0.2) 4px, transparent 34px),
    radial-gradient(circle at 82% 58%, #fff 0 2px, transparent 18px),
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(139, 123, 255, 0.16), transparent 70%);
}
.cover--stream::before {
  background:
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(255, 255, 255, 0.06) 13px 14px),
    linear-gradient(90deg, transparent 10%, rgba(139, 123, 255, 0.5) 45%, rgba(91, 140, 255, 0.1) 70%, transparent 90%) 0 50% / 100% 2px no-repeat,
    radial-gradient(ellipse 50% 40% at 45% 50%, rgba(139, 123, 255, 0.22), transparent 70%);
}
.cover--search::before {
  background:
    repeating-radial-gradient(circle at 58% 48%, transparent 0 22px, rgba(255, 255, 255, 0.07) 22px 23px),
    radial-gradient(circle at 58% 48%, rgba(139, 123, 255, 0.45) 0 6px, rgba(139, 123, 255, 0.12) 7px, transparent 120px);
}
.cover--bars::before {
  background:
    linear-gradient(to top, rgba(139, 123, 255, 0.55), rgba(139, 123, 255, 0.05)) 18% 100% / 7% 38% no-repeat,
    linear-gradient(to top, rgba(139, 123, 255, 0.45), rgba(139, 123, 255, 0.05)) 30% 100% / 7% 58% no-repeat,
    linear-gradient(to top, rgba(91, 140, 255, 0.5), rgba(91, 140, 255, 0.05)) 42% 100% / 7% 30% no-repeat,
    linear-gradient(to top, rgba(139, 123, 255, 0.6), rgba(139, 123, 255, 0.05)) 54% 100% / 7% 72% no-repeat,
    linear-gradient(to top, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.02)) 66% 100% / 7% 48% no-repeat,
    linear-gradient(to top, rgba(139, 123, 255, 0.5), rgba(139, 123, 255, 0.05)) 78% 100% / 7% 64% no-repeat;
}
.cover--map::before {
  background:
    repeating-radial-gradient(ellipse at 35% 60%, transparent 0 16px, rgba(255, 255, 255, 0.06) 16px 17px),
    repeating-radial-gradient(ellipse at 78% 25%, transparent 0 12px, rgba(139, 123, 255, 0.14) 12px 13px),
    radial-gradient(ellipse 30% 30% at 35% 60%, rgba(139, 123, 255, 0.25), transparent 70%);
}
.cover--shield::before {
  background:
    conic-gradient(from 200deg at 50% 55%, transparent 0 20%, rgba(139, 123, 255, 0.35) 30%, transparent 45%, rgba(91, 140, 255, 0.2) 70%, transparent 85%),
    radial-gradient(circle at 50% 55%, transparent 0 60px, rgba(255, 255, 255, 0.08) 61px 62px, transparent 63px 110px, rgba(255, 255, 255, 0.06) 111px 112px, transparent 113px);
}

.feature {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 16px;
}
.feature__cover { aspect-ratio: auto; min-height: 100%; border-right: 1px solid var(--line); }
.feature__cover:hover::before, .feature__cover:hover > img { transform: scale(1.03); }
.feature__body { padding: clamp(28px, 3.5vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.feature__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.feature__title { font: 400 clamp(2rem, 3.6vw, 3.2rem)/1 var(--f-display); letter-spacing: -0.03em; }
.feature__title a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.feature__body > p { font-size: 15.5px; }

.sub { display: flex; gap: 14px; margin-top: 10px; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--r); transition: border-color 0.3s, background 0.3s; }
.sub:hover { border-color: rgba(139, 123, 255, 0.55); background: var(--accent-soft); }
.sub__branch { flex: none; width: 16px; height: 22px; border-left: 1px solid var(--accent); border-bottom: 1px solid var(--accent); border-bottom-left-radius: 8px; margin-top: -4px; }
.sub__body { display: flex; flex-direction: column; gap: 6px; }
.sub__name { font: 500 13.5px/1.2 var(--f-mono); color: var(--fg); }
.sub__desc { font-size: 14px; }

.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--bg-2); transition: border-color 0.3s, transform 0.4s var(--ease); }
.project:hover { border-color: var(--line-2); transform: translateY(-3px); }
.project:hover .cover::before, .project:hover .cover > img { transform: scale(1.04); }
.project .cover { border-bottom: 1px solid var(--line); }
.project__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project__body h3 { font-size: 19px; }
.project__body p { font-size: 14.5px; flex: 1; }

/* ---------- Stack ---------- */
.stack { border-top: 1px solid var(--line); }
.stack__row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.stack__row h3 { font: 500 11.5px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.stack__row .chips li { font-size: 12.5px; padding: 7px 11px; }

.activity { margin-top: clamp(48px, 6vw, 80px); padding: 28px; border: 1px solid var(--line); background: var(--bg-2); }
.activity[hidden] { display: none; }
.activity__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 32px; flex-wrap: wrap; margin-bottom: 22px; }
.activity__head h3 { font-size: 17px; }
.activity__head p { font-size: 14px; }
.activity__scroll { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.activity__months { display: grid; grid-template-columns: repeat(53, minmax(11px, 1fr)); gap: 3px; margin-bottom: 8px; min-width: 740px; font: 400 10px/1 var(--f-mono); color: var(--fg-3); }
.activity__months span { white-space: nowrap; }
.activity__grid { display: grid; grid-template-rows: repeat(7, auto); grid-template-columns: repeat(53, minmax(11px, 1fr)); grid-auto-flow: column; gap: 3px; min-width: 740px; }
.activity__grid i { display: block; aspect-ratio: 1; border-radius: 3px; background: rgba(255, 255, 255, 0.045); }
.activity__legend i { display: block; width: 13px; height: 13px; border-radius: 3px; background: rgba(255, 255, 255, 0.045); }
.activity [data-l="1"] { background: rgba(139, 123, 255, 0.28); }
.activity [data-l="2"] { background: rgba(139, 123, 255, 0.5); }
.activity [data-l="3"] { background: rgba(139, 123, 255, 0.75); }
.activity [data-l="4"] { background: #b3a9ff; box-shadow: 0 0 8px rgba(139, 123, 255, 0.6); }
.activity__legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 14px; font: 400 10.5px/1 var(--f-mono); color: var(--fg-3); }
.activity__legend i { width: 11px; height: 11px; }

/* ---------- Princípios ---------- */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.principles li { display: flex; gap: 24px; padding: clamp(28px, 4vw, 48px) clamp(0px, 3vw, 40px) clamp(28px, 4vw, 48px) 0; border-bottom: 1px solid var(--line); }
.principles li:nth-child(even) { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.principles__n { font: 500 11.5px/2.6 var(--f-mono); letter-spacing: 0.12em; color: var(--accent); }
.principles p { font: 400 clamp(1.6rem, 2.7vw, 2.5rem)/1.12 var(--f-display); color: var(--fg); letter-spacing: -0.02em; }
.principles em { color: var(--fg-2); }

/* ---------- Contato ---------- */
.section--contact > .rail { padding-bottom: clamp(64px, 8vw, 120px); }
.contact__title { margin: 26px 0 clamp(40px, 6vw, 80px); font: 400 clamp(3.2rem, 10vw, 10rem)/0.9 var(--f-display); letter-spacing: -0.04em; }
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.contact__mail {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; text-align: left; padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line); background: radial-gradient(ellipse 80% 100% at 0% 100%, rgba(139, 123, 255, 0.16), transparent 60%), var(--bg-2);
  transition: border-color 0.3s;
}
.contact__mail:hover { border-color: rgba(139, 123, 255, 0.5); }
.contact__v { font: 400 clamp(1.7rem, 3.4vw, 3.2rem)/1.05 var(--f-display); color: var(--fg); letter-spacing: -0.02em; word-break: break-word; }
.contact__k { font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); }
.contact__hint { margin-top: auto; font: 400 11.5px/1 var(--f-mono); color: var(--accent); letter-spacing: 0.06em; }
.contact__links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact__link { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 22px 4px; border-bottom: 1px solid var(--line); color: var(--fg); font-size: 16px; transition: padding 0.3s var(--ease), color 0.2s; }
.contact__link:hover { padding-left: 12px; }
.contact__link > span:last-child { color: var(--fg-3); transition: transform 0.3s var(--ease), color 0.3s; }
.contact__link:hover > span:last-child { transform: translate(3px, -3px); color: var(--accent); }

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--line); overflow: hidden; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 26px; font: 400 12px/1.4 var(--f-mono); color: var(--fg-3); letter-spacing: 0.02em; }
.footer__inner a:hover { color: var(--fg); }
.footer__word {
  font: 400 clamp(5rem, 23vw, 22rem)/0.78 var(--f-display); letter-spacing: -0.05em; text-align: center; white-space: nowrap;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none; margin-bottom: -0.08em;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(20, 22, 26, 0.9); backdrop-filter: blur(10px);
  font: 400 12.5px/1 var(--f-mono); color: var(--fg); transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animações de entrada (só com JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.js [data-split].is-in .w > span { transform: none; }
.js [data-split] em .w > span {
  background: linear-gradient(100deg, #cfc8ff 0%, var(--accent) 50%, var(--accent-2) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.04em;
}
/* Se o JS falhar depois do boot, o loader some sozinho. */
.has-loader .loader { animation: loader-failsafe 0.6s 4s forwards; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 0; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status { display: none; }
}
@media (max-width: 900px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 20px;
    background: rgba(8, 9, 11, 0.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 16px 0; border-bottom: 1px solid var(--line); font: 400 1.9rem/1 var(--f-display); color: var(--fg); }
  .nav__links a.is-active::after { display: none; }
  .nav__meta { margin-left: auto; }
  .nav__toggle { display: block; }
  .nav.is-open { background: rgba(8, 9, 11, 0.96); border-color: var(--line); }

  .hero__inner { grid-template-columns: 1fr; row-gap: 48px; }
  .portrait { justify-self: start; width: min(100%, 340px); }
  .hero__bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__scroll { display: none; }
  .section__head--split { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; gap: 28px; }
  .story__aside { position: static; }
  .story__year { font-size: 4.5rem; }
  .feature { grid-template-columns: 1fr; }
  .feature__cover { aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .stack__row { grid-template-columns: 1fr; gap: 14px; }
  .principles { grid-template-columns: 1fr; }
  .principles li:nth-child(even) { padding-left: 0; border-left: 0; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .btn--sm { display: none; }
  .portrait { width: min(100%, 300px); }
  .hero__title { font-size: clamp(2.8rem, 13vw, 4rem); }
  .cards, .projects { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 22px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .story-art { aspect-ratio: 4 / 3; }
  .story-art.has-art { aspect-ratio: 8 / 3; }
  .story-art__fallback { flex-direction: column; gap: 14px; }
  .story-art__beam { flex: none; width: 1px; height: 28px; background: var(--line-2); }
  .story-art__beam::after { display: none; }
  .org { padding: 20px 18px 10px; }
  .roles { margin-left: 23px; }
  .role { padding-left: 28px; }
  .contact__link { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .contact__link .contact__k { grid-column: 1 / -1; }
  .activity { padding: 20px 16px; }
  .footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
}
