:root {
  --navy: #082f49;
  --blue: #0f4c81;
  --sky: #dbeafe;
  --paper: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 76, 129, 0.14);
}

* { box-sizing: border-box; }

html { min-height: 100%; overflow-x: hidden; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 5%, rgba(14, 165, 233, 0.13), transparent 28rem),
    radial-gradient(circle at 92% 34%, rgba(15, 76, 129, 0.1), transparent 25rem),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #38bdf8, var(--blue), var(--navy));
}

.page-shell {
  width: min(100% - 40px, 680px);
  margin-inline: auto;
  padding: 72px 0 40px;
}

.profile {
  position: relative;
  --cover-offset: 72px;
  padding: 108px 20px 0;
  text-align: center;
}

.profile::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: calc(var(--cover-offset) * -1);
  left: 50%;
  width: 100vw;
  height: 245px;
  overflow: hidden;
  background: url("assets/capa_livros.png") center / cover no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: 0 18px 45px rgba(8, 47, 73, 0.15);
  transform: translateX(-50%);
  pointer-events: none;
}

.profile > * {
  position: relative;
  z-index: 1;
}

.avatar-frame {
  width: 144px;
  height: 144px;
  margin: 0 auto 24px;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f8fafc, #7dd3fc 42%, var(--blue));
  box-shadow: 0 18px 45px rgba(8, 47, 73, 0.24);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border: 4px solid var(--paper);
  border-radius: 50%;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--navy);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.8rem, 11vw, 4.2rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.nickname { margin: 10px 0 0; color: var(--muted); font-weight: 650; }

.bio {
  max-width: 460px;
  margin: 18px auto 0;
  color: #334155;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.65;
}

.links { margin-top: 52px; }

.section-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 17px;
}

.section-heading span { height: 1px; background: var(--line); }

h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 26px;
  min-height: 194px;
  margin-top: 14px;
  padding: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.065);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.book-card:hover {
  border-color: rgba(15, 76, 129, 0.28);
  box-shadow: 0 16px 36px rgba(8, 47, 73, 0.11);
  transform: translateY(-2px);
}

