/*
Theme Name: o07 — Linux, powered by AI
Theme URI: https://www.o07.nl
Description: A dark, terminal-lit child theme of Twenty Twenty-Five for a site about running Linux with a model in the loop. Self-hosted, no external fonts, no page builder.
Author: Eric
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: o07-linux-ai
*/

/* ---------------------------------------------------------------- tokens --
   The palette lives in theme.json so the Site Editor can see it; these custom
   properties are the same values for the hand-written parts. */
:root {
  --ink: #06070a;
  --panel: #0d1016;
  --panel2: #11151d;
  --line: #1d222c;
  --text: #e7eaf0;
  --dim: #98a2b3;
  --accent: #7ee787;
  --accent2: #58a6ff;
  --warm: #ffb454;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
}

html { background: var(--ink); }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* a very quiet grid, so the page reads as a terminal rather than a poster */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(126, 231, 135, .10), transparent 70%),
    radial-gradient(760px 420px at 90% 0%, rgba(88, 166, 255, .09), transparent 70%);
}
body > * { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- header --
   The parent's header part, restyled: sticky, translucent, hairline. */
.wp-block-template-part > header,
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(6, 7, 10, .82);
  border-bottom: 1px solid var(--line);
}
header .wp-block-group {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 26px;
}
.wp-block-site-title a {
  color: var(--text) !important;
  font-weight: 700;
  letter-spacing: -.015em;
  text-decoration: none;
}
.wp-block-site-title a:hover { color: var(--accent) !important; }
header .wp-block-navigation-item a {
  color: var(--dim) !important;
  font-size: 14.5px;
  letter-spacing: .01em;
  text-decoration: none;
}
header .wp-block-navigation-item a:hover { color: var(--text) !important; }

/* ---------------------------------------------------------------- layout -- */
.entry-content > *,
.wp-block-post-content > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
main { display: block; }

.wrap, .hero-inner, .band-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }

/* ---------------------------------------------------------------- hero ---- */
.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 22px 0 0;
  max-width: 17ch;
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--accent) 0%, var(--accent2) 62%, var(--warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  color: var(--dim);
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 54ch;
  margin: 24px 0 0;
}
.hero .buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.wp-block-button__link {
  border-radius: 10px !important;
  padding: 12px 20px !important;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s ease, filter .15s ease;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: var(--line) !important;
  color: var(--text) !important;
}
.wp-block-button__link:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ---------------------------------------------------------------- terminal */
.term {
  margin: 46px 0 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13.5px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
}
.term .bar {
  display: flex;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel2);
}
.term .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a303c; display: block; }
.term .bar i:first-child { background: #ff5f57; }
.term .bar i:nth-child(2) { background: #febc2e; }
.term .bar i:nth-child(3) { background: #28c840; }
.term pre {
  margin: 0;
  padding: 18px 20px;
  color: #c9d3e0;
  overflow-x: auto;
  line-height: 1.7;
  background: transparent;
  border: 0;
}
.term .p { color: var(--accent); }
.term .c { color: #7b8798; }
.term .o { color: var(--accent2); }

/* ---------------------------------------------------------------- sections */
.band { padding: 72px 0; border-bottom: 1px solid var(--line); }
.band h2 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.025em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.band .sub { color: var(--dim); max-width: 60ch; margin: 0 0 38px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: #2e3a4c; transform: translateY(-2px); }
.card .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--faint, #5f6b7d);
  text-transform: uppercase;
}
.card h3 { font-size: 19px; margin: 10px 0 8px; letter-spacing: -.01em; }
.card p { color: var(--dim); font-size: 15px; margin: 0; }

/* latest notes */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color .18s ease, transform .18s ease;
}
.note:hover { border-color: #2e3a4c; transform: translateY(-2px); }
.note .wp-block-post-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint, #5f6b7d);
}
.note .wp-block-post-title, .note h3 { font-size: 18px; line-height: 1.3; margin: 0; }
.note .wp-block-post-title a, .note h3 a { color: var(--text); text-decoration: none; }
.note .wp-block-post-title a:hover, .note h3 a:hover { color: var(--accent); }
.note .wp-block-post-excerpt__excerpt { color: var(--dim); font-size: 14.5px; margin: 0; }

/* stack strip */
.stack { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.stack li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--panel);
}

/* ---------------------------------------------------------------- article */
.single .entry-content, .page .entry-content, .wp-block-post-content {
  max-width: 74ch;
  margin: 0 auto;
  padding: 0 26px;
}
.wp-block-post-title, .entry-title {
  max-width: 24ch;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 56px auto 10px;
  padding: 0 26px;
}
.wp-block-post-content p { color: #cfd6e2; }
.wp-block-post-content h2 { font-size: 27px; letter-spacing: -.02em; margin-top: 1.8em; }
.wp-block-post-content h3 { font-size: 21px; margin-top: 1.6em; }
.wp-block-post-content a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.wp-block-post-content code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: #d9e6c9;
}
.wp-block-post-content pre {
  background: var(--panel) !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
}
.wp-block-post-content pre code { background: none; border: 0; padding: 0; color: #c9d3e0; }
.wp-block-post-content blockquote {
  margin: 1.6em 0;
  padding: .4em 0 .4em 20px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: 19px;
}
.wp-block-post-content img { border-radius: 12px; }
.meta-line {
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: 74ch;
  margin: 0 auto 34px;
  padding: 0 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint, #5f6b7d);
}

/* ---------------------------------------------------------------- footer -- */
footer.wp-block-template-part, .wp-block-template-part > footer {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding: 34px 0;
  color: var(--dim);
  font-size: 14px;
}
footer .wp-block-group { max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }
footer a { color: var(--dim); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- motion -- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- latest-posts
   core/latest-posts renders ul.wp-block-latest-posts; with className "notes"
   the list itself becomes the grid and each item a card. */
ul.wp-block-latest-posts.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.wp-block-latest-posts.notes li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color .18s ease, transform .18s ease;
}
ul.wp-block-latest-posts.notes li:hover { border-color: #2e3a4c; transform: translateY(-2px); }
ul.wp-block-latest-posts.notes li a {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-decoration: none;
}
ul.wp-block-latest-posts.notes li a:hover { color: var(--accent); }
.wp-block-latest-posts__post-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5f6b7d;
}
.wp-block-latest-posts__post-excerpt { color: var(--dim); font-size: 14.5px; margin: 0; }

/* reading time, injected ahead of the content on single posts */
.readmeta {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5f6b7d;
  margin: 0 0 26px;
}

/* ---------------------------------------------------------------- mobile -- */
@media (max-width: 720px) {
  .hero { padding: 60px 0 44px; }
  .band { padding: 52px 0; }
  .hero h1 { max-width: 100%; }
  header .wp-block-group { padding: 12px 18px; }
  .wrap, .hero-inner, .band-inner { padding: 0 18px; }
}
