/* ============================================================
   PORTFOLIO VITOR KREWER — Custom Styles
   Stack: Tailwind CSS (CDN) + Este arquivo de customizações
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables (light — default) --- */
:root,
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --bg-nav: rgba(255, 255, 255, 0.9);
  --border: #d0d7de;
  --text-primary: #1f2328;
  --text-secondary: #636c76;
  --text-muted: #9198a1;
  --accent-blue: #0969da;
  --accent-blue-dim: #0550ae;
  --accent-green: #1a7f37;
  --accent-orange: #bc4c00;
  --accent-purple: #8250df;
  --glow-blue: rgba(9, 105, 218, 0.1);
  --glow-green: rgba(26, 127, 55, 0.1);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

/* --- CSS Variables (dark) --- */
[data-theme="dark"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-nav: rgba(13, 17, 23, 0.85);
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-blue: #58a6ff;
  --accent-blue-dim: #1f6feb;
  --accent-green: #3fb950;
  --accent-orange: #f78166;
  --accent-purple: #d2a8ff;
  --glow-blue: rgba(88, 166, 255, 0.15);
  --glow-green: rgba(63, 185, 80, 0.15);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Selection --- */
::selection {
  background: rgba(88, 166, 255, 0.3);
  color: var(--text-primary);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-blue);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-links a.btn-outline {
  border: 1px solid var(--border);
  color: var(--accent-green);
}

.nav-links a.btn-outline:hover {
  border-color: var(--accent-green);
  background: var(--glow-green);
  color: var(--accent-green);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: var(--text-secondary);
}

.theme-toggle svg,
.theme-toggle-btn svg {
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.icon-moon {
  display: none;
}

.icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(63, 185, 80, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-title .highlight {
  color: var(--accent-blue);
  position: relative;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   TERMINAL (xterm.js wrapper)
   ============================================================ */
.terminal-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.4);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff5f57;
}

.terminal-dot.yellow {
  background: #febc2e;
}

.terminal-dot.green {
  background: #28c840;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

#terminal-container {
  padding: 0.5rem;
  height: 320px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue-dim);
  border-color: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-blue);
  box-shadow: 0 0 16px var(--glow-blue);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section {
  padding: 5rem 0;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::before {
  content: '//';
  color: var(--text-muted);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ============================================================
   ABOUT / SPECIALTIES CARDS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--accent-blue-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.card-icon.blue {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-blue);
}

.card-icon.green {
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
}

.card-icon.orange {
  background: rgba(247, 129, 102, 0.12);
  color: var(--accent-orange);
}

.card-icon.purple {
  background: rgba(210, 168, 255, 0.12);
  color: var(--accent-purple);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.card-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-green), var(--accent-blue-dim), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-green);
  box-shadow: 0 0 8px var(--glow-green);
}

.timeline-dot.past {
  border-color: var(--border);
  box-shadow: none;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.timeline-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  margin-bottom: 0.4rem;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ============================================================
   STACK BADGES
   ============================================================ */
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.stack-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  transition: color var(--transition), border-color var(--transition);
}

.stack-badge:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue-dim);
}

/* ============================================================
   BOOKS CAROUSEL
   ============================================================ */
.books-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.book-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.book-card:hover {
  border-color: var(--accent-blue-dim);
}

.book-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-orange);
  margin-bottom: 0.5rem;
}

.book-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.book-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ============================================================
   PROJECT CARDS (projects.html)
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue-dim), var(--accent-green));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: var(--accent-blue-dim);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cat-sistema {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-blue);
}

.cat-ferramenta {
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
}

