/* Estilo "terminal": papel claro + blocos escuros de código.
   Fonte única: JetBrains Mono (Google Fonts). */

:root {
  --bg-paper: #F6F5F1;
  --bg-card: #FFFFFF;
  --border-subtle: #E4E4E7;
  --text-primary: #121212;
  --text-secondary: #4B4B4F;
  --text-muted: #6B6B70;
  --accent: #15803D;

  --term-bg: #0E1013;
  --term-bar: #16191E;
  --term-border: #262A31;
  --term-text: #E5E7EB;
  --term-dim: #7C828D;
  --term-green: #4ADE80;
  --term-blue: #7DD3FC;
  --term-amber: #FCD34D;
  --term-pink: #F9A8D4;

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-paper); }
::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #121212; }

html {
  scroll-behavior: smooth;
  background-color: var(--bg-paper) !important;
  color: var(--text-primary) !important;
}

body {
  background-color: var(--bg-paper) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono);
  font-feature-settings: "calt" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

::selection { background: #121212; color: #FFFFFF; }
.term ::selection, .preview-term ::selection, .contact-dark ::selection,
.footer-dark ::selection, .statusbar ::selection { background: rgba(74, 222, 128, 0.35); color: #FFFFFF; }

/* Âncoras não ficam escondidas atrás do cabeçalho fixo */
section[id] { scroll-margin-top: 62px; }

/* Quebras de linha mais equilibradas */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Foco visível e consistente para quem navega pelo teclado */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.term :focus-visible, .contact-dark :focus-visible, .footer-dark :focus-visible { outline-color: var(--term-green); }
.term-input input:focus-visible { outline: 0; }

/* Acessibilidade: skip link */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}
.focus\:not-sr-only:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 100; width: auto; height: auto;
  padding: 0.75rem 1.5rem; margin: 0; overflow: visible; clip: auto; white-space: normal;
}

