/* ==========================================================================
   Anderson Alves — Portfólio (versão estática)
   Tokens, temas, layout e componentes — extraído do template DC
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --accent-base: #93aef0;
  --accent: var(--accent-base);
  --accent-ink: #0d1228;
  --accent-soft: color-mix(in oklab, var(--accent-base) 16%, transparent);
  --accent-dim: color-mix(in oklab, var(--accent-base) 36%, transparent);
  --bg: #121215;
  --surface: #1a1a1e;
  --surface-2: #222228;
  --raised: #1d1d22;
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(255,255,255,0.13);
  --border-strong: rgba(255,255,255,0.16);
  --text: #e8e7e3;
  --text-dim: #b0afaa;
  --muted: #8c8b84;
  --faint: #8b8a82;
  --nav-bg: rgba(18,18,21,0.84);
  --glow-soft: rgba(147,174,240,0.13);
  --iso-label: #9d9c94;
}
body[data-theme="light"] {
  --accent: color-mix(in oklab, var(--accent-base) 50%, #1a2a52);
  --accent-ink: #f6f8ff;
  --accent-soft: color-mix(in oklab, var(--accent-base) 18%, transparent);
  --accent-dim: color-mix(in oklab, var(--accent-base) 42%, transparent);
  --bg: #f8f7f3;
  --surface: #fefefd;
  --surface-2: #efede8;
  --raised: #f4f3ef;
  --border: rgba(20,20,15,0.09);
  --border-accent: rgba(20,20,15,0.14);
  --border-strong: rgba(20,20,15,0.22);
  --text: #1d1d1a;
  --text-dim: #4a4944;
  --muted: #63635b;
  --faint: #6e6d64;
  --nav-bg: rgba(248,247,243,0.87);
  --glow-soft: rgba(147,174,240,0.10);
  --iso-label: var(--muted);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }
@media (max-height: 740px) {
  #hero { padding-top: 48px !important; padding-bottom: 56px !important; }
}
body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  transition: background-color .35s ease, border-color .35s ease;
}
header, footer, section { transition: background-color .35s ease, border-color .35s ease; }
html.scrolled header { box-shadow: 0 10px 30px rgba(0,0,0,0.10); }
a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--text); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
::selection { background: var(--accent-soft); color: var(--text); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.mono { font-family: 'IBM Plex Mono', monospace; }
.container { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- Animações ---------- */
@keyframes pulse-ring { 0%,100% { opacity: 0.35; transform: scale(0.96); } 50% { opacity: 0.65; transform: scale(1.04); } }
@keyframes drop { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 78% { opacity: 0.9; } 100% { transform: translateY(244px); opacity: 0; } }
@keyframes cell-blink { 0%,100% { opacity: 0.18; } 50% { opacity: 0.55; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes layer-in { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
@keyframes cell-lit {
  0% { background: var(--surface-2); border-color: var(--border); }
  40% { background: var(--accent-soft); border-color: var(--accent-dim); }
  100% { background: var(--accent-soft); border-color: var(--accent-dim); }
}

@media (prefers-reduced-motion: no-preference) {
  html.js-motion [data-reveal] { opacity: 0; transform: translateY(22px); }
}
html.js-motion [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1); }
@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;
  }
  .iso-stage[data-focus="ui"] .iso-l4 i {
    background: var(--accent-soft);
    border-color: var(--accent-dim);
  }
  .iso-stage[data-focus="api"] .iso-l3 .ring { transform: none; opacity: 0.65; }
  .iso-stage[data-focus="api"] .iso-l3 .core { transform: none; }
}

/* ---------- Skip link / overlay ---------- */
.skip-link {
  position: fixed; top: -64px; left: 16px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  transition: top .15s;
}
.skip-link:focus { top: 16px; color: var(--accent-ink); }
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.04;
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22140%22 height=%22140%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.85%22 numOctaves=%222%22/%3E%3C/filter%3E%3Crect width=%22140%22 height=%22140%22 filter=%22url(%23n)%22/%3E%3C/svg%3E');
}

