:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --accent: #ae6c1c;
  --accent-2: #c2410c;
  --stroke: #d5dbe6;
  --shadow: 0 6px 14px rgba(17, 24, 39, 0.06);
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #eef2f7;
  --page-glow-line: rgba(17, 24, 39, 0.04);
  --hero-start: #ffffff;
  --hero-end: #f8fbff;
  --accent-soft: rgba(174, 108, 28, 0.14);
  --code-bg: rgba(31, 43, 36, 0.08);
  --glass-surface: rgba(255, 255, 255, 0.55);
  --glass-surface-strong: rgba(255, 255, 255, 0.68);
  --glass-stroke: rgba(255, 255, 255, 0.7);
  --glass-highlight: rgba(255, 255, 255, 0.48);
  --bg-node-a: rgba(15, 76, 219, 0.17);
  --bg-node-b: rgba(194, 65, 12, 0.12);
  --bg-node-c: rgba(12, 74, 110, 0.11);
  --bg-line: rgba(15, 76, 219, 0.06);
  --page-bg-image: url('assets/img/background-light.png');
  --content-max: 1100px;
  --page-gutter: 1rem;
}

:root[data-theme='dark'] {
  --bg: #0f172a;
  --surface: #111c34;
  --ink: #e5edf9;
  --muted: #a3b3ce;
  --accent: #428bf9;
  --accent-2: #fdba74;
  --stroke: #5d4a2a;
  --shadow: 0 10px 22px rgba(2, 6, 23, 0.4);
  --bg-gradient-start: #0b1223;
  --bg-gradient-end: #111a31;
  --page-glow-line: rgba(148, 163, 184, 0.12);
  --hero-start: #0f1a33;
  --hero-end: #132446;
  --accent-soft: rgba(127, 178, 255, 0.22);
  --code-bg: rgba(15, 23, 42, 0.9);
  --glass-surface: rgba(18, 32, 58, 0.55);
  --glass-surface-strong: rgba(20, 37, 67, 0.68);
  --glass-stroke: rgba(148, 163, 184, 0.22);
  --glass-highlight: rgba(191, 219, 254, 0.18);
  --bg-node-a: rgba(127, 178, 255, 0.23);
  --bg-node-b: rgba(251, 191, 36, 0.12);
  --bg-node-c: rgba(56, 189, 248, 0.12);
  --bg-line: rgba(148, 163, 184, 0.14);
  --page-bg-image: url('assets/img/background-dark.png');
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: transparent;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background: var(--page-bg-image) center / cover no-repeat;
  filter: blur(9px);
  transform: scale(1.04);
  z-index: -2;
}

body::after {
  background: linear-gradient(180deg, rgba(9, 20, 36, 0.22), rgba(9, 20, 36, 0.14));
  z-index: -1;
}

.page-glow {
  display: none;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  line-height: 1.15;
  margin-top: 0;
}

a {
  color: var(--accent);
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.site-header {
  width: min(var(--content-max), calc(100% - (var(--page-gutter) * 2)));
  margin: var(--page-gutter) auto 0;
  padding: var(--page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 20;
  background: linear-gradient(145deg, var(--glass-surface-strong), var(--glass-surface));
  border: 1px solid var(--glass-stroke);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.theme-toggle {
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle-icon {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
}

:root[data-theme='dark'] .theme-toggle-icon {
  border-color: transparent;
  background: currentColor;
}

:root[data-theme='dark'] .theme-toggle-icon::after {
  content: '';
  position: absolute;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  background: var(--surface);
  top: 0.02rem;
  left: 0.34rem;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  flex-direction: column;
}

.brand-logo {
  width: clamp(24px, 8vw, 110px);
  height: auto;
  filter: none;
}

:root[data-theme='dark'] .brand-logo {
  filter: invert(1);
}

.brand-mark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 0.35rem 0.1rem;
  color: var(--ink);
  font-weight: 500;
}

.main-nav .theme-toggle {
  margin-left: 0.2rem;
}

.main-nav a:hover,
.main-nav a.active {
  border-color: var(--accent);
  background: transparent;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.2rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  margin: 4px 0;
  background: var(--ink);
  border-radius: 2px;
}

main {
  width: min(var(--content-max), calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
  padding: var(--page-gutter) 0;
  position: relative;
  isolation: isolate;
}

main::before,
main::after {
  content: none;
}

.hero,
.blog-hero {
  background: linear-gradient(135deg, var(--glass-surface-strong), var(--glass-surface));
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2rem;
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  position: relative;
  overflow: hidden;
}

.hero::before,
.blog-hero::before,
.axis-card::before,
.preview-card::before,
.post-card::before,
.timeline-grid article::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, var(--glass-highlight), transparent 45%);
}

.kicker {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero h1,
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 0.8rem;
}

.blog-title-logo {
  width: clamp(86px, 10vw, 150px);
  height: auto;
  vertical-align: middle;
  margin-left: 0.35rem;
  filter: none;
}

:root[data-theme='dark'] .blog-title-logo {
  filter: invert(1);
}

.hero-copy {
  max-width: 65ch;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.social-links-block {
  margin-top: 1.1rem;
}

.social-links-actions,
.important-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-link,
.integrante-link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.26rem 0.64rem;
  text-decoration: none;
  background: var(--accent-soft);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
}

.social-link.icon-only,
.integrante-link.icon-only {
  width: 2rem;
  height: 2rem;
  padding: 0;
  justify-content: center;
}

.social-link.no-icon,
.integrante-link.no-icon {
  padding-left: 0.6rem;
}

.social-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.social-icon i {
  font-size: 0.95rem;
  line-height: 1;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--stroke);
  background: transparent;
}

.section-head {
  margin-bottom: 1rem;
}

.info-card,
.axis-card,
.preview-card,
.post-card,
.timeline-grid article {
  background: linear-gradient(145deg, var(--glass-surface-strong), var(--glass-surface));
  border: 1px solid var(--glass-stroke);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(118%);
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  position: relative;
  overflow: hidden;
}

.post-card {
  box-shadow: var(--shadow);
}

#posts-grid .post-card {
  border-radius: 12px;
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow);
  padding: 1rem;
}

