/* Vincent Veysset — Editorial terminal
 * Tokens: theme.json palette / fonts / spacing.
 * Hairlines computed off the foreground swatch.
 */

:root {
  --bg:        var(--wp--preset--color--bg);
  --bg-2:      var(--wp--preset--color--bg-2);
  --fg:        var(--wp--preset--color--fg);
  --mute:      var(--wp--preset--color--mute);
  --grey:      var(--wp--preset--color--grey);
  --lime:      var(--wp--preset--color--lime);
  --cyan:      var(--wp--preset--color--cyan);
  --warn:      var(--wp--preset--color--warn);
  --red:       var(--wp--preset--color--red);
  --hairline:   rgba(228, 228, 231, 0.08);
  --hairline-2: rgba(228, 228, 231, 0.16);
  --gutter: 32px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

img, video { max-width: 100%; height: auto; display: block; }

.t-grey { color: var(--grey); }
.t-mute { color: var(--mute); }
.t-lime { color: var(--lime); }
.t-cyan { color: var(--cyan); }
.t-comment { color: var(--mute); font-style: italic; }

/* Site shell — block theme uses .wp-site-blocks */
.wp-site-blocks,
.t-site {
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─────────── Prompt header ─────────── */

.t-prompt {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0 12px;
  margin-bottom: 40px;
}
.t-prompt-line {
  font-size: 13px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  min-width: 0;
}
.t-prompt-line > * { flex-shrink: 0; }
.t-cmd { color: var(--fg); white-space: nowrap; }
.t-user { color: var(--lime); }
.t-at, .t-colon, .t-dollar { color: var(--mute); margin: 0 1px; }
.t-host { color: var(--cyan); }
.t-path { color: var(--warn); margin-right: 8px; }
.t-dollar { margin-right: 8px; }
.t-cursor { color: var(--lime); animation: blink 1s steps(2) infinite; margin-left: 4px; }
@keyframes blink { 50% { opacity: 0; } }

.t-nav {
  display: flex; gap: 18px; margin-top: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}
.t-nav a {
  color: var(--mute);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.t-nav a:hover { color: var(--fg); }
.t-nav a.active { color: var(--lime); border-bottom-color: var(--lime); }

/* ─────────── Page & sections ─────────── */

.t-page { padding-bottom: 80px; }
.t-section { padding-top: 64px; }
.t-h2 {
  color: var(--cyan);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 24px;
  letter-spacing: 0;
}

/* Core/heading inside .t-section gets the same look unless explicit class set */
.t-section > h2:not(.t-h2) {
  color: var(--cyan);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 24px;
}

/* ─────────── Hero ─────────── */

.t-hero { padding-top: 24px; }
.t-banner {
  color: var(--lime);
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 32px;
  white-space: pre;
  overflow: auto;
  opacity: 0.85;
}
.t-h1 {
  font-size: clamp(22px, 3.6vw, 36px);
  line-height: 1.35;
  font-weight: 500;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.t-blog-hero .t-h1 { font-size: clamp(28px, 4vw, 44px); }
.t-lede { font-size: 14px; margin-bottom: 32px; }

.t-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.t-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 13px;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--fg);
  transition: border-color .15s, color .15s, background .15s;
  cursor: pointer;
}
.t-btn:hover { border-color: var(--lime); color: var(--lime); }
.t-btn.ghost { background: transparent; }

/* core/buttons compatibility */
.wp-block-button__link.t-btn { text-decoration: none; }

/* ─────────── Cards ─────────── */

.t-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.t-card {
  border: 1px solid var(--hairline);
  background: var(--bg-2);
  padding: 20px;
  border-radius: 6px;
  transition: border-color .2s;
}
.t-card:hover { border-color: var(--hairline-2); }
.t-card-head { display: flex; gap: 10px; margin-bottom: 10px; align-items: baseline; }
.t-num { color: var(--lime); font-size: 12px; }
.t-card-title { color: var(--fg); font-weight: 500; font-size: 14px; }
.t-card p { color: var(--mute); font-size: 13px; margin: 0 0 12px; line-height: 1.6; }
.t-card-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; }
.t-card-tags span { color: var(--cyan); }

@media (max-width: 720px) { .t-grid-2 { grid-template-columns: 1fr; } }

/* ─────────── Convictions list ─────────── */

.t-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.t-list li { font-size: 14px; padding-left: 0; line-height: 1.7; }
.t-bullet { color: var(--lime); margin-right: 10px; }
.t-list b { color: var(--fg); font-weight: 500; }

/* ─────────── Stack ─────────── */

.t-stack {
  border: 1px solid var(--hairline);
  background: var(--bg-2);
  padding: 20px 24px;
  border-radius: 6px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px;
}
.t-stack > div { display: flex; gap: 0; }
.t-key { color: var(--cyan); width: 90px; flex-shrink: 0; }
.t-eq { color: var(--mute); margin: 0 6px; }
.t-val { color: var(--fg); }

@media (max-width: 540px) {
  .t-stack > div { flex-direction: column; gap: 2px; }
  .t-key { width: auto; }
  .t-eq { display: none; }
}

/* ─────────── Recent posts ─────────── */

.t-recent { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.t-recent-item {
  display: grid;
  grid-template-columns: 110px 80px 1fr 20px;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  align-items: center;
  transition: background .15s, padding-left .15s;
}
.t-recent-item:hover { background: var(--bg-2); padding-left: 12px; }
.t-recent-date { color: var(--mute); }
.t-recent-tag { color: var(--cyan); font-size: 12px; }
.t-recent-title { color: var(--fg); }
.t-recent-arrow { color: var(--lime); justify-self: end; }

@media (max-width: 640px) {
  .t-recent-item { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .t-recent-arrow { display: none; }
}

.t-link {
  display: inline-block; margin-top: 16px; color: var(--lime);
  font-size: 13px;
  border-bottom: 1px dashed rgba(163, 230, 53, 0.4);
  padding-bottom: 1px;
}

/* ─────────── Contact ─────────── */

.t-contact-box {
  border: 1px solid var(--hairline);
  background: var(--bg-2);
  padding: 24px;
  border-radius: 6px;
}
.t-contact-box p { margin: 0 0 8px; font-size: 14px; }
.t-contact-list { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.t-contact-list a { color: var(--fg); padding: 4px 0; }
.t-contact-list a:hover { color: var(--lime); }

/* ─────────── Blog list ─────────── */

.t-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; margin-bottom: 32px;
}
.t-filter {
  appearance: none;
  border: 1px solid var(--hairline-2);
  background: transparent;
  color: var(--mute);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.t-filter:hover { color: var(--fg); border-color: var(--mute); }
.t-filter.active { color: var(--bg); background: var(--lime); border-color: var(--lime); }
.t-count { margin-left: auto; font-size: 12px; }

.t-post-list { border-top: 1px solid var(--hairline); }
.t-post-row {
  display: grid;
  grid-template-columns: 120px 100px 1fr 60px;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  align-items: center;
  transition: background .15s, padding-left .15s;
}
.t-post-row:not(.t-post-head):hover { background: var(--bg-2); padding-left: 12px; }
.t-post-head {
  font-size: 11px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom-color: var(--hairline-2);
}
.t-post-date { color: var(--mute); }
.t-post-tag { color: var(--cyan); font-size: 12px; }
.t-post-title { color: var(--fg); }
.t-post-time { color: var(--mute); font-size: 12px; text-align: right; }

@media (max-width: 720px) {
  .t-post-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .t-post-head { display: none; }
  .t-post-time { text-align: left; }
}

/* ─────────── Article ─────────── */

.t-article { max-width: 720px; margin: 0 auto; }
.t-back {
  display: inline-block; color: var(--mute); font-size: 13px; margin-bottom: 32px;
}
.t-back:hover { color: var(--lime); }
.t-article-head { margin-bottom: 36px; }
.t-article-meta {
  display: flex; gap: 12px; font-size: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.t-article-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--fg);
  line-height: 1.3;
}
.t-article-lede { color: var(--mute); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.t-article-rule { height: 1px; background: var(--hairline-2); margin-bottom: 32px; }
.t-article-body { font-size: 14.5px; line-height: 1.75; }
.t-article-body p { margin: 0 0 18px; color: var(--fg); }
.t-article-body h2,
.t-article-body h3 {
  color: var(--cyan);
  font-size: 15px;
  font-weight: 500;
  margin: 32px 0 14px;
  letter-spacing: 0;
}
.t-article-body pre,
.wp-block-code,
.t-code {
  background: #0A0D11;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 18px 0 22px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--lime);
  overflow-x: auto;
  white-space: pre;
}
.t-article-foot { margin-top: 48px; }
.t-sig { color: var(--mute); font-size: 12px; line-height: 1.4; }

.t-error { color: var(--red); font-size: 13px; margin: 24px 0; white-space: pre; line-height: 1.6; }

/* ─────────── Projects ─────────── */
.t-projects { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.t-project { padding: 24px 0; border-bottom: 1px solid var(--hairline); }
.t-proj-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; font-size: 12px; }
.t-proj-id { color: var(--lime); font-size: 12px; }
.t-proj-year { color: var(--mute); }
.t-proj-status { font-size: 11px; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--hairline-2); }
.t-status-in-progress { color: var(--lime); border-color: rgba(163, 230, 53, 0.4); }
.t-status-shipped { color: var(--cyan); border-color: rgba(56, 189, 248, 0.4); }
.t-status-exited { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); }
.t-status-archived { color: var(--mute); }
.t-proj-role { font-size: 15px; font-weight: 500; margin: 0 0 8px; color: var(--fg); }
.t-proj-summary { color: var(--mute); font-size: 13.5px; line-height: 1.6; margin: 0 0 12px; max-width: 760px; }
.t-proj-stack { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--cyan); }
.t-disclaimer { color: var(--mute); font-size: 11px; line-height: 1.6; margin-top: 32px; white-space: pre; }

/* ─────────── Article nav ─────────── */
.t-art-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.t-art-nav-item { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--hairline); border-radius: 6px; background: var(--bg-2); transition: border-color .15s; font-size: 12px; }
.t-art-nav-item:hover { border-color: var(--lime); }
.t-art-nav-item.next { text-align: right; }
.t-art-nav-title { color: var(--fg); font-size: 13px; line-height: 1.4; }
@media (max-width: 640px) { .t-art-nav { grid-template-columns: 1fr; } }

