/* Studio Mansano — hero inspirado em portfólio minimal dark, acento próprio (menta) */
:root {
  --bg: #121212;
  --bg2: #1a1a1a;
  --surface: #222220;
  --fg: #f5f5f4;
  --muted: #b4b4b0;
  --accent: #2ee59d;
  --accent-glow: rgba(46, 229, 157, 0.22);
  --accent-dim: rgba(46, 229, 157, 0.12);
  --line: rgba(255, 255, 255, 0.1);
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-hero: "Bebas Neue", Impact, sans-serif;
  --header-h: 4.25rem;
  --progress-h: 3px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-dim);
  color: var(--fg);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: 0.02em;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Textura leve */
main {
  position: relative;
  z-index: 2;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Barra de progresso (scroll) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--progress-h);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.scroll-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #5ef5c0);
  box-shadow: 0 0 1rem var(--accent-glow);
  transition: width 0.12s linear;
}

/* E-mail vertical na lateral */
.side-email {
  position: fixed;
  left: 1.35rem;
  top: 50%;
  z-index: 90;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center center;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: rgba(245, 245, 244, 0.55);
  white-space: nowrap;
  transition: color 0.25s ease;
}
.side-email:hover {
  color: var(--accent);
}
.side-email:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
@media (max-width: 900px) {
  .side-email {
    display: none;
  }
}

/* Header */
.site-header {
  position: fixed;
  top: var(--progress-h);
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.88);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
@media (min-width: 768px) {
  .site-header {
    padding: 0 2rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 2px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--fg);
}

.brand-text {
  display: none;
  font-size: 0.95rem;
}
@media (min-width: 480px) {
  .brand-text {
    display: inline;
  }
}

.nav-main {
  display: none;
  gap: 1.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.nav-main a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-main a:hover {
  color: var(--color-white);
}
.nav-main a:hover::after {
  transform: scaleX(1);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--color-gray-400);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color 0.3s ease;
  font-weight: 500;
}

.lang-btn:hover {
  color: var(--color-white);
}

.lang-btn.is-active {
  color: var(--color-white);
  font-weight: 700;
  pointer-events: none;
}

.lang-sep {
  color: var(--color-gray-600);
  user-select: none;
}

@media (min-width: 900px) {
  .nav-main {
    display: flex;
  }
}

.menu-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.menu-fab:hover {
  border-color: rgba(46, 229, 157, 0.45);
  background: rgba(255, 255, 255, 0.03);
}
.menu-fab-lines {
  display: block;
  width: 1rem;
  height: 6px;
  background: linear-gradient(var(--fg), var(--fg)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--fg), var(--fg)) 0 100% / 70% 1px no-repeat;
  opacity: 0.9;
}
.menu-fab.is-active .menu-fab-lines {
  background: linear-gradient(var(--accent), var(--accent)) 50% 50% / 100% 1px no-repeat;
  transform: rotate(45deg);
  height: 1px;
  width: 0.85rem;
}
@media (min-width: 900px) {
  .menu-fab {
    display: none;
  }
}

/* Menu fullscreen — precisa rolar no mobile quando o conteúdo é alto */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(var(--header-h) + var(--progress-h) + 0.5rem);
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 12px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: rgba(10, 9, 8, 0.72);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  touch-action: pan-y;
}

.menu-overlay-inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 1.25rem;
  padding: 1.5rem 1.25rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--bg2), var(--bg));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
@media (min-width: 480px) {
  .menu-overlay-inner {
    margin-bottom: 2rem;
    padding: 2rem 1.5rem;
  }
}
.menu-overlay.is-open .menu-overlay-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.menu-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 480px) {
  .menu-overlay-head {
    margin-bottom: 2rem;
  }
}

.menu-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.menu-close {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.menu-close:hover {
  color: var(--fg);
  background: var(--accent-dim);
}

.menu-overlay-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.panel-link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 0.65rem 0;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.25s ease, transform 0.25s var(--ease);
}
.panel-link:hover {
  color: var(--fg);
  transform: translateX(6px);
}
@media (max-width: 479px) {
  .panel-link {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem);
    padding: 0.45rem 0;
  }
}

.menu-overlay-foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  padding-bottom: 0.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 480px) {
  .menu-overlay-foot {
    grid-template-columns: 1fr 1fr;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }
}

.menu-socials a {
  display: block;
  font-size: 0.95rem;
  color: var(--fg);
  margin-top: 0.35rem;
  opacity: 0.85;
}
.menu-socials a:hover {
  opacity: 1;
  color: var(--accent);
}

