/* Portfólio: Jonatas Magalhães
   Conceito: a página funciona como um painel de indicadores. O âmbar marca o que mudou. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-500.woff") format("woff"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-600.woff") format("woff"); font-weight: 600 800; font-display: swap; }

:root {
  --ink: #0c2238;
  --ink-2: #163452;
  --ink-3: #224a70;
  --paper: #f5f7f9;
  --paper-2: #e9eef3;
  --white: #ffffff;
  --steel: #2a6496;
  --steel-soft: #6f8fae;
  --signal: #e8a33d;
  --signal-soft: #fbeedb;
  --fog: #d6dee6;
  --slate: #56687a;
  --text: #13283d;
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; background: var(--paper); color: var(--text);
  font-family: var(--body); font-size: 18px; line-height: 1.6;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--signal-soft); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 32px; }
.muted { color: var(--slate); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip:focus { left: 16px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: #f0b456; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); }
.btn-line { border-color: var(--fog); color: var(--ink); background: var(--white); }
.btn-line:hover { border-color: var(--ink); }
.btn-small { min-height: 42px; padding: 0 20px; font-size: 15px; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(245, 247, 249, .86); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--fog); }
.topbar-inner { display: flex; align-items: center; gap: 36px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; color: var(--ink); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 16px; color: var(--slate); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover, .nav a.active { color: var(--ink); border-bottom-color: var(--signal); }
.menu { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.menu span { display: block; width: 24px; height: 2px; margin: 6px auto; background: var(--ink); transition: transform .25s var(--ease); }
.menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu-mobile { display: grid; padding: 8px 32px 20px; border-top: 1px solid var(--fog); }
.menu-mobile a { padding: 14px 0; font-size: 20px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--fog); }
.menu-mobile a:last-child { border-bottom: 0; color: var(--steel); font-weight: 600; }
.menu-mobile[hidden] { display: none; }

/* ---------- Abertura ---------- */
.hero { padding: 64px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }
.who { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.who picture { flex: none; }
.who img { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; object-position: center 22%; }
.status { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 999px; background: var(--ink); font-size: 18px; font-weight: 600; color: #fff; letter-spacing: -.005em; box-shadow: 0 12px 24px -16px rgba(12,34,56,.6); }
.pulse { width: 12px; height: 12px; flex: none; border-radius: 50%; background: #3cc08a; box-shadow: 0 0 0 0 rgba(60,192,138,.55); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(47,158,110,0); } 100% { box-shadow: 0 0 0 0 rgba(47,158,110,0); } }
.hero h1 { font-size: clamp(42px, 5.2vw, 68px); line-height: 1.04; letter-spacing: -.035em; max-width: 13em; }
.lede { margin-top: 28px; max-width: 34em; font-size: 20px; line-height: 1.6; color: #344a60; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.roles { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--fog); max-width: 36em; font-size: 16px; color: var(--slate); }
.roles strong { color: var(--ink); font-weight: 600; }

/* Painel antes/depois: o elemento de destaque da página */
.board { background: var(--ink); color: #fff; border-radius: 28px; padding: 36px 36px 32px; margin-top: 12px; box-shadow: 0 30px 60px -30px rgba(12,34,56,.55); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.board-head h2 { color: #fff; font-size: 22px; letter-spacing: -.01em; }
.board-head p { font-size: 14px; color: #9fb4c8; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 20px; padding: 6px; border-radius: 16px; background: var(--ink-2); }
.seg button { min-height: 48px; padding: 6px 8px; border: 0; border-radius: 11px; background: transparent; color: #c5d3e0; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color .2s, color .2s; }
.seg button:hover { color: #fff; background: rgba(255,255,255,.06); }
.seg button[aria-selected="true"] { background: var(--signal); color: var(--ink); }
.board-body { margin-top: 30px; }
.big { font-family: var(--display); font-weight: 500; font-size: clamp(64px, 7.4vw, 104px); line-height: .95; letter-spacing: -.045em; color: var(--signal); font-variant-numeric: tabular-nums; }
.board-body h3 { margin-top: 14px; color: #fff; font-size: 24px; letter-spacing: -.015em; }
.where { margin-top: 6px; font-size: 16px; color: #9fb4c8; }
.where strong { color: #e3ebf2; font-weight: 600; margin-right: 6px; }
.bars { display: grid; gap: 12px; margin-top: 26px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: 14px; font-size: 15px; }
.bar-label { color: #9fb4c8; }
.bar-track { height: 14px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .7s var(--ease); }
.bar-before { background: var(--steel-soft); }
.bar-after { background: var(--signal); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: #e3ebf2; }
.unit { margin-top: 10px; font-size: 13px; color: #7f97ad; }
.how { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 16px; line-height: 1.6; color: #d3dee8; }

/* ---------- Seções ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -.03em; }
.section-head p { margin-top: 16px; font-size: 19px; color: #3d5368; }
.section-head.row { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: none; flex-wrap: wrap; }

/* Projeto em destaque */
.case-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 56px; align-items: start; }
.step { padding: 22px 0; border-top: 1px solid var(--fog); }
.step:first-child { border-top: 0; padding-top: 0; }
.step h3 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 8px; }
.step p { color: #3d5368; }
.findings { display: grid; gap: 12px; margin-top: 10px; }
.findings li { display: grid; grid-template-columns: 92px 1fr; align-items: baseline; gap: 12px; color: #3d5368; }
.findings b { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -.03em; color: var(--steel); font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stack li { padding: 6px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--fog); font-size: 14px; font-weight: 500; color: var(--ink); }
.case-story .actions { margin-top: 28px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--fog); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 0 0 auto; min-height: 48px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; color: var(--slate); font-size: 17px; font-weight: 600; cursor: pointer; transition: color .2s, border-color .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--signal); }
.shot { position: relative; display: block; width: 100%; margin-top: 20px; padding: 0; border: 1px solid var(--fog); border-radius: 16px; overflow: hidden; background: var(--white); cursor: zoom-in; box-shadow: 0 24px 48px -32px rgba(12,34,56,.45); }
.shot img { width: 100%; aspect-ratio: 1546 / 868; object-fit: cover; transition: opacity .25s; }
.shot.loading img { opacity: .35; }
.zoom { position: absolute; right: 14px; bottom: 14px; padding: 8px 14px; border-radius: 999px; background: rgba(12,34,56,.86); color: #fff; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s var(--ease); }
.shot:hover .zoom, .shot:focus-visible .zoom { opacity: 1; transform: none; }
.caption { margin-top: 18px; font-size: 17px; color: #3d5368; min-height: 3.2em; }
.live-hint { margin-top: 10px; font-size: 15px; color: var(--slate); }
.live-hint a { color: var(--steel); font-weight: 600; }

/* Projetos do GitHub */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--fog); background: var(--white); font-size: 15px; font-weight: 600; color: var(--slate); cursor: pointer; transition: border-color .2s, color .2s, background-color .2s; }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.repo { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 16px; background: var(--white); border: 1px solid var(--fog); transition: border-color .2s; }
.repo:hover { border-color: var(--steel-soft); }
.repo h3 { font-size: 20px; letter-spacing: -.01em; }
.repo p { font-size: 16px; color: #3d5368; }
.repo-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 8px; font-size: 14px; color: var(--slate); }
.repo-meta i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.repo-links { display: flex; gap: 18px; padding-top: 14px; border-top: 1px solid var(--fog); }
.repo-links a { font-size: 15px; font-weight: 600; color: var(--steel); text-decoration: none; }
.repo-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Trajetória */
.two-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.sticky { position: sticky; top: 112px; }
.timeline { display: grid; gap: 12px; }
.timeline > li { border-radius: 16px; background: var(--white); border: 1px solid var(--fog); transition: border-color .2s; }
.timeline > li.open { border-color: var(--ink); }
.timeline summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 24px 26px; cursor: pointer; list-style: none; }
.timeline summary::-webkit-details-marker { display: none; }
.t-period { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--steel); font-variant-numeric: tabular-nums; }
.t-role { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); line-height: 1.25; }
.t-org { grid-column: 1; font-size: 16px; color: var(--slate); }
.t-toggle { grid-column: 2; grid-row: 2 / span 2; align-self: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--fog); display: grid; place-items: center; transition: transform .3s var(--ease), background-color .2s, border-color .2s; }
.t-toggle::before { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-2px) rotate(45deg); }
details[open] .t-toggle { transform: rotate(180deg); background: var(--signal); border-color: var(--signal); }
.t-body { padding: 0 26px 24px; }
.t-body li { position: relative; padding-left: 22px; margin-top: 10px; color: #3d5368; font-size: 17px; }
.t-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--signal); }

/* Competências */
.tabs-wide { margin-bottom: 8px; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.skills li { display: grid; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--fog); }
.skills b { font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.skills span { font-size: 16px; color: #3d5368; }

/* Formação */
.ids { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.degrees { display: grid; }
.degrees li { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--fog); }
.degrees li:first-child { padding-top: 0; }
.deg-year { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--steel); font-variant-numeric: tabular-nums; }
.degrees b { display: block; font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.degrees div span { font-size: 16px; color: var(--slate); }
.edu h3 { margin-top: 40px; margin-bottom: 16px; font-size: 20px; }
.certs { display: flex; flex-wrap: wrap; gap: 10px; }
.certs li { padding: 10px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--fog); font-size: 16px; font-weight: 500; color: var(--ink); }
.certs span { color: var(--slate); font-weight: 400; margin-left: 4px; }

/* Contato */
.contact { padding: 112px 0; background: var(--ink); color: #fff; }
.contact h2 { color: #fff; font-size: clamp(40px, 5.4vw, 72px); letter-spacing: -.04em; line-height: 1.02; }
.contact-lede { margin-top: 18px; font-size: 20px; color: #b7c7d6; }
.channels { margin-top: 48px; border-top: 1px solid rgba(255,255,255,.14); }
.channel { display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.ch-label { font-size: 16px; color: #9fb4c8; }
.ch-value { font-family: var(--display); font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; letter-spacing: -.02em; color: #fff; text-decoration: none; overflow-wrap: anywhere; transition: color .2s; }
.ch-value:hover { color: var(--signal); }
.copy { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.copy:hover { border-color: #fff; }
.copy.done { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.place { margin-top: 32px; font-size: 16px; color: #9fb4c8; }

.footer { background: #08192a; color: #8ea4b9; font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 28px; }
.footer a { color: #c5d3e0; text-decoration: none; }
.footer a:hover { color: #fff; }

/* Ampliação de imagem */
.live { width: min(96vw, 1440px); max-width: none; height: min(92vh, 900px); max-height: none; padding: 0; border: 0; border-radius: 18px; background: var(--ink); color: #fff; overflow: hidden; }
.live[open] { display: flex; flex-direction: column; }
.live::backdrop { background: rgba(8,25,42,.82); backdrop-filter: blur(4px); }
.live-bar { display: flex; align-items: center; gap: 20px; padding: 12px 14px 12px 24px; }
.live-bar h2 { margin-right: auto; color: #fff; font-size: 18px; letter-spacing: -.01em; }
.live-bar a { color: #c5d3e0; font-size: 15px; }
.live-bar a:hover { color: #fff; }
.live-close { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--white); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.live-frame { flex: 1; background: #fff; }
.live-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.lightbox { width: min(96vw, 1600px); max-height: 94vh; padding: 0; border: 0; border-radius: 16px; background: var(--ink); overflow: hidden; }
.lightbox::backdrop { background: rgba(8,25,42,.82); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; height: auto; max-height: 94vh; object-fit: contain; }
.lb-close { position: absolute; top: 14px; right: 14px; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--white); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .nav, .topbar .btn-small { display: none; }
  .menu { display: block; }
  .hero-grid, .case-grid, .two-col { grid-template-columns: 1fr; gap: 48px; }
  .sticky { position: static; }
  .repo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .who { flex-wrap: wrap; gap: 14px; }
  .who img { width: 72px; height: 72px; border-radius: 18px; }
  .status { font-size: 16px; padding: 10px 18px; white-space: nowrap; }
  .tabs button { padding: 0 12px; font-size: 16px; }
  body { font-size: 17px; }
  .wrap { padding-inline: 20px; }
  .menu-mobile { padding-inline: 20px; }
  .topbar-inner { min-height: 64px; }
  .hero { padding: 36px 0 72px; }
  .who img { width: 72px; height: 72px; border-radius: 18px; }
  .lede { font-size: 18px; }
  .actions .btn { flex: 1 1 100%; }
  .board { padding: 24px 20px; border-radius: 22px; }
  .board-head { flex-direction: column; gap: 4px; }
  .seg { grid-template-columns: 1fr 1fr; }
  .section, .contact { padding: 80px 0; }
  .repo-grid, .skills { grid-template-columns: 1fr; }
  .findings li { grid-template-columns: 80px 1fr; }
  .channel { grid-template-columns: 1fr; gap: 6px; }
  .copy { justify-self: start; margin-top: 8px; }
  .footer-inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