.cat-educacao {
  background: rgba(210, 168, 255, 0.12);
  color: var(--accent-purple);
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.project-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tab {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.875rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--bg-tertiary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ============================================================
   BLOG LIST & POST
   ============================================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: border-color var(--transition), transform var(--transition);
}

.post-card:hover {
  border-color: var(--accent-blue-dim);
  transform: translateX(4px);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.post-read-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.post-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Search bar */
.search-bar {
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e7681' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

.search-bar:focus {
  border-color: var(--accent-blue-dim);
}

.search-bar::placeholder {
  color: var(--text-muted);
}

/* ============================================================
   POST READER (markdown rendered)
   ============================================================ */
.post-reader {
  max-width: 1000px;
  width: 100%;
}

.post-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-hero-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Markdown content styles */
.prose {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.prose h1 {
  font-size: 1.75rem;
}

.prose h2 {
  font-size: 1.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.1rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #79b8ff;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-orange);
}

.prose pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent-purple);
  background: rgba(210, 168, 255, 0.05);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0;
  color: var(--text-primary);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.65;
}

.prose blockquote p {
  margin-bottom: 0.6rem;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-style: normal;
  color: var(--text-muted);
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose em {
  color: var(--text-secondary);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.prose th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.6rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

.prose td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* --- PROSE IMAGES & FIGURES --- */
.prose img,
.post-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  background-color: var(--bg-secondary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

:root .prose img,
:root .post-figure img,
[data-theme="light"] .prose img,
[data-theme="light"] .post-figure img {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .prose img,
[data-theme="dark"] .post-figure img {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.prose img:hover,
.post-figure img:hover {
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.prose figure,
.post-figure {
  margin: 2.5rem 0;
  text-align: center;
}

.prose figure img,
.post-figure img {
  margin: 0 auto 0.75rem auto;
}

.prose figcaption,
.post-figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-top: 0.65rem;
  padding: 0 1rem;
}

.prose p:has(> img) {
  text-align: center;
  margin: 2rem 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-1 {
  animation-delay: 0.1s;
}

.fade-in-2 {
  animation-delay: 0.25s;
}

.fade-in-3 {
  animation-delay: 0.4s;
}

.fade-in-4 {
  animation-delay: 0.55s;
}

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */
.page-header {
  padding: 7rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ============================================================
   LOADING / EMPTY STATES
   ============================================================ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  gap: 1rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.6rem 0.75rem;
  }

  .nav-hamburger {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

.page-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-blue-dim);
  color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.06);
}

.page-btn.active {
  background: var(--accent-blue-dim);
  border-color: var(--accent-blue);
  color: #fff;
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn.page-ellipsis {
  border-color: transparent;
  cursor: default;
  color: var(--text-muted);
  min-width: 24px;
}

.page-btn.page-ellipsis:hover {
  background: none;
  border-color: transparent;
  color: var(--text-muted);
}

/* ============================================================
   LIGHT THEME SPECIFIC OVERRIDES
   ============================================================ */
:root .hero::before,
[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(9, 105, 218, 0.05) 0%, transparent 70%);
}

:root .hero::after,
[data-theme="light"] .hero::after {
  background: radial-gradient(circle, rgba(26, 127, 55, 0.04) 0%, transparent 70%);
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(88, 166, 255, 0.06) 0%, transparent 70%);
}

[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(63, 185, 80, 0.05) 0%, transparent 70%);
}

:root .card:hover,
[data-theme="light"] .card:hover {
  box-shadow: var(--shadow-card);
}

:root .project-card:hover,
[data-theme="light"] .project-card:hover {
  box-shadow: var(--shadow-card);
}

:root .terminal-wrapper,
[data-theme="light"] .terminal-wrapper {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .project-card:hover {
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .terminal-wrapper {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth theme transitions */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color;
  transition-duration: 0.25s;
  transition-timing-function: ease;
}

/* ============================================================
   PUBLICATIONS GRID & CARDS
   ============================================================ */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.pub-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pub-card:hover {
  border-color: var(--accent-blue-dim);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.pub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-orange);
  font-weight: 600;
}

.pub-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pub-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.pub-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.pub-authors {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.pub-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pub-cta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ============================================================
   TERMINAL MODAL ANIMATIONS
   ============================================================ */
@keyframes fadeOverlay {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.pub-cursor {
  animation: blink 1s step-end infinite;
}

/* Custom Scrollbar for Terminal Body */
#pub-terminal-output::-webkit-scrollbar {
  width: 4px;
}

#pub-terminal-output::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ============================================================
   REMODELAÇÃO BLOG-FIRST & AUTHOR SIDEBAR LAYOUT
   ============================================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 100%;
}

/* --- SIDEBAR FIXO (DESKTOP) --- */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* --- PERFIL DO AUTOR --- */
.author-profile {
  display: flex;
  flex-direction: column;
}

.author-avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 1rem;
  display: inline-block;
}

.author-avatar-frame {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  box-shadow: 0 4px 18px var(--glow-blue);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.author-avatar-frame:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px var(--glow-blue);
}

.author-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  background: var(--bg-tertiary);
}

.author-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.author-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-blue);
  margin-top: 0.35rem;
  font-weight: 500;
}

.author-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.85rem;
}

