/* johnelia.com v2 — editorial, warm, large type (J reads large type: everything scales from a 19px root). */
:root {
  --paper: #f7f4ee; --ink: #15171c; --mute: #4a4d55; --line: #ddd6c8;
  --scarlet: #9e1b32;   /* Marine scarlet, used as an accent only */
  --gold: #b8892b;      /* decorative gold; text uses --gold-ink for contrast */
  --gold-ink: #7a5a14; --card: #fffdf8;
}
* { box-sizing: border-box; }
html { font-size: 118.75%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.05rem/1.6 -apple-system, "Segoe UI", system-ui, sans-serif; }
h1, h2, h3, .mark, .tag { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
a { color: var(--scarlet); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: space-between;
       padding: 12px 16px; background: rgba(247, 244, 238, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.mark { font-size: 1.35rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; }
.top nav a:hover { color: var(--scarlet); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { display: grid; gap: 28px; align-items: center; padding: 40px 0 28px; }
.portrait { justify-self: center; }
.mono { width: min(320px, 72vw); height: min(320px, 72vw); border-radius: 50%; object-fit: cover; background: var(--card);
                       border: 6px solid var(--card); box-shadow: 0 0 0 2px var(--gold), 0 18px 40px rgba(21, 23, 28, .16); }
.portrait img { display: block; width: min(340px, 78vw); height: auto; aspect-ratio: 768 / 1024; border-radius: 22px; background: var(--card);
                border: 6px solid var(--card); box-shadow: 0 0 0 2px var(--gold), 0 18px 40px rgba(21, 23, 28, .18); transform: rotate(-1.5deg); }
.mono { display: grid; place-items: center; font: 700 5rem/1 "Iowan Old Style", Georgia, serif; color: var(--scarlet); }
.kicker { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--gold-ink); }
h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: 1.02; margin: 6px 0 4px; }
.tag { font-size: clamp(1.25rem, 4vw, 1.6rem); margin: 0 0 14px; color: var(--scarlet); font-style: italic; }
.lede { font-size: 1.15rem; color: var(--mute); max-width: 38ch; margin: 0 0 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 14px 22px; border-radius: 10px; background: var(--scarlet); color: #fff; text-decoration: none; font-weight: 700; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn:hover { filter: brightness(1.08); }

.band { padding: 36px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 18px; }
h2::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 10px; background: var(--gold); }
h3 { font-size: 1.3rem; margin: 0 0 8px; }
.grid { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card p { margin: 0 0 10px; } .card p:last-child { margin-bottom: 0; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 700; }
.feature { margin: 0 0 18px; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.feature img { display: block; width: 100%; height: auto; }
.feature figcaption { padding: 14px 18px; color: var(--mute); }
.contact p { font-size: 1.1rem; }
.foot { text-align: center; padding: 28px 16px 40px; color: var(--mute); border-top: 1px solid var(--line); margin-top: 20px; }
.semper { font-family: "Iowan Old Style", Georgia, serif; font-style: italic; color: var(--scarlet); }

@media (min-width: 760px) {
  .hero { grid-template-columns: 340px 1fr; padding: 64px 0 44px; }
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}
/* /links page */
.linkgroup { margin: 0 0 26px; } .linkgroup ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.linkgroup li a { font-weight: 700; } .linkgroup li span { color: var(--mute); }
@media (min-width: 760px) { .linkgroup ul { grid-template-columns: 1fr 1fr; } }

/* Broke Elvis: the legend and the reality, side by side */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.duo figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.duo img { display: block; width: 100%; height: auto; }
.duo figcaption { padding: 10px 14px; font-family: "Iowan Old Style", Georgia, serif; font-style: italic; color: var(--mute); }
.duo figure:first-child { transform: rotate(-1.2deg); } .duo figure:last-child { transform: rotate(1.2deg); }

/* My sites + the blogs */
h3.group { margin: 22px 0 10px; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-ink); font-family: inherit; }
.grid.sites, .grid.blogs { grid-template-columns: 1fr; }
.site, .blog { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
               color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.site:hover, .blog:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(21, 23, 28, .10); border-color: var(--gold); }
.site strong { font-size: 1.12rem; } .site span:last-child, .blog span:nth-child(2) { color: var(--mute); }
.dom { font-size: .85rem; font-weight: 700; color: var(--scarlet); }
.blog { background: var(--ink); color: #f3efe6; border-color: var(--ink); }
.blog .mast { font: 800 1.15rem/1.2 "Iowan Old Style", Georgia, serif; letter-spacing: .06em; color: #fff; }
.blog span:nth-child(2) { color: #cfc8b8; } .blog .dom { color: #e9c46a; }
@media (min-width: 760px) { .grid.sites { grid-template-columns: repeat(3, 1fr); } .grid.blogs { grid-template-columns: repeat(3, 1fr); } }
.solo { max-width: 420px; margin: 22px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transform: rotate(-1.2deg); }
.solo img { display: block; width: 100%; height: auto; }
.solo figcaption { padding: 10px 14px; font-family: "Iowan Old Style", Georgia, serif; font-style: italic; color: var(--mute); text-align: center; }

/* App Store / Play Store line + app logos above the JellyDazzle and KoiKnife cards (J 10/31) */
.apps-line { margin: 26px 0 12px; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.app-logos { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 0 18px; }
.app-logos a { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.app-logos img { width: 120px; height: 120px; border-radius: 26px; border: 1px solid var(--line); object-fit: cover; }
.app-logos a:focus-visible img, .app-logos a:hover img { outline: 3px solid var(--gold); outline-offset: 2px; }
.in-works { margin: 0 0 6px; padding-left: 1.2em; font-size: 1.1rem; line-height: 1.7; }

/* Card pictures (J 10/31): 600x400 screenshot on each built card; business sites get a light shot with the name over it */
.card .thumb { display: block; width: calc(100% + 40px); max-width: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: -20px -20px 14px; border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.site .shot { position: relative; display: block; aspect-ratio: 3 / 2; margin-bottom: 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.site .shot img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: blur(2px) saturate(.75); transform: scale(1.04); }
.site .shot-name { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; font-size: 1.7rem; font-weight: 800; color: var(--ink); background: rgba(247,244,238,.5); text-shadow: 0 1px 0 var(--paper); }
.site .shot .shot-name { color: var(--ink); opacity: 1; }
/* Song card: cover art beside the details (J 10/31) */
.card.song { display: flex; gap: 20px; align-items: flex-start; }
.song .free { margin: 6px 0 4px; }
.song .free-note { margin: 0 0 12px; font-size: .9rem; color: var(--mute); }
.song .cover img { display: block; width: 180px; height: 180px; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 560px) { .card.song { flex-direction: column; } .song .cover img { width: 100%; height: auto; } }
/* GitHub link with its mark (J 10/31) */
.gh { margin: 0 0 10px; }
.gh a { display: inline-flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.gh a:hover span, .gh a:focus-visible span { text-decoration: underline; }
.in-works .lang { display: inline-block; margin: 0 0 0 2px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--mute); }
/* Toys for Tots line in the hero (J 10/31) */
.t4t { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--mute); font-size: 1rem; }
.t4t img { display: block; width: 150px; height: auto; border-radius: 6px; flex: none; }
@media (max-width: 560px) { .t4t { flex-direction: column; align-items: flex-start; } }
.card .thumb.under-title { margin: 6px -20px 14px; border-radius: 0; border-top: 1px solid var(--line); }
.t4t .aff { font-size: .8em; color: var(--mute); }
.t4t span { max-width: 34em; line-height: 1.55; }

/* Buttons moved under "What I do" (J 11/01) */
.cta.below { margin-top: 28px; }

/* Enterprise card tech list (J 11/01) */
.card ul.stack { margin: 0; padding-left: 1.1em; }
.card ul.stack li { margin: 0 0 8px; line-height: 1.45; }
.card ul.stack li::marker { color: var(--scarlet); }

/* What I do: lead line above each card's bullets (J 11/01) */
.card .lead { font-weight: 500; margin-bottom: 14px; }
.card ul.stack + p { margin-top: 14px; }

/* Monthly feature archive line (J 11/01) */
details.archive { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); }
details.archive summary { cursor: pointer; color: var(--mute); font-size: .95rem; font-weight: 600; }
details.archive .solo img { max-width: 260px; height: auto; }

/* Ask about John button (J 11/01): top of the page per J, but under the menu bar instead of over it */
.acw-fab { top: 74px !important; }
.acw-panel { top: 124px !important; }
@media (max-width: 640px) { .acw-fab { top: 112px !important; } .acw-panel { top: 160px !important; } }
/* Logo above the screenshot on a project card (Tune Book, J 11/23). The tabs logo is only 365 px wide, so it is capped near its own size instead of stretched to the card width. */
.card .card-logo { display: block; margin: 2px 0 14px; }
.card .card-logo img { display: block; width: 100%; max-width: 340px; height: auto; }
.card .card-logo:focus-visible img, .card .card-logo:hover img { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
