/* farantzos.com – mimics a classic micro-blog theme look, with light/dark (system) support. */
/* Theme tokens. Light is the default; data-theme="dark" is set by the inlined init script
   (saved choice in localStorage 'theme', else the system setting). The media block is the no-JS fallback. */
:root {
  color-scheme: light;
  --bg: #fff; --bg-soft: #f6f6f7; --nav-bg: rgba(255,255,255,.92);
  --text: #4a4a4a; --head: #000; --muted: #666;
  --line: #e3e3e6; --mark: #fcdae9; --accent: #b3125a; --accent-soft: #fcdae9;
  --link-ul: #8a8a92; --card-bg: #fff; --card-border: #c9c9ce; --btn-bg: #111; --btn-text: #fff;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121214; --bg-soft: #1b1b1f; --nav-bg: rgba(18,18,20,.92);
  --text: #cfcfd4; --head: #fff; --muted: #a2a2aa;
  --line: #34343a; --mark: #5e2142; --accent: #ff9cc6; --accent-soft: #5e2142;
  --link-ul: #85858f; --card-bg: #1b1b1f; --card-border: #55555e; --btn-bg: #f2f2f4; --btn-text: #111;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #121214; --bg-soft: #1b1b1f; --nav-bg: rgba(18,18,20,.92);
    --text: #cfcfd4; --head: #fff; --muted: #a2a2aa;
    --line: #34343a; --mark: #5e2142; --accent: #ff9cc6; --accent-soft: #5e2142;
    --link-ul: #85858f; --card-bg: #1b1b1f; --card-border: #55555e; --btn-bg: #f2f2f4; --btn-text: #111;
  }
}
:root[data-theme="dark"] article img { filter: brightness(.92); }
/* Robotics card map preview: both images are in the page, CSS shows the one matching the theme */
.feature-img .map-dark { display: none; }
:root[data-theme="dark"] .feature-img .map-light { display: none; }
:root[data-theme="dark"] .feature-img .map-dark { display: block; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 17px/1.7 "Avenir Next", Avenir, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { color: var(--head); line-height: 1.3; margin: 1em 0 0; }
h1 { font-size: 30px; font-weight: 700; } h2 { font-size: 25px; font-weight: 600; } h3 { font-size: 20px; font-weight: 500; }
p, li { line-height: 1.7; } p { margin: 1em 0 0; }
ul { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; border-radius: 5px; }
a { color: var(--head); text-decoration: none; }
p a, #footer a, #post-nav a, .archive_categories a, ul.plain a, .post-date a {
  font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: var(--link-ul); transition: text-decoration-color .15s, color .15s;
}
p a:hover, #footer a:hover, #post-nav a:hover, .archive_categories a:hover, ul.plain a:hover, .post-date a:hover {
  color: var(--accent); text-decoration-color: currentColor; text-decoration-thickness: 2px;
}
:focus-visible { outline: 3px solid var(--head); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bg); color: var(--head); padding: 8px 12px; z-index: 200; border: 2px solid var(--head); }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nav */
nav.main-nav { padding: 20px 20px 0; background: var(--nav-bg); text-align: right; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; align-items: center; }
nav.main-nav a { color: var(--head); font-size: 14px; font-weight: 500; line-height: 1.35; padding: 4px 0; }
nav.main-nav a.normal { margin-right: auto; text-align: left; }
nav.main-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
nav.main-nav a.cta { color: var(--accent); padding: 6px 14px; border: 2px solid var(--accent); border-radius: 20px; white-space: nowrap; }
nav.main-nav a.cta:hover { background: var(--accent-soft); text-decoration: none; }

#wrapper { max-width: 600px; margin: 0 auto; padding: 25px; }
.profile #wrapper { text-align: center; padding: 70px 25px 30px; }
.profile #avatar { display: inline-block; width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1em; }
.profile h1 { margin: 0; }
.profile .p-role { color: var(--muted); margin: .3em 0 0; }
.page-title { margin-top: .6em; margin-bottom: .6em; }