/* ---------- Header / navegação ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.scroll-progress {
  position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(var(--sp, 0));
  transform-origin: 0 50%; opacity: 0.75; pointer-events: none;
}
.nav { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 20px; }
.logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px;
  color: var(--text); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px;
}
.logo::before {
  content: ''; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 12px var(--glow-soft);
}
.nav-desktop { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--muted); font-size: 14px; font-weight: 500; position: relative; padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 1.5px no-repeat;
  transition: color .2s, background-size .28s cubic-bezier(.22,1,.36,1);
}
.nav-links a:hover { color: var(--text); background-size: 100% 1.5px; }
.nav-links a.active { color: var(--text); background-size: 100% 1.5px; }
.nav-sep { width: 1px; height: 18px; background: var(--border-accent); }

.lang-group { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.lang-btn {
  border: none; cursor: pointer; font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  padding: 4px 9px; border-radius: 6px; background: transparent; color: var(--muted);
  transition: background .2s, color .2s;
}
.lang-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.mobile-menu .lang-btn { font-size: 14px; padding: 8px 16px; }

.icon-btn {
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.theme-icon {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.btn {
  display: inline-block; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 8px;
  transition: filter .18s, box-shadow .18s, transform .25s cubic-bezier(.34,1.56,.64,1), border-color .18s, background .18s, color .18s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--accent-ink); transform: translateY(-1px); }

.nav-mobile-btns { display: none; align-items: center; gap: 8px; margin-left: auto; }
.nav-mobile-btns .icon-btn { width: 40px; height: 40px; }
.menu-btn { flex-direction: column; gap: 5px; }
.menu-btn span { width: 18px; height: 2px; background: var(--text); border-radius: 1px; display: block; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 12px 24px 28px; flex-direction: column; gap: 2px;
  animation: fade-up .25s ease both;
}
.mobile-menu.open { display: flex; }
.mobile-menu a.nav-item {
  color: var(--text); font-size: 17px; font-weight: 500; padding: 14px 4px;
  border-bottom: 1px solid var(--border); transition: color .2s;
}
.mobile-menu a.nav-item:hover { color: var(--accent); }
.mobile-menu a.nav-item.active { color: var(--accent); }
.mobile-menu-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.mobile-menu-row .btn { font-size: 15px; padding: 11px 20px; margin-left: auto; }

@media (max-width: 1023px) {
  .nav-desktop { display: none; }
  .nav-mobile-btns { display: flex; }
}

/* ---------- Hero ---------- */
#hero {
  display: flex; flex-wrap: wrap; gap: clamp(40px, 8vw, 80px); align-items: center;
  padding-top: clamp(56px, 7vh, 120px); padding-bottom: clamp(56px, 8vh, 100px);
}
.hero-text { flex: 1 1 500px; min-width: min(100%, 320px); }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--accent);
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 20px; font-weight: 500;
  animation: fade-up .55s cubic-bezier(.22,1,.36,1) .05s both;
}
h1 {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(36px, 5.6vw, 60px);
  line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 20px;
  text-wrap: pretty; animation: fade-up .6s cubic-bezier(.22,1,.36,1) .12s both;
}
@media (max-width: 480px) {
  h1 { line-height: 1.12; }
}
.hero-lead {
  font-size: clamp(17px, 2vw, 21px); line-height: 1.45; font-weight: 500; color: var(--text-dim);
  margin: 0 0 12px; max-width: 540px; text-wrap: pretty;
  animation: fade-up .6s cubic-bezier(.22,1,.36,1) .2s both;
}
.hero-support {
  font-size: 15.5px; line-height: 1.65; color: var(--muted); margin: 0 0 16px; max-width: 520px;
  text-wrap: pretty; animation: fade-up .6s cubic-bezier(.22,1,.36,1) .28s both;
}
.hero-location {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--accent);
  margin: 0 0 32px; display: flex; align-items: center; gap: 8px; opacity: 0.85;
  animation: fade-up .6s cubic-bezier(.22,1,.36,1) .36s both;
}
.hero-location::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--glow-soft);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; animation: fade-up .6s cubic-bezier(.22,1,.36,1) .46s both; }
.hero-facts {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; line-height: 1.5;
  color: var(--faint); max-width: 560px;
  animation: fade-up .6s cubic-bezier(.22,1,.36,1) .54s both;
}
/* Separador no item seguinte, nunca no anterior: numa quebra de linha
   ele vira marcador no início da linha em vez de ficar pendurado no fim. */