/* --- SIDEBAR NAV --- */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  border: 1px solid transparent;
}

.sidebar-nav-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(3px);
}

.sidebar-nav-link.active {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-blue);
  font-weight: 600;
  border-color: rgba(88, 166, 255, 0.25);
}

.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

/* --- SIDEBAR SOCIALS & FOOTER --- */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lang-pill-group {
  display: inline-flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
}

.lang-pill-btn {
  border: none;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-pill-btn:hover {
  color: var(--text-primary);
}

.lang-pill-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
}

.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.sidebar-socials {
  display: flex;
  gap: 0.5rem;
}

.sidebar-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
  overflow: hidden;
}

.sidebar-social-btn:hover {
  background: var(--border);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sidebar-social-btn:has(img),
.sidebar-social-btn.sidebar-social-btn--full {
  padding: 0;
  border: 1px solid var(--border);
}

.sidebar-social-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  transition: transform 0.2s ease;
}

.sidebar-social-btn:hover img {
  transform: scale(1.06);
}

.sidebar-social-btn:has(img):hover,
.sidebar-social-btn.sidebar-social-btn--full:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.25);
}


.sidebar-copyright {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --- ÁREA PRINCIPAL DE CONTEÚDO (EXPANDIDA PARA A DIREITA) --- */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 2.25rem 3.5rem 3.5rem 3rem;
  max-width: 1400px;
  width: 100%;
}

.feed-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.feed-tagline,
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  margin-bottom: 0.35rem;
  display: block;
}

.feed-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.feed-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  max-width: 680px;
}

/* --- TOOLBAR: PESQUISA E TAGS --- */
.feed-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.search-container,
.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-container input,
.search-box-wrapper input,
.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-container input:focus,
.search-box-wrapper input:focus,
.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--glow-blue);
}

.search-icon-svg,
.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.tag-filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-filter-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-filter-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.tag-filter-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  font-weight: 600;
}

/* --- CARDS DE POST (RELAÇÃO COM PROJETOS) --- */
.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.6rem;
  margin-bottom: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  line-height: 1.2;
  transition: all 0.2s ease;
}

.post-tag + .post-tag {
  margin-left: 0.35rem;
}

.post-tag:hover {
  background: rgba(88, 166, 255, 0.18);
  border-color: var(--accent-blue);
}

.reading-card-tags,
.reading-tags-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0 1.25rem 0;
}

.post-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: var(--accent-blue);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.read-more-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.2s ease;
}

.read-more-link:hover {
  transform: translateX(4px);
}

.post-project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-purple);
  background: rgba(210, 168, 255, 0.1);
  border: 1px solid rgba(210, 168, 255, 0.25);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-project-badge:hover {
  background: rgba(210, 168, 255, 0.2);
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

/* --- SERIES & SEQUENTIAL POSTS --- */
.post-series-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: #3fb950;
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.28);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.series-nav-box {
  margin-top: 3.5rem;
  padding: 1.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.series-nav-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3fb950, var(--accent-blue), var(--accent-purple));
}

.series-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.series-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.series-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3fb950;
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid rgba(63, 185, 80, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.series-title-row h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.series-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.series-nav-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.series-btn {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.15rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
}

.series-btn:hover {
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.series-btn-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.series-btn-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.series-btn-disabled {
  opacity: 0.55;
  cursor: default;
  background: transparent;
  border-style: dashed;
}

.series-btn-disabled .series-btn-sub {
  color: var(--text-muted);
}

.series-btn-disabled .series-btn-title {
  color: var(--text-muted);
  font-weight: 400;
}

.series-dropdown {
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tertiary);
}

.series-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.2s;
}

.series-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.series-dropdown-toggle:hover {
  color: var(--text-primary);
}

.series-dropdown[open] .series-dropdown-toggle svg {
  transform: rotate(180deg);
}

