/* ========================================================================
   Diogo Assis — portfolio
   Themes: mono (black & white, auto dark) · brasil (pastel green & yellow)
   ======================================================================== */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #e4e4e4;
  --accent: #111111;
  --accent-contrast: #fafafa;
  --accent-soft: #ededed;
  --accent-soft-2: #f4f4f4;
  --selection-bg: #111111;
  --selection-fg: #fafafa;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --maxw: 960px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="brasil"]):not([data-theme="light"]) {
    --bg: #0e0e0e;
    --surface: #161616;
    --text: #f2f2f2;
    --muted: #9a9a9a;
    --border: #272727;
    --accent: #f2f2f2;
    --accent-contrast: #0e0e0e;
    --accent-soft: #1f1f1f;
    --accent-soft-2: #191919;
    --selection-bg: #f2f2f2;
    --selection-fg: #0e0e0e;
  }
}

:root[data-theme="dark"] {
  --bg: #0e0e0e;
  --surface: #161616;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --border: #272727;
  --accent: #f2f2f2;
  --accent-contrast: #0e0e0e;
  --accent-soft: #1f1f1f;
  --accent-soft-2: #191919;
  --selection-bg: #f2f2f2;
  --selection-fg: #0e0e0e;
}

:root[data-theme="brasil"] {
  --bg: #faf6e8;
  --surface: #fffdf4;
  --text: #22372b;
  --muted: #5a6a5c;
  --border: #e3dcc0;
  --accent: #3e7c59;
  --accent-contrast: #fdfbee;
  --accent-soft: #d9ecd9;
  --accent-soft-2: #f6ecc0;
  --selection-bg: #3e7c59;
  --selection-fg: #fdfbee;
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.palette-input:focus-visible,
main:focus { outline: none; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus { transform: none; }

a { color: inherit; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

em {
  font-style: normal;
  font-weight: 600;
  background: var(--accent-soft-2);
  border-radius: 4px;
  padding: 0 4px;
  transition: background-color 0.5s var(--ease);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--maxw) + 40px);
  margin: 0 auto;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.5s var(--ease);
}

.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-dot { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -3px;
  height: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}

.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { right: 0; }

/* theme + language switches */

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.15s var(--ease);
}

.theme-btn:active { transform: scale(0.94); }

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

.theme-btn.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.theme-btn.icon-only { padding: 6px 9px; }

.theme-btn > svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-btn .flag {
  width: 17px;
  height: 12px;
}

.theme-btn:not(.is-active) .flag {
  filter: grayscale(0.7);
  opacity: 0.75;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

.theme-btn:hover .flag {
  filter: none;
  opacity: 1;
}

/* ------------------------------------------------------------------ hero */

.hero { padding: 96px 0 72px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(44px, 8.5vw, 84px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero-title .line { display: block; }

.accent-dot { color: var(--accent); transition: color 0.5s var(--ease); }

.hero-sub {
  max-width: 560px;
  margin-top: 26px;
  font-size: 18px;
  color: var(--muted);
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease),
              background-color 0.3s var(--ease), color 0.3s var(--ease),
              box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 45%, transparent);
}

.btn:active { transform: translateY(0) scale(0.97); }

.btn-solid {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.meta-item { display: flex; flex-direction: column; }

.meta-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.meta-label { font-size: 13px; color: var(--muted); }

/* -------------------------------------------------------------- sections */

.section { padding: 56px 0; }

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
}

.section-total {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
}

.section-intro {
  max-width: 640px;
  margin: -16px 0 32px;
  font-size: 15.5px;
  color: var(--muted);
}

/* jobs / timeline */

.job {
  position: relative;
  padding: 0 0 44px 28px;
  border-left: 1px solid var(--border);
}

.job:last-child { padding-bottom: 8px; }

.job::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transition: background-color 0.5s var(--ease), transform 0.3s var(--ease);
}

.job:hover::before { transform: scale(1.5); }

.job-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.job-role { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }

.job-org { color: var(--muted); font-size: 15px; }

