/* wonderly.net — shared styles. Fully self-hosted: no web fonts, no CDN, no trackers. */

:root {
  color-scheme: light dark;
  /* Gruvbox light */
  --bg:      #fbf1c7;
  --bg2:     #f9f5d7;   /* hero wash    */
  --surface: #f2e5bc;   /* panels/cards */
  --ink:     #3c3836;
  --muted:   #665c54;
  --border:  #d5c4a1;
  --accent:  #9a2420;   /* gruvbox red  */
  --accent2: #076678;   /* gruvbox blue */
  --shadow:  0 1px 2px rgba(40,33,20,.05), 0 6px 20px rgba(40,33,20,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", "URW Palladio L", P052, serif;
  --sans: Avenir, Montserrat, Corbel, "URW Gothic", source-sans-pro, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Gruvbox dark */
    --bg:      #282828;
    --bg2:     #32302f;
    --surface: #32302f;
    --ink:     #ebdbb2;
    --muted:   #a89984;
    --border:  #504945;
    --accent:  #7b9b8f;
    --accent2: #de402e;
    --shadow:  0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; cursor: url('/cursors/Tomatic_Arrow.cur'), auto; }
a, button, summary, label, .iconlink { cursor: url('/cursors/Tomatic_Link.cur'), pointer; }
input, textarea, select { cursor: url('/cursors/Tomatic_Ibeam.cur'), text; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% -10%, var(--bg2) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4.5rem;
  line-height: 1.7;
  font-size: 1.02rem;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent2); }

/* ---- hero ---- */
.hero { display: flex; align-items: center; gap: 1.3rem; margin-bottom: .5rem; }
.avatar {
  flex: 0 0 auto; width: 5.25rem; height: 5.25rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.8rem; color: #fff;
  background: linear-gradient(140deg, var(--accent), #15514d);
  box-shadow: var(--shadow); letter-spacing: .01em;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.05; margin: 0;
  letter-spacing: -.01em;
}
.hero .tagline { color: var(--ink); margin: .4rem 0 0; font-size: 1.05rem; }
.hero .meta { color: var(--muted); font-size: .9rem; margin: .3rem 0 0; }
.interests { color: var(--muted); font-size: .95rem; line-height: 1.9; margin: 1.4rem 0 0; }

/* ---- sections ---- */
section { margin-top: 2.9rem; }
h2 {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 700; margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .6rem;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
p { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; }

/* ---- cards ---- */
.cards { display: grid; gap: .85rem; }
@media (min-width: 34rem) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 14px; padding: 1.05rem 1.15rem; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: 0 0 .3rem; font-size: 1.05rem; font-family: var(--serif); }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.card .cat { display: inline-block; font-size: .67rem; text-transform: uppercase;
  letter-spacing: .12em; font-weight: 700; color: var(--accent2); margin-bottom: .45rem; }
.card.span-all { grid-column: 1 / -1; }
.card .tags { margin: 0; }
.card .tags li { background: var(--bg); }

/* ---- post list ---- */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 0; border-bottom: 1px solid var(--border); }
.posts li:last-child { border-bottom: 0; }
.posts .thumb { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.posts .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.posts .pbody { flex: 1; min-width: 0; }
.posts .pbody > a { font-family: var(--serif); font-size: 1.12rem; text-decoration: none; }
.posts .pbody > a:hover { text-decoration: underline; }
.posts .when { display: block; color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.posts .excerpt { color: var(--muted); font-size: .92rem; margin: .3rem 0 0; }

/* ---- top social bar ---- */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 1.1rem; margin-bottom: 2.25rem; }
.iconlink { color: var(--muted); display: inline-flex; transition: color .15s ease, transform .15s ease; }
.iconlink:hover { color: var(--accent); transform: translateY(-1px); }
.iconlink svg { width: 1.4rem; height: 1.4rem; fill: currentColor; display: block; }

/* ---- footer ---- */
footer {
  margin-top: 4rem; padding-top: 1.3rem; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--muted);
}

/* ---- post page ---- */
.site-nav { font-size: .85rem; letter-spacing: .04em; margin-bottom: 2.5rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--accent); }
article h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 5vw, 2.2rem);
  line-height: 1.12; margin: 0 0 .3rem; letter-spacing: -.01em;
}
article .post-date { color: var(--muted); font-size: .85rem; margin: 0 0 2rem; }
article p { margin: 0 0 1.15rem; }

/* video / link card */
.video-card { display: block; position: relative; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border); margin: 1.5rem 0; }
.video-card img { display: block; width: 100%; height: auto; }
.video-card .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(20,16,10,.18); transition: background .15s ease;
}
.video-card:hover .play { background: rgba(20,16,10,.32); }
.video-card .play span {
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.video-card .play span::after {
  content: ""; margin-left: .25rem;
  border-style: solid; border-width: .85rem 0 .85rem 1.4rem;
  border-color: transparent transparent transparent var(--accent2);
}
.video-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .85rem;
  font-size: .82rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7));
}

/* tags */
.tags { margin: 1.5rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.tags li { font-size: .8rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; }

/* ---- book / long-form reading ---- */
.book h2 { font-family: var(--serif); text-transform: none; letter-spacing: -.01em;
  font-size: 1.6rem; font-weight: 600; color: var(--ink); margin: 2.8rem 0 1rem; }
.book h2::after { display: none; }
.book h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent2); font-weight: 700; margin: 2rem 0 .75rem; }
.book p { text-align: justify; hyphens: auto; }
.book blockquote { margin: 1.4rem 0; padding: .3rem 0 .3rem 1.2rem;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.book ul { margin: 1.2rem 0; padding-left: 1.3rem; }
.book li { margin: .35rem 0; }
.book sup { font-size: .7em; color: var(--accent2); padding: 0 1px; }
.book-cover { float: right; width: 42%; max-width: 240px; height: auto;
  margin: .3rem 0 1rem 1.5rem; border-radius: 8px; box-shadow: var(--shadow); }
.compare { display: grid; gap: 1rem; margin: 1.8rem 0; clear: both; }
@media (min-width: 34rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .col { border: 1px solid var(--border); background: var(--surface);
  border-radius: 12px; padding: 1rem 1.15rem; }
.compare h4 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 .6rem; color: var(--accent); }
.compare p { text-align: left; margin: 0 0 .6rem; font-size: .96rem; }
.compare p:last-child { margin-bottom: 0; }
.endnotes { color: var(--muted); font-size: .92rem; padding-left: 1.4rem; }
.endnotes li { margin: .55rem 0; }
.colophon { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--muted); clear: both; }
.book-fig { margin: 1.8rem auto; padding: 1rem; background: #fdfdfb;
  border: 1px solid var(--border); border-radius: 10px; clear: both; }
.book-fig img { display: block; max-width: 100%; max-height: 500px; width: auto; height: auto; margin: 0 auto; }
