:root {
  --bg: #0b0c10;
  --panel: #12141b;
  --text: #e9ecf1;
  --muted: #b8bfcc;
  --stroke: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

  /* Accent palette by track */
  --accent-lq:  rgba(120,  80, 255, 0.85);  /* purple — Literatura Quântica  */
  --accent-tq:  rgba(  0, 220, 255, 0.85);  /* cyan   — Transformativo Quântico */
  --accent-lab: rgba(255, 160,  40, 0.85);  /* amber  — Laboratório Vivo     */

  --navbar-h: 52px;

  --radius: 16px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--navbar-h) + 12px); }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(120, 80, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(0, 220, 255, 0.14), transparent 50%),
    var(--bg);
  color: var(--text);
}

/* prevent scroll when mobile menu open */
body.menu-open { overflow: hidden; }

/* ── Skip link ───────────────────────────────────────────── */

a.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: rgba(18, 20, 27, 0.95);
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  z-index: 200;
}
a.skip:focus { left: 16px; }

a { color: inherit; }

/* ── Navbar ──────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
}

.navbar__inner {
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.navbar__brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

/* Desktop nav links */
.navbar__links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-1);
}

.navbar__link {
  display: block;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(184, 191, 204, 0.85);
  text-decoration: none;
  border-radius: 8px;
  transition: color 120ms ease, background 120ms ease;
  white-space: nowrap;
}

.navbar__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.navbar__link:focus-visible {
  outline: 2px solid rgba(0, 220, 255, 0.65);
  outline-offset: 2px;
}

/* Hamburger button */
.navbar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(18, 20, 27, 0.6);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.navbar__toggle:focus-visible {
  outline: 2px solid rgba(0, 220, 255, 0.65);
  outline-offset: 2px;
}

.navbar__toggle-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
}

/* Show/hide icons based on state */
.navbar__toggle-icon--close { display: none; }

.navbar__toggle[aria-expanded="true"] .navbar__toggle-icon--open  { display: none; }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-icon--close { display: block; }

/* Mobile menu panel */
.navbar__mobile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  transition: max-height 220ms ease;
  border-top: 0 solid var(--stroke);
}

.navbar__mobile[aria-hidden="false"] {
  max-height: 400px;
  border-top-width: 1px;
}

.navbar__mobile-links {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
}

.navbar__mobile-link {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(184, 191, 204, 0.9);
  text-decoration: none;
  transition: color 120ms ease, background 120ms ease;
}

.navbar__mobile-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.navbar__mobile-link:focus-visible {
  outline: 2px solid rgba(0, 220, 255, 0.65);
  outline-offset: -2px;
}

/* ── Container / Header ──────────────────────────────────── */

.container {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  padding: var(--space-5) 0 var(--space-4);
}

.brand {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.brand__logo {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stroke);
}

.brand__logo img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  margin: 0;
  letter-spacing: 0.12em;
  font-size: 18px;
}

.brand__tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

/* ── Main content ────────────────────────────────────────── */

.main { padding-bottom: var(--space-5); }

/* ── Intro ───────────────────────────────────────────────── */

.intro {
  margin: 0 0 var(--space-5);
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(18, 20, 27, 0.65);
}

.intro__lead {
  margin: 0;
  line-height: 1.45;
  font-size: 14px;
}

.quicklinks {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.quicklinks__link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(18, 20, 27, 0.55);
  text-decoration: none;
  color: rgba(233, 236, 241, 0.9);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.quicklinks__link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(18, 20, 27, 0.75);
}

.quicklinks__link:focus-visible {
  outline: 2px solid rgba(0, 220, 255, 0.65);
  outline-offset: 3px;
}

.quicklinks__link svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ── Groups ──────────────────────────────────────────────── */

.group { margin-bottom: var(--space-5); }

.group__title {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group__lead {
  margin: 0 0 var(--space-3);
  color: rgba(184, 191, 204, 0.92);
  font-size: 13.5px;
  line-height: 1.4;
}

/* ── Split / Subgroup ────────────────────────────────────── */

.split {
  display: grid;
  gap: var(--space-5);
}

.subgroup { min-width: 0; }

.subgroup__title {
  margin: 0 0 var(--space-3);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233, 236, 241, 0.88);
}

/* ── Collection (details/summary) ───────────────────────── */

.collection {
  margin-top: var(--space-3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(18, 20, 27, 0.65);
  overflow: hidden;
}

.collection__summary {
  cursor: pointer;
  padding: 14px 16px;
  color: rgba(233, 236, 241, 0.92);
  font-weight: 600;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
  transition: color 120ms ease;
}

.collection__summary:hover { color: var(--text); }

.collection__summary:focus-visible {
  outline: 2px solid rgba(0, 220, 255, 0.65);
  outline-offset: 3px;
}

.collection__summary::-webkit-details-marker { display: none; }
.collection__summary::marker { display: none; }

/* Animated chevron */
.collection__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  color: rgba(184, 191, 204, 0.6);
  transition: transform 220ms ease, color 120ms ease;
}