.hero-facts li { display: flex; align-items: center; gap: 14px; }
.hero-facts li:not(:first-child)::before { content: '·'; color: var(--accent-dim); }
.hero-ctas .btn { font-size: 15px; padding: 14px 28px; border-radius: 10px; }
.hero-ctas .btn-primary:hover { transform: translateY(-2px); }
.btn-outline { border: 1.5px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); transform: translateY(-2px); }
.btn-dashed { border: 1.5px dashed var(--border-strong); color: var(--muted); }
.btn-dashed:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Visual isométrico ---------- */
.iso-stage {
  flex: 1 1 340px; min-width: 280px; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.iso-wrap { width: 100%; display: flex; justify-content: center; perspective: 1000px; }
.iso { position: relative; width: min(100%, 360px); height: 420px; }
.iso-layer {
  position: absolute; left: 50%; width: 200px; height: 200px; margin-left: -100px;
  transform: rotateX(55deg) rotateZ(-45deg); border-radius: 16px;
  border: 1px solid var(--border-accent);
  box-shadow: 0 16px 36px rgba(0,0,0,0.16); box-sizing: border-box;
  transition: bottom .45s cubic-bezier(.22,1,.36,1), opacity .35s ease, border-color .3s ease, box-shadow .35s ease;
}
.iso-l1 { bottom: 10px; background: color-mix(in oklab, var(--raised) 78%, transparent); display: flex; flex-direction: column; gap: 10px; padding: 28px 24px; animation: layer-in .6s cubic-bezier(.22,1,.36,1) .5s backwards; }
.iso-l1 i { height: 12px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); transition: background .3s, border-color .3s; }
.iso-l1 i:nth-child(3) { width: 60%; }
.iso-l1 i:nth-child(4) { width: 40%; margin-top: 4px; background: var(--accent-soft); border-color: var(--accent-dim); }
.iso-l2 { bottom: 105px; background: color-mix(in oklab, var(--raised) 80%, transparent); display: flex; align-items: center; justify-content: center; gap: 16px; animation: layer-in .6s cubic-bezier(.22,1,.36,1) .62s backwards; }
.iso-l2 i { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-accent); transition: border-color .3s, box-shadow .3s, background .3s; }
.iso-l3 { bottom: 200px; border: 1.5px solid var(--accent); background: color-mix(in oklab, var(--raised) 82%, transparent); box-shadow: 0 18px 40px rgba(0,0,0,0.18), 0 0 28px var(--glow-soft); display: flex; align-items: center; justify-content: center; animation: layer-in .6s cubic-bezier(.22,1,.36,1) .74s backwards; }
.iso-l3 .ring { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--accent-dim); opacity: 0.35; position: absolute; animation: pulse-ring 4.2s ease-in-out infinite; transition: opacity .35s, transform .45s cubic-bezier(.22,1,.36,1); }
.iso-l3 .core { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; transition: box-shadow .35s, transform .35s; }
.iso-l3 .core i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow-soft); }
.iso-l4 { bottom: 295px; background: color-mix(in oklab, var(--raised) 76%, transparent); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 24px; animation: layer-in .6s cubic-bezier(.22,1,.36,1) .86s backwards; }
.iso-l4 i { border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); }
.iso-l4 i.blink { background: var(--accent-soft); border-color: var(--accent-dim); animation: cell-blink 3.8s ease-in-out infinite; }
.iso-beam { position: absolute; bottom: 296px; left: calc(50% - 1px); width: 1.5px; height: 250px; background: linear-gradient(to top, transparent, var(--accent-dim) 20%, var(--accent-dim) 80%, transparent); opacity: 0.3; animation: fade-in .6s ease 1s backwards; transition: opacity .35s; }
.iso-drop { position: absolute; bottom: 296px; left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: drop 3.4s linear infinite; opacity: 0.8; transition: opacity .35s; }
.iso-drop.d2 { animation-delay: 1.7s; }
.iso-label {
  position: absolute; right: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px;
  color: var(--iso-label); letter-spacing: 0.08em;
  transition: color .3s ease, opacity .3s ease, bottom .45s cubic-bezier(.22,1,.36,1);
}
.iso-label.l-api { color: var(--accent); }
.iso-stage[data-focus] .iso-label.l-api { color: var(--iso-label); }
.iso-stage[data-focus="api"] .l-api { color: var(--accent); }
.iso-label.l-ui { bottom: 388px; animation: fade-in .5s ease 1.18s backwards; }
.iso-label.l-api { bottom: 293px; animation: fade-in .5s ease 1.12s backwards; }
.iso-label.l-services { bottom: 198px; animation: fade-in .5s ease 1.06s backwards; }
.iso-label.l-data { bottom: 103px; animation: fade-in .5s ease 1s backwards; }