/* Header */
.header-swiss {
  background: rgba(246, 245, 241, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.25s ease;
}
.header-swiss.is-scrolled { box-shadow: 0 10px 24px -20px rgba(18, 18, 18, 0.45); }

/* Marca: o peixe (cauda > e corpo <>) com o olho verde, que é o cursor. */
.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1;
  color: var(--text-primary);
  white-space: nowrap;
}
/* Letras desenhadas: traço reto, cortes de 45° como o peixe, pingo do i verde */
.brand-word { display: inline-flex; align-items: center; height: 1.5em; }
.brand-word .wl {
  display: block;
  height: 1.5em;
  flex-shrink: 0;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: miter;
}
.brand-word .wl .wl-dot { fill: var(--accent); stroke: none; }
.brand-name .brand-path { margin-left: 0.3em; font-size: 0.82em; font-weight: 500; color: var(--text-muted); }
/* Letras de "edro " somem uma a uma, e o resto do nome desliza junto */
.brand-word .bc {
  display: inline-block;
  overflow: hidden;
  width: var(--w);
  transition: width 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
}
.brand-word .bc.is-gone { width: 0; opacity: 0; }
/* "xo" vira o peixe: as letras x e o dão lugar ao peixe verde, e o resto desliza junto */
.bxo { position: relative; display: inline-flex; width: var(--w0); transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.bxo-letters { display: flex; transition: opacity 0.25s ease; }
.brand-word .wl.bxo-fish { position: absolute; left: 0; top: 0; opacity: 0; stroke: var(--accent); }
.bxo-fish .bxo-eye { fill: var(--text-primary); stroke: none; }
.bxo.is-fish { width: var(--w1); }
.bxo.is-fish .bxo-letters { opacity: 0; }
.bxo.is-fish .wl.bxo-fish { opacity: 1; }

/* Peixe em voo: nasce no cursor do terminal e nada até o cabeçalho */
.fish-fly {
  position: fixed;
  z-index: 60;
  transform-origin: 0 0;
  color: #4ADE80;
  pointer-events: none;
  will-change: transform;
}
.fish-fly svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: miter; overflow: visible; }
.fish-fly-eye { position: absolute; background: #4ADE80; }

.nav-link-swiss {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-link-swiss::before { content: "./"; color: #8E8E96; transition: color 0.2s ease; }
.nav-link-swiss:hover, .nav-link-swiss.is-active { color: var(--text-primary); }
.nav-link-swiss:hover::before, .nav-link-swiss.is-active::before { color: var(--accent); }
.nav-link-swiss.is-active { font-weight: 600; }

/* Link "voltar" das páginas de case */
.back-link { font-size: 12.5px; font-weight: 500; color: var(--text-muted); transition: color 0.2s ease; }
.back-link:hover { color: var(--accent); }

/* Rótulos de seção no formato comentário */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
  display: block;
}

/* Botões */
.btn-swiss-primary {
  background-color: #121212 !important;
  color: #FFFFFF !important;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  border-radius: 6px;
  border: 1px solid #121212;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-swiss-primary:hover { opacity: 0.88; }
.btn-swiss-primary:active, .btn-swiss-secondary:active,
.btn-term-primary:active, .btn-term-secondary:active { transform: translateY(1px); }

/* Setas dos botões andam um pouco no hover */
.btn-swiss-primary svg, .btn-swiss-secondary svg, .btn-term-primary svg { transition: transform 0.2s ease; }
a:hover > .lucide-arrow-right { transform: translateX(3px); }
a:hover > .lucide-arrow-down { transform: translateY(3px); }
a:hover > .lucide-external-link { transform: translate(1px, -1px); }

.btn-swiss-secondary {
  background-color: #FFFFFF !important;
  color: #121212 !important;
  font-family: var(--font-mono);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  font-size: 12.5px;
  border-radius: 6px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.btn-swiss-secondary:hover { border-color: #121212; }

/* Cards */
.card-swiss {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.card-swiss:hover {
  border-color: #121212;
  box-shadow: 4px 4px 0 0 #121212;
}

/* Badges */
.badge-swiss {
  background-color: #F4F4F5 !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.01em;
}

/* ---------- Janela de terminal ---------- */
.term {
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: 10px;
  color: var(--term-text);
  box-shadow: 0 24px 48px -24px rgba(18, 18, 18, 0.45);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-border);
  font-size: 11.5px;
  color: var(--term-dim);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.term-dots i:nth-child(1) { background: #FF5F57; }
.term-dots i:nth-child(2) { background: #FEBC2E; }
.term-dots i:nth-child(3) { background: #28C840; }
.term-title { flex: 1; text-align: center; margin-right: 46px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.term-body { padding: 22px 22px 26px; font-size: 14px; line-height: 1.7; container-type: inline-size; }
@media (min-width: 640px) { .term-body { padding: 28px 30px 32px; font-size: 15px; } }

.term-line { white-space: pre-wrap; word-break: break-word; min-height: 1.7em; }
.term-prompt { color: var(--term-green); font-weight: 600; }
.term-path { color: var(--term-blue); }
.term-dim { color: var(--term-dim); }

.tok-obj { color: var(--term-text); }
.tok-fn { color: var(--term-blue); }
.tok-punc { color: var(--term-dim); }
.tok-str { color: var(--term-amber); }
.tok-key { color: var(--term-pink); }
.tok-num { color: var(--term-green); }

/* Nome como saída comum do console.log: discreto, sem banner nem brilho */
.term-banner {
  margin: 6px 0 14px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.5rem, 5.2vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  white-space: nowrap;
}
@supports (font-size: 1cqw) {
  .term-banner { font-size: min(2.25rem, 7.5cqw); }
}
.term-banner.is-hiding .bn-row:not(.is-on) { visibility: hidden; }

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--term-green);
  animation: blink 1.05s steps(1) infinite;
}
.term-banner .caret { width: 0.5em; height: 1em; margin-left: 0.15em; vertical-align: -0.14em; }
.caret.is-typing { animation: none; }
.caret[hidden] { display: none; }

@keyframes blink { 50% { opacity: 0; } }

/* Elementos que aparecem depois do "console.log" */
.js .reveal { opacity: 0; transform: translateY(6px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Foto (janela de visualizador) ---------- */
.photo-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 6px 6px 0 0 #121212;
}
.photo-frame .term-bar { background: #FAFAF9; border-bottom-color: var(--border-subtle); color: var(--text-muted); }
.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.photo-caption {
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* ---------- Bloco de código (Sobre) ---------- */
.code-block { font-size: 13px; line-height: 1.75; }
.code-block .ln { color: #4B5160; user-select: none; display: inline-block; width: 2.2em; text-align: right; margin-right: 1em; }
/* Linha longa que quebra continua recuada, alinhada depois do número */
.code-block .code-line { white-space: pre-wrap; padding-left: calc(3.2em + 4ch); text-indent: calc(-3.2em - 4ch); }
@media (max-width: 639px) { .code-block { font-size: 12px; } }

/* Preview dos cards em formato terminal */
.preview-term {
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: 8px;
  color: var(--term-text);
  font-size: 12px;
  line-height: 1.8;
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .js .reveal { transition: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Camada "espetáculo": REPL interativo, foto ASCII, barra de status,
   comandos digitados e revelações no scroll. Só vale na home.
   ===================================================================== */

/* ---------- Palco do hero: grade de pontos ---------- */
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, #CFCEC7 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, #000 10%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, #000 10%, transparent 78%);
  pointer-events: none;
}

.term-hero {
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.06),
    0 30px 60px -30px rgba(18, 18, 18, 0.6),
    0 0 90px -30px rgba(74, 222, 128, 0.35);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.term-hero:focus-within {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.25),
    0 30px 60px -30px rgba(18, 18, 18, 0.6),
    0 0 110px -24px rgba(74, 222, 128, 0.5);
}


/* ---------- REPL ---------- */
.term-log {
  position: relative;
  max-height: 10.2em;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2E333C transparent;
}
@media (min-width: 640px) { .term-log { max-height: 15.3em; } }
.term-log::-webkit-scrollbar { width: 4px; }
.term-log::-webkit-scrollbar-track { background: transparent; }
.term-log::-webkit-scrollbar-thumb { background: #2E333C; }
.term-log .term-line { animation: lineIn 0.22s ease-out both; }
@keyframes lineIn { from { opacity: 0; transform: translateY(3px); } }

.term-log a, .term-log .term-link {
  color: var(--term-blue);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.35);
  text-underline-offset: 3px;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.term-log a:hover, .term-log .term-link:hover { color: #fff; text-decoration-color: #fff; }
.term-err { color: #FCA5A5; }
.term-ok { color: var(--term-green); }
.term-echo { color: var(--term-text); }

.term-input {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin-top: 2px;
}
.term-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0;
  color: var(--term-text);
  font-family: var(--font-mono);
  font-size: 16px; /* evita zoom do iOS ao focar */
  line-height: 1.7;
  caret-color: var(--term-green);
}
@media (min-width: 640px) { .term-input input { font-size: 15px; } }
.term-input input::placeholder { color: #5F6675; }

.term-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 14px;
  font-size: 12px;
}
.term-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--term-blue);
  background: rgba(125, 211, 252, 0.07);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.term-chip:hover, .term-chip:focus-visible {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.5);
  color: var(--term-green);
  outline: 0;
}

/* ---------- Foto: ASCII que decodifica ---------- */
.photo-wrap { position: relative; background: var(--term-bg); overflow: hidden; }
.photo-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.7s cubic-bezier(0.65, 0.05, 0.3, 1);
}
.photo-wrap:not(.ascii-ready) canvas { visibility: hidden; }
.photo-wrap.decoded canvas { clip-path: inset(100% 0 0 0); }
.photo-scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--term-green);
  box-shadow: 0 0 14px 3px rgba(74, 222, 128, 0.75);
  opacity: 0;
  transition: top 1.7s cubic-bezier(0.65, 0.05, 0.3, 1), opacity 0.25s ease;
  pointer-events: none;
}
.photo-wrap.decoded .photo-scan { top: 100%; }
.photo-wrap.scanning .photo-scan { opacity: 1; }

.ascii-toggle {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ascii-toggle:hover { border-color: #121212; color: #121212; }
.ascii-toggle[aria-pressed="true"] { background: #121212; border-color: #121212; color: var(--term-green); }
.photo-frame .term-title { margin-right: 0; }

/* ---------- Comando digitado no topo de cada seção ---------- */
.cmdline {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.55em;
  min-height: 1.7em;
}
.cmd-prompt { color: var(--accent); font-weight: 700; }
.cmd-typed { display: inline-block; white-space: nowrap; overflow: hidden; }
.caret-sm { width: 0.5em; height: 1.05em; margin-left: -0.3em; vertical-align: -0.18em; background: var(--accent); }
.cmdline-dark { color: var(--term-text); }
.cmdline-dark .cmd-prompt { color: var(--term-green); }
.cmdline-dark .caret-sm, .footer-dark .caret-sm { background: var(--term-green); }

.js .cmdline .cmd-typed { width: 0; }
.js .cmdline.in-view .cmd-typed {
  animation: cmdType calc(var(--n, 12) * 55ms) steps(var(--n, 12)) 0.15s forwards;
}
@keyframes cmdType { to { width: calc(var(--n, 12) * 1ch); } }

/* ---------- Revelação no scroll ---------- */
.js .sr { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .sr.in-view { opacity: 1; transform: none; }
.js .cmdline.sr { transform: none; transition-duration: 0.2s; }

/* Linhas de código "impressas" uma a uma */
.js .sr-lines > * { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s ease, transform 0.3s ease; transition-delay: calc(var(--i, 0) * 95ms + 0.25s); }
.js .sr-lines.in-view > * { opacity: 1; transform: none; }

/* Cards */
.card-path { font-size: 11px; color: #85858D; letter-spacing: 0.01em; }
.card-path span { color: var(--accent); font-weight: 700; margin-right: 0.5em; }
.js .project-case-card.sr { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease; }
.project-case-card.in-view:hover { transform: translate(-2px, -2px); }

/* ---------- Contato e rodapé escuros ---------- */
.contact-dark {
  position: relative;
  background-color: var(--term-bg);
  background-image: radial-gradient(circle, #1E222A 1px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--term-text);
}
.contact-dark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 20% 50%, rgba(74, 222, 128, 0.09), transparent 70%);
  pointer-events: none;
}
.contact-dark > * { position: relative; z-index: 1; }

.btn-term-primary, .btn-term-secondary {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.btn-term-primary { background: var(--term-green); color: #052E16; border: 1px solid var(--term-green); }
.btn-term-primary:hover { box-shadow: 0 0 28px -4px rgba(74, 222, 128, 0.7); transform: translateY(-1px); }
.btn-term-secondary { background: transparent; color: var(--term-text); border: 1px solid var(--term-border); font-weight: 500; }
.btn-term-secondary:hover { border-color: var(--term-green); color: var(--term-green); }

.footer-dark { background: var(--term-bg); color: var(--term-dim); border-top: 1px solid var(--term-border); }

/* ---------- Barra de status ---------- */
.has-statusbar { padding-bottom: 28px; }
.statusbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: 28px;
  display: flex;
  align-items: stretch;
  background: #16191E;
  border-top: 1px solid var(--term-border);
  color: var(--term-dim);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.statusbar > span { display: flex; align-items: center; }
.sb-progress { position: absolute; left: 0; top: -2px; height: 2px; width: 100%; background: var(--term-green); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px rgba(74, 222, 128, 0.6); }
.sb-mode { padding: 0 12px; background: var(--term-green); color: #052E16; font-weight: 800; letter-spacing: 0.04em; transition: background 0.2s ease; }
.sb-mode.is-insert { background: var(--term-amber); color: #422006; }
.sb-seg { padding: 0 11px; gap: 5px; border-right: 1px solid var(--term-border); }
.sb-file { color: var(--term-text); border-right: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-spacer { flex: 1; }
.sb-hint, #sb-lang, .sb-hide-sm { border-right: 0; border-left: 1px solid var(--term-border); }
.sb-hint kbd { font-family: var(--font-mono); font-size: 10px; color: var(--term-text); border: 1px solid #3A3F49; border-radius: 3px; padding: 1px 5px; }
.sb-pos { padding: 0 12px; background: #262A31; color: var(--term-text); font-weight: 600; min-width: 4.6em; justify-content: center; }
@media (max-width: 639px) {
  .sb-hint, .sb-hide-sm { display: none !important; }
  .sb-seg { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .sr, .js .sr-lines > * { opacity: 1; transform: none; transition: none; }
  .js .cmdline .cmd-typed { width: auto; animation: none; }
  .photo-wrap canvas, .photo-scan { transition: none; }
  .term-log .term-line { animation: none; }
}

/* ---------- Artigos ---------- */
.article-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-subtle); }
.article-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 0.5rem 1.75rem;
  align-items: baseline;
  padding: 1.4rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  transition: background-color 0.2s ease;
}
.article-row:hover, .article-row:focus-visible { background: var(--bg-card); }
.article-row:hover .article-title, .article-row:focus-visible .article-title { color: var(--accent); }
.article-date, .article-meta { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.article-title { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.45; letter-spacing: -0.01em; transition: color 0.2s ease; }
.article-desc { display: block; margin-top: 0.4rem; font-size: 13.5px; line-height: 1.7; color: var(--text-secondary); }
@media (max-width: 639px) {
  .article-row { grid-template-columns: minmax(0, 1fr) auto; }
  .article-date { grid-column: 1 / -1; }
}

/* ---------- Projetos: explorador estilo IDE ---------- */
.ide {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 30px 60px -42px rgba(18, 18, 18, 0.45);
  font-family: var(--font-mono);
}
.ide-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 16px;
  background: var(--term-bar);
  color: var(--term-dim);
  font-size: 12px;
}
.ide-title { flex: 1; text-align: center; margin-right: 46px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ide-body { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.ide-tree { background: #F1F0EC; border-right: 1px solid var(--border-subtle); padding: 16px 10px; }
.ide-root, .ide-folder { margin: 0; padding: 5px 8px; font-size: 12px; color: #6B6B70; white-space: nowrap; }
.ide-folder { margin-top: 6px; padding-left: 20px; }
.ide-file {
  position: relative;
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px 7px 36px;
  border-radius: 6px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ide-file::before { content: "▸"; position: absolute; left: 22px; color: transparent; transition: color 0.15s ease; }
.ide-file:hover { background: rgba(18, 18, 18, 0.05); color: var(--text-primary); }
.ide-file[aria-selected="true"] { background: var(--bg-card); color: var(--text-primary); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.ide-file[aria-selected="true"]::before { color: var(--accent); }
.ide-file-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ide-file-meta { flex-shrink: 0; font-size: 11px; font-weight: 400; color: #8E8E96; }
.ide-panels { min-width: 0; }
.ide-panel { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 24px; }
.ide-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.js .ide.is-ready .ide-panel[hidden] { display: none; }
.ide-panel + .ide-panel { border-top: 1px solid var(--border-subtle); }
.js .ide.is-ready .ide-panel + .ide-panel { border-top: 0; }
.ide-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: start; }
.ide-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.ide-preview { border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; background: #FFFFFF; }
.ide-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: #FAFAF8;
  font-size: 11.5px;
  color: #6B6B70;
}
.ide-live { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.ide-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22C55E; animation: idePulse 1.8s ease-in-out infinite; }
@keyframes idePulse { 50% { opacity: 0.35; } }
.ide-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.ide-frame { position: relative; height: 440px; overflow: hidden; background: #F6F5F1; }
.ide-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; transform-origin: 0 0; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.ide-frame.is-loaded iframe { opacity: 1; }
.ide-frame-video { background: #0E1013; }
.ide-frame-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ide-frame.is-live iframe { pointer-events: auto; }
/* A demo só recebe cliques depois de um clique: assim a rolagem da página não fica presa dentro dela */
.ide-frame-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 18px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
}
.ide-frame-cover span {
  padding: 7px 12px;
  border-radius: 6px;
  background: rgba(14, 16, 19, 0.82);
  color: #E5E7EB;
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ide-frame-cover:hover span, .ide-frame-cover:focus-visible span { opacity: 1; transform: none; }
.ide-frame.is-live .ide-frame-cover { display: none; }
.ide-preview-term { border: 0; background: transparent; }
.ide-preview-term .preview-term { font-size: 13px; line-height: 1.9; }
@media (min-width: 1024px) {
  /* mesma altura da área de demo dos outros projetos, para a janela não pular ao trocar */
  .ide-preview-term .preview-term { min-height: 451px; display: flex; flex-direction: column; justify-content: center; padding-left: 40px; }
}
.ide-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 28px;
  padding: 0 14px;
  border-top: 1px solid var(--border-subtle);
  background: #F1F0EC;
  font-size: 11px;
  color: #6B6B70;
}
@media (max-width: 1023px) {
  .ide-body { grid-template-columns: minmax(0, 1fr); }
  .ide-tree { border-right: 0; border-bottom: 1px solid var(--border-subtle); padding: 8px; }
  .ide-root, .ide-folder { display: none; }
  .ide-files { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .ide-file { width: auto; padding: 8px 12px; white-space: nowrap; }
  .ide-file::before { display: none; }
  .ide-panel { padding: 22px 20px 24px; }
  .ide-info { grid-template-columns: minmax(0, 1fr); }
  .ide-actions { flex-direction: row; flex-wrap: wrap; }
  .ide-frame { height: 520px; }
  .ide-title { margin-right: 0; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  .ide-live::before { animation: none; }
}

/* Lista do que o Slash faz, dentro do painel do projeto */
.ide-features { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.ide-features li { position: relative; padding-left: 16px; }
.ide-features li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.ide-features b { color: var(--text-primary); font-weight: 600; }
@media (max-width: 767px) { .ide-features { grid-template-columns: minmax(0, 1fr); } }

/* Diagrama "como funciona" do Slash */
.ide-arch { border: 1px solid var(--border-subtle); border-radius: 10px; background: #FAFAF8; padding: 18px 20px 20px; }
.ide-arch-title { margin: 0 0 16px; font-size: 12.5px; color: var(--text-secondary); }
.arch-flow { display: flex; align-items: stretch; }
.arch-node {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}
.arch-node b { font-size: 12.5px; color: var(--text-primary); font-weight: 700; }
.arch-node svg { color: var(--accent); }
.arch-node-mcp { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.08); }
.arch-link { position: relative; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; }
.arch-link::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 1.5px dashed #C9C9CE; }
.arch-link::after { content: ""; position: absolute; right: 2px; top: calc(50% - 4px); border: 4px solid transparent; border-left: 6px solid #A1A1AA; border-right: 0; }
.arch-link-both::after { border-left-color: var(--accent); }
.arch-link span { position: relative; top: -14px; padding: 0 4px; background: #FAFAF8; font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.arch-dot {
  position: absolute;
  top: calc(50% - 3px);
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: archFlow 2.4s cubic-bezier(.45,0,.55,1) infinite;
}
.arch-link:nth-of-type(2) .arch-dot { animation-delay: .3s; }
.arch-link:nth-of-type(4) .arch-dot { animation-delay: .6s; }
.arch-link-both .arch-dot { animation-name: archBoth; animation-delay: .9s; }
.arch-link:nth-of-type(8) .arch-dot { animation-delay: 1.2s; }
@keyframes archFlow { 0% { left: 4px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
@keyframes archBoth { 0% { left: 4px; } 50% { left: calc(100% - 10px); } 100% { left: 4px; } }
.arch-side { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 11.5px; color: var(--text-muted); }
.arch-side svg { color: var(--accent); flex-shrink: 0; }
.arch-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.arch-notes b { font-size: 12.5px; color: var(--text-primary); }
.arch-notes p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--text-secondary); }
@media (max-width: 1023px) {
  .arch-flow { flex-direction: column; }
  .arch-link { flex: 0 0 38px; }
  .arch-link::before { left: 50%; right: auto; top: 4px; bottom: 4px; border-top: 0; border-left: 1.5px dashed #C9C9CE; }
  .arch-link::after { right: auto; left: calc(50% - 4px); top: auto; bottom: 2px; border: 4px solid transparent; border-top: 6px solid #A1A1AA; border-bottom: 0; }
  .arch-link-both::after { border-top-color: var(--accent); }
  .arch-link span { top: 0; left: 18px; position: relative; }
  .arch-dot { left: calc(50% - 3px); top: 4px; animation-name: archFlowV; }
  .arch-link-both .arch-dot { animation-name: archBothV; }
  .arch-notes { grid-template-columns: minmax(0, 1fr); }
}
@keyframes archFlowV { 0% { top: 4px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; } }
@keyframes archBothV { 0% { top: 4px; } 50% { top: calc(100% - 10px); } 100% { top: 4px; } }
@media (prefers-reduced-motion: reduce) { .arch-dot { animation: none; opacity: 0; } }
