:root {
  --bg: #ecf2ff;
  --card-white: #ffffff;
  --card-gray: #e5e5ea;
  --text-main: #1c1c1e;
  --text-sub: #8e8e93;
  --radius: 32px;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

@media (max-width: 768px) {
  body {
    padding: 60px 50px;
  }
}

@media (min-width: 1024px) {

  html,
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  body::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

main {
  width: 100%;
  max-width: 400px;
}

/* --- Perfil --- */
.profile-header {
  text-align: left;
  margin-bottom: 35px;
}

.profile-header img {
  width: 100px;
  height: 100px;
  border-radius: 100%;
  object-fit: cover;
  margin-bottom: 15px;
}

.profile-header h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.description {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 4px;
  line-height: 1.4;
}

/* --- Bento Grid --- */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

/* Card Base */
.bento-item {
  background: var(--card-white);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 24px;
  box-sizing: border-box;
  transition: transform 0.2s cubic-bezier(.4, 1.3, .7, 1);
  position: relative;
}

/* Quadrados perfeitos para os cards menores */
.bento-item.square {
  aspect-ratio: 1 / 1;
}

/* Card Largo (ocupa 2 colunas) */
.bento-item.wide {
  grid-column: span 2;
  aspect-ratio: 2.1 / 1;
  /* Proporção retangular */
}

.bento-item:hover {
  transform: scale(1.05);
}

.bento-item.secondary {
  background: var(--card-gray);
}

.bento-item img.main-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
}

.bento-item span {
  font-size: 14px;
  font-weight: 600;
}

.open-icon {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 16px;
  height: 16px;
}

/* --- Lista de Posts --- */
#posts {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.post-card {
  background: var(--card-white);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 100px;
  transition: transform 0.2s cubic-bezier(.4, 1.3, .7, 1);
}

.post-card:hover {
  transform: scale(1.05);
  z-index: 2;
}

.post-preview {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.post-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-title {
  font-weight: 600;
  text-decoration: none;
  color: var(--text-main);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta {
  font-size: 12px;
  color: var(--text-sub);
  margin: 2px 0 0 0;
}

.post-description {
  font-size: 13px;
  color: var(--text-sub);
  margin: 4px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.all-posts-link {
  text-align: left;
  margin-bottom: 45px;
  padding-left: 5px;
}

.action-button {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: var(--card-white);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.4, 1.3, .7, 1);
}

.action-button:hover {
  transform: scale(1.05);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 35px 0;
}

.page-tab {
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: var(--card-white);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.4, 1.3, .7, 1);
}

.page-tab:hover {
  transform: scale(1.05);
}

.page-tab.active {
  background: var(--text-main);
  color: var(--card-white);
}

.post-article {
  background: var(--card-white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 30px;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px 0;
}

.post-article-title {
  margin: 0 0 8px 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.post-content {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  overflow-wrap: break-word;
}

.post-content p {
  margin: 0 0 16px 0;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin: 20px 0 10px 0;
  line-height: 1.3;
}

.post-content a {
  color: #004FFF;
  text-decoration: none;
}

.post-content blockquote {
  margin: 16px 0;
  padding-left: 14px;
  border-left: 4px solid var(--card-gray);
  color: var(--text-sub);
}

.post-img {
  width: 100%;
  max-width: 100%;
  border-radius: 20px;
  margin: 12px 0;
  object-fit: cover;
}

/* --- Transições de Página --- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(root) {
  animation-name: fade-out;
}

::view-transition-new(root) {
  animation-name: fade-in;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Fallback para navegadores sem View Transitions API */
.page-transition-fade {
  animation: fade-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body {
  animation: fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Rodapé --- */
.brand-name {
  text-align: left;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -1px;
  color: var(--text-main);
  padding-left: 5px;
}