@media (prefers-reduced-motion: no-preference) {
  .iso-layer, .iso-label, .iso-beam, .iso-drop {
    transition: translate .32s ease-out, rotate .32s ease-out, bottom .45s cubic-bezier(.22,1,.36,1), opacity .35s ease, border-color .3s ease, box-shadow .35s ease, color .3s ease;
  }
}

/* Fan-out + focus reveal */
.iso-stage[data-focus] .iso-layer { opacity: 0.38; }
.iso-stage[data-focus] .iso-label { opacity: 0.35; }
.iso-stage[data-focus] .iso-beam,
.iso-stage[data-focus] .iso-drop { opacity: 0.12; }
.iso-stage[data-focus] .iso-l4 i.blink { animation-play-state: paused; }
.iso-stage[data-focus] .iso-l3 .ring { animation-play-state: paused; }

.iso-stage.iso-fan[data-focus="ui"] .iso-l4 {
  bottom: 318px; opacity: 1; border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(0,0,0,0.2), 0 0 32px var(--glow-soft);
}
.iso-stage.iso-fan[data-focus="ui"] .iso-l3 { bottom: 188px; }
.iso-stage.iso-fan[data-focus="ui"] .iso-l2 { bottom: 98px; }
.iso-stage.iso-fan[data-focus="ui"] .iso-l1 { bottom: 8px; }
.iso-stage.iso-fan[data-focus="ui"] .l-ui { bottom: 412px; }
.iso-stage.iso-fan[data-focus="ui"] .l-api { bottom: 281px; }
.iso-stage.iso-fan[data-focus="ui"] .l-services { bottom: 191px; }
.iso-stage.iso-fan[data-focus="ui"] .l-data { bottom: 101px; }