#integrantes-grid .post-card {
  border-radius: 12px;
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.mission-section {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 0;
}

.mission-lead {
  font-size: 1.1rem;
  max-width: 72ch;
  margin-bottom: 1rem;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mission-grid div {
  padding: 0.8rem 0;
  border-top: 1px solid var(--stroke);
}

.axis-grid,
.preview-grid,
.timeline-grid,
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.axis-list {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

.axis-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.axis-item {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--stroke);
}

.axis-item h3,
.blog-item h3 {
  margin-bottom: 0.3rem;
}

.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  margin-bottom: 1.2rem;
}

.blog-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--stroke);
}

#integrantes-grid {
  grid-template-columns: 1fr;
}

.timeline-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.axis-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-2);
  letter-spacing: 0.08em;
}

.preview-meta {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}



.filters {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.filter {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

.filter.active,
.filter:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.post-card h2 {
  margin-bottom: 0.55rem;
}

.post-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1.2rem;
  align-items: start;
}

.post-main {
  min-width: 0;
}

.post-toc {
  position: sticky;
  top: 1rem;
  border-left: 0;
  padding-left: 0;
}

.post-toc h2 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
}

.post-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.post-toc-list li a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.post-toc-list li a:hover {
  color: var(--accent);
}

.post-toc-list .toc-level-3 {
  padding-left: 0.7rem;
}

.post-toc-mobile {
  display: none;
  margin-bottom: 1rem;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: var(--surface);
}

.post-toc-mobile summary {
  cursor: pointer;
  font-weight: 700;
}

.post-toc-mobile[open] summary {
  margin-bottom: 0.6rem;
}

.post-markdown h2,
.post-markdown h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.post-markdown p,
.post-markdown ul,
.post-markdown ol,
.post-markdown blockquote {
  margin-top: 0;
  margin-bottom: 1rem;
}

.post-markdown ul,
.post-markdown ol {
  padding-left: 1.2rem;
}

.post-markdown pre,
.post-markdown code {
  font-family: "Courier New", monospace;
}

.post-markdown pre {
  background: var(--code-bg);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 0.8rem;
  overflow-x: auto;
}

.post-markdown blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 0.8rem;
  color: var(--muted);
}

.integrante-card {
  padding: 0.75rem 0.9rem;
}

.integrante-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.45rem;
}

.integrante-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(15, 118, 110, 0.3);
  background: var(--surface);
}

.integrante-head-text h2 {
  margin: 0;
  line-height: 1.05;
}

.integrante-role {
  margin: 0 0 0.22rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.integrante-nome {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  margin: 0;
}

.integrante-bio {
  margin: 0 0 0.55rem;
  color: var(--muted);
  line-height: 1.45;
}

.integrante-profile-posts {
  margin-top: 1.2rem;
}

.integrante-profile-posts h2 {
  margin-bottom: 0.7rem;
}

.author-posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.integrante-head h2 {
  margin: 0;
}

.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--glass-stroke);
  background: linear-gradient(180deg, var(--glass-surface-strong), var(--glass-surface));
  color: var(--muted);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1rem 1rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1.3fr 1fr 1fr;
}

.footer-kicker {
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--accent-2);
  font-weight: 700;
}

.footer-brand-block h2,
.footer-links-block h3,
.footer-contact-block h3 {
  margin-bottom: 0.55rem;
}

.footer-brand-block h2 {
  font-size: clamp(1.15rem, 2.1vw, 1.35rem);
}

.footer-brand-block p,
.footer-contact-block p {
  margin: 0 0 0.45rem;
}

.footer-links-block ul {
  margin: 0;
  padding-left: 1.05rem;
}

.footer-links-block li {
  margin-bottom: 0.35rem;
}

.footer-links-block a {
  font-weight: 600;
}

.footer-legal {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1rem 1.2rem;
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-legal p {
  margin: 0;
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 0.12s;
}

.reveal:nth-of-type(3) {
  animation-delay: 0.22s;
}

.reveal:nth-of-type(4) {
  animation-delay: 0.32s;
}

.reveal:nth-of-type(5) {
  animation-delay: 0.42s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .mission-grid,
  .axis-grid,
  .preview-grid,
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .brand {
    max-width: calc(100% - 52px);
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--stroke);
  }

  .site-header.menu-open .main-nav {
    display: flex;
  }

  .main-nav a {
    width: fit-content;
    padding: 0.3rem 0;
  }

  .main-nav .theme-toggle {
    margin-left: 0;
  }

  .mission-grid,
  .axis-grid,
  .preview-grid,
  .timeline-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-layout {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .post-toc {
    display: none;
  }

  .post-toc-mobile {
    display: block;
  }

  .hero,
  .blog-hero {
    border-radius: 12px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    flex-direction: column;
  }
}