.collection[open] .collection__chevron {
  transform: rotate(180deg);
  color: rgba(0, 220, 255, 0.75);
}

.collection[open] .collection__summary {
  border-bottom: 1px solid var(--stroke);
}

.collection__body { padding: 16px; }

/* ── Cards ───────────────────────────────────────────────── */

.cards { display: grid; gap: var(--space-2); }

.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  background: rgba(18, 20, 27, 0.75);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  gap: 14px;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
}

.card:focus-visible {
  outline: 2px solid rgba(0, 220, 255, 0.65);
  outline-offset: 3px;
}

.card__title { font-weight: 600; line-height: 1.2; }

.card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.card__thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: transparent;
}

.card__thumb img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: cover;
}

.card__kicker {
  color: rgba(184, 191, 204, 0.95);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card__meta {
  color: rgba(233, 236, 241, 0.75);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Trilhas (Ecossistema: 3 caminhos) ───────────────────── */

.ecosystem .group__lead { max-width: 560px; }

.trilhas { display: grid; gap: var(--space-3); }

.trilha {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 20px;
  border: 1px solid var(--stroke);
  border-top: 2px solid transparent;
  border-radius: var(--radius);
  background: rgba(18, 20, 27, 0.65);
  transition: box-shadow 150ms ease;
}

.trilha:hover { box-shadow: var(--shadow); }

.trilha--lq  { border-top-color: var(--accent-lq);  }
.trilha--tq  { border-top-color: var(--accent-tq);  }
.trilha--lab { border-top-color: var(--accent-lab); }

.trilha__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trilha--lq  .trilha__icon { color: var(--accent-lq);  }
.trilha--tq  .trilha__icon { color: var(--accent-tq);  }
.trilha--lab .trilha__icon { color: var(--accent-lab); }

.trilha__icon svg { width: 28px; height: 28px; }

.trilha__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.trilha__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1;
}

.trilha__cta {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-lq);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 120ms ease;
}

.trilha--lq  .trilha__cta:hover { color: rgba(160, 120, 255, 1); }
.trilha__cta--tq { color: var(--accent-tq) !important; }
.trilha__cta--tq:hover { color: rgba(0, 240, 255, 1) !important; }
.trilha__cta--muted { color: rgba(184, 191, 204, 0.5); cursor: default; }

/* ── Posts / Artigos ─────────────────────────────────────── */

.posts { display: grid; gap: var(--space-3); }

.post {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 20px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(18, 20, 27, 0.55);
}

.post__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.post__tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 2px 8px;
}

.post__tag--lq  { color: rgba(160, 120, 255, 1); background: rgba(120, 80, 255, 0.12); border: 1px solid rgba(120, 80, 255, 0.22); }
.post__tag--tq  { color: rgba(0, 220, 255, 0.9); background: rgba(0, 220, 255, 0.10); border: 1px solid rgba(0, 220, 255, 0.20); }
.post__tag--lab { color: rgba(255, 160, 40, 0.9); background: rgba(255, 160, 40, 0.10); border: 1px solid rgba(255, 160, 40, 0.20); }

.post__read {
  font-size: 10.5px;
  color: rgba(184, 191, 204, 0.55);
  letter-spacing: 0.04em;
  margin-left: auto;
}

.post__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.post__excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(184, 191, 204, 0.92);
}

.post__excerpt + .post__excerpt { margin-top: 8px; }
.post__excerpt strong { color: rgba(233, 236, 241, 0.9); font-weight: 600; }

.post__footer {
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.post__author { font-size: 11.5px; color: rgba(184, 191, 204, 0.6); letter-spacing: 0.04em; }
.post__date   { font-size: 11px;   color: rgba(184, 191, 204, 0.45); letter-spacing: 0.04em; }

/* ── Sobre Gabriel Henrique ──────────────────────────────── */

.sobre {
  padding: 20px;
  border: 1px solid var(--stroke);
  border-left: 3px solid rgba(120, 80, 255, 0.55);
  border-radius: var(--radius);
  background: rgba(18, 20, 27, 0.55);
}

.sobre__bio {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(184, 191, 204, 0.92);
}

.sobre__bio:last-of-type { margin-bottom: 0; }
.sobre__bio strong { color: rgba(233, 236, 241, 0.9); font-weight: 600; }

.sobre__links {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.sobre__link {
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 220, 255, 0.75);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 120ms ease;
}

.sobre__link:hover { color: rgba(0, 220, 255, 1); }
.sobre__link:focus-visible { outline: 2px solid rgba(0, 220, 255, 0.65); outline-offset: 3px; border-radius: 4px; }

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  padding: var(--space-4) 0 var(--space-5);
  color: var(--muted);
  font-size: 13px;
}

.footer p { margin: 0; }

.footer__fineprint {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(184, 191, 204, 0.85);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (min-width: 700px) {
  /* Navbar: show desktop links, hide hamburger */
  .navbar__links  { display: flex; }
  .navbar__toggle { display: none; }
  .navbar__mobile { display: none; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr 1fr; }
  .trilhas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .posts   { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