.iso-stage[data-focus="ui"] .iso-l4 {
  opacity: 1; border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(0,0,0,0.2), 0 0 32px var(--glow-soft);
}
.iso-stage[data-focus="ui"] .l-ui { opacity: 1; color: var(--accent); }
.iso-stage[data-focus="ui"] .iso-l4 i {
  animation: cell-lit .55s ease forwards;
}
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(1) { animation-delay: 0s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(2) { animation-delay: .05s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(3) { animation-delay: .1s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(4) { animation-delay: .15s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(5) { animation-delay: .2s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(6) { animation-delay: .25s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(7) { animation-delay: .3s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(8) { animation-delay: .35s; }
.iso-stage[data-focus="ui"] .iso-l4 i:nth-child(9) { animation-delay: .4s; }

.iso-stage.iso-fan[data-focus="api"] .iso-l3 { bottom: 218px; }
.iso-stage.iso-fan[data-focus="api"] .iso-l4 { bottom: 305px; }
.iso-stage.iso-fan[data-focus="api"] .iso-l2 { bottom: 92px; }
.iso-stage.iso-fan[data-focus="api"] .iso-l1 { bottom: 6px; }
.iso-stage.iso-fan[data-focus="api"] .l-api { bottom: 311px; }
.iso-stage.iso-fan[data-focus="api"] .l-ui { bottom: 398px; }
.iso-stage.iso-fan[data-focus="api"] .l-services { bottom: 185px; }
.iso-stage.iso-fan[data-focus="api"] .l-data { bottom: 99px; }

.iso-stage[data-focus="api"] .iso-l3 {
  opacity: 1; border-color: var(--accent);
  box-shadow: 0 22px 48px rgba(0,0,0,0.22), 0 0 40px var(--glow-soft);
}
.iso-stage[data-focus="api"] .l-api { opacity: 1; color: var(--accent); }
.iso-stage[data-focus="api"] .iso-l3 .ring {
  opacity: 0.75; transform: scale(1.22); animation: none;
}
.iso-stage[data-focus="api"] .iso-l3 .core {
  transform: scale(1.08); box-shadow: 0 0 20px var(--glow-soft);
}

.iso-stage.iso-fan[data-focus="services"] .iso-l2 { bottom: 122px; }
.iso-stage.iso-fan[data-focus="services"] .iso-l4 { bottom: 308px; }
.iso-stage.iso-fan[data-focus="services"] .iso-l3 { bottom: 208px; }
.iso-stage.iso-fan[data-focus="services"] .iso-l1 { bottom: 4px; }
.iso-stage.iso-fan[data-focus="services"] .l-services { bottom: 215px; }
.iso-stage.iso-fan[data-focus="services"] .l-ui { bottom: 401px; }
.iso-stage.iso-fan[data-focus="services"] .l-api { bottom: 301px; }
.iso-stage.iso-fan[data-focus="services"] .l-data { bottom: 97px; }

.iso-stage[data-focus="services"] .iso-l2 {
  opacity: 1; border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(0,0,0,0.2), 0 0 28px var(--glow-soft);
}
.iso-stage[data-focus="services"] .l-services { opacity: 1; color: var(--accent); }
.iso-stage[data-focus="services"] .iso-l2 i {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 12px var(--glow-soft);
}
.iso-stage[data-focus="services"] .iso-l2 i:nth-child(1) { transition-delay: 0s; }
.iso-stage[data-focus="services"] .iso-l2 i:nth-child(2) { transition-delay: .08s; }
.iso-stage[data-focus="services"] .iso-l2 i:nth-child(3) { transition-delay: .16s; }

.iso-stage.iso-fan[data-focus="data"] .iso-l1 { bottom: 28px; }
.iso-stage.iso-fan[data-focus="data"] .iso-l4 { bottom: 308px; }
.iso-stage.iso-fan[data-focus="data"] .iso-l3 { bottom: 210px; }
.iso-stage.iso-fan[data-focus="data"] .iso-l2 { bottom: 112px; }
.iso-stage.iso-fan[data-focus="data"] .l-data { bottom: 121px; }
.iso-stage.iso-fan[data-focus="data"] .l-ui { bottom: 401px; }
.iso-stage.iso-fan[data-focus="data"] .l-api { bottom: 303px; }
.iso-stage.iso-fan[data-focus="data"] .l-services { bottom: 205px; }

.iso-stage[data-focus="data"] .iso-l1 {
  opacity: 1; border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(0,0,0,0.2), 0 0 28px var(--glow-soft);
}
.iso-stage[data-focus="data"] .l-data { opacity: 1; color: var(--accent); }
.iso-stage[data-focus="data"] .iso-l1 i {
  background: var(--accent-soft); border-color: var(--accent-dim);
}

.iso-caption {
  margin: 0; min-height: 1.4em; max-width: 280px; text-align: center;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; line-height: 1.45;
  color: var(--muted); letter-spacing: 0.02em;
  transition: color .3s ease, opacity .3s ease;
}
.iso-stage[data-focus] .iso-caption { color: var(--text-dim); }

.iso-compact {
  display: none; flex: 0 0 auto; justify-content: center; align-items: center;
  margin: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: color-mix(in oklab, var(--raised) 88%, transparent); cursor: pointer;
  color: inherit; font: inherit; appearance: none; -webkit-appearance: none;
  transition: border-color .2s ease, background .2s ease;
  perspective: 400px;
}
.iso-compact:hover { border-color: var(--border-accent); background: var(--raised); }
.iso-compact-inner { position: relative; width: 200px; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; pointer-events: none; transform-style: preserve-3d; }
.iso-compact-ring {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  background: var(--raised); position: relative; z-index: 1;
  box-shadow:
    0 0 10px var(--glow-soft),
    0 2px 0 0 var(--border),
    0 4px 0 0 color-mix(in oklab, var(--border) 55%, transparent),
    0 6px 0 0 color-mix(in oklab, var(--border) 28%, transparent);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease, border-color .3s;
}
.iso-compact-ring i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--glow-soft); }
.iso-compact-line { width: 1px; height: 20px; background: linear-gradient(to bottom, var(--accent-dim), transparent); transition: opacity .3s ease; }
.iso-compact-labels { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 2px; }
.iso-compact-labels span {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--faint);
  transition: color .25s ease, opacity .25s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.iso-stage[data-focus] .iso-compact-labels span { opacity: 0.4; }
.iso-stage[data-focus="ui"] .iso-compact-labels [data-layer="ui"],
.iso-stage[data-focus="api"] .iso-compact-labels [data-layer="api"],
.iso-stage[data-focus="services"] .iso-compact-labels [data-layer="services"],
.iso-stage[data-focus="data"] .iso-compact-labels [data-layer="data"] {
  opacity: 1; color: var(--accent); transform: translateZ(6px) scale(1.12);
}

.iso-stage[data-focus] .iso-compact-ring {
  transform: translateZ(18px) scale(1.1);
  box-shadow:
    0 0 18px var(--glow-soft),
    0 3px 0 0 var(--accent),
    0 8px 0 0 color-mix(in oklab, var(--accent) 50%, transparent),
    0 14px 0 0 color-mix(in oklab, var(--accent) 22%, transparent);
}
.iso-stage[data-focus] .iso-compact-line { opacity: 0.45; }

/* Tablet: isométrico reduzido.
   Escalas discretas — `calc(<length> / <number>)` devolve length, e clamp() com
   tipos mistos é inválido no computed value, o que zerava a redução inteira. */
@media (max-width: 1023px) {
  #hero { gap: clamp(48px, 9vw, 72px); }
  .hero-ctas { margin-bottom: 12px; }
  .iso-stage {
    --iso-scale: 0.74;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    margin-top: clamp(28px, 6vw, 40px);
    padding-top: 8px;
  }
  .iso-wrap {
    display: flex;
    height: calc(420px * var(--iso-scale));
    overflow: visible;
  }
  .iso {
    transform: scale(var(--iso-scale));
    transform-origin: top center;
  }
  .iso-caption { max-width: min(100%, 280px); }
}

/* Mobile: o isométrico completo custa ~420px de hero sem ser hoverável.
   Entra a versão compacta, que cicla as camadas no toque. */
@media (max-width: 767px) {
  #hero { gap: clamp(36px, 8vw, 56px); }
  .iso-wrap { display: none; }
  .iso-compact { display: flex; }
  .iso-stage { margin-top: 0; padding-top: 0; gap: 14px; }
}

/* ---------- Seções ---------- */
section { border-top: 1px solid var(--border); }
section.alt { background: var(--raised); }
.section-pad { padding-top: clamp(56px, 7vh, 88px); padding-bottom: clamp(56px, 7vh, 88px); }
.section-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--accent);
  letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; font-weight: 500;
}
h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(26px, 3.8vw, 38px); letter-spacing: -0.02em; margin: 0 0 24px; text-wrap: pretty; }
main { position: relative; z-index: 2; outline: none; }

/* ---------- Sobre ---------- */
.about-box { max-width: 960px; }
.about-layout {
  display: grid;
  gap: 20px 48px;
  grid-template-areas:
    "title"
    "media"
    "copy";
  align-items: start;
}
.about-title { grid-area: title; margin-bottom: 0; }
.about-media { grid-area: media; }
.about-copy { grid-area: copy; min-width: 0; }
.about-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 14px;
  border: 1px solid var(--border-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  display: block;
}
body[data-theme="light"] .about-photo {
  box-shadow: 0 10px 28px rgba(20, 20, 15, 0.10);
}
.about-copy p.body { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 16px; text-wrap: pretty; }
.about-copy p.body:last-of-type { margin: 0; }
.about-langs { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--faint); margin: 20px 0 0; }

@media (min-width: 900px) {
  .about-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas:
      "media title"
      "media copy";
    column-gap: clamp(36px, 5vw, 56px);
    row-gap: 16px;
  }
  .about-media {
    position: sticky;
    top: 96px;
  }
  .about-photo {
    width: 280px;
    height: 280px;
  }
}