.book-cover {
  display: block;
  width: 126px;
  height: 178px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.book-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.book-label {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-info h3 {
  margin: 6px 0 10px;
  color: var(--navy);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.72rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.kindle-unlimited {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  margin-bottom: 13px;
  color: #52705b;
  font-size: 0.68rem;
  font-weight: 650;
}

.kindle-unlimited i { color: #6b8f71; font-size: 0.72rem; }

.book-actions {
  display: grid;
  width: 100%;
  gap: 8px;
}

.book-card-ezequiel .book-actions { max-width: 210px; }

.book-card-machina .book-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-actions a {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 10px;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  border: 1px solid var(--blue);
  border-radius: 11px;
  box-shadow: 0 5px 14px rgba(8, 47, 73, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.book-actions a::after {
  content: "↗";
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 180ms ease;
}

.book-actions a:hover, .book-actions a:focus-visible {
  color: white;
  background: linear-gradient(135deg, #12609f, var(--blue));
  box-shadow: 0 9px 20px rgba(8, 47, 73, 0.22);
  outline: none;
  transform: translateY(-2px);
}

.book-actions a:hover::after { transform: translate(2px, -2px); }

.link-card {
  display: grid;
  grid-template-columns: 48px 1fr 26px;
  align-items: center;
  gap: 15px;
  min-height: 86px;
  margin-top: 12px;
  padding: 16px 18px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.055);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.link-card:hover, .link-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(15, 76, 129, 0.42);
  box-shadow: 0 16px 34px rgba(8, 47, 73, 0.13);
  outline: none;
}

.card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--blue);
  background: var(--sky);
  border-radius: 14px;
  font-size: 1.25rem;
  font-weight: 700;
}

.featured { color: white; background: linear-gradient(135deg, var(--blue), var(--navy)); border-color: transparent; }
.featured .card-icon { color: white; background: rgba(255, 255, 255, 0.14); }
.featured small { color: #bae6fd; }

.card-copy { min-width: 0; }
.card-copy strong, .card-copy small { display: block; }
.card-copy strong { font-size: 0.98rem; line-height: 1.35; overflow-wrap: anywhere; }
.card-copy small { margin-top: 4px; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.arrow { justify-self: end; font-size: 1.15rem; transition: transform 180ms ease; }
.link-card:hover .arrow { transform: translate(2px, -2px); }

footer { margin-top: 44px; text-align: center; }
footer p { margin: 0 0 15px; color: var(--muted); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.socials { display: flex; flex-wrap: nowrap; justify-content: center; gap: 11px; }
.socials a { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; padding: 0; color: white; text-decoration: none; background: linear-gradient(145deg, #38bdf8, var(--blue) 54%, var(--navy)); border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 50%; box-shadow: 0 9px 22px rgba(8, 47, 73, 0.16); transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease; }
.socials i { font-size: 1.3rem; line-height: 1; }
.socials a:hover, .socials a:focus-visible { color: white; filter: brightness(1.05) saturate(1.05); box-shadow: 0 13px 26px rgba(8, 47, 73, 0.24); outline: none; }
.socials a:hover { transform: translateY(-2px); }
footer > small { display: block; margin-top: 28px; color: #94a3b8; font-size: 0.72rem; }

.about {
  position: relative;
  margin-top: 48px;
  padding: 42px clamp(24px, 7vw, 48px);
  overflow: hidden;
  text-align: left;
  background: linear-gradient(145deg, var(--navy), #0b4169);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(8, 47, 73, 0.18);
}

.about::after {
  content: "“";
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(255, 255, 255, 0.075);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(7rem, 24vw, 10rem);
  font-weight: 700;
  line-height: 0.72;
  pointer-events: none;
}

.about .eyebrow { position: relative; z-index: 1; margin-bottom: 10px; color: #7dd3fc; }

.about h2 {
  position: relative;
  z-index: 1;
  color: white;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.35rem, 8vw, 3.25rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.2);
  text-transform: none;
}

.about h3 {
  position: relative;
  z-index: 1;
  margin: 7px 0 24px;
  color: #bae6fd;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-copy { position: relative; z-index: 1; }
.about-copy p { margin: 7px 0 16px; color: #e2e8f0; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; font-weight: 400; letter-spacing: 0; line-height: 1.72; text-transform: none; }
.about-copy p:first-child { color: white; font-size: 1.08rem; line-height: 1.68; }
.about-copy p:last-child { margin-bottom: 0; }

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 24px); padding: 48px 0 28px; }
  .profile { --cover-offset: 48px; padding-top: 96px; }
  .profile::before { height: 205px; }
  .avatar-frame { width: 124px; height: 124px; }
  .bio { font-size: 1.03rem; line-height: 1.58; }
  .links { margin-top: 38px; }
  .link-card { grid-template-columns: 44px 1fr 20px; gap: 12px; min-height: 80px; padding: 14px; border-radius: 15px; }
  .card-icon { width: 44px; height: 44px; border-radius: 12px; }
  .book-card { grid-template-columns: 88px 1fr; gap: 8px 14px; min-height: 148px; padding: 12px; border-radius: 16px; }
  .book-cover { grid-row: 1 / span 3; width: 88px; height: 124px; border-radius: 8px; }
  .book-info { display: contents; }
  .book-label, .book-info h3, .kindle-unlimited { grid-column: 2; }
  .book-label { align-self: end; }
  .book-info h3 { align-self: center; margin: 0; font-size: 1.28rem; }
  .kindle-unlimited { align-self: start; margin-bottom: 0; }
  .book-actions { grid-column: 1 / -1; gap: 7px; }
  .book-card-ezequiel .book-actions { max-width: none; }
  .book-card-machina .book-actions { grid-template-columns: 1fr; }
  .book-actions a { min-height: 44px; padding: 9px 12px; font-size: 0.76rem; }
  .about { margin-top: 40px; padding: 34px 24px; border-radius: 18px; }
  .about-copy p { font-size: 0.96rem; line-height: 1.68; }
  .about-copy p:first-child { font-size: 1.03rem; }
}

@media (min-width: 521px) and (max-width: 620px) {
  .book-card-machina .book-actions { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .page-shell { width: calc(100% - 18px); padding-top: 40px; }
  .profile { --cover-offset: 40px; padding-top: 88px; }
  .profile::before { height: 190px; }
  .avatar-frame { width: 112px; height: 112px; margin-bottom: 18px; }
  h1 { font-size: 2.65rem; }
  .bio { margin-top: 14px; font-size: 0.98rem; }
  .section-heading { gap: 10px; }
  .book-card { grid-template-columns: 78px 1fr; gap: 8px 11px; padding: 10px; }
  .book-cover { width: 78px; height: 110px; }
  .book-label { font-size: 0.61rem; letter-spacing: 0.07em; }
  .book-info h3 { font-size: 1.16rem; }
  .kindle-unlimited { font-size: 0.63rem; }
  .link-card { grid-template-columns: 40px 1fr 18px; gap: 10px; padding: 12px; }
  .card-icon { width: 40px; height: 40px; }
  .card-copy strong { font-size: 0.9rem; }
  .card-copy small { font-size: 0.72rem; }
  .socials { gap: 7px; }
  .socials a { flex-basis: 42px; width: 42px; height: 42px; }
  .about { padding: 30px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
