/* Site layer over Nocturne (nocturne.css): the light theme, the bilingual switch, and the page
   layout. Colors, radii and shadows come from the system's tokens. */

:root {
  color-scheme: dark;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --text-soft: color-mix(in srgb, var(--color-text) 80%, transparent);
  --text-subtle: color-mix(in srgb, var(--color-text) 70%, transparent);
  --text-muted: color-mix(in srgb, var(--color-text) 55%, transparent);
  --fade-rule: linear-gradient(to right, transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}

:root[data-theme="light"] {
  color-scheme: light;
  --color-bg: #eef0f7;
  --color-surface: #f9fafd;
  --color-text: #1c1e2b;
  --color-divider: color-mix(in srgb, #1c1e2b 14%, transparent);
  --color-neutral-800: #dfe2ee;
  --color-neutral-100: #2a2d3c;
  --color-accent: #6a5cc4;
  --color-accent-400: #5647ad;
  --color-accent-300: #4a3d9c;
  --color-accent-800: #e3dffb;
  --color-accent-100: #2e2760;
  --shadow-sm: 0 0 0 1px #d5d8e6;
  --shadow-md: 0 0 0 1px #c3c7d9, 0 6px 18px rgba(28, 30, 43, 0.10);
}

/* Both languages live in the markup; the root's lang attribute picks which one shows. */
html[lang="pt-BR"] body [lang="en"],
html[lang="en"] body [lang="pt-BR"] {
  display: none !important;
}

html { scroll-behavior: smooth; }
main [id] { scroll-margin-top: 12px; }
a:hover { color: var(--color-accent-400); }
p, h2 { text-wrap: pretty; }

.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--font-mono); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: block; flex: none; }
.rule { max-width: 1040px; margin: 0 auto; }

.kicker {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--color-accent); margin: 0 0 14px;
}
.label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 4px;
}

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 45%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}

/* — header — */
.site-header {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding-block: 22px;
}
.monogram {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px;
  border: 1px solid var(--color-accent); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--color-accent); text-decoration: none;
}
.monogram--small { width: 26px; height: 26px; border-radius: 6px; font-size: 10px; letter-spacing: 0; }
.site-nav { display: flex; gap: 22px; margin-right: auto; font-size: 14px; }
.site-nav a { color: inherit; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--color-accent); }
.header-tools { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 12px;
}
.lang-switch button {
  background: transparent; border: 0; color: inherit; font: inherit;
  padding: 7px 11px; cursor: pointer;
}
.lang-switch button + button { border-left: 1px solid var(--color-divider); }
.lang-switch [aria-pressed="true"] { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.lang-switch button:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }

:root[data-theme="light"] .icon-sun,
:root:not([data-theme="light"]) .icon-moon { display: none; }
.menu-toggle { display: none; }

/* — hero — */
.hero { position: relative; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--color-divider) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-divider) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 28% 40%, rgba(0, 0, 0, 0.45), transparent 75%);
  mask-image: radial-gradient(ellipse 60% 90% at 28% 40%, rgba(0, 0, 0, 0.45), transparent 75%);
}
.hero-glow {
  position: absolute; left: -120px; top: -160px; width: 620px; height: 460px;
  border-radius: 50%; pointer-events: none; filter: blur(30px);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 48px; align-items: end;
  padding-block: 92px 84px;
  animation: fade-up 0.6s ease-out both;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--color-accent);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent);
  animation: pulse 2.2s ease-out infinite;
}
.hero-name { font-size: 42px; line-height: 1.1; margin: 26px 0 8px; }
.hero-role { font-family: var(--font-mono); font-size: 17px; color: var(--color-accent); margin: 0 0 18px; }
.hero-sub { font-size: 18px; line-height: 1.5; max-width: 620px; color: var(--text-soft); margin: 0 0 34px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.terminal-figure { min-width: 0; }
.terminal {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--color-surface); box-shadow: var(--shadow-sm); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--text-soft);
}
.terminal .dim { color: var(--text-muted); }
.terminal .ok { color: var(--color-accent); }
.terminal-figure figcaption { font-family: var(--font-mono); margin-top: 8px; }