/* ---------- Experiência (timeline) ---------- */
.timeline { display: flex; flex-direction: column; max-width: 780px; }
.job { display: grid; grid-template-columns: 18px 1fr; gap: clamp(18px, 3.5vw, 36px); }
.job-rail { display: flex; flex-direction: column; align-items: center; }
.job-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--raised); flex-shrink: 0; margin-top: 7px; }
.job-line { width: 1px; flex: 1; background: var(--border-accent); min-height: 12px; }
.job:last-child .job-line { display: none; }
.job-body { padding-bottom: 48px; }
.job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 4px; }
.job-head h3 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.job-period { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--faint); }
.job-role { font-size: 14.5px; font-weight: 600; color: var(--accent); margin: 0 0 2px; }
.job-loc { font-size: 13px; color: var(--faint); margin: 0 0 16px; font-family: 'IBM Plex Mono', monospace; }
.job-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.job-card p { font-size: 14px; line-height: 1.65; color: var(--text-dim); margin: 0; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; }
.chip-lg { font-size: 12px; color: var(--text-dim); }

/* ---------- Projetos ---------- */
.proj-intro { font-size: 15px; color: var(--muted); margin: 0 0 36px; max-width: 640px; text-wrap: pretty; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 22px; }
.proj-card {
  background: var(--raised); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.proj-card:hover { border-color: var(--border-accent); box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.proj-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proj-cat { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--accent); margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.proj-badge { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--faint); border: 1px dashed var(--border-accent); padding: 3px 8px; border-radius: 5px; margin-left: auto; }
.proj-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.proj-blurb { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; text-wrap: pretty; }
.proj-result { font-size: 13px; line-height: 1.55; color: var(--text-dim); margin: 0; border-left: 2px solid var(--accent-dim); padding-left: 12px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.proj-links a {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--border-accent); padding: 8px 14px; border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  transition: border-color .18s, color .18s, background .18s;
}
.proj-links a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.case-details { border-top: 1px solid var(--border); padding-top: 14px; }
.case-details summary {
  cursor: pointer; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent);
  list-style: none; display: flex; align-items: center; gap: 8px; user-select: none;
}
.case-details summary::-webkit-details-marker { display: none; }
.case-details summary::before { content: '+'; font-size: 14px; transition: transform .2s; }
.case-details[open] summary::before { transform: rotate(45deg); }
.case-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.case-steps li { display: flex; align-items: baseline; gap: 12px; }
.step-num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent-dim); min-width: 20px; text-align: right; flex-shrink: 0; }
.case-steps strong { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 2px; }
.case-steps p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0; text-wrap: pretty; }

