/* =========================
   Identity — Mocha fika
   ========================= */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    /* Base — latte-inspired */
    --background: #eae3dc;      /* warm latte foam */
    --text: #2d2a28;            /* dark roast text */

    /* Links — like cinnamon/cardamom */
    --link: #7a5a3b;
    --link-hover: #5f452e;

    /* Surfaces — subtle layering */
    --accent-1: #f4efea;        /* cards & buttons */
    --accent-2: #d9d2cb;        /* borders */
    --accent-3: #7c736d;        /* muted text/icons */
    --highlight: #e1d7ce;       /* highlight background */

    /* A11y */
    --focus-ring: #7a5a3b;
    --selection-bg: #d9c8b7;    /* like spilled latte */

    /* Radius */
    --radius: 0.75rem;
    --radius-sm: 0.625rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    /* Base — warm dark mocha */
    --background: #1b1715;
    --text: #eae3dc;

    /* Links */
    --link: #d6b89c;
    --link-hover: #e4c9ad;

    /* Surfaces */
    --accent-1: #2a2421;
    --accent-2: #3b322e;
    --accent-3: #b8a99e;
    --highlight: #241f1c;

    /* A11y */
    --focus-ring: #d6b89c;
    --selection-bg: #3a2f28;

    --radius: 0.75rem;
    --radius-sm: 0.625rem;
  }
}


/* =========================
   Base page styling
   ========================= */
html, body {
  background: var(--background);
  color: var(--text);
}
::selection { background: var(--selection-bg); color: var(--text); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================
   Links and focus
   ========================= */
a { text-decoration: none; color: var(--link); }
a:hover, a:active { color: var(--link-hover); }

/* no underline on logo/header */
.site-title a,
.site-nav a { text-decoration: none; }

/* focus outlines only on interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================
   Status feed cards
   ========================= */
.h-entry {
  display: flex;
  flex-direction: column-reverse; /* feed vibe */
  gap: 0.6rem;
  border: 1px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin: 2.4rem 0;
}

/* Gentle desktop hover (no transitions) */
@media (hover: hover) and (pointer: fine) {
  .h-entry:hover {
    border-color: var(--accent-3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  }
}

/* Tighten default article spacing */
article { margin: 0 0 2rem 0; }
article:last-of-type { margin-bottom: 1rem; }

/* =========================
   Timestamp
   ========================= */
.post-date {
  color: var(--accent-3);
  font-size: 1.4rem;
  margin: 0;
  order: 2; /* below content in the reversed stack */
}
.post-date a { color: var(--accent-3); }
.post-date a:hover { color: var(--link); }

/* =========================
   Entry content
   ========================= */
.h-entry p { margin: 0.3rem 0; }
.h-entry p:last-child { margin-bottom: 0; }
.h-entry p a { font-weight: var(--font-weight-bold); }

/* Media */
article img,
article video {
  border-radius: var(--radius-sm);
  margin: 1.2rem 0;
}

/* =========================
   Chips (reply/share)
   ========================= */
.reply-buttons,
.tinylytics_kudos,
a.conversation-on-mb,
a.reply-on-mastodon,
a.reply-by-email { border-radius: 999px; }

.reply-buttons li { margin-right: .4rem; }

.tinylytics_kudos,
a.conversation-on-mb,
a.reply-on-mastodon,
a.reply-by-email {
  border: 1px solid var(--accent-2);
  background: var(--accent-1);
  color: var(--accent-3);
}

@media (hover: hover) and (pointer: fine) {
  .tinylytics_kudos:hover,
  a.conversation-on-mb:hover,
  a.reply-on-mastodon:hover,
  a.reply-by-email:hover {
    background: var(--link);
    border-color: var(--link);
    color: var(--background);
  }
}

/* =========================
   Mobile
   ========================= */
@media (max-width: 48rem) { /* 768px */
  .h-entry {
    border-radius: var(--radius);
    margin: 1.2rem 0 2.4rem 0;
    padding: 1.4rem 1.6rem;
  }
  .site-title { font-size: 2rem; }
}
