/*
Theme Name: utk/2026
Theme URI: https://utkarshpatel.com/
Author: Utkarsh Patel
Author URI: https://utkarshpatel.com/
Description: A minimal, performant Full-Site-Editing theme for engineers' blogs. System fonts only, zero webfonts, no jQuery, no third-party scripts. Designed around dense reading and a small set of typographic tokens.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: utk-2026
Tags: blog, full-site-editing, block-theme, one-column, custom-colors, custom-typography, threaded-comments
*/

/* The bulk of the styling lives in theme.json. This file holds only the
   small pieces that theme.json cannot express cleanly: post-list grid
   responsive behaviour, code-block scroll, and a couple of refinements. */

/* ------ post list grid (homepage + related) ---------- */
.utk-post-row {
  display: grid;
  grid-template-columns: 110px 1fr 180px 24px;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--wp--preset--color--rule);
  transition: padding .25s ease;
}
.utk-post-row:hover { padding-left: 12px; }
.utk-post-row:hover .utk-post-arrow { transform: translateX(4px); color: var(--wp--preset--color--accent); }
.utk-post-row:hover .wp-block-post-title a { color: var(--wp--preset--color--accent); }
.utk-post-arrow {
  font-family: var(--wp--preset--font-family--mono);
  color: var(--wp--preset--color--contrast-3);
  text-align: right;
  transition: transform .25s ease, color .15s;
}

@media (max-width: 781px) {
  .utk-post-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }
  .utk-post-row:hover { padding-left: 0; }
  .utk-post-arrow { display: none; }
  .utk-post-row .wp-block-post-terms { font-size: 11px; }
}

/* ------ headings get a // prefix in body content -- */
.utk-content h2::before {
  content: "// ";
  color: var(--wp--preset--color--contrast-3);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.06em;
  vertical-align: 0.35em;
  margin-right: 4px;
}

/* ------ inline + block code -- */
:not(pre) > code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.88em;
  background: var(--wp--preset--color--base-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--wp--preset--color--rule);
}

.wp-block-code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 13.5px;
  line-height: 1.7;
  background: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  border: 0;
}
.wp-block-code code { background: transparent; border: 0; padding: 0; color: inherit; }

@media (max-width: 781px) {
  .wp-block-code {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    padding: 16px;
    font-size: 12.5px;
  }
}

/* ------ sticky sidebar for single posts ---------- */
.utk-sidebar { position: sticky; top: 88px; align-self: start; }
@media (max-width: 781px) {
  .utk-sidebar {
    position: static;
    background: var(--wp--preset--color--base-2);
    border-radius: 8px;
    padding: 16px;
  }
}

/* ------ table ---------- */
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 14px;
}
.wp-block-table th,
.wp-block-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--wp--preset--color--rule);
}
.wp-block-table th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--contrast-3);
  font-weight: 500;
}

/* ------ selection ---------- */
::selection { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); }

/* ------ skip link -- */
.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 16px; top: 16px;
  background: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  z-index: 1000;
}

/* ------ availability dot ---------- */
.utk-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #22a559;
  vertical-align: middle;
  margin-right: 6px;
}