/* ---------- Tecnologias (stack strata) ---------- */
.stack-intro {
  font-size: 15px; color: var(--muted); margin: -8px 0 32px; max-width: 520px; text-wrap: pretty;
}
.stack-strata {
  display: flex; flex-direction: column; max-width: 820px;
  border-top: 1px solid var(--border);
}
.stack-row {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px 28px;
  padding: 22px 8px 22px 0; border-bottom: 1px solid var(--border);
  transition: background .2s ease;
}
.stack-row:hover,
.stack-row:focus-within {
  background: color-mix(in oklab, var(--accent-soft) 55%, transparent);
}
.stack-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.08em;
  color: var(--faint); padding-top: 3px; transition: color .2s ease;
}
.stack-row:hover .stack-label,
.stack-row:focus-within .stack-label { color: var(--accent); }
.stack-body h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 17px; margin: 0 0 4px; letter-spacing: -0.01em;
}
.stack-body p {
  font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0 0 12px; text-wrap: pretty;
}
.stack-row-cross {
  margin-top: 8px; padding-top: 26px;
  border-top: 1px dashed var(--border-accent);
  border-bottom: 1px solid var(--border);
}
.stack-row-cross + .stack-row-cross {
  margin-top: 0; padding-top: 22px;
  border-top: none;
}
.stack-row-cross:last-child { border-bottom: none; }
.stack-row-cross .stack-label { color: var(--accent); opacity: 0.85; }

