:root {
  --accent-copy: #83eff9;
  --panel-inner: #0b2340;
  --panel-start: #102c4e;
  --panel-end: #171e3e;
  --frame-start: #57def0;
  --frame-end: #f67dcc;
}

body {
  min-width: 0;
  background: radial-gradient(ellipse at 8% 12%, #0d2745, transparent 55%),
    radial-gradient(ellipse at 98% 70%, #232148, transparent 55%), var(--bg);
}

[hidden] { display: none !important; }

.site-shell {
  overflow: clip;
  width: min(100%, 1500px);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  column-gap: clamp(20px, 3vw, 48px);
}
.site-header { grid-column: 1 / -1; }
.site-footer { grid-column: 2; }
.site-shell > main { min-width: 0; }
.top-nav {
  position: sticky;
  top: 18px;
  align-self: start;
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: auto;
  margin: 28px 0 0;
}
.top-nav a {
  min-height: 48px;
  padding: 10px 14px;
  font-size: 14px;
  gap: 10px;
  border-radius: 16px;
}
.top-nav a[aria-current="page"] {
  color: #fff;
  border-color: var(--frame-end);
  background: linear-gradient(125deg, #583353, #292747);
  box-shadow: 0 0 14px #fb77cc3a, inset 0 0 16px #ff96d425;
}
.theme-moon, [data-theme="light"] .theme-sun { display: none; }
[data-theme="light"] .theme-moon { display: block; }
.icon-button { min-width: 44px; min-height: 44px; }

.page { min-width: 0; }
.page h1[tabindex="-1"]:focus { outline: none; }
#roadmap .hero { padding-inline: clamp(16px, 8vw, 120px); }
#roadmap .hero h1, #roadmap .hero p { white-space: normal; }
.page-heading { padding: clamp(28px, 5vw, 68px) 0 23px; }
.page-heading h1, .welcome h1 {
  font: italic 900 clamp(2rem, 7.5vw, 4.8rem)/1.02 "Outfit", system-ui, sans-serif;
  letter-spacing: -.045em;
  margin: 0;
}
.page-heading h1 { text-transform: uppercase; }
.page-heading h1 em, .welcome h1 span {
  color: #ffa5de;
  background: linear-gradient(105deg, #ffc2e9 8%, #ff7bc9 73%, #d7a2ff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-heading > p:last-child { color: var(--muted); margin: 12px 0 0; }
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-copy);
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .16em;
  margin: 0 0 14px;
}
.kicker span {
  width: 8px;
  height: 8px;
  background: var(--frame-start);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--frame-start);
}

.welcome {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(250px, 37vw, 380px);
  padding: 24px clamp(14px, 4vw, 54px) 34px;
  overflow: hidden;
}
.welcome-art {
  position: absolute;
  z-index: -2;
  right: 0;
  top: 0;
  width: 68%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}
.welcome::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 8%, #081a32ee 31%, #081a3240 72%, #081a320c),
    linear-gradient(0deg, var(--bg) 0%, transparent 40%);
}
.welcome-copy { color: #f5f8ff; }
.welcome h1 { font-size: clamp(3rem, 10vw, 7rem); }
.welcome-greeting { font-weight: 800; margin: 0 0 3px; }
.project-tag {
  display: inline-block;
  margin-top: 15px;
  padding: 5px 12px;
  border: 1px solid #d985bc;
  border-radius: 20px;
  color: #ffe2f6;
  background: #2d2345e6;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.neon-panel {
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid transparent;
  border-radius: clamp(19px, 3vw, 31px);
  background: linear-gradient(140deg, var(--panel-start), var(--panel-end)) padding-box,
    linear-gradient(120deg, var(--frame-start), #7b99ce 44%, var(--frame-end)) border-box;
  box-shadow: inset 0 0 25px #68b7ff16, 0 12px 30px #030b2085;
}
.panel-kicker {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-copy);
  font-size: clamp(.75rem, 2.5vw, .95rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.synopsis {
  display: grid;
  grid-template-columns: minmax(130px, .6fr) minmax(0, 1.6fr);
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}
.synopsis img {
  display: block;
  width: 100%;
  height: clamp(175px, 26vw, 310px);
  object-fit: cover;
  object-position: center 38%;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.synopsis h3, .updates-empty h3 { font-size: clamp(1.2rem, 3vw, 1.7rem); margin: 0; line-height: 1.18; }
.synopsis p, .about-intro p { line-height: 1.65; margin: 10px 0 0; color: var(--muted); }
.about-intro strong { color: var(--text); }
.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  gap: 9px;
  list-style: none;
}
.home-features { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0; }
.feature-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 91px;
  padding: 9px 5px;
  text-align: center;
  font-size: clamp(.73rem, 1.8vw, .95rem);
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(140deg, #3c76a728, #aa55ab17);
}
.feature-list svg { width: 26px; height: 26px; color: var(--frame-end); }
.home-features li:first-child svg { color: var(--accent-copy); }
.home-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--frame-start);
  border-radius: 13px;
  color: var(--text);
  text-align: center;
  font-weight: 800;
  font-size: .86rem;
  text-decoration: none;
}
.page-link--primary {
  background: linear-gradient(115deg, #f595d3, #d29bf5);
  border-color: #ffb1e0;
  color: #301231;
}
.page-link:hover { box-shadow: 0 0 15px #99c5ff55; }

.updates-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: clamp(13px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-inner);
}
.empty-art {
  width: min(310px, 100%);
  aspect-ratio: 450 / 367;
  margin: 0 0 14px;
  background: url("../assets/livro-e-pena.webp?v=2") center / contain no-repeat;
  mask-image: radial-gradient(ellipse, #000 43%, transparent 73%);
}
.empty-art svg { display: none; }
.updates-empty p { color: var(--muted); margin: 9px 0 21px; }

.gallery-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.gallery-panel figure { margin: 0; min-width: 0; }
.gallery-panel img {
  width: 100%;
  height: auto;
  max-height: 350px;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.gallery-panel figcaption { margin-top: 9px; font-size: .86rem; font-weight: 700; }
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr);
  gap: 14px;
  align-items: center;
}
.about-intro p:first-child { margin-top: 0; }
.tech-art { position: relative; width: 146px; height: 137px; margin-inline: auto; }
.tech-card {
  position: absolute;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  color: #fff;
  border: 2px solid #9ee6ff;
  border-radius: 17px;
  background: linear-gradient(145deg, #423e80, #0a2b52 65%);
  font-weight: 900;
}
.tech-card.love { width: 99px; height: 100px; rotate: -12deg; box-shadow: 0 0 21px #ed8fe862; }
.love svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; fill: #fff3fc; background: linear-gradient(145deg, #fb74c5 33%, #479eea 72%); }
.tech-card.lua { width: 64px; height: 64px; right: 0; bottom: 3px; rotate: 11deg; border-color: #a08eff; background: #233883; }
.lua-orbit { width: 23px; height: 23px; border-radius: 50%; background: #5377ee; position: relative; }
.lua-orbit::after { content: ""; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: #d8edff; }
.project-details { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0; }
.project-details > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(125deg, #ee7edb22, #309fee1a);
}
.project-details svg { color: var(--accent-copy); }
.project-details > div:first-child svg { color: var(--frame-end); }
.project-details dt { color: var(--muted); font-size: .72rem; }
.project-details dd { margin: 3px 0 0; font-size: .86rem; font-weight: 800; }
.project-focus h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; color: var(--accent-copy); font-size: .95rem; }

[data-theme="light"] {
  --accent-copy: #07516b;
  --frame-start: #14869f;
  --frame-end: #9b3779;
  --panel-inner: #f2f6ff;
  --panel-start: #f4fcff;
  --panel-end: #f2eafa;
  background: linear-gradient(130deg, #e9f7ff, #f8ebfc);
}
[data-theme="light"] .welcome::after {
  background: linear-gradient(90deg, #081a32 5%, #081a32e9 34%, #081a3238 82%),
    linear-gradient(0deg, #0d2443 0%, transparent 42%);
}
[data-theme="light"] .welcome .kicker { color: #a0f2ff; }
[data-theme="light"] .page-heading h1 em,
[data-theme="light"] .hero h1 em { background-image: linear-gradient(105deg, #9b216e, #6c3899); }
[data-theme="light"] .top-nav a[aria-current="page"] { color: #792058; background: #f9e2f3; }
[data-theme="light"] .empty-art { background: none; mask-image: none; display: grid; place-items: center; aspect-ratio: 2; }
[data-theme="light"] .empty-art svg { display: block; width: 70px; height: 70px; color: var(--frame-end); }
[data-theme="light"] .section-marker { color: var(--accent-copy); }
[data-theme="light"] .step-mini { color: #304f6b; }
[data-theme="light"] .timeline-item .step-name { color: #123354; }
[data-theme="light"] .timeline-item { background: linear-gradient(100deg, var(--lane-tint), #e1ecff); }

@media (max-width: 1000px) {
  .site-shell { grid-template-columns: 140px minmax(0, 1fr); }
  .top-nav a { padding-inline: 9px; font-size: 13px; }
}

@media (max-width: 850px) {
  html { scroll-padding-top: 18px; }
  .site-shell { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .site-header { flex-wrap: nowrap; }
  .site-footer { grid-column: 1; }
  .top-nav {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 7px max(7px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
    overflow: visible;
    background: #09172cf5;
    border-top: 1px solid #5882af90;
  }
  [data-theme="light"] .top-nav { background: #f1f7fff5; }
  .top-nav a {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 5px 0;
    min-height: 53px;
    border-radius: 12px;
    font-size: clamp(.6rem, 2.5vw, .76rem);
  }
  .top-nav svg { width: 19px; height: 19px; }
  .top-nav :is(a, button):hover { transform: none; }
  .welcome { margin-top: 10px; border-radius: 17px 17px 0 0; }
  #roadmap .hero { padding-inline: 6px; }
}

@media (max-width: 500px) {
  .welcome { min-height: 242px; }
  .welcome-art { width: 85%; }
  .welcome::after {
    background: linear-gradient(90deg, #081a32 2%, #081a32d9 26%, #081a3245 82%),
      linear-gradient(0deg, var(--bg), transparent 42%);
  }
  .synopsis { grid-template-columns: 1fr; gap: 14px; }
  .synopsis img { height: 126px; }
  .feature-list li { min-height: 80px; }
  .project-focus .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-intro { grid-template-columns: minmax(0, 1fr); }
  .tech-art { margin-block: 7px 0; }
  .home-actions > a { flex: 1 1 auto; }
}