/* ─────────── Contact channels ─────────── */
.t-contact-prompt { color: var(--mute); font-size: 12px; line-height: 1.6; margin: 0 0 28px; white-space: pre-wrap; }
.t-contact-channels { display: flex; flex-direction: column; gap: 12px; }
.t-channel { padding: 18px 20px; border: 1px solid var(--hairline); background: var(--bg-2); border-radius: 6px; transition: border-color .15s; }
.t-channel:hover { border-color: var(--hairline-2); }
.t-ch-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; font-size: 13px; }
.t-ch-id { color: var(--lime); font-size: 12px; }
.t-ch-name { color: var(--fg); font-weight: 500; }
.t-ch-note { font-size: 12px; }
.t-ch-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.t-ch-val { color: var(--cyan); font-size: 13.5px; flex: 1; min-width: 200px; padding: 6px 0; }
.t-ch-btn { padding: 6px 12px; font-size: 12px; }
.t-ch-desc { color: var(--mute); font-size: 12.5px; line-height: 1.5; margin: 0; }

/* ─────────── Footer ─────────── */

.t-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 80px;
  padding: 32px 0;
}
.t-footer pre {
  color: var(--mute);
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

@media (max-width: 540px) {
  :root { --gutter: 18px; }
  .t-banner { font-size: 9px; }
}

/* ─────────── Core block harmonisation ─────────── */
.wp-block-buttons { gap: 12px; }
.wp-block-button .wp-block-button__link {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 13px;
  padding: 9px 16px;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--fg);
}
.wp-block-button .wp-block-button__link:hover { border-color: var(--lime); color: var(--lime); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; }

.wp-block-quote, blockquote {
  border-left: 2px solid var(--lime);
  padding-left: 16px;
  color: var(--mute);
  font-style: normal;
  margin: 24px 0;
}

hr.wp-block-separator { border: 0; border-top: 1px solid var(--hairline-2); margin: 32px 0; }

/* Ensure block list shell takes the gutter even on FSE pages */
body > .wp-site-blocks { padding-block-end: 0; }