.job-when {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.job-meta { text-align: right; }

.job-dur {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
}

.job-dur:empty { display: none; }

.edu-head { align-items: center; }

.res-intro-row {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: -16px 0 32px;
}

.res-intro-row .section-intro { margin: 0; }

.edu-logo.ufmg-logo {
  width: 124px;
  height: 46px;
  -webkit-mask-image: url("/assets/ufmg.svg");
  mask-image: url("/assets/ufmg.svg");
}

.edu-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.edu-logo {
  flex-shrink: 0;
  display: block;
  width: 104px;
  height: 52px;
  background: var(--text);
  -webkit-mask: url("/assets/puc-minas.png") no-repeat center / contain;
  mask: url("/assets/puc-minas.png") no-repeat center / contain;
}

:root[data-theme="brasil"] .edu-logo { background: var(--accent); }

.job-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 15px;
  color: var(--muted);
}

.job-points li {
  position: relative;
  padding-left: 18px;
}

.job-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.job-stack {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease), background-color 0.5s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* project screenshot */
.card-shot {
  margin: -10px -10px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1200 / 564;
  background: var(--accent-soft-2);
}

.card-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.6s var(--ease);
}

.card:hover .card-shot img { transform: scale(1.04); }

.card-shot-center img { object-position: center; }

.card:hover .card-link .arr-next { transform: translateX(3px); }

/* cursor spotlight */
@property --spot {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.card {
  background:
    radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--accent) var(--spot), transparent), transparent 70%),
    var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease), background-color 0.5s var(--ease), --spot 0.35s var(--ease);
}

.card:hover { --spot: 13%; }

.card-title { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }

.card-body { font-size: 14.5px; color: var(--muted); flex: 1; }

.card-stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

/* make the whole card clickable */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card:has(.card-link):hover .card-link { color: var(--accent); }

.card-link .arr {
  transition: transform 0.25s var(--ease);
}

.card:hover .card-link .arr {
  transform: translate(2px, -2px);
}

/* skills */

.skill-group { margin-bottom: 28px; }

.skill-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: default;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease),
              background-color 0.3s var(--ease);
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chip i {
  font-size: 17px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.chip svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.chip svg.dev {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.chip:hover i,
.chip:hover svg { color: var(--accent); }

/* contact */

.contact { padding: 88px 0 96px; text-align: center; }

.contact-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.contact-sub { margin-top: 14px; color: var(--muted); font-size: 17px; }

.contact .hero-links { justify-content: center; }

/* footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 36px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.footer-links { display: flex; gap: 16px; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer-links a:hover { color: var(--text); }

.footer-links svg {
  width: 15px;
  height: 15px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

button.btn {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.btn-copy .i-check { display: none; color: var(--accent); }
.btn-copy.is-done .i-copy { display: none; }
.btn-copy.is-done .i-check { display: block; animation: pop 0.35s var(--ease); }
.btn-copy.is-done { border-color: var(--accent); }

@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 5px;
  margin: 0 2px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 1.4;
  text-align: center;
  color: var(--text);
}

.footer-hint {
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: color 0.25s var(--ease);
}

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

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* command palette */

.palette {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 16px 16px;
}

.palette[hidden] { display: none; }

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.palette-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}

.palette.is-open .palette-backdrop,
.palette.is-open .palette-panel { opacity: 1; transform: none; }

.palette-top {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.palette-close {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  cursor: pointer;
}

.palette-close svg { width: 16px; height: 16px; }

.palette-panel:focus { outline: none; }

.palette-input {
  width: 100%;
  padding: 18px 20px;
  border: none;
  background: transparent;
  color: var(--text);
  font: 500 16px var(--font-sans);
  outline: none;
}

.palette-input::placeholder { color: var(--muted); }

.palette-list {
  list-style: none;
  overflow-y: auto;
  padding: 6px;
}

.palette-group {
  padding: 10px 12px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  cursor: pointer;
}

.palette-item.is-active { background: var(--accent-soft); }

.palette-icon {
  width: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.palette-item.is-active .palette-icon { color: var(--accent); }

.palette-label { flex: 1; }

.palette-current { font-size: 9px; color: var(--accent); }

.palette-empty { padding: 18px 12px; color: var(--muted); font-size: 14px; }

.palette-foot {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.palette-foot kbd { margin-left: 8px; }
.palette-foot kbd:first-child { margin-left: 0; }

/* ------------------------------------------------------------- colophon */

.hero-compact { padding-bottom: 32px; }
.hero-compact .hero-title { font-size: clamp(38px, 7vw, 68px); }
.hero-compact .hero-sub { max-width: 640px; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.toc a {
  display: inline-flex;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.25s var(--ease), background-color 0.3s var(--ease);
}

.toc a span:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.toc a:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--accent-soft); }

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.principle {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.principle h3 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.principle p { font-size: 14px; color: var(--muted); }

.prose, .note p {
  max-width: 680px;
  font-size: 15.5px;
  color: var(--muted);
}

.prose strong, .note p strong { color: var(--text); font-weight: 600; }

.note, .prose { margin-bottom: 26px; }
.note h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px; }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--text);
}

.type-sample {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 18px;
  max-width: 680px;
  margin: -6px 0 30px;
  padding: 20px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.sample-sans { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.sample-mono { font-family: var(--font-mono); font-size: 30px; }
.sample-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.swatches { display: flex; flex-wrap: wrap; gap: 18px; margin: -6px 0 30px; }
.swatch-set { display: flex; align-items: center; gap: 4px; }
.swatch-set span { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); }
.swatch-set p { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.table-wrap { max-width: 680px; margin: -6px 0 30px; overflow-x: auto; }

.ratios { width: 100%; border-collapse: collapse; font-size: 14.5px; }

.ratios th, .ratios td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.ratios thead th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ratios tbody th { font-weight: 600; }
.ratios td { font-family: var(--font-mono); font-size: 13.5px; }

.perf-changes { max-width: 680px; margin: -12px 0 28px; }

.perf-table { min-width: 520px; }
.perf-table thead tr:first-child th[colspan] { text-align: center; border-bottom-style: dashed; }
.perf-table tbody th { font-weight: 500; font-size: 14px; }
.perf-table td.before { color: var(--muted); }
.perf-table td.after { font-weight: 600; }
.perf-table td.up { color: var(--accent); }
.perf-table td.up::before { content: "↓ "; font-weight: 400; }
.perf-table td.up.score::before { content: "↑ "; }
.perf-table tbody tr:first-child td { font-size: 15px; }

.refs {
  max-width: 680px;
  margin-top: 8px;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft-2);
  border-radius: 0 10px 10px 0;
}

.refs-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.refs ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }

.refs a {
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease);
}

