/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  --bg: #0a0e16;
  --bg-elevated: #10161f;
  --bg-elevated-2: #161d29;
  --border: #202b3a;
  --border-soft: #182131;

  --text-primary: #eef2f6;
  --text-secondary: #8694a3;
  --text-tertiary: #566373;

  --accent: #5eead4;
  --accent-dim: #2c7a6f;
  --accent-warm: #f4a261;
  --danger: #f2836b;

  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1040px;
  --radius: 10px;
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #06110f;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

ul { list-style: none; margin: 0; padding: 0; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.nav__logo-at { color: var(--accent); }
.nav__logo-tail { color: var(--text-tertiary); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav__link:hover { color: var(--accent); }

.nav__link--cta {
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 7px 14px;
  border-radius: 6px;
}
.nav__link--cta:hover {
  background: rgba(94, 234, 212, 0.08);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 100px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 0%, transparent 75%);
  opacity: 0.55;
}

.hero__inner {
  position: relative;
  max-width: 760px;
  width: 100%;
  text-align: left;
}

.hero__code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--accent);
  min-height: 108px;
  margin-bottom: 10px;
  white-space: pre-wrap;
  line-height: 1.65;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  display: inline-block;
}

.hero__name {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 8px 0 20px;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(8px);
}
.hero__name.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero__role {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 28px;
}
.hero__role-accent {
  color: var(--text-primary);
}

.hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 999px;
}
.status-pill--muted { color: var(--text-tertiary); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.status-dot--live {
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(94, 234, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn--primary {
  background: var(--accent);
  color: #06110f;
}
.btn--primary:hover {
  background: #7ff2e0;
  transform: translateY(-1px);
}
.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn--ghost:hover {
  border-color: var(--accent-dim);
  background: var(--bg-elevated);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat__num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
}
.stat__label {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.hero__scroll span {
  width: 3px;
  height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDown 1.8s infinite;
}
@keyframes scrollDown {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ==========================================================================
   SECTIONS (generic)
   ========================================================================== */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 110px 24px;
}
.section--alt {
  max-width: none;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section--alt > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 10px;
}

.section__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 640px;
}

/* Centered title + block, used on Stack and Experiência sections */
#stack .section__title,
#experiencia .section__title,
#curriculo .section__title {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__intro {
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 620px;
  margin: 0 0 48px;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  margin-top: 40px;
}

.about__text p {
  color: var(--text-secondary);
  margin: 0 0 20px;
  font-size: 1.02rem;
}
.about__text strong { color: var(--text-primary); font-weight: 600; }

.about__facts {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.fact__value {
  font-size: 14.5px;
  color: var(--text-primary);
}

/* ==========================================================================
   STACK
   ========================================================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}

.stack-card {
  background: var(--bg);
  padding: 26px 22px;
}

.stack-card__dir {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 16px;
}

.stack-card__list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 9px;
}
.stack-card__list li:first-child { border-top: none; }

.tech-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stack-card__list svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.tech-icon--txt {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
  border-radius: 4px;
  width: 17px;
  height: 17px;
}

.stack-learning {
  margin: 36px auto 0;
  max-width: var(--container);
  padding: 18px 20px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 10px 14px;
  align-items: baseline;
}
.stack-learning__label {
  font-family: var(--font-mono);
  color: var(--accent-warm);
  font-size: 12.5px;
}
.stack-learning strong { color: var(--text-primary); }

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.project-card--restricted {
  background: repeating-linear-gradient(
    135deg,
    var(--bg-elevated),
    var(--bg-elevated) 12px,
    var(--bg-elevated-2) 12px,
    var(--bg-elevated-2) 13px
  );
}

.project-card__head {
  margin-bottom: 14px;
}

.project-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top left;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  filter: saturate(0.85);
  cursor: zoom-in;
  transition: filter 0.15s ease, border-color 0.15s ease;
}
.project-card__img:hover {
  filter: saturate(1);
  border-color: var(--accent-dim);
}

.access-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-block;
}
.access-badge--open {
  color: var(--accent);
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid var(--accent-dim);
}
.access-badge--restricted {
  color: var(--danger);
  background: rgba(242, 131, 107, 0.1);
  border: 1px solid rgba(242, 131, 107, 0.35);
}
.access-badge--progress {
  color: var(--accent-warm);
  background: rgba(244, 162, 97, 0.1);
  border: 1px solid rgba(244, 162, 97, 0.35);
}

.project-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.project-card__desc {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin: 0 0 18px;
  flex-grow: 1;
}
.project-card__desc strong { color: var(--text-primary); }

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.project-card__tags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  padding: 5px 10px 5px 8px;
  border-radius: 5px;
  line-height: 1;
}
.project-card__tags li svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.project-card__tags li .tech-icon--txt {
  font-size: 7px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.project-card__links {
  display: flex;
  gap: 18px;
}
.project-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.15s ease;
}
.project-link:hover { opacity: 0.75; }
.project-link--muted { color: var(--text-secondary); }

.project-card__note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* ==========================================================================
   TIMELINE
   ========================================================================== */
.timeline {
  margin-top: 40px;
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: 48px;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__marker {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline__period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  margin: 0 0 8px;
}
.timeline__role {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.timeline__org {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.timeline__desc {
  color: var(--text-secondary);
  font-size: 14.5px;
  max-width: 580px;
  margin: 0;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.section--contact {
  text-align: left;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 24px 40px;
  text-align: center;
}
.footer p {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin: 0;
}
.footer__code {
  display: inline-block;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.7;
}
.fc-kw { color: #f472b6; }
.fc-cls { color: #facc15; }
.fc-fn { color: #60a5fa; }
.fc-str { color: var(--accent); }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1150px) {
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 36px; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__link { padding: 10px 0; width: 100%; }
  .nav__link--cta { margin-top: 8px; }
  .nav__toggle { display: flex; }

  .hero { padding-top: 120px; }
  .section { padding: 80px 20px; }
  .stack-grid { grid-template-columns: 1fr; }
}
/* Centralizar o parágrafo do currículo */
#curriculo .section__intro {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Centralizar os botões do currículo */
#curriculo .contact-links {
  justify-content: center;
}