.series-posts-list {
  list-style: none;
  padding: 0.5rem 0.75rem 0.75rem 0.75rem;
  margin: 0;
  border-top: 1px solid var(--border);
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.series-posts-list li {
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.series-posts-list li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.series-posts-list li:hover {
  background: rgba(255, 255, 255, 0.04);
}

.series-posts-list li:hover a {
  color: var(--text-primary);
}

.series-posts-list li.current {
  background: rgba(88, 166, 255, 0.12);
  border-left: 3px solid var(--accent-blue);
}

.series-posts-list li.current a {
  color: var(--accent-blue);
  font-weight: 600;
}

.series-item-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 28px;
}

.series-posts-list li.current .series-item-num {
  color: var(--accent-blue);
}

.series-item-title {
  flex: 1;
}

.series-item-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- TAG CLOUD & TOPICS PAGE --- */
.tag-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tag-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.tag-stat-value {
  font-weight: 700;
  color: var(--accent-blue);
}

.tag-search-wrapper {
  margin-bottom: 2rem;
  position: relative;
  width: 100%;
}

.tag-search-input {
  width: 100%;
  max-width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.tag-search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--glow-blue);
}

.tag-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.tag-cloud-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 2.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.cloud-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.cloud-tag:hover {
  transform: translateY(-3px) scale(1.03);
  color: var(--text-primary);
  border-color: var(--accent-blue);
  box-shadow: 0 6px 18px rgba(88, 166, 255, 0.2);
}

.cloud-tag.active {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(88, 166, 255, 0.3);
}

/* Escalonamento por popularidade */
.cloud-tag.weight-5 {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-color: rgba(63, 185, 80, 0.4);
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  box-shadow: 0 4px 16px rgba(63, 185, 80, 0.15);
}
.cloud-tag.weight-5:hover {
  box-shadow: 0 8px 24px rgba(63, 185, 80, 0.3);
  border-color: #3fb950;
}

.cloud-tag.weight-4 {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-color: rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent-blue);
}

.cloud-tag.weight-3 {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.05rem;
  border-color: rgba(210, 168, 255, 0.3);
  background: rgba(210, 168, 255, 0.06);
  color: var(--accent-purple);
}

.cloud-tag.weight-2 {
  font-size: 0.88rem;
  font-weight: 500;
}

.cloud-tag.weight-1 {
  font-size: 0.8rem;
  opacity: 0.85;
}

.cloud-tag-count {
  font-size: 0.72em;
  opacity: 0.75;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  line-height: 1.2;
}

.cloud-tag.active .cloud-tag-count {
  background: rgba(88, 166, 255, 0.3);
  color: #fff;
  opacity: 1;
}

/* Resultados filtrados na página de Tags */
.tag-results-section {
  margin-top: 2rem;
  animation: fadeIn 0.3s ease;
}

.tag-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.tag-results-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag-results-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- READINGS & ESSAYS --- */
.reading-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #d2a8ff;
  background: rgba(210, 168, 255, 0.1);
  border: 1px solid rgba(210, 168, 255, 0.28);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius);
}

.reading-card {
  border-left: 3px solid rgba(210, 168, 255, 0.4);
  transition: all 0.25s ease;
}

.reading-card:hover {
  border-left-color: #d2a8ff;
  transform: translateY(-2px);
}

/* --- BOOK INFO CARD (FICHA DA OBRA) --- */
.book-info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-purple);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2.25rem 0;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.book-info-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(210, 168, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.book-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border);
}

.book-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-purple);
  background: rgba(210, 168, 255, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.book-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem 1.25rem;
}

.book-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.book-info-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.book-info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

.book-info-value.book-info-highlight {
  font-weight: 600;
  color: var(--accent-blue);
}

.book-meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* --- MOBILE RESPONSIVE DRAWER --- */
.mobile-header-bar {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 992px) {
  .app-layout {
    flex-direction: column;
  }
  
  .mobile-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.25rem;
    z-index: 1000;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
  }

  .mobile-brand-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    display: block;
  }

  .mobile-brand-text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .mobile-menu-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 300px;
    z-index: 1100;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 35px rgba(0,0,0,0.6);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: block;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    padding: calc(64px + 1.75rem) 1.25rem 3rem 1.25rem;
  }

  .feed-title {
    font-size: 1.75rem;
  }

  .post-card {
    padding: 1.25rem;
  }
}

