/* robocipe.com - "electronics recipe book".
   Recipe-card paper, circuit-board green, copper traces, LED accents.
   Fonts are self-hosted (OFL): Sofia Sans (Bulgarian design, Bulgarian Cyrillic forms) for text,
   Unbounded for headings. Nothing loads from third parties. */

@font-face {
  font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(/assets/fonts/sofia-sans-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap;
  src: url(/assets/fonts/sofia-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/assets/fonts/unbounded-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/assets/fonts/unbounded-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fbf7ef;
  --paper-2: #f4ecdd;
  --card: #ffffff;
  --ink: #1e2320;
  --ink-2: #3a423d;
  --muted: #66706a;
  --line: #e6dccb;
  --dot: #ddd1bc;
  --pcb: #0f3b2d;
  --pcb-2: #0b2e23;
  --pcb-ink: #eee8da;
  --copper: #c8742f;
  --copper-ink: #9a4a14;          /* links and small text on paper: 5.6:1 */
  --copper-soft: #f6e3cf;
  --led: #ff4d4d;
  --juice: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(30, 35, 32, .06), 0 8px 24px -12px rgba(30, 35, 32, .18);
  --shadow-lift: 0 2px 4px rgba(30, 35, 32, .08), 0 18px 36px -16px rgba(30, 35, 32, .32);
  --font-text: "Sofia Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Unbounded", "Sofia Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.68 var(--font-text);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--copper-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--juice); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; letter-spacing: -.01em; color: var(--ink); }

.wrap { max-width: 47rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 10; background: var(--juice); color: var(--ink); padding: .5rem 1rem; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 1rem; }

/* ---------------------------------------------------------------- brand / header ---- */
.site-header, .site-footer {
  background: var(--pcb) url(/assets/circuit.svg) repeat;
  color: var(--pcb-ink);
}
.site-header { position: relative; border-bottom: 4px solid var(--copper); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.brand-logo { display: block; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.led {
  width: .55rem; height: .55rem; border-radius: 50%; margin-left: -.15rem; align-self: flex-start; margin-top: .45rem;
  background: var(--led); box-shadow: 0 0 6px 2px rgba(255, 77, 77, .75);
  animation: blink 2.6s ease-in-out infinite;
}
@keyframes blink { 0%, 55%, 100% { opacity: 1; } 70%, 85% { opacity: .25; box-shadow: none; } }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .4rem .85rem; border-radius: 999px; color: var(--pcb-ink); text-decoration: none;
  font-weight: 600; font-size: 1rem; line-height: 1.3; border: 1px solid transparent;
}
.site-nav a:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.site-nav a[aria-current="page"] { background: var(--copper); color: #fff; }

/* -------------------------------------------------------------------------- hero ---- */
.hero {
  /* a breadboard: rows of contact holes */
  background:
    radial-gradient(circle at 1px 1px, var(--dot) 1.4px, transparent 1.9px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; padding-top: 3.25rem; padding-bottom: 3.5rem; }
.kicker {
  margin: 0 0 .6rem; font: 600 .8rem/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--copper-ink);
}
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.2rem); font-weight: 800; margin: 0; letter-spacing: -.03em; line-height: 1; color: var(--pcb); }
.lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink-2); max-width: 34rem; margin: 1rem 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.btn {
  display: inline-block; padding: .75rem 1.3rem; border-radius: 999px; background: var(--copper-ink); color: #fff;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; line-height: 1.2; box-shadow: 0 4px 0 #6e330c;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #6e330c; text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #6e330c; }
.btn-ghost { background: transparent; color: var(--pcb); box-shadow: inset 0 0 0 2px var(--pcb); }
.btn-ghost:hover, .btn-ghost:active { box-shadow: inset 0 0 0 2px var(--pcb); background: rgba(15, 59, 45, .06); }

/* the recipe index card */
.recipe-card {
  justify-self: center; width: min(100%, 22rem); padding: 1.4rem 1.5rem 1.2rem; border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 2.6rem, rgba(229, 72, 77, .35) 2.6rem, rgba(229, 72, 77, .35) calc(2.6rem + 1px), transparent calc(2.6rem + 1px)),
    repeating-linear-gradient(180deg, transparent 0 2.15rem, rgba(11, 110, 160, .14) 2.15rem calc(2.15rem + 1px)),
    #fffdf8;
  box-shadow: var(--shadow-lift); transform: rotate(-1.6deg); position: relative;
}
.recipe-card::before {
  content: ""; position: absolute; top: -.7rem; left: 50%; width: 6rem; height: 1.4rem; transform: translateX(-50%) rotate(2deg);
  background: rgba(245, 158, 11, .35); border-radius: 2px;
}
.recipe-title { margin: 0 0 .4rem 2.4rem; font: 800 1.05rem/2.15rem var(--font-display); color: var(--pcb); }
.ingredients { list-style: none; margin: 0; padding: 0 0 0 2.4rem; }
.ingredients li { line-height: 2.15rem; font-size: 1.15rem; display: flex; align-items: center; gap: .55rem; }
.ingredients li::before {
  content: "✓"; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; flex: none;
  border: 2px solid var(--pcb); border-radius: 4px; font-size: .8rem; font-weight: 900; color: var(--copper-ink); line-height: 1;
}
.qty { font: 700 .95rem/1 var(--font-mono); color: var(--copper-ink); }
.recipe-result { margin: .2rem 0 0 2.4rem; line-height: 2.15rem; font-weight: 700; font-style: italic; color: var(--pcb); }

/* ------------------------------------------------------------------- home cards ---- */
.recipes { padding-top: 3rem; padding-bottom: 3.5rem; }
.section-title {
  display: flex; align-items: center; gap: .9rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--pcb); margin: 0 0 1.5rem;
}
.section-title::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--copper), transparent); }
.cards { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-media { aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: .9rem; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.3rem; }
.card h3 { font-size: 1.22rem; font-weight: 700; margin: .55rem 0 .35rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card clickable */
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--juice); outline-offset: 3px; }
.card .meta { margin: 0 0 .6rem; }
.excerpt {
  margin: 0 0 1rem; color: var(--ink-2); font-size: 1.05rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.more { margin-top: auto; font-weight: 700; color: var(--copper-ink); }
.card:hover .more { text-decoration: underline; text-underline-offset: .18em; }

.chip {
  display: inline-block; align-self: flex-start; margin: 0; padding: .2rem .6rem; border-radius: 999px;
  background: var(--copper-soft); color: var(--copper-ink); font: 700 .72rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.meta { font: 500 .85rem/1.5 var(--font-mono); color: var(--muted); }

/* --------------------------------------------------------------------- articles ---- */
.entry-head {
  background:
    radial-gradient(circle at 1px 1px, var(--dot) 1.3px, transparent 1.8px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--paper-2), var(--paper));
  border-bottom: 1px solid var(--line); padding: 2.2rem 0 1.8rem;
}
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font: 600 .8rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--copper-ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.entry-head h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); font-weight: 800; margin: .7rem 0 .8rem; color: var(--pcb); }
.entry-head .meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: 0; }
.entry-head .meta > * { display: inline-flex; align-items: center; gap: .4rem; }
.entry-head .meta > * + *::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); margin-right: .35rem; }
.entry-head .meta a { color: var(--copper-ink); }
.wrap-head { max-width: 47rem; margin: 0 auto; padding: 0 1.25rem; }
.entry-body { padding-top: 2.2rem; padding-bottom: 1rem; }
.error-code { margin: 0; font: 800 4rem/1 var(--font-display); color: var(--copper); }

