/* Hueb.Net — site stylesheet */
:root {
  --bg: #eef4f1;
  --surface: #ffffff;
  --text: #1f2a28;
  --muted: #5b6b67;
  --accent: #2f6f5e;
  --accent-dark: #1f4d41;
  --header: #1f2f2c;
  --border: #d6e2dd;
  --radius: 10px;
  --max: 1100px;
  --read: 46rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.7 var(--font); display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-dark); }
:focus-visible { outline: 3px solid #f2b134; outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: var(--header); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: 1.45rem; margin: 1.6em 0 .5em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: .5rem 1rem; border-radius: 6px; }

/* Header */
.site-header { background: var(--header); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font: 700 1.4rem var(--serif); }
.brand:hover, .brand:focus { color: #fff; }
.brand img { border-radius: 4px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a { display: block; color: #e3eeea; text-decoration: none; padding: .45rem .8rem; border-radius: 6px; }
.site-nav a:hover, .site-nav a:focus, .site-nav a[aria-current] { background: rgba(255,255,255,.12); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 24px; height: 2px; background: #fff; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 700px) {
  .menu-toggle { display: block; }
  .site-nav { display: none; width: 100%; padding-bottom: .75rem; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
}

/* Breadcrumbs */
.breadcrumbs { font-size: .9rem; color: var(--muted); max-width: var(--read); margin: 0 auto 1rem; }
.breadcrumbs a { color: var(--muted); }

/* Home */
.hero { text-align: center; padding: 1.5rem 0 2rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); margin-bottom: .2em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; margin: 0 auto; }
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding: 0 1.25rem 1.25rem; display: flex; flex-direction: column; }
.card-link { text-decoration: none; color: inherit; }
.card-link img { display: block; width: calc(100% + 2.5rem); max-width: none; margin: 0 -1.25rem; aspect-ratio: 16/10; object-fit: cover; }
.card-link img.crop-top { object-position: 50% 30%; }
.card h2 { margin: 1rem 0 .4rem; }
.card-link:hover h2 { color: var(--accent); }
.card p { margin: 0 0 .75rem; }

/* Articles */
.entry { max-width: var(--read); margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.5rem); }
.entry::after { content: ""; display: table; clear: both; }
.meta, .kicker { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.kicker { margin: 0; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.kicker a { color: var(--muted); text-decoration: none; }
.entry li { margin-bottom: .75em; }
.alignright { float: right; margin: 0 0 1rem 1.25rem; }
@media (max-width: 480px) { .alignright { float: none; display: block; margin: 0 auto 1rem; } }
address { font-style: normal; padding-left: 1rem; border-left: 3px solid var(--border); }
blockquote { margin: 2rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--accent); background: var(--bg); font: italic 1.2rem/1.5 var(--serif); }
blockquote p { margin: 0 0 .5rem; }
blockquote cite { font: normal .95rem var(--font); color: var(--muted); }
blockquote cite::before { content: "— "; }
figure { margin: 1.5rem 0; }
figure.feature { margin-left: calc(-1 * clamp(1.25rem, 4vw, 2.5rem)); margin-right: calc(-1 * clamp(1.25rem, 4vw, 2.5rem)); }
figure.feature img { display: block; width: 100%; }
figure.inline { text-align: center; }
figcaption { font-size: .9rem; color: var(--muted); text-align: center; padding: .5rem 1rem 0; }
ol.chapters, ul.chapters { padding-left: 1.25rem; }
ul.chapters { margin: .25rem 0 0; }
ul.chapters li { margin-bottom: .25rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.pager .next { margin-left: auto; text-align: right; }

/* Lightbox */
a.lightbox { display: block; cursor: zoom-in; }
.lb-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10,15,14,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.lb-overlay.show { opacity: 1; }
.lb-overlay img { max-width: 100%; max-height: calc(100vh - 100px); box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: zoom-out; }
.lb-caption { color: #e8efec; margin-top: .75rem; text-align: center; }
.lb-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: #fff; font-size: 2.25rem; line-height: 1; cursor: pointer; padding: 6px 10px; }

/* Footer */
.site-footer { background: var(--header); color: #c9d6d2; font-size: .9rem; text-align: center; padding: 1.25rem 0; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }

@media print {
  .site-header, .site-footer, .breadcrumbs, .pager { display: none; }
  body { background: #fff; }
  .entry { border: 0; padding: 0; }
}

/* Author portrait */
a.portrait { width: 190px; }
a.portrait img { display: block; border-radius: var(--radius); }
.chapter-header { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.author-photo { flex: 0 0 auto; }
.author-photo img { display: block; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; object-position: 50% 35%; border: 3px solid var(--border); }
@media (max-width: 480px) { .author-photo img { width: 72px; height: 72px; } }