/* ============================================================
   MINIMALIST SIDEBAR COLLAPSE / FULLSCREEN READING MODE
   ============================================================ */

/* Discreet button inside the top-right of the sidebar */
.author-profile {
  position: relative;
}

.sidebar-collapse-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.15rem;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.sidebar-collapse-btn:hover {
  opacity: 1;
  background: var(--bg-primary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Discreet floating button to reopen sidebar when collapsed */
.sidebar-expand-btn {
  position: fixed;
  top: 1.15rem;
  left: 1.15rem;
  height: 32px;
  padding: 0 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  z-index: 105;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  box-shadow: var(--shadow-card);
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.sidebar-expand-btn:hover {
  opacity: 1 !important;
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  background: var(--bg-tertiary);
}

.sidebar-expand-btn .expand-kbd {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  line-height: 1.2;
}

@media (min-width: 993px) {
  .sidebar {
    transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.2s ease,
                border-color 0.28s ease;
  }

  .main-content {
    transition: padding 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  html[data-sidebar-collapsed="true"] .sidebar {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right-color: transparent;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  html[data-sidebar-collapsed="true"] .sidebar-expand-btn {
    opacity: 0.68;
    pointer-events: auto;
    transform: translateX(0);
  }

  html[data-sidebar-collapsed="true"] .main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem clamp(2rem, 6vw, 5.5rem) 4rem clamp(2rem, 6vw, 5.5rem);
  }

  html[data-sidebar-collapsed="true"] .post-reader {
    max-width: 920px;
    margin: 0 auto;
  }
}

@media (max-width: 992px) {
  .sidebar-collapse-btn,
  .sidebar-expand-btn {
    display: none !important;
  }
}

/* Clickable author identity in sidebar */
.author-identity-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.author-identity-link:hover .author-name {
  color: var(--accent-blue);
}

/* ============================================================
   PROFILE PAGE (profile.html)
   ============================================================ */

.profile-hero-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.profile-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-green));
}

.profile-hero-grid {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 2.25rem;
  align-items: center;
}

.profile-photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.profile-photo-ring {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-green));
  box-shadow: 0 8px 28px var(--glow-blue);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-photo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  background: var(--bg-tertiary);
}

.profile-location-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.profile-hero-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.profile-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
}

.profile-status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}

.profile-citation-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.profile-hero-name {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.profile-hero-headline {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-blue);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.profile-hero-lead {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.profile-id-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.profile-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
}

.profile-id-chip:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.profile-id-chip--primary {
  background: var(--accent-blue-dim);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.profile-id-chip--primary:hover {
  background: var(--accent-blue);
  color: #ffffff;
}

/* Metrics Bar */
.profile-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.profile-metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.profile-metric-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.profile-metric-number {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--accent-blue);
  line-height: 1.1;
}

.profile-metric-card:nth-child(2) .profile-metric-number {
  color: var(--accent-purple);
}

.profile-metric-card:nth-child(3) .profile-metric-number {
  color: var(--accent-green);
}

.profile-metric-card:nth-child(4) .profile-metric-number {
  color: var(--accent-orange);
}

.profile-metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-metric-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Section Blocks in Profile */
.profile-section {
  margin-bottom: 3rem;
}

.profile-section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Storytelling Chapters */
.story-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.story-chapter-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.story-chapter-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-purple);
  font-weight: 600;
}

.story-chapter-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.story-chapter-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

.story-quote-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.65rem;
  margin-bottom: 1.25rem;
  font-size: 0.96rem;
  color: var(--text-primary);
  line-height: 1.7;
}

/* Education Grid */
.edu-category-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.5rem 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.edu-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.edu-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.edu-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.edu-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.edu-type-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.edu-type-grad {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-blue);
}

.edu-type-mba {
  background: rgba(210, 168, 255, 0.12);
  color: var(--accent-purple);
}

.edu-type-pos {
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
}

.edu-course-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.edu-institution {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-blue);
}

.edu-thesis {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border);
}

/* Production & Advisories */
.prod-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.prod-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s ease;
}

.prod-item-card:hover {
  border-color: var(--accent-purple);
}

.prod-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-orange);
}

.prod-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.prod-item-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .profile-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .profile-hero-meta-top,
  .profile-id-links {
    justify-content: center;
  }
}