/* the featured image as a pinned photo */
.featured {
  justify-self: center; margin: 1.6rem auto 0; width: fit-content; max-width: 100%; padding: .75rem .75rem 1.5rem;
  background: #fff; border-radius: 6px; box-shadow: var(--shadow-lift); transform: rotate(1.6deg); position: relative;
}
.featured::before {
  content: ""; position: absolute; top: -.55rem; left: 50%; width: 1.1rem; height: 1.1rem; margin-left: -.55rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a7a, var(--led) 60%, #a51d1d); box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
}
.featured img { display: block; max-height: 19rem; width: auto; border-radius: 3px; }

.post-content { font-size: 1.1875rem; }
.post-content > :first-child { margin-top: 0; }
.post-content p, .post-content ul, .post-content ol { margin: 0 0 1.15em; }
.post-content h2 { font-size: 1.6rem; margin: 2.4rem 0 1rem; }
.post-content h3, .post-content h4 {
  position: relative; font-size: 1.22rem; font-weight: 700; margin: 2.4rem 0 .9rem; padding-left: 1.05em; color: var(--pcb);
}
.post-content h3::before, .post-content h4::before {
  /* a solder pad */
  content: ""; position: absolute; left: 0; top: .32em; width: .62em; height: .62em; border-radius: 50%;
  border: .2em solid var(--copper); background: var(--paper); box-sizing: border-box;
}
.post-content ul { padding-left: 1.4rem; }
.post-content li { margin: .35em 0; padding-left: .2rem; }
.post-content li::marker { color: var(--copper); }
.post-content strong { color: var(--ink); font-weight: 700; }
.post-content img { border-radius: 10px; }
.post-content a:has(> img) { display: inline-block; }
.post-content iframe {
  width: 100%; margin: .2rem 0 .4rem; background: #fff; border: 2px solid var(--pcb); border-radius: 14px;
  box-shadow: 0 6px 0 var(--pcb-2), 0 14px 30px -18px rgba(15, 59, 45, .55);
}
/* without JavaScript (assets/frames.js fits them exactly): room for the tallest calculator */
.post-content iframe { height: 330px; }
.post-content blockquote {
  margin: 1.6rem 0; padding: 1rem 1.2rem 1rem 1.4rem; background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid var(--pcb); border-radius: 12px;
}
.post-content blockquote.warning {
  position: relative; border: 1px solid #edd38a; background: #fff8df; padding-left: 2rem; overflow: hidden;
}
.post-content blockquote.warning::before {
  /* hazard tape */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
  background: repeating-linear-gradient(-45deg, #f5c400 0 8px, #232323 8px 16px);
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content pre {
  background: var(--pcb-2); color: #e9f1ec; padding: 1rem 1.2rem; border-radius: 12px; overflow-x: auto;
  font: .92rem/1.55 var(--font-mono);
}
.post-content code { font-family: var(--font-mono); font-size: .9em; }
.post-content :not(pre) > code { background: var(--copper-soft); padding: .1em .35em; border-radius: 5px; }
.post-content table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; }
.post-content td, .post-content th { border: 1px solid var(--line); padding: .4rem .7rem; }
.alignleft { float: left; margin: .3rem 1.2rem .6rem 0; }
.alignright { float: right; margin: .3rem 0 .6rem 1.2rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.post-content::after { content: ""; display: table; clear: both; }

/* previous / next */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 0; }
.post-nav a {
  display: block; padding: 1rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font: 700 1rem/1.35 var(--font-display);
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-nav a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.post-nav span { display: block; margin-bottom: .35rem; font: 600 .75rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--copper-ink); }
.post-nav .next { grid-column: 2; text-align: right; }

/* comments: read-only, kept from WordPress */
.comments { margin: 3rem 0 3.5rem; }
.comments > h2 { font-size: 1.35rem; color: var(--pcb); }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.4rem; padding-left: 1.2rem; border-left: 2px dashed var(--line); }
.bubble { margin: .9rem 0; padding: .9rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; }
.by-author > .bubble { border-color: #ecc9a6; background: #fffaf3; border-left: 4px solid var(--copper); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .65rem; margin-bottom: .2rem; }
.fn { font-weight: 800; }
.avatar {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; align-self: center; flex: none;
  font: 800 .9rem/1 var(--font-display); color: #fff; background: var(--pcb);
}
.av-1 { background: #2f6f9f; } .av-2 { background: #8a4fb0; } .av-3 { background: #b4532a; } .av-4 { background: #3d7a3a; }
.by-author .avatar { background: var(--copper-ink); }
.badge { background: var(--copper-ink); color: #fff; border-radius: 999px; padding: .05rem .55rem; font: 700 .7rem/1.6 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.comment-date { color: var(--muted); font: .78rem/1.4 var(--font-mono); text-decoration: none; }
.comment-content { font-size: 1.05rem; line-height: 1.6; }
.comment-content p { margin: .35rem 0; }
.closed { color: var(--muted); font: .85rem/1.5 var(--font-mono); }

/* ------------------------------------------------------------------------ footer ---- */
.site-footer { margin-top: 2rem; border-top: 4px solid var(--copper); font-size: 1.02rem; }
.footer-grid { display: grid; gap: 2.2rem; padding-top: 2.8rem; padding-bottom: 2rem; }
.footer-brand .tagline { margin: .9rem 0 0; max-width: 22rem; color: rgba(238, 232, 218, .82); font-style: italic; }
.site-footer h2 { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: #f1c79a; margin: 0 0 .8rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin: .45rem 0; }
.footer-nav a { color: var(--pcb-ink); text-decoration: none; border-bottom: 1px solid rgba(238, 232, 218, .25); }
.footer-nav a:hover { color: #fff; border-bottom-color: var(--copper); }
.footer-bottom { border-top: 1px solid rgba(238, 232, 218, .14); padding-top: 1rem; padding-bottom: 1.4rem; }
.footer-bottom p { margin: 0; font: .8rem/1.5 var(--font-mono); color: rgba(238, 232, 218, .65); }

.donate {
  position: relative; background: #fffaf0; color: var(--ink); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.2rem;
  border-top: 6px solid var(--juice); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .6);
}
.site-footer .donate h2 {
  font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--pcb); margin: 0 3.4rem .6rem 0; line-height: 1.3;
}
.donate-icon { position: absolute; top: -1.6rem; right: 1rem; width: 2.6rem; height: auto; transform: rotate(8deg); }
.donate p { margin: 0 0 .6rem; font-size: .98rem; line-height: 1.5; color: var(--ink-2); }
.donate .donate-amount { font-weight: 700; color: var(--ink); }
.donate form { margin: .4rem 0 0; }
.donate-button { cursor: pointer; display: block; transition: transform .12s ease; }
.donate-button:hover { transform: scale(1.04); }

/* ------------------------------------------------------------------ breakpoints ---- */
@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: 1.35fr 1fr; padding-top: 4rem; padding-bottom: 4.5rem; }
  .footer-grid { grid-template-columns: 1fr 1.1fr 1.15fr; gap: 3rem; }
  .wrap-head.has-image { max-width: 66rem; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
  .wrap-head.has-image .featured { margin: 0; }
}
@media (min-width: 66rem) {
  /* horizontal recipe cards, two by two */
  .card { flex-direction: row; }
  .card-media { flex: 0 0 42%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .card-media img { max-height: 15rem; }
}
@media (max-width: 40rem) {
  body, .post-content { font-size: 1.0625rem; }
  .header-row { justify-content: center; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: .35rem .7rem; font-size: .95rem; }
  .lede { font-size: 1.15rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; text-align: left; }
  .alignleft, .alignright { float: none; margin: .6rem 0; }
  .comment-list .children { margin-left: .5rem; padding-left: .8rem; }
  .recipe-card { transform: none; }
  .post-content iframe { height: 480px; }
  .hero-grid { padding-top: 2.2rem; padding-bottom: 2.6rem; gap: 2rem; }
  .btn { padding: .65rem 1.1rem; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led { animation: none; }
  .card, .btn, .post-nav a, .donate-button { transition: none; }
}
@media print {
  .site-header, .site-footer, .post-nav, .skip { display: none; }
  body { background: #fff; }
}