.menu-email {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--accent);
}

/* Hero — composição tipo referência: copy à esquerda, stats à direita, chevron no rodapé */
.hero-cinematic {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  padding: calc(var(--header-h) + var(--progress-h) + 2.5rem) 0 5rem;
  background:
    radial-gradient(ellipse 90% 60% at 80% 10%, var(--accent-dim), transparent 55%),
    var(--bg);
}

.hero-chevron {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  min-width: min(376px, 90vw);
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.hero-chevron-path {
  fill: transparent;
}

.hero-math-grid {
  margin-top: 150px;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  align-items: center;
  max-width: 1080px;
}
@media (min-width: 900px) {
  .hero-math-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(2rem, 6vw, 5rem);
    padding-left: 0.5rem;
  }
}
@media (min-width: 901px) {
  .hero-math-grid {
    padding-left: 2rem;
  }
}

.hero-massive {
  font-family: var(--font-hero);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.hero-massive-line {
  display: block;
  font-size: clamp(3.25rem, 11vw, 6.5rem);
}
.hero-massive-accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-lead-math {
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(245, 245, 244, 0.82);
}
.hero-lead-math strong {
  color: var(--fg);
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: 2rem;
}

.btn-hero-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.75rem;
  border-radius: 2px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: var(--font-hero);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease), filter 0.2s, box-shadow 0.25s;
}
.btn-hero-solid:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 28px var(--accent-glow);
}
.btn-hero-solid:active {
  transform: scale(0.98);
}

.hero-link-gh {
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.hero-link-gh:hover {
  color: var(--accent);
  border-color: rgba(46, 229, 157, 0.45);
}

.hero-math-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: right;
}
@media (max-width: 899px) {
  .hero-math-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
    gap: 1.5rem 2.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }
}
.stat-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stat-num {
  font-family: var(--font-hero);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-dim);
}
.stat-cap {
  font-size: 0.8rem;
  color: rgba(245, 245, 244, 0.65);
  max-width: 12rem;
}
@media (min-width: 900px) {
  .stat-cap {
    margin-left: auto;
  }
}

/* Botões genéricos (resto do site) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active {
  transform: scale(0.98);
}

.btn-solid {
  background: var(--accent);
  color: #0a0a0a;
  border: 1px solid transparent;
}
.btn-solid:hover {
  filter: brightness(1.06);
}

.btn-line {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn-line:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sections */
.section {
  padding: 5rem 0;
}
@media (min-width: 768px) {
  .section {
    padding: 6.5rem 0;
  }
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.75rem;
  margin-bottom: 3rem;
  align-items: start;
}
.section-index {
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 0.35rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.section-desc {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 28rem;
}

/* About */
.about-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .about-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
}

.about-pull {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--bg2);
}

.about-hi {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--fg);
}

.about-body p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Stack */
.stack-groups {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.stack-group {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg2);
}
.stack-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.stack-pill {
  font-size: 0.875rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--surface);
  transition: border-color 0.2s, color 0.2s;
}
.stack-pill:hover {
  border-color: rgba(46, 229, 157, 0.45);
  color: var(--accent);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.5;
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  margin-left: 0.1rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-role {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.25rem;
}
.timeline-company {
  font-size: 0.95rem;
  color: var(--muted);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg2);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 229, 157, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.project-card-link {
  display: block;
  height: 100%;
}

.project-card-media {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  overflow: hidden;
}
.project-card-media.is-empty {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 50%, var(--surface) 100%);
  position: relative;
}
.project-card-media.is-empty::after {
  content: "preview";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
}
.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.project-card:hover .project-card-media img {
  transform: scale(1.04);
}

.project-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
}
.project-card-num {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}
.project-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.project-card-title svg {
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.project-card:hover .project-card-title svg {
  opacity: 1;
  transform: translate(3px, -3px);
}
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.project-card-tags span {
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Footer */
.site-footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(18, 18, 18, 0.75));
}

.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.footer-lead {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-email {
  font-size: 1.05rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(46, 229, 157, 0.35);
  display: inline-block;
  padding-bottom: 0.1rem;
  transition: color 0.2s;
}
.footer-email:hover {
  color: #7af5c8;
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-name {
  color: var(--fg);
}
.footer-year::before {
  content: " · ";
}

/* Animação entrada */
.slide-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.slide-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-progress-fill {
    transition: none;
  }
  .slide-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .menu-overlay,
  .menu-overlay-inner,
  .project-card,
  .btn {
    transition: none !important;
  }
}
