/*
Theme Name: frontElevation Gridline
Theme URI: https://example.com/frontelevation-gridline
Author: Bob Lewis
Description: A minimal, editorial WordPress theme with pixel accents, strict grids, and early-web-inspired interface details.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: frontelevation-gridline
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, grid-layout, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --fe-bg: #f4f1e9;
  --fe-surface: #fbfaf6;
  --fe-ink: #111111;
  --fe-muted: #666666;
  --fe-line: #c8c2b5;
  --fe-accent: #b23a2e;
  --fe-dark: #1d1d1b;
  --fe-footer-text: #f3f0e7;
  --fe-input-bg: #ffffff;
  color-scheme: light;
  --fe-max: 1180px;
  --fe-gap: clamp(1rem, 2vw, 2rem);
  --fe-radius: 0;
  --fe-pixel: "Courier New", Courier, monospace;
  --fe-ui: Arial, Helvetica, sans-serif;
  --fe-editorial: Georgia, "Times New Roman", serif;
}


html[data-theme="dark"] {
  --fe-bg: #10110f;
  --fe-surface: #191a17;
  --fe-ink: #f0eee6;
  --fe-muted: #aaa99f;
  --fe-line: #42433d;
  --fe-accent: #e05a48;
  --fe-dark: #080907;
  --fe-footer-text: #f0eee6;
  --fe-input-bg: #121310;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fe-bg);
  color: var(--fe-ink);
  font-family: var(--fe-ui);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--fe-accent); }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important;
  top: 1rem; left: 1rem;
  width: auto; height: auto;
  padding: .75rem 1rem;
  background: var(--fe-surface); color: var(--fe-ink);
  clip: auto; z-index: 9999;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--fe-max));
  margin: 2rem auto;
  background: var(--fe-surface);
  border: 1px solid var(--fe-line);
}

.site-header {
  display: grid;
  grid-template-columns: minmax(215px, auto) minmax(0, 1fr) auto;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--fe-line);
  padding: 0 1.25rem;
  gap: 1.5rem;
}

.site-branding { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.fe-logo-link { display: inline-flex; color: inherit; text-decoration: none; }
.custom-logo-link img { max-height: 38px; width: auto; }
.site-title { margin: 0; font: 700 1rem/1 var(--fe-ui); letter-spacing: -.02em; }
.site-title a { text-decoration: none; }
.site-description { margin: .3rem 0 0; color: var(--fe-muted); font-size: .72rem; }

.fe-logo-mark {
  display: grid;
  grid-template-columns: repeat(11, 3px);
  grid-template-rows: repeat(7, 3px);
  gap: 2px;
  width: max-content;
  flex: 0 0 auto;
}
.fe-logo-mark span { width: 3px; height: 3px; background: transparent; }
.fe-logo-mark span.on { background: currentColor; }

.primary-navigation { justify-self: center; min-width: 0; }
.primary-navigation ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.primary-navigation a {
  display: inline-block;
  padding: 1.7rem 0 1.55rem;
  text-decoration: none;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-bottom: 2px solid transparent;
}
.primary-navigation .current-menu-item > a,
.primary-navigation a:hover { color: var(--fe-accent); border-bottom-color: var(--fe-accent); }

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  padding: .5rem;
  cursor: pointer;
}
.header-tools { display: flex; align-items: center; gap: .15rem; }
.search-toggle, .theme-toggle { border: 0; background: none; color: inherit; cursor: pointer; padding: .5rem; line-height: 1; }
.theme-toggle { font-size: 1rem; }
.theme-toggle-light { display: none; }
html[data-theme="dark"] .theme-toggle-light { display: inline; }
html[data-theme="dark"] .theme-toggle-dark { display: none; }

.site-main { padding: clamp(1rem, 3vw, 2rem); }

.fe-kicker,
.entry-meta,
.card-label,
.widget-title,
.archive-title,
.page-title {
  font-family: var(--fe-pixel);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.fe-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: var(--fe-gap);
  align-items: center;
  margin-bottom: 2rem;
}
.fe-hero-media { position: relative; overflow: hidden; background: #ddd7cb; }
.fe-hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fe-hero-content { padding: .5rem 0; }
.fe-kicker { margin: 0 0 1rem; color: var(--fe-accent); font-size: clamp(1.6rem, 4vw, 3.1rem); line-height: 1; }
.fe-date { float: right; color: var(--fe-muted); font-size: .7rem; }
.fe-hero h1 { margin: 0 0 .5rem; font: 700 clamp(1.4rem, 2.4vw, 2.1rem)/1.15 var(--fe-editorial); }
.fe-hero .byline { margin: 0 0 1rem; color: var(--fe-accent); font-size: .78rem; }
.fe-hero .excerpt { margin: 0 0 1.2rem; }

.fe-button,
.wp-block-button__link,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 38px;
  padding: .65rem .95rem;
  border: 1px solid var(--fe-line);
  border-radius: 0;
  background: transparent;
  color: var(--fe-ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
}
.fe-button:hover, .wp-block-button__link:hover, input[type="submit"]:hover { border-color: var(--fe-ink); background: var(--fe-ink); color: white; }

.fe-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--fe-line);
  margin-bottom: 2rem;
}
.fe-panel { padding: 1rem; min-width: 0; }
.fe-panel + .fe-panel { border-left: 1px solid var(--fe-line); }
.fe-panel h2 { margin: 0 0 1rem; font-size: .88rem; text-transform: uppercase; }
.fe-panel ul { list-style: none; padding: 0; margin: 0; }
.fe-panel li { padding: .5rem 0; border-top: 1px dotted var(--fe-line); font-size: .78rem; }
.fe-panel li:first-child { border-top: 0; }
.fe-panel .date { display: inline-block; width: 3.8rem; font-family: var(--fe-pixel); color: var(--fe-muted); font-size: .68rem; }

.fe-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--fe-line);
  border: 1px solid var(--fe-line);
}
.fe-card { background: var(--fe-surface); padding: 1rem; }
.fe-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 1rem; }
.fe-card h2 { margin: 0 0 .5rem; font: 700 1.15rem/1.25 var(--fe-editorial); }
.fe-card .entry-meta { color: var(--fe-accent); font-size: .65rem; }
.fe-card p { font-size: .88rem; }

.content-area { max-width: 780px; margin: 0 auto; }
.entry-header { margin-bottom: 1.5rem; }
.entry-title { margin: 0 0 .75rem; font: 700 clamp(2rem, 5vw, 4.8rem)/.98 var(--fe-editorial); letter-spacing: -.035em; }
.entry-meta { color: var(--fe-muted); font-size: .72rem; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.4rem; }
.entry-content h2, .entry-content h3 { font-family: var(--fe-editorial); line-height: 1.15; }
.entry-content blockquote { margin: 2rem 0; padding-left: 1.5rem; border-left: 3px solid var(--fe-accent); font-family: var(--fe-editorial); font-size: 1.3rem; }
.alignwide { width: min(1100px, calc(100vw - 4rem)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }

.post-navigation, .posts-navigation, .pagination { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--fe-line); }
.nav-links { display: flex; justify-content: space-between; gap: 1rem; }

.widget-area { border-top: 1px solid var(--fe-line); padding: 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.widget-title { font-size: .75rem; }
.widget ul { list-style: none; padding: 0; }
.widget li { border-top: 1px dotted var(--fe-line); padding: .45rem 0; font-size: .82rem; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  min-height: 118px;
  padding: 1.25rem;
  background: var(--fe-dark);
  color: var(--fe-footer-text);
}
.site-footer p { margin: 0; color: #c8c8c1; font-size: .7rem; }
.site-footer .fe-logo-mark { color: var(--fe-footer-text); transform: scale(1.25); transform-origin: bottom right; }

.search-panel { display: none; padding: 1rem; border-bottom: 1px solid var(--fe-line); background: var(--fe-input-bg); }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: .5rem; }
.search-field { width: 100%; border: 1px solid var(--fe-line); padding: .7rem; background: transparent; }

.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--fe-line); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1rem 0; border-top: 1px dotted var(--fe-line); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; }
  .menu-toggle { display: inline-flex; justify-self: end; }
  .primary-navigation { display: none; grid-column: 1 / -1; justify-self: stretch; border-top: 1px solid var(--fe-line); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: block; }
  .primary-navigation a { width: 100%; padding: .9rem 0; }
  .header-tools { grid-column: 2; grid-row: 1; }
  .menu-toggle { grid-column: 3; grid-row: 1; }
  .fe-hero { grid-template-columns: 1fr; }
  .fe-dashboard, .fe-post-grid, .widget-area { grid-template-columns: 1fr; }
  .fe-panel + .fe-panel { border-left: 0; border-top: 1px solid var(--fe-line); }
}

@media (max-width: 560px) {
  .site-shell { width: 100%; margin: 0; border-left: 0; border-right: 0; }
  .site-header, .site-main, .widget-area, .site-footer { padding-left: 1rem; padding-right: 1rem; }
  .site-description { display: none; }
  .fe-date { float: none; display: block; margin-top: .5rem; }
  .site-footer { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-footer .fe-logo-mark { transform-origin: bottom left; }
}

.footer-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0 0 .7rem;
  padding: 0;
}
.footer-navigation a {
  color: inherit;
  font-size: .68rem;
  text-transform: uppercase;
  text-decoration: none;
}
.footer-navigation a:hover { color: var(--fe-accent); }

html[data-theme="dark"] .fe-hero-media,
html[data-theme="dark"] .fe-hero-media > div { background: #292a26 !important; }
html[data-theme="dark"] .fe-button:hover,
html[data-theme="dark"] .wp-block-button__link:hover,
html[data-theme="dark"] input[type="submit"]:hover {
  background: var(--fe-ink);
  color: var(--fe-bg);
}