/* — stance and skills — */
.stance { padding-block: 24px 72px; }
.stance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px; align-items: start;
}
.stance-copy { max-width: 560px; }
.stance-copy p { font-size: 16px; line-height: 1.6; margin: 0 0 16px; color: var(--text-soft); }
.stance-copy p:first-child { font-size: 19px; line-height: 1.5; color: inherit; }
.stance-copy p:last-child { margin: 0; }
.facts { margin: 0; padding-top: 6px; display: grid; gap: 18px; font-family: var(--font-mono); }
.facts dd { margin: 0; font-size: 15px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.skills .tag {
  font-family: var(--font-mono); font-size: 12px; padding: 5px 11px;
  border-color: color-mix(in srgb, var(--color-accent) 55%, transparent); color: var(--color-text);
}

/* — consulting band — the page's one saturated ground; it stays dark in both themes. */
.consulting {
  --section-text: #e9e9ed;
  --section-mark: #b5abfc;
  color: var(--section-text);
  background:
    radial-gradient(ellipse 50% 80% at 85% 50%, var(--color-section-glow), transparent 70%),
    var(--color-section);
}
.consulting-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px; align-items: start; padding-block: 72px;
}
.consulting .kicker { color: var(--section-mark); margin-bottom: 18px; }
.consulting h2 { font-size: 32px; line-height: 1.15; margin: 0 0 16px; }
.consulting-body {
  font-size: 16px; line-height: 1.55; max-width: 520px; margin: 0;
  color: color-mix(in srgb, var(--section-text) 82%, transparent);
}
.consulting-aside { padding-top: 38px; }
.band-label {
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px;
  color: color-mix(in srgb, var(--section-text) 60%, transparent);
}
.domains { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.domains li { display: flex; gap: 10px; align-items: baseline; }
.domains li::before {
  content: ""; flex: none; width: 14px; height: 1px;
  background: var(--section-mark); transform: translateY(-4px);
}
.consulting-email {
  font-family: var(--font-mono); font-size: 18px; text-decoration: none;
  color: var(--section-text); border-bottom: 1px solid var(--section-mark); padding-bottom: 2px;
}
.consulting-email:hover { color: var(--color-accent-300); }

/* — project cards — */
.card-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min, 260px), 1fr));
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-name { font-family: var(--font-mono); font-size: 16px; font-weight: 500; margin: 0; letter-spacing: 0; }
.status { font-size: 10px; padding: 2px 8px; white-space: nowrap; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.stack .tag { font-family: var(--font-mono); font-size: 11px; }

.featured { padding-block: 72px 88px; }
.featured-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.featured-head .kicker { margin: 0; }
.featured-head .btn { font-size: 13px; }
.preview-card { padding: 20px; gap: 10px; color: inherit; text-decoration: none; }
.preview-card:hover { color: inherit; box-shadow: var(--shadow-md); }
.preview-card p { font-size: 13.5px; line-height: 1.5; opacity: 0.78; margin: 0; }

.section { padding-block: 88px; }
.section-title { margin: 0 0 10px; }
.section-intro { font-size: 16px; color: var(--text-subtle); max-width: 560px; margin: 0 0 40px; }

.project-grid { --card-min: 290px; gap: 16px; }
.project-card { padding: 24px; gap: 14px; }
.project-card .card-name { font-size: 18px; }
.project-card p { font-size: 14px; line-height: 1.55; opacity: 0.82; margin: 0; flex: 1; }
.repo-link {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 4px; font-size: 13px; text-decoration: none;
}

.secondary-kicker { margin: 44px 0 14px; }
.project-card--small { padding: 18px; gap: 10px; }
.project-card--small .card-name { font-size: 15px; }
.project-card--small p { font-size: 13.5px; line-height: 1.5; opacity: 0.8; }
.project-card--small .stack .tag { font-size: 10.5px; }
.project-card--small .repo-link { margin-top: 0; font-size: 12px; gap: 4px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* — about — */
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px; align-items: start;
}
.about-copy { max-width: 560px; }
.about-copy h2 { margin: 0 0 22px; }
.about-copy p { font-size: 16px; line-height: 1.6; margin: 0 0 14px; }
.about-copy p:last-child { margin: 0; color: var(--text-soft); }
.about-list { margin: 0; }
.about-list > div { padding: 16px 0; background: var(--fade-rule) no-repeat bottom / 100% 1px; }
.about-list dt {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-accent); margin: 0 0 6px;
}
.about-list dd { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* — contact — */
.contact { padding-block: 88px 96px; }
.contact-list {
  display: grid; grid-template-columns: auto 1fr; column-gap: 28px; row-gap: 12px;
  max-width: 560px; margin: 0 0 40px; font-family: var(--font-mono); font-size: 15px;
}
.contact-list dt { margin: 0; padding-top: 4px; }
.contact-list dd { margin: 0; word-break: break-all; }
.contact-list a {
  color: var(--color-text); text-decoration: none;
  border-bottom: 1px solid var(--color-divider); padding-bottom: 1px;
}
.contact-list a.is-primary { border-bottom-color: var(--color-accent); }
.contact-list a:hover { color: var(--color-accent); }

/* — footer — */
.site-footer {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-block: 28px 40px; font-size: 13px; color: var(--text-muted);
  background: var(--fade-rule) no-repeat top / 100% 1px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--color-accent); }
.footer-meta { margin-right: auto; display: flex; flex-direction: column; gap: 2px; }
.footer-note { font-family: var(--font-mono); font-size: 11px; }

/* — mobile: hamburger menu, stacked CTAs, no terminal — */
@media (max-width: 760px) {
  .site-header { gap: 10px; padding-block: 16px; }
  .site-header > .monogram { margin-right: auto; }
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; order: 1; flex-basis: 100%; flex-direction: column; gap: 0; margin: 0;
  }
  .js .site-header.is-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 0; font-size: 15px; background: var(--fade-rule) no-repeat bottom / 100% 1px; }

  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-block: 36px 48px; }
  .hero-name { font-size: 30px; line-height: 1.12; margin-top: 20px; }
  .hero-role { font-size: 14px; margin-bottom: 14px; }
  .hero-sub { font-size: 15px; margin-bottom: 24px; }
  .cta-row .btn-primary { flex-basis: 100%; min-height: 44px; }
  .terminal-figure { display: none; }

  .consulting-inner { padding-block: 56px; }
  .consulting-aside { padding-top: 0; }
  .section, .featured { padding-block: 64px; }
  .contact { padding-block: 64px 72px; }
}