.refs a::after { content: " ↗"; font-size: 12px; color: var(--muted); }
.refs a:hover { text-decoration-color: var(--accent); }

.not-found .hero { min-height: calc(100vh - 220px); display: flex; flex-direction: column; justify-content: center; }

.request-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  margin-top: 22px;
  padding: 8px 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.req-method { color: var(--text); font-weight: 500; }
.req-path { color: var(--text); }
.req-status { color: var(--accent); font-weight: 500; }

.colophon .contact { padding: 56px 0 80px; }
.colophon .contact-sub { margin-top: 0; }
.colophon .contact .hero-links { margin-top: 20px; }

/* ------------------------------------------------------------ animations */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* -------------------------------------------------------------- mobile */

@media (max-width: 640px) {
  .site-nav { display: none; }
  .controls { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .hero { padding: 64px 0 56px; }
  .hero-meta { gap: 20px 32px; }
  .job { padding-left: 22px; }
  .edu-main { gap: 14px; }
  .edu-logo { width: 88px; height: 44px; }
  .res-intro-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .edu-logo.ufmg-logo { width: 104px; height: 38px; }
  .job-meta { text-align: left; }
  .section-total { margin-left: 0; flex-basis: 100%; }
  .footer-hint { display: none; }
}

@media (hover: none) {
  .footer-hint { display: none; }
  .palette-close { display: inline-flex; }
  .palette-foot { display: none; }
  .palette-item { padding: 12px; }
}

.menu-btn {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.25s var(--ease), background-color 0.5s var(--ease);
}

.menu-btn svg { width: 18px; height: 18px; }
.menu-btn:active { transform: scale(0.94); }

/* Below ~1000px the text nav (longest in Portuguese) no longer fits beside the
   theme and language switches, so the menu button takes its place. */
@media (max-width: 1023px) {
  .site-nav { display: none; }
  .controls { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .site-header { gap: 12px; }
}