/* Posts */
#post-list li { list-style: none; }
#post-list .sep { margin: 42px 0 48px; } .divider { display: block; height: 1px; background: var(--line); }
article img { padding: 20px 0; }
.dates, .post-date { font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
article .u-url { display: inline-block; margin-top: 6px; }
article .u-url:hover time { text-decoration: underline; }
.post { margin: 60px 0 0; }
.post header { text-align: center; }
.post-date { margin: 0; } .post-date a { text-transform: none; font-size: 14px; }
.tags { font-size: 14px; color: var(--muted); }
blockquote { padding-left: 15px; border-left: 3px solid var(--line); font-style: italic; margin: 15px 0 0; }
pre { padding: 20px; background: #272b2d; color: #d0d4d7; border-radius: 5px; overflow: auto; font: 13px/1.5 Menlo, Monaco, monospace; white-space: pre-wrap; }
#post-meta { font-size: 13px; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; margin-top: 50px; color: var(--text); }
#post-meta a { display: flex; align-items: center; gap: 15px; }
#post-meta span { display: block; color: var(--muted); font-weight: 500; } #post-meta span.dark { color: var(--head); }
#post-meta img.avatar { width: 36px; height: 36px; border-radius: 50%; padding: 0; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--line); }
#post-nav { display: flex; justify-content: space-between; padding-top: 20px; margin-top: 20px; font-size: 14px; font-weight: 500; }
#post-nav span { min-height: 1px; }

/* Archive, photos */
.archive_categories { border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 30px; display: flex; flex-wrap: wrap; gap: 0 20px; }
.h-entry.archive-row, #wrapper > p.h-entry { margin: 0 0 .9em; }
ul.plain li { list-style: none; margin-top: .4em; }
.photos-grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.photos-grid-container a { display: block; }
.photos-grid-item { width: 100%; aspect-ratio: 1; object-fit: cover; padding: 0; display: block; }

/* Featured robotics card */
.feature { display: block; border: 2px solid var(--card-border); border-radius: 12px; background: var(--card-bg); overflow: hidden; margin: 0 0 48px; }
.feature-img { display: block; background: var(--bg-soft); }
.feature-img img { width: 100%; aspect-ratio: 720 / 250; object-fit: cover; object-position: center; padding: 0; border-radius: 0; display: block; filter: none !important; }
.feature-text { padding: 18px 20px 20px; }
.feature-text p { margin: .4em 0 0; line-height: 1.5; }
.feature-text h2 { font-size: 20px; margin: .35em 0 0; }
.feature .feature-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.badge { display: inline-block; border: 2px solid var(--head); color: var(--head); padding: 0 6px; border-radius: 4px; font-weight: 800; letter-spacing: .08em; margin-right: 6px; line-height: 1.5; }
.btn { display: inline-block; margin-top: 14px; padding: 8px 16px; background: var(--btn-bg); color: var(--btn-text) !important; border-radius: 22px; font-size: 14px; font-weight: 600; }
.btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
#footer { text-align: center; }
footer #wrapper { padding: 35px 25px 80px; }
#footer li { display: inline; padding: 0 10px; list-style: none; }
#footer a { font-size: 14px; }
.footer-robotics { font-size: 14px; color: var(--muted); margin: 0 0 1.2em; }
#search input.field { width: min(270px, 100%); height: 36px; font-size: 14px; padding: 0 14px; border: 2px solid var(--line); border-radius: 18px; margin-top: 20px; background: var(--bg); color: var(--text); }

@media (max-width: 540px) {
  h1 { font-size: 24px; } h2 { font-size: 22px; } h3 { font-size: 19px; }
  nav.main-nav { justify-content: flex-start; padding: 14px 16px 0; }
  nav.main-nav a.normal { flex-basis: 100%; text-align: left; }
  #wrapper { padding: 20px; }
  .profile #wrapper { padding: 40px 20px 20px; }
  .photos-grid-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feature-img img { aspect-ratio: 16 / 7; }
  .post { margin: 30px 0 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Mini-posts: shorter, boxed with a left rule and a text label (not color-only) */
.mini-post { border-left: 4px solid var(--head); padding: .2em 0 .2em 1em; font-size: .95em; }
.mini-label { display: inline-block; border: 1.5px solid var(--head); color: var(--head); padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; }
.mini-tag { margin: 0 0 .4em; }
.archive-row .mini-label, #wrapper > p.h-entry .mini-label { margin-right: 4px; }
.footer-copyright { font-size: 13px; color: var(--muted); margin: 1.2em 0 0; }

/* Theme toggle. aria-pressed is true while dark mode is on. */
.theme-toggle { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--head); cursor: pointer; }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.theme-toggle:hover { background: var(--accent-soft); }
.theme-toggle:focus-visible { outline: 3px solid var(--head); outline-offset: 2px; }
/* Variant B: circled, same outline as the Follow me on X pill */
.theme-toggle.circled { border: 2px solid var(--accent); color: var(--accent); }

/* 404. Favicon silhouette, filled with the site accent (light #b3125a, dark #ff9cc6). */
.lost-mark {
  width: 64px; height: 64px; margin: 8px 0 16px; padding: 0;
  background: var(--accent);
  -webkit-mask: url(/assets/favicon.svg) center / contain no-repeat;
  mask: url(/assets/favicon.svg) center / contain no-repeat;
  -webkit-mask-mode: alpha; mask-mode: alpha;
}
.lost-note { font-size: 1.15rem; line-height: 1.45; }
a.lost-home {
  display: inline-block; min-height: 44px; min-width: 44px;
  padding: 10px 8px; margin: -10px -8px;
  line-height: 1.45;
}

/* Legal pages */
.legal-date { color: var(--muted); font-size: 14px; margin: 0 0 1em; }
.legal ul { padding-left: 1.2em; margin: 0.6em 0 0; }
.legal li { margin-top: 0.4em; }
