/*
Theme Name: Bodhi Avasa
Description: Quiet reading theme for the words and recordings of Bodhi Avasa.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: bodhiavasa
*/

:root {
  --paper: #f6f1e7;
  --ink: #2b2621;
  --heading: #4f453b;
  --muted: #6f6458;
  --line: #ddd3c2;
  --accent: #8a5a3c;
  --serif: "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;
  --measure: 38rem;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.2rem/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
h1, h2, h3 { font-weight: 400; line-height: 1.2; color: var(--heading); }
.entry-content h2 { font-size: 2rem; }
.entry-content h3 { font-size: 1.6rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem auto; width: 6rem; }
blockquote { margin: 2rem 0; padding: 0 1.5rem; font-style: italic; border-left: 1px solid var(--line); }

.skip { position: absolute; left: 1rem; top: -4rem; padding: .5rem 1rem; background: var(--ink); color: var(--paper); }
.skip:focus { top: 1rem; }

/* Header */
.site-header { text-align: center; padding: 2.5rem 1rem 1rem; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); text-decoration: none; font-size: 1.5rem; letter-spacing: .08em; }
.menu-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.6rem; margin-top: .9rem; }
.site-nav li { position: relative; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 1rem; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--ink); }
.site-nav .sub-menu {
  position: absolute; left: 50%; top: 100%; z-index: 10; transform: translateX(-50%);
  min-width: 13rem; padding: .6rem 0; background: var(--paper); border: 1px solid var(--line);
  text-align: left; visibility: hidden; opacity: 0; transition: opacity .15s;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { visibility: visible; opacity: 1; }
.site-nav .sub-menu a { display: block; padding: .25rem 1.1rem; }

/* Content */
.site-main { max-width: var(--measure); margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.entry-header, .archive-header { text-align: center; margin-bottom: 2.5rem; }
.entry-header h1, .archive-header h1 { font-size: 2.6rem; font-style: italic; margin: .3rem 0; }
.meta { color: var(--muted); font-size: .95rem; margin: 0; }
.meta a { color: var(--muted); }
.entry-image { display: block; margin: 0 auto 2rem; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content .alignwide { margin-left: -6rem; margin-right: -6rem; max-width: none; }
.entry-content .wp-block-embed { margin: 2rem 0; }
.archive-description { color: var(--muted); }
.entry-content .wp_random_inside { margin: 2.5rem 0 1.2em; font-style: italic; font-size: 1.5rem; }
.entry-content .wp_random_inside .dashicons { display: none; }
/* !important: wp-random-post-inside forces red with !important */
.entry-content .wp_random_inside a { color: var(--heading) !important; text-decoration: none; }
.entry-content .wp_random_inside a:hover { color: var(--accent) !important; }

/* Lists */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.post-list h2 { font-size: 1.55rem; margin: 0; }
.post-list h2 a { color: var(--heading); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list p { margin: .3rem 0 0; }
.pagination, .post-navigation { margin-top: 2.5rem; text-align: center; font-size: 1rem; }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.2rem; }
.post-navigation .nav-links { justify-content: space-between; text-align: left; }

/* Comments and forms */
.comments { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-meta, .reply { font-size: .95rem; color: var(--muted); }
input, textarea, button { font: inherit; color: var(--ink); }
input[type=text], input[type=email], input[type=url], input[type=search], textarea {
  width: 100%; padding: .5rem .7rem; background: #fffdf8; border: 1px solid var(--line);
}
input[type=submit], button { padding: .45rem 1.2rem; background: transparent; border: 1px solid var(--accent); color: var(--accent); cursor: pointer; }
input[type=submit]:hover, button:hover { background: var(--accent); color: var(--paper); }
.search-form { display: flex; gap: .5rem; }

/* Footer */
.site-footer { text-align: center; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer p { margin: 0; letter-spacing: .08em; }

/* Small screens: menu behind a toggle, submenus shown inline */
@media (max-width: 760px) {
  body { font-size: 1.1rem; }
  .menu-toggle { display: block; margin: .8rem auto 0; font-size: 1rem; }
  .site-nav { display: none; }
  .nav-open .site-nav { display: block; }
  .site-nav > ul { flex-direction: column; gap: .4rem; }
  .site-nav .sub-menu { position: static; transform: none; visibility: visible; opacity: 1; border: 0; padding: .2rem 0 0; text-align: center; min-width: 0; }
  .entry-header h1, .archive-header h1 { font-size: 1.8rem; }
  .entry-content .alignwide { margin-left: 0; margin-right: 0; }
}
