/* ExploringML editorial system. Shared tokens and components, then page layouts. */
:root {
  --paper:#fdfcf9; --ink:#0b1c3c; --muted:#52627c; --accent:#1554d1;
  --rule:#cbd4df; --community:#eaf3fc; --image-mat:#0b1422;
  --display:"Libre Caslon Display",Georgia,serif; --body:"DM Sans",Arial,sans-serif;
  --space-1:8px; --space-2:16px; --space-3:24px; --space-4:32px;
  --space-5:48px; --space-6:64px; --page-width:1320px;
  --gutter:clamp(22px,4.2vw,54px); --column-gap:clamp(32px,5vw,64px);
}
body { background:var(--paper); color:var(--ink); font-family:var(--body); font-size:17px; line-height:1.7; }
a { color:var(--accent); text-underline-offset:4px; }
a:hover { color:#103e99; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible { outline:3px solid var(--accent); outline-offset:4px; border-radius:3px; }
h1,h2,h3 { color:var(--ink); }
/* Brand and navigation */
.navbar { background:var(--paper)!important; padding:12px 0; border:0; font-family:var(--body); }
.navbar>.container-fluid { max-width:var(--page-width); padding:0 var(--gutter); margin:auto; }
.navbar-logo { width:60px; height:60px; max-height:60px; object-fit:contain; border-radius:0; padding:0; }
a.navbar-brand.navbar-brand-logo { margin-right:12px; }
.navbar-brand { font-family:var(--display); font-size:31px; color:var(--ink); line-height:1.1; }
.navbar-title::after { content:"DAVID GWYER"; display:block; font-family:var(--body); font-size:10px; letter-spacing:2.6px; margin-top:8px; color:var(--muted); }
.navbar-nav .nav-link { font-size:15px; color:var(--ink); padding:10px 0!important; margin:0 14px; }
.navbar-nav .nav-link.active { color:var(--accent); box-shadow:0 2px var(--accent); }
.navbar-nav.ms-auto .nav-link { background:var(--accent); color:white; border-radius:5px; padding:11px 20px!important; margin-left:24px; margin-right:8px; white-space:nowrap; }
.navbar-nav.ms-auto .nav-link:hover { background:#103e99; }
.navbar-nav.ms-auto .bi { margin-right:8px; }
#quarto-search { margin-left:12px; }
.navbar-collapse .navbar-nav:first-child { margin-left:auto; }
/* Reusable editorial components */
.eyebrow { font-family:var(--body); font-size:12px; font-weight:500; line-height:1.8; letter-spacing:2.2px; text-transform:uppercase; color:#526c95; margin:0 0 24px; }
.editorial-button { display:inline-flex; align-items:center; justify-content:center; gap:22px; padding:14px 22px; min-height:48px; background:var(--accent); color:#fff; border:1px solid var(--accent); border-radius:5px; text-decoration:none; font-family:var(--body); font-size:15px; font-weight:500; line-height:1.4; }
.editorial-button:hover { background:#103e99; color:white; border-color:#103e99; }
.editorial-button.secondary { background:transparent; color:var(--ink); border-color:#8ea2c0; }
.editorial-button.secondary:hover { background:#edf2f9; }
.home-actions { display:flex; gap:16px; flex-wrap:wrap; }
.text-link { font-family:var(--display); font-size:23px; text-decoration:none; display:inline-flex; gap:14px; align-items:center; }
.text-link:hover { text-decoration:underline; }
.text-link .bi { font-size:17px; }
.post-image-link { display:block; overflow:hidden; border-radius:4px; background:var(--image-mat); }
.post-image { display:block; width:100%; aspect-ratio:16/9; object-fit:contain; }
.featured-post .post-image { object-fit:cover; }
.post-meta { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; font-size:11px; font-weight:500; letter-spacing:1.2px; text-transform:uppercase; color:#526789; line-height:1.6; margin:20px 0 12px; }
.featured-post h2,.recent-post h3 { font-family:var(--display); font-size:clamp(30px,2.8vw,38px); line-height:1.12; font-weight:600; letter-spacing:-.5px; border:0; margin:0 0 16px; padding:0; }
.featured-post h2 a,.recent-post h3 a { color:var(--ink); text-decoration:none; }
.featured-post h2 a:hover,.recent-post h3 a:hover { color:var(--accent); }
.post-topics { display:flex; flex-wrap:wrap; align-content:start; gap:6px; margin:0 0 18px; }
.post-topics span { font-size:11px; line-height:1.5; text-transform:uppercase; background:#edf0f3; color:#455772; padding:5px 9px; border-radius:3px; letter-spacing:.15px; }
.post-description { font-size:16px; line-height:1.65; color:#3d4960; margin:18px 0 12px; }
/* Homepage */
.homepage #quarto-content,.editorial-page #quarto-content { display:block; max-width:var(--page-width); margin:0 auto; padding:0 var(--gutter); }
.homepage main.content,.editorial-page main.content { margin:0; width:100%; padding:0; }
.homepage #title-block-header,.editorial-page #title-block-header { display:none; }
.homepage .quarto-listing { padding:0; margin:0; }
.home-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--column-gap); padding:32px 0 36px; }
.home-intro { padding-top:12px; }
.home-intro h1 { font-family:var(--display); font-size:clamp(48px,6.5vw,82px); font-weight:600; line-height:1.04; letter-spacing:-1.8px; margin:0 0 28px; }
.intro-copy { max-width:500px; font-size:19px; line-height:1.6; color:#394760; margin:0 0 32px; }
.home-recent { border-top:1px solid var(--rule); padding:28px 0 0; }
.section-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; gap:16px; }
.section-heading .eyebrow { border:0; padding:0; margin:0; }
.recent-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 var(--column-gap); }
.recent-post { display:grid; grid-template-rows:subgrid; grid-row:span 6; }
.recent-post .post-meta { margin:0 0 12px; }
.recent-post .post-image { aspect-ratio:16/9; }
.recent-post .text-link { align-self:end; }
/* Discord invitation and footer */
.community-invite { display:flex; align-items:center; gap:32px; padding:36px; margin:48px 0 36px; border-radius:8px; background:var(--community); color:var(--ink); grid-column:body-content-start / body-content-end; width:100%; box-sizing:border-box; }
.community-icon { font-size:56px; color:var(--ink); border-right:1px solid #b8cee5; padding-right:32px; line-height:1.4; }
.community-copy { flex:1; min-width:0; }
.community-copy .eyebrow { font-size:11px; letter-spacing:1.7px; margin:0 0 6px; }
.community-copy h2 { font-family:var(--display); font-weight:600; font-size:40px; letter-spacing:-.7px; line-height:1.15; border:0; margin:0 0 8px; padding:0; }
.community-copy p:last-child { font-size:16px; line-height:1.65; margin:0; color:#3d5274; }
.community-invite .editorial-button { white-space:nowrap; }
body:not(.homepage):not(.editorial-page) .community-invite { display:grid; grid-template-columns:54px minmax(0,1fr); padding:28px; gap:22px; }
body:not(.homepage):not(.editorial-page) .community-icon { font-size:42px; padding-right:22px; }
body:not(.homepage):not(.editorial-page) .community-invite .editorial-button { grid-column:2; justify-self:start; }
body:not(.homepage):not(.editorial-page) .community-copy h2 { font-size:34px; }
.nav-footer { max-width:1212px; margin:auto; border-top:1px solid var(--rule); padding:24px 0; background:var(--paper); font-size:13px; color:var(--muted); }
.nav-footer a { color:var(--ink); }
.nav-footer-left { font-family:var(--display); font-size:18px; }
.nav-footer .nav-link { padding:8px 12px; }
.quarto-title-banner { background:#f0f4f8; color:var(--ink); }
.quarto-title-banner h1 { font-family:var(--display); font-weight:400; }
@media(max-width:1100px) {
  .navbar-nav .nav-link { margin:0 10px; }
  .community-invite { flex-wrap:wrap; gap:24px; padding:28px; }
  .community-invite .editorial-button { margin-left:90px; }
}
@media(max-width:991px) {
  .navbar-brand { font-size:27px; }
  .navbar-logo { width:52px; height:52px; }
  .navbar-collapse .navbar-nav:first-child { margin-left:0; }
  .navbar-nav .nav-link { margin:2px 0; padding:10px 0!important; }
  .navbar-nav .nav-link.active { box-shadow:none; font-weight:600; }
  .navbar-nav.ms-auto .nav-link { display:inline-block; margin:12px 0; }
  .home-intro h1 { font-size:clamp(44px,6.2vw,62px); letter-spacing:-1.2px; }
  .intro-copy { font-size:18px; }
  .home-actions { gap:12px; }
  .editorial-button { font-size:14px; padding:12px 16px; }
  .nav-footer { margin:0 var(--gutter); }
}
@media(max-width:700px) {
  body { font-size:16px; }
  .navbar>.container-fluid { padding:0 20px; }
  .navbar-logo { width:46px; height:46px; }
  .navbar-brand { font-size:23px; }
  .navbar-title::after { font-size:8px; margin-top:5px; }
  .navbar-brand-container { max-width:calc(100% - 90px)!important; }
  a.navbar-brand.navbar-brand-logo { margin-right:8px; }
  .home-hero { grid-template-columns:1fr; padding:24px 0 32px; gap:40px; }
  .home-intro { padding:0; }
  .home-intro h1 { font-size:clamp(40px,10.3vw,66px); letter-spacing:-1px; }
  .eyebrow { font-size:11px; letter-spacing:1.8px; margin-bottom:20px; }
  .intro-copy { margin-bottom:24px; }
  .recent-grid { grid-template-columns:1fr; gap:36px; }
  .recent-post { display:block; grid-row:auto; }
  .featured-post h2,.recent-post h3 { font-size:32px; }
  .section-heading .text-link { font-size:20px; }
  .community-invite { padding:26px 23px; margin:36px 0 28px; gap:20px; }
  .community-icon { display:none; }
  .community-copy { flex-basis:100%; }
  .community-copy h2 { font-size:36px; }
  .community-copy p:last-child { font-size:16px; }
  .community-copy br { display:none; }
  .community-invite .editorial-button { margin-left:0; }
  body:not(.homepage):not(.editorial-page) .community-invite { grid-template-columns:1fr; }
  body:not(.homepage):not(.editorial-page) .community-invite .editorial-button { grid-column:1; }
}

/* About and journal use the same editorial type, spacing and image frames. */
.about-hero { display:grid; grid-template-columns:minmax(0,1fr) 300px; align-items:center; gap:var(--column-gap); padding:48px 0 56px; }
.about-hero h1,.journal-header h1 { font-family:var(--display); font-size:clamp(46px,5.7vw,72px); font-weight:600; line-height:1.06; letter-spacing:-1.3px; margin:0 0 24px; }
.page-intro { font-size:20px; line-height:1.65; color:#394760; max-width:650px; margin:0; }
.about-portrait { margin:0; }
.about-portrait img { display:block; width:300px; max-width:100%; height:auto; aspect-ratio:1; object-fit:cover; border-radius:50%; }
.about-portrait figcaption { font-size:12px; color:var(--muted); margin-top:12px; letter-spacing:.5px; }
.about-links { display:flex; flex-wrap:wrap; gap:24px; margin-top:28px; }
.about-links a { font-size:15px; text-decoration:none; }
.about-links a:hover { text-decoration:underline; }
.about-links .bi { font-size:12px; margin-left:5px; }
.about-section { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(0,1.2fr); gap:var(--column-gap); border-top:1px solid var(--rule); padding:40px 0; }
.about-section h2 { font-family:var(--display); font-size:38px; font-weight:600; line-height:1.15; border:0; padding:0; margin:0; }
.prose-column { max-width:660px; color:#394760; }
.prose-column p:last-child { margin-bottom:0; }
.interest-list h3 { font-size:18px; margin:0 0 6px; }
.interest-list p { color:#394760; margin-bottom:24px; }
.education-section h3 { font-family:var(--display); font-size:30px; line-height:1.2; margin:0 0 14px; }
.education-section .eyebrow { font-size:11px; margin-bottom:16px; }
.journal-header { padding:40px 0 36px; border-bottom:1px solid var(--rule); }
.journal-intro { display:flex; justify-content:space-between; align-items:end; gap:32px; }
.journal-intro .text-link { white-space:nowrap; font-size:22px; }
.browse-hint { color:var(--muted); font-size:14px; margin:24px 0 0; }
.blog-page .quarto-listing { padding-top:20px; }
.blog-page .listing-actions-group { margin-bottom:32px; }
.blog-page .quarto-grid-item { background:transparent; border:0; height:auto!important; }
.blog-page .quarto-grid-item .card-img-top { margin:0; flex-shrink:0; background:var(--image-mat); border-radius:4px; overflow:hidden; }
.blog-page .quarto-grid-item .thumbnail-image { display:block; width:100%; height:auto!important; aspect-ratio:16/9; object-fit:contain; }
.blog-page .quarto-grid-item .card-body { padding:20px 0 0; min-width:0; }
.blog-page .quarto-grid-item .card-title { font-family:var(--display); font-size:32px; font-weight:600; line-height:1.15; color:var(--ink); margin-bottom:14px; }
.blog-page .quarto-grid-item .listing-description { font-size:16px; line-height:1.65; color:#3d4960; }
.blog-page .quarto-grid-item .listing-categories { gap:6px; margin-bottom:16px; }
.blog-page .quarto-grid-item .listing-category { border:0; border-radius:3px; background:#edf0f3; color:#455772; font-size:11px; padding:5px 9px; }
.blog-page .quarto-grid-item .card-attribution { color:var(--muted); font-size:12px; padding:16px 0 0; }
.blog-page .list.grid { gap:44px var(--column-gap); }
.blog-page .listing-pagination { margin:32px 0; }
.blog-page .form-control,.blog-page .form-select { background-color:var(--paper); border-color:#aebbcf; min-height:44px; font-size:15px; }
@media(max-width:800px) {
  .about-hero { grid-template-columns:minmax(0,1fr) 240px; gap:32px; }
  .about-section { grid-template-columns:1fr; gap:24px; }
  .journal-intro { display:block; }
  .journal-intro .text-link { margin-top:20px; }
}
@media(max-width:700px) {
  .about-hero { grid-template-columns:1fr; padding:24px 0 36px; }
  .about-portrait { max-width:260px; }
  .about-hero h1,.journal-header h1 { font-size:46px; }
  .page-intro { font-size:18px; }
  .about-section { padding:32px 0; }
  .about-section h2 { font-size:34px; }
  .journal-header { padding:24px 0 28px; }
  .blog-page .quarto-grid-item .thumbnail-image { height:auto!important; aspect-ratio:16/9; }
  .blog-page .quarto-grid-item .card-title { font-size:30px; }
}

/* Readable footer text and generous social-link targets on every page. */
.nav-footer .nav-footer-left p { font-size:20px; color:var(--muted); }
.nav-footer .nav-footer-center .nav-link,.nav-footer .nav-footer-center .nav-link p { font-size:16px; }
.nav-footer .nav-footer-right .nav-link { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:10px; }
.nav-footer .nav-footer-right .bi { font-size:21px; }