@media (max-width: 560px) {
  .stack-row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .stack-label { padding-top: 0; }
}

/* ---------- Formação ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; max-width: 900px; }
.edu-card {
  background: var(--raised); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  transition: border-color .18s, transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
}
.edu-card:hover { border-color: var(--border-accent); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.10); }
.edu-brand {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
}
.edu-school {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--faint);
  letter-spacing: 0.04em; margin: 0;
}
.edu-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 16px; margin: 0 0 6px; letter-spacing: -0.01em; }
.edu-card .period { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--faint); margin: 0; }
.edu-card .edu-note {
  font-size: 13px; line-height: 1.55; color: var(--muted); margin: 12px 0 0; text-wrap: pretty;
}
.edu-card h3.certs { margin-bottom: 14px; }

/* ---------- Contato ---------- */
.contact-box { max-width: 760px; margin: 0 auto; padding-top: clamp(64px, 10vh, 120px); padding-bottom: clamp(64px, 10vh, 120px); text-align: center; }
.contact-box h2 { font-size: clamp(30px, 4.8vw, 44px); margin-bottom: 16px; }
.contact-body { font-size: 17px; line-height: 1.7; color: var(--muted); margin: 0 auto 36px; max-width: 500px; text-wrap: pretty; }
.contact-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-ctas .btn { font-size: 15px; padding: 14px 28px; border-radius: 10px; }
.contact-note { margin: 28px 0 0; }
.contact-note a { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--faint); }
.contact-note a:hover { color: var(--accent); }

@media (max-width: 480px) {
  .contact-ctas {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .contact-ctas .btn {
    width: 100%;
    max-width: 260px;
    font-size: 14px;
    padding: 12px 20px;
    text-align: center;
  }
}

/* ---------- Rodapé ---------- */
footer { border-top: 1px solid var(--border); position: relative; z-index: 2; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 30px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer-credit { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--faint); margin: 0; flex: 1; min-width: 200px; }
.footer-inner a, .footer-inner button.linklike {
  font-size: 13px; color: var(--muted); transition: color .18s;
  border: none; background: transparent; cursor: pointer; padding: 4px;
  font-family: inherit;
}
.footer-inner a:hover, .footer-inner button.linklike:hover { color: var(--text); }
.footer-inner button.linklike { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }

@media (max-width: 560px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 24px 16px;
  }
  .footer-credit {
    flex: none;
    min-width: 0;
    width: 100%;
    font-size: 12px;
  }
  .footer-inner a,
  .footer-inner button.linklike {
    font-size: 12px;
  }
}
