:root {
  --bg: #ffffff;
  --ink: #0b1b25;
  --muted: #6b7b86;
  --card: #f7fafb;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
img { max-width: 100%; display: block; }

.site-header { text-align:center; padding: 16px 12px 8px; }
.site-header.compact { text-align:left; display:flex; align-items:center; gap:12px; }
.hero { width: 120px; height: 120px; object-fit: cover; margin: 0 auto 8px; border-radius: 16px; }
.back { text-decoration:none; color: var(--ink); font-weight:600; }

h1 { font-size: clamp(20px, 4vw, 36px); margin: 8px 0; }
.tagline { margin: 0; color: var(--muted); }

.container { width: min(100%, 1000px); margin: 0 auto; padding: 16px; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease; }
.card:hover { transform: translateY(-2px); }
.card-link { color: inherit; text-decoration:none; display:block; }
.card-cover { aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 12px; }
.card-body h2 { margin: 0 0 6px; font-size: 18px; }
.card-body p { margin: 0 0 10px; color: var(--muted); }
.card-meta { display:flex; align-items:center; gap:8px; color: var(--muted); }
.avatar { width:28px; height:28px; border-radius:50%; object-fit: cover; }

.post { background: var(--card); border-radius: var(--radius); padding: 12px; }
.post-cover { border-radius: 12px; margin-bottom: 10px; }
.post-meta { color: var(--muted); margin-bottom: 8px; }

.engage { display:flex; justify-content:flex-start; margin: 14px 0; }
.like-btn { border:0; background:#0bb3a2; color:#fff; border-radius:999px; padding:10px 14px; font-weight:700; }
.like-btn span { margin-left:6px; }

.comments h2 { margin-top: 0; }
.comment-form { display:grid; gap:8px; margin-bottom: 14px; }
.comment-form input, .comment-form textarea {
  width:100%; padding:10px; border:1px solid #d7e1e7; border-radius:10px; font: inherit;
}
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-form button { justify-self:start; border:0; background:#0b6bcb; color:#fff; border-radius:10px; padding:10px 14px; font-weight:700; }

.comment-list { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.comment { background:#fff; border:1px solid #e8eef2; border-radius:12px; padding:10px; }
.comment-head { display:flex; align-items:baseline; justify-content:space-between; color: var(--muted); }

.site-footer { text-align:center; padding: 24px 12px; color: var(--muted); }

/* Responsive:  ≥640px */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Responsive:  ≥960px */
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Imagen flotante con wrap de texto */
.float-right {
  float: right;
  width: min(45%, 360px);
  margin: 0 0 10px 14px;   /* separa del texto: top right bottom left */
  border-radius: 12px;
}

.float-left {
  float: left;
  width: min(45%, 360px);
  margin: 0 14px 10px 0;
  border-radius: 12px;
}

/* En móviles, que se vea completa y sin flotado */
@media (max-width: 640px) {
  .float-right, .float-left {
    float: none;
    display: block;
    width: 100%;
    margin: 0 0 12px 0;
  }
}

