/* Sharad — sections rendered outside the Framer export (.sx).
   Matches the surrounding design: Geist, light theme, #DC2626 accent. */

.sx {
  --ink: #0b0b0b;
  --muted: #6b6b6b;
  --line: rgba(0, 0, 0, 0.09);
  --accent: #dc2626;
  --card: #ffffff;
  --page: #fafafa;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 96px;
  box-sizing: border-box;
  font-family: Geist, "Geist Placeholder", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
}

.sx *,
.sx *::before,
.sx *::after {
  box-sizing: border-box;
}

.sx .sx-eyebrow {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 500;
}

.sx .sx-h2 {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
}

.sx .sx-lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 52ch;
}

.sx section {
  margin: 0 0 96px;
  scroll-margin-top: 90px;
}

/* ------------------------------------------------------------ bento grid */

.sx .sx-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 132px;
  gap: 12px;
}

.sx .sx-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
  min-height: 0;
}

.sx .sx-tile:hover {
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* bento rhythm: one large, two medium, one wide-ish */
.sx .sx-tile:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}
.sx .sx-tile:nth-child(2) {
  grid-column: span 2;
}
.sx .sx-tile:nth-child(3) {
  grid-column: span 1;
}
.sx .sx-tile:nth-child(4) {
  grid-column: span 1;
}

.sx .sx-tile-id {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.sx .sx-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

.sx .sx-tile-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.sx .sx-tile-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* empty state — deliberately blank, no placeholder lorem */
.sx .sx-tile-empty {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
  align-self: flex-start;
}

.sx .sx-tile[data-filled="true"] .sx-tile-empty {
  display: none;
}

/* --------------------------------------------------------------- writing */

.sx .sx-posts {
  border-top: 1px solid var(--line);
}

.sx .sx-post {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.sx .sx-post:hover {
  background: rgba(0, 0, 0, 0.02);
}

.sx .sx-post:hover .sx-post-title {
  color: var(--accent);
}

.sx .sx-post-date {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
}

.sx .sx-post-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.sx .sx-post-excerpt {
  grid-column: 2 / -1;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: -4px 0 0;
}

.sx .sx-post-meta {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.sx .sx-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------- contact */

.sx .sx-rows {
  border-top: 1px solid var(--line);
}

.sx .sx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

.sx .sx-row:hover {
  color: var(--accent);
}

.sx .sx-row-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}

.sx .sx-row:hover .sx-row-label {
  color: var(--accent);
}

.sx .sx-row-value {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sx .sx-row:hover .sx-row-value {
  color: var(--accent);
}

.sx .sx-ico {
  width: 17px;
  height: 17px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------- counter + footer */

.sx .sx-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  align-items: baseline;
  padding-top: 4px;
}

.sx .sx-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.sx .sx-stat-n {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}

.sx .sx-stat-l {
  font-size: 13px;
  color: var(--muted);
}

.sx .sx-foot {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sx .sx-foot-me {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
}

.sx .sx-foot-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
}

.sx .sx-built {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.sx .sx-built b {
  font-weight: 600;
  color: var(--ink);
}

.sx .sx-copyright {
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.38);
  width: 100%;
}

.sx a:focus-visible,
.sx button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 809px) {
  .sx {
    padding: 0 20px 72px;
  }
  .sx section {
    margin-bottom: 72px;
  }
  .sx .sx-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 112px;
  }
  /* wide / half / half / wide, so the last tile does not sit alone on a row */
  .sx .sx-tile:nth-child(1),
  .sx .sx-tile:nth-child(4) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .sx .sx-tile:nth-child(2),
  .sx .sx-tile:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
  }
  .sx .sx-post {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 20px 2px;
  }
  .sx .sx-post-date {
    grid-column: 1 / -1;
  }
  .sx .sx-post-excerpt {
    grid-column: 1 / -1;
  }
  .sx .sx-row {
    padding: 18px 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sx .sx-tile,
  .sx .sx-post,
  .sx .sx-row {
    transition: none;
  }
  .sx .sx-tile:hover {
    transform: none;
  }
}
